/* fwdr.link website: page layout on top of fwdr.css (tokens + components). */

html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--space-6); padding-right: var(--space-6); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--go); color: var(--on-go); padding: 8px 12px; }
.skip:focus { left: 8px; }
.small { font-size: 13px; }
.lead { font-size: 17px; line-height: 1.55; color: var(--ink-muted); max-width: 52ch; margin: 12px 0 0; }
h2.h1 { margin: 10px 0 0; }
h3.h3 { margin: 0 0 8px; }

/* Hero */
.hero { min-height: min(760px, 100vh); display: flex; flex-direction: column; }
.hero .fw-nav { background: transparent; border-bottom: 0; width: 100%; }
.hero .in { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-12); align-items: center; padding-top: var(--space-12); padding-bottom: var(--space-8); width: 100%; }
.kick { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
.hero .display { margin: 0; max-width: 12ch; }
.hero .sub { max-width: 44ch; margin: var(--space-6) 0 var(--space-8); color: var(--ink-muted); }
.micro { margin-top: var(--space-3); font-size: 13px; color: var(--ink-muted); }
.panel { background: color-mix(in srgb, var(--ground) 84%, transparent); backdrop-filter: blur(6px); }
.panel .fw-code__tabs { align-items: center; justify-content: space-between; padding: 6px 6px 6px 12px; }
.panel pre { background: transparent; min-height: 168px; white-space: pre-wrap; }
.panel pre .p { color: var(--ink-faint); }
.result { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding: var(--space-4); border-top: 1px solid var(--line); }
.result .slug { font-family: var(--font-pixel); font-size: 30px; line-height: 1; color: var(--ink); }
.result .slug .host { color: var(--ink-faint); }
.result .count { text-align: right; }
.result .count b { display: block; font-family: var(--font-pixel); font-weight: 400; font-size: 30px; line-height: 1; color: var(--go-ink); }
.hero > .bar { display: flex; justify-content: flex-end; padding-bottom: var(--space-6); width: 100%; }

/* Sections */
.sec { padding: 96px 0; border-top: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--space-12); align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-top: var(--space-8); }
.card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: var(--space-6); }
.card p { margin: 0; }
.also { margin-top: var(--space-6); color: var(--ink-muted); font-size: 14px; }
.also .fw-label { margin-right: 8px; }

/* Demo */
.demo { padding: var(--space-6); background: var(--surface); border-radius: var(--radius-md); }
.demo .step > p:first-child { margin-top: 0; }
.demo .row { display: grid; grid-template-columns: 32px 1fr; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.demo .row:first-child { padding-top: 0; }
.demo .grow { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.num { font: 400 22px/1 var(--font-pixel); color: var(--go-ink); }
.targets { display: flex; flex-wrap: wrap; gap: 6px; }
.targets button { all: unset; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-muted); }
.targets button:hover { color: var(--ink); border-color: var(--ink-muted); }
.targets button[aria-checked="true"] { color: var(--go-ink); border-color: var(--go); background: var(--go-soft); }
.targets button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.targets button[disabled] { opacity: .5; cursor: progress; }
.opened { display: flex; align-items: baseline; gap: 12px; }
.opened b { font: 400 44px/1 var(--font-pixel); color: var(--go-ink); }
.demo .foot { margin: var(--space-4) 0 0; }
.linkbtn { all: unset; cursor: pointer; color: var(--go-ink); text-decoration: underline; text-underline-offset: 3px; }
.key { display: block; margin-top: 6px; word-break: break-all; color: var(--ink); }
.err { color: var(--stop-ink); font-size: 14px; margin: 12px 0 0; }
#nowTarget { color: var(--ink); word-break: break-all; }

/* Steps */
.steps { list-style: none; padding: 0; margin: var(--space-8) 0 var(--space-6); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); background: var(--surface); min-width: 0; }
.steps li > div { min-width: 0; }
.steps b { display: block; margin-bottom: 8px; }
.steps p { margin: 0; }
.snip { margin: 0; padding: var(--space-3); background: var(--surface-raised); border-radius: var(--radius-sm); font: 400 12.5px/1.65 var(--font-mono); color: var(--ink); overflow-x: auto; white-space: pre; }
.snip .c { color: var(--ink-muted); }

