/*
 * SteadyTLS www — the static marketing site (Cloudflare Pages, no build step).
 * Same "soft × brutal" look as the app (web/theme/soft-brutal.css): warm ground, 2px ink outlines,
 * hard shadows that mean "press this" or "look here". Every animation has a still version under
 * prefers-reduced-motion, and nothing animated carries information on its own.
 */

@font-face {
  font-family: "Jakarta";
  src: url("/assets/fonts/jakarta-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root,
.island {
  --bg: #f4efe6;
  --surface: #ffffff;
  --surface-2: #faf6ef;
  --fg: #16140f;
  --muted: #4f483d;
  --ink: #16140f;
  --line: #e6dfd0;
  --hard: #16140f;
  --brand: #086e5c;
  --ok: #136b35;
  --warn: #8a5500;
  --crit: #ad2a17;
  --info: #2450c0;
}
.island { --brand: #04463a; color: var(--fg); }

:root {
  color-scheme: light;
  --on-candy: #16140f;
  --candy-line: #16140f;
  --accent: #2ee6c5;
  --sun: #ffd43b;
  --ok-candy: #a8edc1;
  --crit-candy: #ffae9e;
  --info-candy: #c3d6ff;
  --off-candy: #e4ddcf;
  --brand-soft: #d4f6eb;
  --crit-soft: #ffdcd3;
  --sun-soft: #fff0c2;
  --info-soft: #e0e9ff;

  --font: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --r-md: 0.75rem;
  --r-lg: 1.25rem;
  --r-xl: 1.75rem;
  --sh-sm: 2px 2px 0 0 var(--hard);
  --sh: 4px 4px 0 0 var(--hard);
  --sh-lg: 6px 6px 0 0 var(--hard);
  --bounce: cubic-bezier(0.2, 1.5, 0.35, 1);
  --max: 72rem;
  /* Terminal-style panels stay dark in both themes so their colored text keeps its contrast. */
  --term-bg: #16140f;
  --term-fg: #f4efe6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121117;
    --surface: #1c1b23;
    --surface-2: #25242e;
    --fg: #f6f2ea;
    --muted: #b2adba;
    --ink: #efe9dd;
    --line: #37353f;
    --hard: #efe9dd;
    --brand: #5cf2d6;
    --ok: #7deaa3;
    --warn: #ffd257;
    --crit: #ff9785;
    --info: #a8c2ff;
    --brand-soft: #1d3a35;
    --crit-soft: #3d2420;
    --sun-soft: #3a3218;
    --info-soft: #1f2840;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121117;
  --surface: #1c1b23;
  --surface-2: #25242e;
  --fg: #f6f2ea;
  --muted: #b2adba;
  --ink: #efe9dd;
  --line: #37353f;
  --hard: #efe9dd;
  --brand: #5cf2d6;
  --ok: #7deaa3;
  --warn: #ffd257;
  --crit: #ff9785;
  --info: #a8c2ff;
  --brand-soft: #1d3a35;
  --crit-soft: #3d2420;
  --sun-soft: #3a3218;
  --info-soft: #1f2840;
}
/* Islands keep light neutrals in dark mode so candy fills stay loud. */
.island {
  --bg: #f4efe6; --surface: #fff; --surface-2: #faf6ef; --fg: #16140f; --muted: #4f483d;
  --ink: #16140f; --line: #e6dfd0; --hard: #16140f;
  --brand-soft: #d4f6eb; --crit-soft: #ffdcd3; --sun-soft: #fff0c2; --info-soft: #e0e9ff;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd, pre { font-family: var(--mono); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-candy); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; }
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.center { text-align: center; }

/* Grid items default to min-width:auto, so one wide code block would stretch the column past the screen. */
.timeline, .tx, .tx-steps, .tx-out, .lifetimes, .faq, .demo-body, .kv, .check-list { grid-template-columns: minmax(0, 1fr); }

/* ---------- Pieces ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.6rem 1.15rem;
  border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 700; font-size: 0.9375rem; text-decoration: none; white-space: nowrap;
  background: var(--surface); color: var(--fg);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--sh); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn-primary { background: var(--accent); color: var(--on-candy); border-color: var(--candy-line); box-shadow: var(--sh-sm); }
.btn-primary:hover { box-shadow: var(--sh-lg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { border-color: var(--ink); box-shadow: none; transform: none; }
.btn-lg { min-height: 3.25rem; padding: 0.8rem 1.6rem; font-size: 1.0625rem; }

.card {
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-lg);
  padding: 1.5rem; color: var(--fg);
}
:where(.card) h3 { font-size: 1.125rem; }
:where(.card) p { margin-top: 0.5rem; color: var(--muted); font-size: 0.9375rem; }
.card.lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card.lift:hover { transform: translate(-3px, -3px); box-shadow: var(--sh-lg); }

.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.75rem; border: 2px solid var(--candy-line); border-radius: 999px;
  font-size: 0.8125rem; font-weight: 800; color: var(--on-candy); background: var(--accent);
  white-space: nowrap;
}
.sticker { box-shadow: var(--sh-sm); }
.c-accent { background: var(--accent); }
.c-sun { background: var(--sun); }
.c-ok { background: var(--ok-candy); }
.c-crit { background: var(--crit-candy); }
.c-info { background: var(--info-candy); }
.c-off { background: var(--off-candy); }
.t-brand { background: var(--brand-soft); }
.t-crit { background: var(--crit-soft); }
.t-sun { background: var(--sun-soft); }
.t-info { background: var(--info-soft); }

.mark {
  background-image: linear-gradient(var(--mark, var(--accent)), var(--mark, var(--accent)));
  background-repeat: no-repeat; background-position: 0 90%; background-size: 100% 0.22em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.mark-sun { --mark: var(--sun); }
.mark-crit { --mark: var(--crit-candy); }

.link { color: var(--brand); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.link:hover { text-decoration-color: currentColor; }

/* ---------- Header ---------- */

.header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}
.header .wrap { display: flex; align-items: center; gap: 1rem; height: 4.25rem; }
.logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.02em; text-decoration: none; }
.logo svg { width: 1.75rem; height: 1.75rem; color: var(--brand); }
.nav { display: none; gap: 0.25rem; margin-left: 1rem; }
.nav a { padding: 0.4rem 0.85rem; border: 2px solid transparent; border-radius: 999px; font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--fg); border-color: var(--ink); }
.nav a[aria-current="page"] { color: var(--on-candy); background: var(--accent); border-color: var(--candy-line); }
.header-cta { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.header-cta .btn { min-height: 2.5rem; padding: 0.45rem 1rem; font-size: 0.875rem; }
.signin { display: none; }
.menu-btn { display: inline-flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); }
.menu-btn svg { width: 1.25rem; height: 1.25rem; }
.mobile-nav { display: none; border-top: 2px solid var(--ink); }
.mobile-nav[data-open] { display: block; }
.mobile-nav a { display: block; padding: 0.85rem 1rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .signin { display: inline-flex; } }
@media (min-width: 900px) {
  .nav { display: flex; }
  .menu-btn, .mobile-nav, .mobile-nav[data-open] { display: none; }
}
.progress { position: absolute; left: 0; right: 0; bottom: -2px; height: 4px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); display: none; }
@supports (animation-timeline: scroll()) {
  .progress { display: block; animation: grow linear both; animation-timeline: scroll(root block); }
}
@keyframes grow { to { transform: scaleX(1); } }