/* Pricing */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin: var(--space-8) 0 var(--space-4); }
.price { display: flex; flex-direction: column; gap: 10px; }
.price.hl { border-color: color-mix(in srgb, var(--pay) 55%, var(--line)); }
.ph { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.amt { font: 400 44px/1 var(--font-pixel); color: var(--pay-ink); }
.amt small { font: 500 16px/1 var(--font-mono); margin: 0 4px; vertical-align: 6px; }
.price .fw-mono { margin-top: auto; color: var(--ink-muted); }

/* Safety + FAQ */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.checks li { border-left: 2px solid var(--go); padding: 4px 0 4px var(--space-4); color: var(--ink-muted); }
.checks b { color: var(--ink); font-weight: 600; }
.faq details { border-bottom: 1px solid var(--line); padding: var(--space-4) 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--ink-muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--ink-muted); margin: 10px 0 0; max-width: 60ch; }

/* Final */
.final .two { align-items: center; }
.small-d { font-size: clamp(36px, 5vw, 56px); margin: 0; max-width: 14ch; }
.stage { background: #0b0c09; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.stage video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* Header of every page (site.ts siteNav). Scoped to .site-nav: the operator board has its own bar (src/admin.ts). */
nav.site-nav.fw-nav { position: relative; z-index: 5; }
.site-nav .fw-nav__links a[aria-current="page"] { color: var(--ink); background: var(--surface-raised); }
.site-nav .nav-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.nav-menu { display: none; }
.nav-menu__btn { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); color: var(--ink); cursor: pointer; list-style: none; }
.nav-menu__btn::-webkit-details-marker { display: none; }
.nav-menu__btn:hover { background: var(--surface-raised); }
.nav-menu__btn .i-close, .nav-menu[open] .nav-menu__btn .i-open { display: none; }
.nav-menu[open] .nav-menu__btn .i-close { display: block; }
.nav-menu__panel { position: absolute; left: 0; right: 0; top: 100%; padding: var(--space-2) var(--space-4) var(--space-4); background: var(--ground); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: var(--lift); }
.nav-menu__links { list-style: none; margin: 0; padding: 0; }
.nav-menu__links a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-sm); color: var(--ink-muted); font-size: 16px; text-decoration: none; }
.nav-menu__links a:hover { color: var(--ink); background: var(--surface-raised); }
.nav-menu__links a[aria-current="page"] { color: var(--ink); background: var(--surface-raised); box-shadow: inset 2px 0 0 var(--go-ink); }
.nav-menu__actions { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }
.nav-menu__actions .fw-btn { --h: 44px; }
/* Five links, the logo and the two buttons (Get a test key, Sign in) need about 790px: below that the links fold into
   the menu. Down to 421px the bar keeps both buttons next to the menu button (checked at 421, 480, 560 and 700px). */
@media (max-width: 800px) {
  .site-nav.fw-nav { gap: var(--space-3); }
  .site-nav .fw-nav__links { display: none; }
  .nav-menu { display: block; }
}
@media (max-width: 420px) {
  .site-nav .nav-actions { display: none; } /* the button is in the menu */
  .site-nav .nav-menu { margin-left: auto; }
}

/* Breadcrumb and guide lists (site.ts guidePage, guidesIndexPage) */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--space-2); margin: 0 0 var(--space-2); padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: var(--space-2); color: var(--ink-faint); }
.crumbs a { color: var(--ink-muted); }
.crumbs a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.guide-list { list-style: none; margin: 0; padding: 0; }
.guide-list li { padding: var(--space-6) 0; border-top: 1px solid var(--line); }
.guide-list li:last-child { border-bottom: 1px solid var(--line); }
.guide-list .h3 { margin: 0 0 var(--space-2); }
.guide-list .h3 a { color: var(--ink); }
.guide-list p { margin: 0; color: var(--ink-muted); line-height: 1.6; }
.guide-list p.small { margin-top: var(--space-2); }
/* The changelog (/changelog): a heading per day, then its entries */
.change-day { margin-top: var(--space-8); }
.change-day > .h3 { margin: 0 0 var(--space-2); color: var(--ink-muted); font-size: 15px; }
.change { padding: var(--space-6) 0; border-top: 1px solid var(--line); }
.change p { margin: 0; color: var(--ink-muted); line-height: 1.6; }
.change .h3 { margin: var(--space-2) 0; color: var(--ink); scroll-margin-top: 24px; }
.change .h3:target { color: var(--go-ink); }
.change .change-links, .change .small { margin-top: var(--space-2); }
.change-links a { color: var(--ink); }
.more-guides { margin-top: var(--space-12); }
.more-guides > .h3 { margin: 0 0 var(--space-2); }

/* Footer: brand line, then four groups (4 columns from 900px, 2 from 480px, 1 below) */
footer.foot { display: grid; gap: var(--space-8); padding-top: var(--space-8); padding-bottom: var(--space-12); border-top: 1px solid var(--line); }
footer.foot .fw-logo { font-size: 17px; }
.foot-brand p { margin: var(--space-2) 0 0; }
.foot-nav { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
.foot-h { margin: 0 0 var(--space-2); }
.foot-group ul { list-style: none; margin: 0; padding: 0; }
.foot-group a { display: inline-block; padding: 6px 0; color: var(--ink-muted); text-decoration: none; font-size: 14px; }
.foot-group a:hover { color: var(--ink); }
@media (min-width: 480px) { .foot-nav { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .foot-nav { grid-template-columns: repeat(4, 1fr); } }

@media (max-width: 900px) {
  .wrap { padding-left: var(--space-4); padding-right: var(--space-4); }
  .hero .in, .two { grid-template-columns: 1fr; gap: var(--space-8); }
  .hero .in { padding-top: var(--space-6); }
  .hero .display { font-size: 46px; }
  .grid3, .prices, .steps { grid-template-columns: 1fr; }
  .sec { padding: 64px 0; }
  .result { flex-wrap: wrap; }
  .result .slug, .result .count b { font-size: 24px; }
  .result .count { text-align: left; }
  .hero > .bar { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .hero .display { font-size: 40px; }
  .demo { padding: var(--space-4); }
}
[hidden] { display: none !important; }

/* ── Scroll reveals: everything arrives from the bottom left, moving forward ── */
.reveal-on [data-reveal], .reveal-on [data-stagger] > * {
  opacity: 0; transform: translate(-36px, 36px);
  transition: opacity .7s var(--ease-fwd), transform 1s var(--ease-fwd);
  transition-delay: var(--d, 0ms);
}
.reveal-on [data-reveal].is-in, .reveal-on [data-stagger].is-in > * { opacity: 1; transform: none; }

/* ── Hero drifts up and to the right as you scroll away ── */
.hero .in { transform: translate(calc(var(--hp, 0) * 48px), calc(var(--hp, 0) * -72px)); opacity: calc(1 - var(--hp, 0) * .8); will-change: transform; }

/* ── Pinned stories: the section holds still while something travels bottom-left to top-right ── */
.story { position: relative; height: 360vh; border-top: 1px solid var(--line); }
.story[data-story="pay"], .story[data-story="safe"] { height: 320vh; }
.story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.story-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--space-12); align-items: center; width: 100%; }
.story-text > .fw-label { display: inline-flex; align-items: center; gap: 8px; }
.story-steps { list-style: none; padding: 0; margin: var(--space-8) 0 var(--space-6); display: flex; flex-direction: column; gap: 6px; }
.story-steps li { display: grid; grid-template-columns: 32px 1fr; gap: var(--space-3); padding: 12px 14px; border-left: 2px solid var(--line); color: var(--ink-faint); transition: color .4s var(--ease-fwd), border-color .4s var(--ease-fwd), background .4s var(--ease-fwd), transform .5s var(--ease-fwd); }
.story-steps li b { color: inherit; font-weight: 600; }
.story-steps li .num { color: var(--ink-faint); transition: color .4s; }
.story-steps li.on { color: var(--ink-muted); border-left-color: var(--go); background: color-mix(in srgb, var(--go) 6%, transparent); transform: translateX(6px); }
.story-steps li.on b { color: var(--ink); }
.story-steps li.on .num { color: var(--go-ink); }
.story-steps li.done { color: var(--ink-muted); border-left-color: color-mix(in srgb, var(--go) 40%, var(--line)); }
.story-bar { height: 2px; background: var(--line); }
.story-bar i { display: block; height: 100%; width: 0; background: var(--go); box-shadow: 0 0 12px var(--go); }
[data-story="pay"] .story-steps li.on { border-left-color: var(--pay); background: color-mix(in srgb, var(--pay) 7%, transparent); }
[data-story="pay"] .story-steps li.on .num { color: var(--pay-ink); }
[data-story="pay"] .story-bar i { background: linear-gradient(90deg, var(--pay), var(--go)); box-shadow: 0 0 12px var(--pay); }

.story-stage { position: relative; aspect-ratio: 1 / 1; max-height: 78vh; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-md); background: radial-gradient(120% 120% at 0% 100%, color-mix(in srgb, var(--go) 7%, transparent), transparent 55%), var(--surface); overflow: hidden; }
.st-pay { background: radial-gradient(120% 120% at 0% 100%, color-mix(in srgb, var(--pay) 8%, transparent), transparent 55%), var(--surface); }
.story-stage .track { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-stage .track line { stroke: var(--line-strong); stroke-width: 1.5px; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.story-stage .track line.lit { stroke: var(--go); stroke-dasharray: none; stroke-width: 2px; filter: drop-shadow(0 0 4px var(--go)); }
.st-pay[data-phase="1"] .track line.lit, .st-pay[data-phase="2"] .track line.lit { stroke: var(--pay); filter: drop-shadow(0 0 4px var(--pay)); }
.node { position: absolute; z-index: 2; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(4px); display: flex; flex-direction: column; gap: 6px; transition: opacity .6s var(--ease-fwd), transform .8s var(--ease-fwd), border-color .4s, box-shadow .4s; }
.node .line { font-size: 13px; color: var(--ink); white-space: nowrap; }
.node .small-line { font-size: 11px; color: var(--ink-muted); }
.node .ph { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.n-a { left: 5%; bottom: 6%; }
.n-b { left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: 56%; }
.n-c { right: 5%; top: 6%; text-align: right; align-items: flex-end; }
.slugbig { font: 400 clamp(22px, 2.6vw, 34px)/1 var(--font-pixel); color: var(--ink); white-space: nowrap; }
.slugbig .host { color: var(--ink-faint); }
.opens { display: flex; align-items: baseline; gap: 8px; }
.opens b { font: 400 clamp(28px, 3.4vw, 44px)/1 var(--font-pixel); color: var(--go-ink); min-width: 3ch; }
.is-on { border-color: var(--go) !important; box-shadow: var(--glow-go); }
.is-pay { border-color: var(--pay) !important; box-shadow: 0 0 0 1px var(--pay), 0 0 24px color-mix(in srgb, var(--pay) 35%, transparent); }
.is-hidden { opacity: 0 !important; }
.is-dim { opacity: .35; }
.pop { animation: pay-pop .8s var(--ease-fwd); }
@keyframes pay-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: none; opacity: 1; } }
.swap { animation: swap-in .7s var(--ease-fwd); }
@keyframes swap-in { from { opacity: 0; transform: translate(-16px, 16px); } to { opacity: 1; transform: none; } }
.packet { position: absolute; z-index: 1; left: 0; top: 0; width: 40px; height: 32px; margin: -16px 0 0 -20px; display: grid; place-items: center; transform: rotate(-45deg); filter: drop-shadow(0 0 8px var(--go)); pointer-events: none; transition: filter .3s; }
.packet.amber { filter: drop-shadow(0 0 10px var(--pay)) hue-rotate(-45deg) saturate(1.4); }

/* how */
.st-how .n-b.is-hidden { transform: translate(-80%, -20%) scale(.92); }
/* pay */
.st-pay .n-b { min-width: 50%; }
.code402 { font: 500 12px/1 var(--font-mono); color: var(--on-pay); background: var(--pay); padding: 4px 6px; border-radius: var(--radius-sm); }
.price-big { font: 400 clamp(30px, 3.6vw, 48px)/1 var(--font-pixel); color: var(--pay-ink); }
.price-big small { font: 500 14px/1 var(--font-mono); }
.n-w { right: 6%; bottom: 18%; }
.st-pay .n-c .ph .fw-label { color: var(--go-ink); }
/* safe */
.gate { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; transform: translate(-50%, -50%); padding: 6px 10px 6px 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--ground); white-space: nowrap; transition: border-color .4s, box-shadow .4s; }
.gate .tick { width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 3px; display: grid; place-items: center; }
.gate.ok { border-color: var(--go); box-shadow: var(--glow-go); }
.gate.ok .tick { background: var(--go); border-color: var(--go); }
.gate.ok .tick::after { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--on-go); border-bottom: 2px solid var(--on-go); transform: translateY(-1px) rotate(-45deg); }
.gate.ok .fw-label { color: var(--go-ink); }
.g1 { left: 31%; top: 69%; } .g2 { left: 50%; top: 50%; } .g3 { left: 69%; top: 31%; }
.n-x { left: 40%; bottom: 6%; border-color: var(--stop); }
.n-x .fw-label { color: var(--stop-ink); }
.n-x .line:not(.small-line) { text-decoration: line-through; text-decoration-color: var(--stop); }