/* ---------- Sections ---------- */

.section { padding: 4.5rem 0; }
@media (min-width: 768px) { .section { padding: 6rem 0; } }
.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; }
.eyebrow { transform: rotate(-2deg); margin-bottom: 1rem; box-shadow: var(--sh-sm); }
.h2 { font-size: clamp(1.875rem, 4.2vw, 2.75rem); font-weight: 800; }
.lead { margin-top: 1rem; font-size: 1.125rem; color: var(--muted); }

.band { background: var(--surface-2); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.band-accent { background: var(--accent); color: var(--on-candy); }
.inverse { background: var(--ink); color: var(--bg); }
.inverse .muted { color: color-mix(in srgb, var(--bg) 75%, transparent); }

/* Torn-ticket edges. */
.zz-top, .zz-bottom { position: relative; --zz: 14px; }
.zz-top::before, .zz-bottom::after { content: ""; position: absolute; left: 0; right: 0; height: var(--zz); background: inherit; pointer-events: none; }
.zz-top::before { bottom: calc(100% - 1px); -webkit-mask: conic-gradient(from -45deg at bottom, #0000 0 90deg, #000 0) 50% / calc(2 * var(--zz)) 100%; mask: conic-gradient(from -45deg at bottom, #0000 0 90deg, #000 0) 50% / calc(2 * var(--zz)) 100%; }
.zz-bottom::after { top: calc(100% - 1px); -webkit-mask: conic-gradient(from 135deg at top, #0000 0 90deg, #000 0) 50% / calc(2 * var(--zz)) 100%; mask: conic-gradient(from 135deg at top, #0000 0 90deg, #000 0) 50% / calc(2 * var(--zz)) 100%; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; }
.hero-dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 22%, transparent) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%);
}
.hero .wrap { position: relative; display: grid; gap: 3.5rem; align-items: center; padding-top: 3rem; padding-bottom: 4.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; padding-top: 5rem; padding-bottom: 6rem; } }
.pill { display: inline-flex; padding: 0.3rem 0.9rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); font-size: 0.8125rem; font-weight: 700; margin-bottom: 1.25rem; }
.h1 { font-size: clamp(2.35rem, 6.2vw, 4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; }
.h1 .stamp-word {
  display: inline-block; margin-top: 0.35rem; padding: 0 0.6rem 0.12rem; transform: rotate(-1.5deg);
  border: 2px solid var(--candy-line); border-radius: 1rem; background: var(--sun); color: var(--on-candy); box-shadow: var(--sh);
}
.hero-lead { margin-top: 1.5rem; max-width: 36rem; font-size: 1.15rem; color: var(--muted); }
.ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 479px) { .ctas .btn { width: 100%; } }

.launch-note { display: flex; align-items: center; gap: 0.6rem; margin-top: 1.75rem; font-size: 0.95rem; font-weight: 700; }
.launch-note .pulse { flex-shrink: 0; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--ok); }
@media (prefers-reduced-motion: no-preference) { .launch-note .pulse { animation: blink 1.6s ease-in-out infinite; } }
.trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.5rem; font-size: 0.875rem; color: var(--muted); }
.trust span::before { content: "✓"; margin-right: 0.4rem; color: var(--brand); font-weight: 800; }