/* streaming chevrons, bottom-left to top-right */
.stream { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.stream i { position: absolute; left: var(--x); top: var(--y); width: 8px; height: 10px; background: var(--go); opacity: 0; clip-path: polygon(0 0, 42% 0, 100% 50%, 42% 100%, 0 100%, 58% 50%); animation: drift var(--t, 5s) linear infinite; animation-delay: var(--dl, 0s); }
.stream i.p { background: var(--pay); }
@keyframes drift {
  0% { transform: translate(0, 0) rotate(-45deg); opacity: 0; }
  12% { opacity: .55; }
  80% { opacity: .35; }
  100% { transform: translate(180px, -180px) rotate(-45deg); opacity: 0; }
}

/* ── Dividers: a band of chevrons that moves with the scroll, pushing the next section forward ── */
.flow { position: relative; height: 56px; overflow: hidden; border-top: 1px solid var(--line); }
.flow + .sec { border-top: 0; }
.flow-track { position: absolute; inset: -40px -200px; transform: rotate(-3deg) translateX(var(--fx, 0px)); will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cpath d='M2 2h3l6 6-6 6H2l6-6zM14 2h3l6 6-6 6h-3l6-6z' fill='%23c6f23c' fill-opacity='.55'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: 0 50%; background-size: 48px 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }

/* Legal pages */
.legal .fw-nav { border-bottom: 1px solid var(--line); }
.doc { padding-top: var(--space-12); padding-bottom: var(--space-12); max-width: 820px; }
.doc-head { margin-bottom: var(--space-8); }
.doc-head .h1 { margin: 10px 0 0; }
.prose h2 { font-size: 19px; line-height: 1.3; margin: 36px 0 10px; scroll-margin-top: 24px; }
.prose p, .prose li { color: var(--ink-muted); line-height: 1.7; }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose code { font: 13px var(--font-mono); background: var(--surface-raised); padding: 2px 6px; border-radius: var(--radius-sm); color: var(--ink); }
.prose h2:target { color: var(--go-ink); }
/* Guides: headings, code blocks and tables written in Markdown */
.prose h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 10px 0 18px; }
.prose h3 { font-size: 16px; line-height: 1.35; margin: 24px 0 6px; }
.prose a { color: var(--ink); }
.prose pre { overflow-x: auto; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.prose pre code { background: none; padding: 0; font-size: 13px; line-height: 1.6; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; color: var(--ink-muted); }
.prose th { color: var(--ink); font-weight: 600; white-space: nowrap; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.tbl table { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-muted); vertical-align: top; }
.tbl th { font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.tbl tr:last-child td { border-bottom: 0; }

@media (max-width: 900px) {
  .story, .story[data-story="pay"], .story[data-story="safe"] { height: 300vh; }
  .story-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .story-stage { order: -1; aspect-ratio: auto; height: 46svh; max-height: none; }
  .story-text .h1 { font-size: 26px; }
  .story-steps { margin: var(--space-3) 0; }
  .story-steps li { display: none; padding: 8px 10px; }
  .story-steps li.on { display: grid; transform: none; }
  .node { padding: 8px 10px; }
  .node .line { font-size: 11px; }
  .n-b { min-width: 72%; }
  .gate { padding: 4px 8px 4px 4px; }
  .gate .fw-label { font-size: 9px; }
  .n-w { bottom: 22%; }
  .flow { height: 40px; }
  .n-x { left: auto; right: 4%; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-on [data-reveal], .reveal-on [data-stagger] > * { transform: none; transition: opacity .3s; }
  .hero .in { transform: none; opacity: 1; }
  .story, .story[data-story="pay"], .story[data-story="safe"] { height: auto; }
  .story-pin { position: static; height: auto; padding: 96px 0; }
  .story-steps li { display: grid; color: var(--ink-muted); }
  .story-steps li b { color: var(--ink); }
  .stream { display: none; }
  .flow-track { transform: rotate(-3deg); }
}

/* QR code generator (/qr-code-generator, public/static/qr.js) */
.qr-tool { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-8); padding: var(--space-6); margin: var(--space-6) 0 var(--space-8); background: var(--surface); border-radius: var(--radius-md); }
.qr-form { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.qr-form .fw-help { margin: 0; }
.qr-text { height: auto; min-height: 88px; padding: 10px var(--space-3); line-height: 1.5; resize: vertical; }
.qr-file { height: auto; padding: 8px; }
.qr-color { padding: 4px; cursor: pointer; }
.qr-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-3); }
.qr-clear { align-self: flex-start; }
.qr-out { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.qr-preview { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); padding: var(--space-4); }
.qr-preview img { width: 100%; height: auto; max-width: 320px; image-rendering: pixelated; }
.qr-out .err { margin: 0; }
@media (max-width: 760px) {
  .qr-tool { grid-template-columns: 1fr; padding: var(--space-4); }
}