/* The live demo card in the hero. */
.demo-wrap { position: relative; }
.demo { position: relative; padding: 0; overflow: hidden; box-shadow: var(--sh-lg); }
.demo-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 1rem; border-bottom: 2px solid var(--ink); background: var(--surface-2); font-size: 0.78rem; font-weight: 700; }
.demo-bar i { width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid var(--ink); }
.demo-bar i:nth-child(1) { background: var(--crit-candy); }
.demo-bar i:nth-child(2) { background: var(--sun); }
.demo-bar i:nth-child(3) { background: var(--ok-candy); }
.demo-bar span { margin-left: 0.5rem; color: var(--muted); }
.demo-body { padding: 1.25rem; display: grid; gap: 1.1rem; }
.cert-row { display: flex; align-items: center; gap: 1rem; }
.ring { position: relative; flex-shrink: 0; width: 5.25rem; height: 5.25rem; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--line); }
.ring .meter { stroke: var(--crit); transition: stroke-dashoffset 1.1s var(--bounce), stroke 0.4s ease; }
.ring[data-state="ok"] .meter { stroke: var(--ok); }
.ring[data-state="warn"] .meter { stroke: var(--warn); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring-label b { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-label small { font-size: 0.65rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.15rem; }
.cert-meta { min-width: 0; }
.cert-meta .dom { font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cert-meta .srv { font-size: 0.82rem; color: var(--muted); }
.status { margin-top: 0.4rem; }
.status .chip { font-size: 0.72rem; padding: 0.1rem 0.6rem; transition: background-color 0.3s ease; }

.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem; }
.pipeline li { position: relative; display: grid; justify-items: center; gap: 0.35rem; font-size: 0.68rem; font-weight: 700; color: var(--muted); text-align: center; }
.pipeline .dot { width: 2rem; height: 2rem; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 0.8rem; transition: all 0.3s ease; }
.pipeline li::before { content: ""; position: absolute; top: 1rem; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; transform: translateX(-1rem); }
.pipeline li:first-child::before { display: none; }
.pipeline li > * { position: relative; z-index: 1; }
.pipeline li[data-s="run"] .dot { border-color: var(--ink); background: var(--sun); color: var(--on-candy); animation: pulse 0.9s ease-in-out infinite; }
.pipeline li[data-s="done"] .dot { border-color: var(--candy-line); background: var(--ok-candy); color: var(--on-candy); }
.pipeline li[data-s="done"]::before, .pipeline li[data-s="run"]::before { background: var(--ink); }
.pipeline li[data-s="run"], .pipeline li[data-s="done"] { color: var(--fg); }

.log { height: 8.6rem; overflow: hidden; padding: 0.8rem 0.9rem; border-radius: var(--r-md); background: var(--term-bg); color: var(--term-fg); font-family: var(--mono); font-size: 0.74rem; line-height: 1.6; }
.log p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: line-in 0.25s ease-out; }
.log .t { opacity: 0.55; margin-right: 0.5rem; }
.log .ok { color: var(--accent); }
.log .warn { color: var(--sun); }
.demo-stamp {
  position: absolute; right: 1.25rem; top: 4.4rem; padding: 0.25rem 0.75rem; border: 3px solid var(--ok); border-radius: 0.5rem;
  color: var(--ok); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
  transform: rotate(-12deg) scale(2.2); opacity: 0; pointer-events: none; background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.demo-stamp[data-on] { opacity: 1; transform: rotate(-12deg) scale(1); transition: transform 0.35s var(--bounce), opacity 0.15s ease; }
.float-sticker { position: absolute; z-index: 2; }
.fs-1 { top: -1rem; left: -0.75rem; transform: rotate(-6deg); }
.fs-2 { bottom: -1.1rem; right: 1.5rem; transform: rotate(3deg); }
@media (max-width: 639px) { .float-sticker { display: none; } }

/* ---------- Ticker ---------- */

.ticker { overflow: hidden; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--surface); }
.ticker-track { display: flex; width: max-content; gap: 2rem; padding: 0.8rem 1rem; }
.ticker-item { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; white-space: nowrap; }
.ticker-item .chip { font-size: 0.72rem; }

/* ---------- "The gap" explainer ---------- */

.gap-demo { display: grid; gap: 1.25rem; align-items: stretch; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .gap-demo { grid-template-columns: 1fr auto 1fr; } }
.gap-col h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.75rem; }
.mini-cert { display: flex; align-items: center; gap: 0.9rem; padding: 1rem; border: 2px solid var(--ink); border-radius: var(--r-md); background: var(--surface); transition: background-color 0.4s ease; }
.mini-cert + .mini-cert { margin-top: 0.75rem; }
.mini-cert .ic { flex-shrink: 0; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border: 2px solid var(--candy-line); border-radius: 0.6rem; color: var(--on-candy); font-weight: 800; }
.mini-cert b { display: block; font-size: 0.95rem; }
.mini-cert span { font-size: 0.82rem; color: var(--muted); }
.gap-link { display: grid; place-items: center; min-height: 4rem; }
.gap-link svg { width: 7rem; height: 3rem; }
@media (max-width: 899px) { .gap-link svg { transform: rotate(90deg); } }
.gap-link .wire { stroke: var(--ink); stroke-width: 3; fill: none; stroke-dasharray: 6 6; }
.gap-link .break { stroke: var(--crit); stroke-width: 3; stroke-linecap: round; transition: opacity 0.3s ease; }
.gap-demo[data-fixed] .gap-link .break { opacity: 0; }
.gap-demo[data-fixed] .gap-link .wire { stroke: var(--ok); stroke-dasharray: none; }
.visitor { margin-top: 0.75rem; padding: 0.9rem 1rem; border: 2px dashed var(--ink); border-radius: var(--r-md); font-size: 0.88rem; }
.visitor .url { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.7rem; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); font-family: var(--mono); font-size: 0.78rem; }
.visitor .lock { width: 0.9rem; height: 0.9rem; flex-shrink: 0; color: var(--crit); }
.gap-demo[data-fixed] .visitor .lock { color: var(--ok); }
.visitor p { margin-top: 0.6rem; }
.switch { display: inline-grid; grid-template-columns: 1fr 1fr; position: relative; padding: 0.25rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); box-shadow: var(--sh-sm); }
.switch button { position: relative; z-index: 1; padding: 0.4rem 1.1rem; border: 0; background: none; border-radius: 999px; font-weight: 700; font-size: 0.875rem; color: var(--muted); }
.switch button[aria-pressed="true"], .switch button[aria-checked="true"] { color: var(--on-candy); }
.switch .knob { position: absolute; top: 0.25rem; bottom: 0.25rem; left: 0.25rem; width: calc(50% - 0.25rem); border: 2px solid var(--candy-line); border-radius: 999px; background: var(--accent); transition: transform 0.35s var(--bounce); }
.switch[data-right] .knob { transform: translateX(100%); }

/* ---------- Steps ---------- */

.steps { counter-reset: s; }
.steps li { position: relative; }
.steps .num { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem; }

/* Vertical timeline that fills as you scroll (how-it-works). */
.timeline { position: relative; display: grid; gap: 2rem; padding-left: 3.75rem; }
.timeline::before { content: ""; position: absolute; left: 1.3rem; top: 0.5rem; bottom: 0.5rem; width: 3px; border-radius: 3px; background: var(--line); }
.timeline .fill { position: absolute; left: 1.3rem; top: 0.5rem; width: 3px; border-radius: 3px; background: var(--brand); height: 0; }
.timeline > li { position: relative; }
.timeline .num { position: absolute; left: -3.75rem; top: 0; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--surface); font-weight: 800; transition: background-color 0.3s ease, color 0.3s ease; }
.timeline > li.lit .num { background: var(--accent); color: var(--on-candy); border-color: var(--candy-line); }
.timeline h3 { font-size: 1.25rem; padding-top: 0.4rem; }
.timeline p { margin-top: 0.5rem; color: var(--muted); max-width: 40rem; }
.timeline .detail { margin-top: 0.9rem; }

/* ---------- Comparison ---------- */

.table-card { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 36rem; }
th, td { text-align: left; padding: 0.95rem 1.25rem; vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); }
tbody tr + tr { border-top: 1px solid var(--line); }
tbody th { font-weight: 800; }
td.no { color: var(--muted); }
td.yes { font-weight: 600; }
td.yes::before { content: "✓ "; color: var(--brand); font-weight: 800; }

/* ---------- 47-day explainer ---------- */

.lifetimes { display: grid; gap: 0.9rem; }
.lt { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: 1rem; }
.lt-label { font-weight: 800; font-size: 0.9rem; line-height: 1.2; }
.lt-label small { display: block; font-weight: 600; color: var(--muted); font-size: 0.75rem; }
.lt-bar { position: relative; height: 2.6rem; border: 2px solid var(--ink); border-radius: 0.7rem; background: var(--surface); overflow: hidden; }
.lt-fill { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--c, var(--accent)); border-right: 2px solid var(--ink); display: flex; align-items: center; justify-content: flex-end; padding-right: 0.7rem; font-weight: 800; font-size: 0.85rem; color: var(--on-candy); white-space: nowrap; }
.lt-fill.tiny { justify-content: flex-start; padding-left: calc(100% + 0.6rem); color: var(--fg); }
.calc { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 900px) { .calc { grid-template-columns: 1.1fr 1fr; } }
.calc label { display: block; font-weight: 700; margin-bottom: 0.6rem; }
.calc output { font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--brand); height: 1.75rem; }
.big-num { color: var(--fg); font-size: clamp(2.5rem, 6vw, 3.75rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat { padding: 1.1rem; border: 2px solid var(--ink); border-radius: var(--r-md); background: var(--surface); }
.stat small { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-top: 0.4rem; }

/* ---------- Environments ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.tags li { padding: 0.45rem 1rem; border: 2px solid var(--candy-line); border-radius: 999px; font-weight: 700; font-size: 0.875rem; color: var(--on-candy); }

/* ---------- Architecture diagram ---------- */

.arch { display: grid; gap: 1rem; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .arch { grid-template-columns: 1fr 9rem 1fr 9rem 1fr; } }
.node { padding: 1.25rem; border: 2px solid var(--ink); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh); }
.node h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 0.5rem; }
.node ul { margin-top: 0.7rem; display: grid; gap: 0.35rem; font-size: 0.86rem; color: var(--muted); }
.node ul li::before { content: "•"; color: var(--brand); font-weight: 800; margin-right: 0.45rem; }
.wire-h { position: relative; height: 3.5rem; display: grid; place-items: center; }
.wire-h .line { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 16px); }
.wire-h .lbl { position: absolute; top: -0.4rem; left: 50%; transform: translateX(-50%); font-size: 0.7rem; font-weight: 800; white-space: nowrap; padding: 0.05rem 0.5rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--sun); color: var(--on-candy); }
@media (max-width: 899px) {
  .wire-h { height: 4rem; }
  .wire-h .line { left: 50%; right: auto; top: 0; bottom: 0; width: 3px; height: auto; margin: 0 0 0 -1.5px; background: repeating-linear-gradient(180deg, var(--ink) 0 8px, transparent 8px 16px); }
  .wire-h .lbl { top: 50%; left: calc(50% + 1rem); transform: translateY(-50%); }
}

/* ---------- Transaction simulator ---------- */

.tx { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .tx { grid-template-columns: 1fr 1fr; } }
.tx-steps { display: grid; gap: 0.6rem; }
.tx-steps li { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 1rem; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-weight: 700; font-size: 0.92rem; transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.3s var(--bounce); }
.tx-steps .ic { width: 1.75rem; height: 1.75rem; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); font-size: 0.8rem; }
.tx-steps li small { margin-left: auto; font-weight: 600; color: var(--muted); font-size: 0.78rem; text-align: right; }
.tx-steps li[data-s="run"] { border-color: var(--ink); transform: translateX(6px); }
.tx-steps li[data-s="run"] .ic { background: var(--sun); border-color: var(--ink); animation: pulse 0.9s infinite; }
.tx-steps li[data-s="done"] { border-color: var(--ink); }
.tx-steps li[data-s="done"] .ic { background: var(--ok-candy); border-color: var(--candy-line); color: var(--on-candy); }
.tx-steps li[data-s="fail"] { border-color: var(--crit); background: var(--crit-soft); }
.tx-steps li[data-s="fail"] .ic { background: var(--crit-candy); border-color: var(--candy-line); color: var(--on-candy); }
.tx-steps li[data-s="undo"] { border-color: var(--info); background: var(--info-soft); }
.tx-steps li[data-s="undo"] .ic { background: var(--info-candy); border-color: var(--candy-line); color: var(--on-candy); }
.tx-out { display: grid; align-content: start; gap: 1rem; }
.tx-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.result { padding: 1.1rem 1.25rem; border: 2px solid var(--ink); border-radius: var(--r-md); background: var(--surface); min-height: 7.5rem; }
.result h4 { font-size: 1rem; }
.result p { margin-top: 0.4rem; font-size: 0.9rem; color: var(--muted); }
.result[data-kind="ok"] { background: var(--brand-soft); }
.result[data-kind="fail"] { background: var(--info-soft); }

/* ---------- Ticket flow (MSP) ---------- */

.flow { display: grid; gap: 0.9rem; }
.flow li { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0.9rem; align-items: start; }
.flow .ic { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 2px solid var(--candy-line); border-radius: 0.8rem; color: var(--on-candy); font-weight: 800; }
.flow b { display: block; }
.flow span { font-size: 0.88rem; color: var(--muted); }

.report { position: relative; padding: 1.5rem; border: 2px solid var(--ink); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-lg); transform: rotate(1.2deg); }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 2px solid var(--ink); }
.report-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; }
.report-brand i { width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; background: #7c3aed; border: 2px solid var(--candy-line); }
.report h4 { margin-top: 1rem; font-size: 1.35rem; }
.report .rows { margin-top: 1rem; display: grid; gap: 0.5rem; font-size: 0.88rem; }
.report .rows div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.75rem; border-radius: 0.6rem; background: var(--surface-2); }
.bars { display: flex; align-items: flex-end; gap: 0.35rem; height: 4.5rem; margin-top: 1rem; }
.bars i { flex: 1; border: 2px solid var(--ink); border-bottom: 0; border-radius: 0.35rem 0.35rem 0 0; background: var(--accent); height: var(--h); transform-origin: bottom; }

/* ---------- Pricing ---------- */

.plans { display: grid; gap: 1.25rem; align-items: center; margin-top: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); } .plan { padding: 1.5rem; } }
.plan { position: relative; display: flex; flex-direction: column; padding: 1.75rem; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.plan:hover { transform: translate(-3px, -3px); box-shadow: var(--sh-lg); }
.plan.pop { box-shadow: var(--sh-lg); background: var(--brand-soft); }
@media (min-width: 900px) { .plan.pop { padding-top: 2.5rem; padding-bottom: 2.5rem; } }
.plan .badge { position: absolute; top: -1rem; right: 1.25rem; transform: rotate(3deg); }
.plan h3 { font-size: 1.3rem; }
.plan .desc { margin-top: 0.3rem; color: var(--muted); font-size: 0.9rem; }
.price { color: var(--fg); margin-top: 1.25rem; font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.price small { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.saving { min-height: 1.75rem; margin-top: 0.6rem; font-size: 0.85rem; color: var(--muted); }
.plan ul { margin-top: 1.25rem; flex: 1; display: grid; gap: 0.55rem; font-size: 0.92rem; align-content: start; }
.plan ul li { display: flex; gap: 0.55rem; }
.plan ul li::before { content: "✓"; color: var(--brand); font-weight: 800; }
.plan ul li.head { font-weight: 800; }
.plan .btn { margin-top: 1.5rem; width: 100%; }
.plan .addon { margin-top: 1.25rem; padding-top: 1rem; border-top: 2px solid var(--ink); font-size: 0.8rem; color: var(--muted); }
.period { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem; }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 0.75rem; max-width: 48rem; }
.faq details { border: 2px solid var(--ink); border-radius: var(--r-md); background: var(--surface); }
.faq details[open] { box-shadow: var(--sh); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; font-weight: 800; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 2px solid var(--ink); border-radius: 50%; font-weight: 800; transition: transform 0.3s var(--bounce); }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--accent); color: var(--on-candy); }
.faq .a { padding: 0 1.25rem 1.1rem; color: var(--muted); }
.faq .a p + p { margin-top: 0.6rem; }

/* ---------- CTA + footer ---------- */

.callout { position: relative; padding: 3.5rem 1.5rem; border: 2px solid var(--ink); border-radius: var(--r-xl); background: var(--sun); color: var(--on-candy); text-align: center; box-shadow: var(--sh-lg); }
.callout p { max-width: 34rem; margin: 1rem auto 0; font-size: 1.1rem; color: #3b352b; }
.callout .ctas { justify-content: center; }
.callout .btn { border-color: var(--candy-line); }
.callout .btn:not(.btn-primary) { background: #fff; color: #16140f; }
.callout .btn:hover { box-shadow: 4px 4px 0 0 #16140f; }

.seal { position: absolute; width: 7rem; height: 7rem; top: -3.25rem; right: -0.5rem; filter: drop-shadow(3px 3px 0 var(--hard)); }
@media (min-width: 640px) { .seal { right: -1.5rem; width: 8rem; height: 8rem; } }
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal-spin { transform-origin: 60px 60px; }

.footer { margin-top: 7rem; }
.footer .cols { display: grid; gap: 2rem; padding: 3.5rem 0 2rem; font-size: 0.9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .footer .cols { grid-template-columns: 2fr repeat(3, 1fr); } }
.footer .cols > div:first-child { grid-column: 1 / -1; }
@media (min-width: 768px) { .footer .cols > div:first-child { grid-column: auto; } }
.footer h4 { font-size: 0.9rem; margin-bottom: 0.75rem; }
.footer a { display: block; width: fit-content; text-decoration: none; opacity: 0.8; padding: 0.15rem 0; }
.footer a:hover { opacity: 1; text-decoration: underline; }
.footer .logo { display: inline-flex; opacity: 1; }
.footer .logo svg { color: var(--accent); }
.footer .base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; padding-bottom: 1.5rem; font-size: 0.8rem; opacity: 0.8; }
.theme-btn { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1rem; padding: 0.35rem 0.9rem; border: 2px solid currentColor; border-radius: 999px; background: none; font-size: 0.8rem; font-weight: 700; }
.wordmark { overflow: hidden; }
.wordmark p { font-size: min(19vw, 13.5rem); line-height: 0.8; font-weight: 800; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 2px var(--bg); opacity: 0.35; text-align: center; user-select: none; margin-bottom: -0.05em; }

/* Inner page intro. */
.page-intro { padding: 4rem 0 1rem; }
@media (min-width: 768px) { .page-intro { padding: 5.5rem 0 1.5rem; } }
.page-intro .lead { max-width: 44rem; }

.check-list { display: grid; gap: 0.6rem; }
.check-list li { display: flex; gap: 0.6rem; }
.check-list li::before { content: "✓"; color: var(--brand); font-weight: 800; }

.kv { display: grid; gap: 0.75rem; }
.kv div { display: grid; gap: 0.25rem; padding: 1rem 1.25rem; border: 2px solid var(--ink); border-radius: var(--r-md); background: var(--surface); }
@media (min-width: 768px) { .kv div { grid-template-columns: 14rem minmax(0, 1fr); gap: 1.25rem; } }
.kv dt { font-weight: 800; }
.kv dd { margin: 0; color: var(--muted); }

.code-card { padding: 1rem 1.15rem; border: 2px solid var(--ink); border-radius: var(--r-md); background: var(--term-bg); color: var(--term-fg); font-family: var(--mono); font-size: 0.8rem; line-height: 1.7; overflow-x: auto; white-space: pre; }
.code-card .c { opacity: 0.55; }
.code-card .k { color: var(--accent); }
.code-card .s { color: var(--sun); }

/* ---------- Motion ---------- */

@keyframes pulse { 50% { transform: scale(1.12); } }
@keyframes line-in { from { opacity: 0; transform: translateX(-6px); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes march { to { stroke-dashoffset: -32; } }
@keyframes march-x { to { background-position: 16px 16px; } }
@keyframes wiggle { 25% { transform: rotate(-5deg) scale(1.06); } 75% { transform: rotate(4deg) scale(1.06); } }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: ticker 55s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
  .seal-spin { animation: spin 22s linear infinite; }
  .seal:hover .seal-spin { animation-duration: 4s; }
  .gap-link .wire { animation: march 1.2s linear infinite; }
  .wire-h .line { animation: march-x 0.8s linear infinite; }
  .gap-demo[data-fixed] .gap-link .wire { animation: none; }
  .sticker:hover, .chip.sticker:hover { animation: wiggle 0.5s ease-in-out; }
  .pop-in { animation: pop 0.45s var(--bounce); }

  /* Stamp-in reveal (site.js adds .rv to elements below the fold). */
  .rv { opacity: 0; transform: translateY(26px) rotate(-1.2deg) scale(0.97); }
  .rv.in { opacity: 1; transform: none; transition: opacity 0.45s ease-out var(--d, 0ms), transform 0.7s var(--bounce) var(--d, 0ms); }
  .mark.rv-mark { background-size: 0% 0.22em; }
  .mark.rv-mark.in { background-size: 100% 0.22em; transition: background-size 0.8s cubic-bezier(0.6, 0, 0.2, 1) 0.15s; }
  .lt-fill { transform: scaleX(0); transform-origin: left; }
  .lifetimes.in .lt-fill { transform: none; transition: transform 1s var(--bounce) var(--d, 0ms); }
  .bars i { transform: scaleY(0); }
  .bars.in i { transform: none; transition: transform 0.7s var(--bounce) var(--d, 0ms); }
  .timeline .fill { transition: height 0.15s linear; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker { overflow-x: auto; }
  .pipeline li[data-s="run"] .dot, .tx-steps li[data-s="run"] .ic { animation: none; }
}
@media print {
  .header, .ticker, .footer .wordmark { display: none; }
  .rv { opacity: 1 !important; transform: none !important; }
}

/* ================= Early access: forms, landing pages, streams, Canada ================= */

.ea-form { display: grid; gap: 0.9rem; padding: 1.5rem; box-shadow: var(--sh-lg); }
@media (min-width: 640px) { .ea-form { padding: 1.75rem; } }
.ea-form h2 { font-size: 1.5rem; font-weight: 800; }
.ea-form .perks { display: grid; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); }
.ea-form .perks li::before { content: "★"; color: var(--brand); margin-right: 0.45rem; }
.ea-form label { display: grid; gap: 0.3rem; font-size: 0.85rem; font-weight: 700; }
.ea-form input:not([type="checkbox"]), .ea-form select, .ea-form textarea {
  width: 100%; min-height: 2.9rem; padding: 0.6rem 0.85rem; border: 2px solid var(--ink); border-radius: var(--r-md);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 1rem; font-weight: 500;
}
.ea-form input:focus, .ea-form select:focus, .ea-form textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.ea-form input[aria-invalid="true"] { border-color: var(--crit); background: var(--crit-soft); }
.ea-form .row2 { display: grid; gap: 0.9rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 480px) { .ea-form .row2 { grid-template-columns: 1fr 1fr; } }
.ea-form .check { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 600; color: var(--muted); }
.ea-form .check input { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--brand); flex-shrink: 0; }
.ea-form .btn { width: 100%; }
.ea-form .fine { font-size: 0.78rem; color: var(--muted); line-height: 1.5; margin: 0; }
.ea-form .form-msg { font-size: 0.88rem; font-weight: 700; color: var(--crit); margin: 0; }
.ea-form .form-msg:empty { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ea-done { text-align: center; padding: 1.5rem 0.5rem; }
.ea-done .big-check { width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; display: grid; place-items: center; border: 3px solid var(--candy-line); border-radius: 50%; background: var(--ok-candy); color: var(--on-candy); font-size: 2rem; font-weight: 800; box-shadow: var(--sh); }
.ea-done h3 { font-size: 1.4rem; }
.ea-done p { margin-top: 0.5rem; color: var(--muted); }

.lp .header .wrap { height: 4rem; }
.lp-hero .wrap { align-items: start; }
@media (min-width: 1024px) { .lp-hero .wrap { grid-template-columns: 1.1fr 0.9fr; padding-top: 4rem; } }
.lp-hero .check-list { margin-top: 1.75rem; font-weight: 600; }
.lp-hero .check-list li { font-size: 1.02rem; }
.lp-footer { margin-top: 5rem; padding: 2rem 0; border-top: 2px solid var(--ink); font-size: 0.85rem; color: var(--muted); }
.lp-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; }
.lp-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.lp-footer a { color: inherit; }

/* A live stream of events (discovery, audit log, post-quantum scan). */
.stream { display: grid; gap: 0.5rem; grid-template-columns: minmax(0, 1fr); min-height: 21rem; align-content: start; }
.stream li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; border: 2px solid var(--ink); border-radius: var(--r-md); background: var(--surface); font-size: 0.9rem; }
.stream li .chip { font-size: 0.72rem; justify-self: start; }
.stream .s-main { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream .s-meta { display: block; font-weight: 500; font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream time { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
@media (max-width: 479px) { .stream time { display: none; } .stream li { grid-template-columns: auto minmax(0, 1fr); } }
.stream-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; font-size: 0.85rem; font-weight: 700; }
.stream-head .live::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.45rem; border-radius: 50%; background: var(--crit); vertical-align: 0.05rem; }
.counter { font-variant-numeric: tabular-nums; }

/* Canada */
.maple { width: 100%; max-width: 22rem; margin: 0 auto; filter: drop-shadow(6px 6px 0 var(--hard)); }
.maple path { fill: #d52b1e; stroke: var(--candy-line); stroke-width: 60; stroke-linejoin: round; }
.flag-band { display: grid; grid-template-columns: 1fr 2fr 1fr; height: 0.75rem; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.flag-band i:nth-child(odd) { background: #d52b1e; }
.flag-band i:nth-child(2) { background: #fff; }
.stays { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .stays { grid-template-columns: 1fr auto 1fr; align-items: center; } }
.stays .arrow { text-align: center; font-weight: 800; font-size: 0.8rem; }
.stays .arrow b { display: block; font-size: 2rem; line-height: 1; }
@media (max-width: 899px) { .stays .arrow b { transform: rotate(90deg); } }

@keyframes blink { 50% { opacity: 0.25; } }
@keyframes row-in { from { opacity: 0; transform: translateY(-10px) scale(0.98); } }
@keyframes draw { from { stroke-dashoffset: var(--len); fill-opacity: 0; } 70% { fill-opacity: 0; } to { stroke-dashoffset: 0; fill-opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .stream-head .live::before { animation: blink 1.2s ease-in-out infinite; }
  .stream li.new { animation: row-in 0.45s var(--bounce); }
  .maple.draw path { stroke-dasharray: var(--len); animation: draw 2.2s ease-out both; }
}

/* Legal documents, generated by infra/www/build-legal.mjs. */
.doc-updated { margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }
.doc-section { padding-top: 2rem; }
.doc { max-width: 46rem; line-height: 1.7; }
.doc > * + * { margin-top: 1rem; }
.doc h2 { margin-top: 2.75rem; font-size: 1.5rem; scroll-margin-top: 6rem; }
.doc h3 { margin-top: 2rem; font-size: 1.15rem; scroll-margin-top: 6rem; }
.doc ul { list-style: disc; padding-left: 1.4rem; display: grid; gap: 0.5rem; }
.doc ol { list-style: decimal; padding-left: 1.6rem; display: grid; gap: 0.5rem; }
.doc code { font-size: 0.88em; padding: 0.1em 0.35em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.doc a.link { overflow-wrap: anywhere; }
.doc-table { overflow-x: auto; border: 2px solid var(--ink); border-radius: var(--r-lg); background: var(--surface); }
.doc-table th, .doc-table td { padding: 0.75rem 1rem; }
.doc-table code { white-space: nowrap; overflow-wrap: normal; }
.doc-nav { max-width: 46rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.92rem; font-weight: 600; color: var(--muted); }
.doc-nav a { text-decoration: none; }
.doc-nav a:hover { color: var(--ink); }
.doc-list { display: grid; gap: 1rem; max-width: 46rem; }
.doc-list .card { display: block; text-decoration: none; }
.doc-list .card p { margin-top: 0.4rem; color: var(--muted); }
.doc-contact { max-width: 46rem; margin-top: 2.5rem; color: var(--muted); font-size: 0.95rem; }

/* Cookie choice (site.js): one card, bottom right on wide screens, full width on phones. */
.consent { position: fixed; inset: auto 1rem 1rem; z-index: 60; max-width: 34rem; margin-inline: auto; padding: 1rem; border: 2px solid var(--ink); border-radius: 0.75rem; background: var(--surface); color: var(--fg); box-shadow: var(--sh); font-size: 0.9rem; line-height: 1.5; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
@media (min-width: 640px) { .consent { left: auto; margin: 0; } }
.consent-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Interaction details (same ideas as web/theme/soft-brutal.css; site.js drives the JS halves) ---------- */

/* Fitts's law: the menu button reaches 44px, and small text buttons get an invisible margin to aim at. */
.menu-btn { width: 2.75rem; height: 2.75rem; position: relative; }
.consent-link, .theme-btn { position: relative; }
.consent-link::before, .theme-btn::before { content: ""; position: absolute; inset: -10px -6px; }

/* Crossfade icons with blur: both states share one cell; the one marked data-off blurs and shrinks away. */
.swap { display: inline-grid; place-items: center; }
.swap > * { grid-area: 1 / 1; transition: opacity 0.2s ease, filter 0.2s ease, scale 0.3s var(--bounce); }
.swap > [data-off] { opacity: 0; filter: blur(4px); scale: 0.5; }

/* Rubber band past the edge (site.js sets --rb-x on wide tables and code). */
[data-rubber-on] > * { translate: var(--rb-x, 0) 0; }
[data-rubber-release] > * { transition: translate 0.5s cubic-bezier(0.25, 1, 0.5, 1); }

/* Reveal with masks: headings below the fold are uncovered by a soft-edged mask sweeping left to right. */
.mask-wait, .mask-in {
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%); mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
}
.mask-in { animation: mask-in 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.05s both; }
@keyframes mask-in { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }

@media (prefers-reduced-motion: no-preference) {
  /* Pulse to confirm: a ring breathes out of the control that just did its job. */
  .confirm-pulse { animation: confirm-pulse 0.55s cubic-bezier(0.2, 0.9, 0.3, 1); }
  .check input[type="checkbox"]:checked:focus:not(:focus-visible) { animation: confirm-pulse 0.55s cubic-bezier(0.2, 0.9, 0.3, 1); }

  /* Expand the same element: the mobile menu unrolls out of the header, and FAQ cards grow to fit their answer. */
  .mobile-nav[data-open] { animation: unroll 0.3s cubic-bezier(0.2, 0.9, 0.3, 1) both; }

  /* Stage the focus: in a row of plans or feature cards, the one under the pointer stays bright. */
  @media (hover: hover) {
    .plans > *, [data-stagger] > .card.lift { transition: opacity 0.25s ease, filter 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease; }
    .plans:has(> :hover) > :not(:hover),
    [data-stagger]:has(> .card.lift:hover) > .card.lift:not(:hover) { opacity: 0.55; filter: saturate(0.4); }
  }
  /* With the mobile menu open, the page behind steps back. */
  main, .footer { transition: opacity 0.25s ease, filter 0.25s ease; }
  body:has(.mobile-nav[data-open]) :is(main, .footer) { opacity: 0.35; filter: blur(2px); }
}
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    :root { interpolate-size: allow-keywords; }
    .faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), content-visibility 0.35s allow-discrete; }
    .faq details[open]::details-content { block-size: auto; }
  }
}
@keyframes confirm-pulse {
  0% { outline: 3px solid var(--accent); outline-offset: 0; }
  35% { scale: 1.05; }
  100% { outline: 3px solid transparent; outline-offset: 10px; scale: 1; }
}
@keyframes unroll {
  from { clip-path: inset(0 0 100% 0); translate: 0 -6px; }
  to { clip-path: inset(0 0 0 0); translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .swap > * { transition: none; }
  .mask-wait, .mask-in { -webkit-mask-image: none; mask-image: none; }
  [data-rubber-on] > * { translate: none; }
}
@media print {
  .mask-wait { -webkit-mask-image: none; mask-image: none; }
}
