/* ColibriDB website. An Apple-style product page for an infrastructure product: the system font, a lot of air, the real
   product shown large, one accent (the ruby of the hummingbird's gorget) for links, the primary button and focus.

   Shape rule: buttons and segmented controls are full pills; product images 18px (12px on phones); panels 18px;
   inputs 12px. Motion: critically damped springs (no overshoot) for reveals, a strong ease-out for UI feedback. */

:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #FBFBFD;
  --bg-alt: #F5F5F7;
  --surface: #FFFFFF;
  --text: #1D1D1F;
  --text-2: #6E6E73;
  --line: rgba(0, 0, 0, 0.1);
  --line-2: rgba(0, 0, 0, 0.16);
  --fill: rgba(0, 0, 0, 0.05);
  --fill-2: rgba(0, 0, 0, 0.08);
  --accent: #B0213B;
  --accent-press: #8E1A30;
  --on-accent: #FFFFFF;
  --mark-ink: #1D1D1F;
  --mark-ruby: #B0213B;
  --nav-bg: rgba(251, 251, 253, 0.72);
  --shot-shadow: 0 1px 2px rgba(29, 29, 31, 0.05), 0 18px 40px -16px rgba(29, 29, 31, 0.18), 0 50px 100px -40px rgba(29, 29, 31, 0.22);
  --shot-ring: 0 0 0 1px rgba(0, 0, 0, 0.06);

  /* The one product-on-black band keeps these in both themes. */
  --band: #0B0B0C;
  --band-text: #F5F5F7;
  --band-text-2: #A1A1A6;
  --band-line: rgba(255, 255, 255, 0.14);

  /* Semantic state inside the live Chaos Lab (product UI, not page accents). */
  --lab-ink: #1D1D1F;
  --lab-ink-2: #86868B;
  --lab-green: #248A3D;
  --lab-red: #D70015;
  --lab-amber: #B25000;

  --wrap: 1080px;
  --wrap-wide: 1320px;
  --gutter: 16px;
  --nav-h: 52px;
  --r-shot: 18px;
  --r-panel: 18px;
  --r-input: 12px;

  /* A critically damped spring (damping 1.0) sampled for CSS: no overshoot, settles softly. */
  --spring: linear(0, 0.0362, 0.1198, 0.2241, 0.3329, 0.4369, 0.5316, 0.6147, 0.6861, 0.7462, 0.7961, 0.8372, 0.8706, 0.8976, 0.9192, 0.9365, 0.9503, 0.9611, 0.9697, 0.9764, 0.9817, 0.9858, 0.989, 0.9915, 0.9935, 0.995, 0.9961, 0.997, 0.9977, 0.9982, 0.9987, 0.999, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0B;
    --bg-alt: #151516;
    --surface: #1C1C1E;
    --text: #F5F5F7;
    --text-2: #A1A1A6;
    --line: rgba(255, 255, 255, 0.12);
    --line-2: rgba(255, 255, 255, 0.2);
    --fill: rgba(255, 255, 255, 0.07);
    --fill-2: rgba(255, 255, 255, 0.11);
    --accent: #FF6F86;
    --accent-press: #FF8FA1;
    --mark-ink: #F5F5F7;
    --mark-ruby: #FF5A78;
    --nav-bg: rgba(10, 10, 11, 0.7);
    --shot-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
    --shot-ring: 0 0 0 1px rgba(255, 255, 255, 0.09);
    --band: #000000;
    --lab-ink: #F5F5F7;
    --lab-ink-2: #8E8E93;
    --lab-green: #30D158;
    --lab-red: #FF453A;
    --lab-amber: #FF9F0A;
  }
}

@media (min-width: 734px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, svg, picture { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
code, kbd, pre, samp { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; padding: 10px 16px; background: var(--surface); color: var(--text); border-radius: 980px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); font-size: 14px; transition: top 200ms var(--ease-out); }
.skip:focus { top: 10px; text-decoration: none; }

/* Layout ------------------------------------------------------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2 * var(--gutter), var(--wrap-wide)); margin-inline: auto; }
/* Section rhythm: generous but not a screen of nothing between sections (it was up to 168/184 px, which read as empty). */
.sec { padding-block: clamp(72px, 8.5vw, 120px) clamp(80px, 9vw, 128px); }
.sec-alt { background: var(--bg-alt); }
.sec-tight { padding-block: clamp(72px, 9vw, 120px) clamp(80px, 10vw, 128px); }

/* Type scale: tracking tightens as size grows; leading loosens as size shrinks. */
.t-hero { font-size: clamp(56px, 9.2vw, 96px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 600; }
.t-display { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.05; letter-spacing: -0.028em; font-weight: 600; }
.t-h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.07; letter-spacing: -0.022em; font-weight: 600; }
.t-h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.13; letter-spacing: -0.016em; font-weight: 600; }
.t-h4 { font-size: 21px; line-height: 1.24; letter-spacing: -0.012em; font-weight: 600; }
.t-lead { font-size: clamp(21px, 2.2vw, 28px); line-height: 1.25; letter-spacing: -0.016em; font-weight: 500; color: var(--text-2); }
.t-lead b, .t-lead strong { color: var(--text); font-weight: 600; }
.t-body { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.47; letter-spacing: -0.012em; }
.t-small { font-size: 14px; line-height: 1.43; letter-spacing: -0.006em; color: var(--text-2); }
.t-fine { font-size: 12px; line-height: 1.5; letter-spacing: 0.01em; color: var(--text-2); }
.muted { color: var(--text-2); }

.head { text-align: center; max-width: 860px; margin: 0 auto clamp(48px, 6vw, 80px); }
.head .t-lead, .head .t-body { margin: 20px auto 0; max-width: 680px; }
.head .links { justify-content: center; }
.head-left { max-width: 820px; margin: 0 0 clamp(40px, 5vw, 64px); }
.head-left .t-lead, .head-left .t-body { margin-top: 18px; max-width: 760px; }

/* Buttons and links ---------------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px; border: 0; border-radius: 980px;
  background: var(--accent); color: var(--on-accent);
  font: 400 17px/1.18 var(--font); letter-spacing: -0.016em; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, opacity 200ms ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
@media (prefers-color-scheme: dark) { .btn { background: #D2304E; } }
.btn:hover { text-decoration: none; background: var(--accent-press); }
@media (prefers-color-scheme: dark) { .btn:hover { background: #E04462; } }
.btn:active { transform: scale(0.97); transition-duration: 100ms; }
.btn-small { min-height: 28px; padding: 4px 12px; font-size: 12px; letter-spacing: 0; }
.btn-quiet { background: var(--fill-2); color: var(--text); }
.btn-quiet:hover { background: var(--line-2); }
@media (prefers-color-scheme: dark) { .btn-quiet { background: var(--fill-2); } .btn-quiet:hover { background: var(--line-2); } }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* "Learn more ›" style text link: the chevron is a glyph, the press feedback is a nudge. */
.more { display: inline-flex; align-items: baseline; gap: 0.18em; font-size: 17px; letter-spacing: -0.016em; color: var(--accent); }
.more::after { content: "\203A"; font-size: 1.3em; line-height: 0; position: relative; top: 0.06em; transition: transform 200ms var(--ease-out); }
.more:hover::after { transform: translateX(2px); }
.more:active { opacity: 0.6; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 32px; }
.links.center { justify-content: center; }

/* Header: a translucent material over the content, a hairline only once content scrolls under it --------------- */
.site-header { position: sticky; top: 0; z-index: 20; height: var(--nav-h); background: var(--nav-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); transition: box-shadow 200ms ease; }
.site-header.is-stuck { box-shadow: 0 1px 0 var(--line); }
.site-header.on-dark { --nav-bg: rgba(22, 22, 23, 0.72); --bg: #161617; --text: #F5F5F7; --line: rgba(255, 255, 255, 0.12); transition: background-color 300ms ease, box-shadow 200ms ease; }
.site-header.on-dark .brand, .site-header.on-dark .nav a:not(.btn) { color: #F5F5F7; }
.site-header.on-dark .btn { background: #D2304E; }
@media (prefers-reduced-transparency: reduce) { .site-header.on-dark { background: #161617; } }
.bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(100% - 2 * var(--gutter), var(--wrap-wide)); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.022em; color: var(--text); }
/* The small mark beside the name: the ink version on light, the light-ink version on dark (system dark, or a dark band under the bar). */
.brand-mark { width: 24px; height: 24px; flex: none; }
.brand-mark-dark { display: none; }
@media (prefers-color-scheme: dark) { .brand-mark-light { display: none; } .brand-mark-dark { display: block; } }
.site-header.on-dark .brand-mark-light { display: none; }
.site-header.on-dark .brand-mark-dark { display: block; }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { font-size: 12px; letter-spacing: 0.01em; color: var(--text); opacity: 0.8; transition: opacity 200ms ease; }
.nav a:not(.btn):hover { opacity: 1; text-decoration: none; }
.nav a.active { opacity: 1; font-weight: 600; }
.nav-toggle { display: none; width: 44px; height: 44px; margin-right: -12px; border: 0; background: transparent; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.nav-toggle i, .nav-toggle i::before { position: absolute; left: 14px; width: 16px; height: 1.5px; border-radius: 1px; background: var(--text); transition: transform 240ms var(--ease-out); }
.nav-toggle i { top: 19px; }
.nav-toggle i::before { content: ""; left: 0; top: 6px; }
.nav-open .nav-toggle i { transform: translateY(3px) rotate(45deg); }
.nav-open .nav-toggle i::before { transform: translateY(-6px) rotate(-90deg); }
@media (max-width: 833px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 28px; background: var(--bg); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity 200ms ease, transform 280ms var(--ease-out), visibility 0s linear 280ms; box-shadow: 0 1px 0 var(--line); }
  .nav-open .nav { visibility: visible; opacity: 1; transform: none; transition: opacity 200ms ease, transform 280ms var(--ease-out); }
  .nav a:not(.btn) { font-size: 24px; font-weight: 600; letter-spacing: -0.016em; opacity: 1; padding: 10px 0; }
  .nav .btn { margin-top: 20px; align-self: flex-start; min-height: 44px; padding: 11px 22px; font-size: 17px; }
}
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (prefers-contrast: more) { .site-header { background: var(--bg); box-shadow: 0 1px 0 var(--line-2); } }

/* Product images: real screenshots on a soft shadow, light and dark ---------------------------------------------- */
.shot { position: relative; }
.shot picture, .shot > img { border-radius: var(--r-shot); overflow: hidden; box-shadow: var(--shot-ring), var(--shot-shadow); background: var(--surface); }
.shot img, .shot video { width: 100%; height: auto; }
.film .film-dark { display: none; }
@media (prefers-color-scheme: dark) { .film .film-light { display: none; } .film .film-dark { display: block; } }
@media (max-width: 733px) { .shot picture, .shot > img { border-radius: 12px; } }
.band .shot picture { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 40px 120px -40px rgba(0, 0, 0, 0.9); background: #1C1C1E; }
.film-wrap { margin-top: clamp(56px, 7vw, 96px); }
.shot-cap { margin-top: 18px; text-align: center; font-size: 14px; color: var(--text-2); }

/* Reveal on scroll: opacity and a short rise on a spring; nothing moves with reduced motion ---------------------- */
.js [data-reveal] .r { opacity: 0; transform: translateY(28px); }
.js [data-reveal].is-in .r { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 1000ms var(--spring); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal] .r-shot { opacity: 0; transform: translateY(56px) scale(0.98); }
.js [data-reveal].is-in .r-shot { opacity: 1; transform: none; transition: opacity 600ms var(--ease-out), transform 1200ms var(--spring); transition-delay: 120ms; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] .r, .js [data-reveal] .r-shot { transform: none !important; }
  .js [data-reveal].is-in .r, .js [data-reveal].is-in .r-shot { transition: opacity 240ms ease; transition-delay: 0ms; }
}

/* Hero ------------------------------------------------------------------------------------------------------------ */
.hero { position: relative; padding-top: clamp(40px, 5vw, 64px); overflow: hidden; }
.hero-copy, .hero-shot { position: relative; z-index: 1; }
/* The living mark (wwwroot/js/colibri.js). Its canvas reaches a little past the box, so the wing's stroke and the
   entrance are never clipped. The still SVG underneath shows without JS, with reduced motion and if the script fails. */
.hero-mark { position: relative; width: clamp(188px, 21vw, 296px); aspect-ratio: 1; margin: 0 auto; touch-action: pan-y; }
.hero-mark img { width: 100%; height: 100%; }
.js .hero-mark img { visibility: hidden; }
.colibri-failed .hero-mark img, .colibri-still .hero-mark img { visibility: visible; }
.hero-mark .colibri-canvas { position: absolute; pointer-events: none; }
.hero-copy { text-align: center; max-width: 900px; }
.hero-promise { margin: 18px auto 0; max-width: 860px; font-size: clamp(36px, 5vw, 60px); line-height: 1.06; letter-spacing: -0.028em; font-weight: 600; text-wrap: balance; }
.hero-sub { margin: 20px auto 0; max-width: 620px; font-size: clamp(19px, 1.7vw, 21px); line-height: 1.43; letter-spacing: -0.014em; color: var(--text-2); }
.hero .links { justify-content: center; margin-top: 32px; gap: 16px 28px; }
.hero-shot { margin-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(72px, 9vw, 120px); }
@media (prefers-reduced-motion: no-preference) {
  /* The words follow the bird: they wait for its entrance to start (colibri-go, set by the script, or by
     site.js after a short timeout if the script is slow or fails), then rise in 0.9 s into it. */
  .js .hero-copy > :not(.hero-mark) { animation: hero-in 420ms var(--ease-out) 900ms both paused; }
  .js .hero-copy > .hero-sub { animation-delay: 960ms; }
  .js .hero-copy > .links { animation-delay: 1020ms; }
  .js .colibri-go .hero-copy > :not(.hero-mark) { animation-play-state: running; }
  .hero-shot .shot { animation: shot-rise 1400ms var(--spring) 200ms both; }
}
@keyframes hero-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes shot-rise { from { opacity: 0.001; transform: translateY(96px) scale(0.965); } }

/* The product-on-black band: resilience ------------------------------------------------------------------------ */
.band { background: var(--band); color: var(--band-text); --text-2: var(--band-text-2); --line: var(--band-line); --accent: #FF6F86; --mark-ink: #F5F5F7; --mark-ruby: #FF5A78; --pt-bg: #000000; }
.band .t-lead { color: var(--band-text-2); }
.band .t-lead b { color: var(--band-text); }
.story { display: grid; gap: 48px; }
.story-steps { display: grid; gap: 40px; }
.step h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.14; letter-spacing: -0.018em; }
.step p { margin-top: 12px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.47; color: var(--band-text-2); max-width: 30em; }
.story-media { position: relative; }
.story-media .shot + .shot { position: absolute; inset: 0; }
.story-media .shot { transition: opacity 500ms var(--ease-out); }
@media (min-width: 1000px) {
  .story { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 72px; align-items: start; }
  .story-media { position: sticky; top: max(calc(var(--nav-h) + 24px), calc(50vh - 236px)); grid-row: 1; }
  .story-steps { gap: 0; }
  /* Enough scroll per step to swap the pinned screenshot, without a screen of black between three short paragraphs. */
  .step { min-height: 40vh; display: flex; flex-direction: column; justify-content: center; }
  .step:first-child { min-height: 32vh; justify-content: flex-start; padding-top: 4vh; }
  .step:last-child { min-height: 40vh; }
  .js .step { opacity: 0.32; transition: opacity 450ms var(--ease-out); }
  .js .step.is-active { opacity: 1; }
  .js .story-media .shot:not(.is-active) { opacity: 0; }
}

/* Gallery: the rest of the console, a horizontal scroll-snap row ------------------------------------------------ */
.gallery { position: relative; }
.gallery-track { display: grid; grid-auto-flow: column; grid-auto-columns: min(86vw, 980px); gap: clamp(16px, 2.4vw, 28px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: max(var(--gutter), calc((100vw - min(86vw, 980px)) / 2)); padding-block: 8px 48px; margin: 0; list-style: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: center; }
.slide p { margin: 24px auto 0; max-width: 640px; text-align: center; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.42; color: var(--text-2); }
.slide p b { color: var(--text); font-weight: 600; }
.gallery-nav { display: flex; justify-content: center; gap: 14px; }
.gallery-nav button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--fill-2); color: var(--text); cursor: pointer; display: grid; place-items: center; transition: transform 160ms var(--ease-out), opacity 200ms ease, background-color 200ms ease; -webkit-tap-highlight-color: transparent; }
.gallery-nav button:hover { background: var(--line-2); }
.gallery-nav button:active { transform: scale(0.94); }
.gallery-nav button[disabled] { opacity: 0.35; cursor: default; }
.gallery-nav button::before { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateX(2px) rotate(45deg); }
.gallery-nav button[data-dir="1"]::before { transform: translateX(-2px) rotate(-135deg); }
.no-js .gallery-nav { display: none; }

/* Security: one lead statement and four short ones ------------------------------------------------------------- */
.sec-shot { margin-bottom: clamp(64px, 8vw, 112px); }
.statements { display: grid; gap: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.statement h3 { font-size: 21px; line-height: 1.24; letter-spacing: -0.012em; }
.statement p { margin-top: 8px; color: var(--text-2); font-size: 17px; line-height: 1.47; }
.statement-lead h3 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -0.022em; }
.statement-lead p { font-size: clamp(19px, 1.6vw, 21px); line-height: 1.43; max-width: 26em; }
@media (min-width: 834px) {
  .statements { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .statement-rest { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 48px; }
}
@media (max-width: 833px) { .statement-rest { display: grid; gap: 32px; } }

/* Terminal: a real redis-cli session, typeset ------------------------------------------------------------------ */
.terminal { max-width: 980px; margin: 0 auto; border-radius: var(--r-panel); background: #1D1D1F; color: #F5F5F7; box-shadow: 0 30px 80px -36px rgba(0, 0, 0, 0.5); overflow: hidden; }
@media (prefers-color-scheme: dark) { .terminal { background: #1C1C1E; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); } }
.terminal-title { padding: 14px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font: 500 12px/1.4 var(--font); letter-spacing: 0.01em; color: #A1A1A6; text-align: center; }
.terminal pre { margin: 0; padding: clamp(20px, 3vw, 32px) clamp(18px, 3vw, 36px) clamp(24px, 3vw, 36px); overflow-x: auto; font: 400 clamp(13px, 1.25vw, 15px)/1.65 var(--mono); letter-spacing: 0; tab-size: 2; }
.terminal pre:focus-visible { outline-offset: -4px; }
.terminal pre { white-space: normal; }
.terminal .ln { display: block; min-height: 1.65em; white-space: pre; }
.terminal .p { color: #8E8E93; }
.terminal .c { color: #F5F5F7; font-weight: 500; }
.terminal .o { color: #B9B9BE; }
.js [data-reveal] .terminal .ln { opacity: 0; }
.js [data-reveal].is-in .terminal .ln { opacity: 1; transition: opacity 160ms ease-out; transition-delay: calc(240ms + var(--i, 0) * 55ms); }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] .terminal .ln { opacity: 1; transition: none; } }
@media print { .js [data-reveal] .r, .js [data-reveal] .r-shot, .js [data-reveal] .terminal .ln { opacity: 1 !important; transform: none !important; transition: none !important; } }
.compat { margin: 40px auto 0; max-width: 680px; text-align: center; }

/* Measured: big numbers with honest captions ------------------------------------------------------------------- */
.numbers { display: grid; gap: 56px 48px; }
.num { display: grid; align-content: start; gap: 10px; }
.num .num-v { color: var(--text); font-size: clamp(56px, 7vw, 96px); line-height: 1; letter-spacing: -0.035em; font-weight: 600; font-variant-numeric: tabular-nums; }
.num-v small { font-size: 0.42em; letter-spacing: -0.01em; font-weight: 600; color: var(--text-2); margin-left: 0.12em; }
.num p { font-size: 17px; line-height: 1.42; color: var(--text-2); max-width: 22em; }
.num p b { color: var(--text); font-weight: 600; }
.num-sm .num-v, .timeline .num .num-v { font-size: clamp(44px, 4.6vw, 64px); }
@media (min-width: 834px) {
  .numbers { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .num-lg { grid-column: span 6; }
  .num-sm { grid-column: span 3; }
}
@media (min-width: 600px) and (max-width: 833px) { .numbers { grid-template-columns: 1fr 1fr; } .num-lg { grid-column: 1 / -1; } }
.footnote { margin-top: clamp(48px, 6vw, 72px); padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5; letter-spacing: 0.01em; color: var(--text-2); max-width: 760px; }

/* Specs: two-column groups, like Tech Specs -------------------------------------------------------------------- */
.specs { display: grid; }
.spec { display: grid; gap: 20px 48px; padding-block: 36px 40px; border-top: 1px solid var(--line); }
.spec:first-child { border-top-color: var(--line-2); }
.spec > h3 { font-size: 21px; line-height: 1.24; letter-spacing: -0.012em; }
.spec ul { list-style: none; padding: 0; display: grid; gap: 22px 48px; }
.spec li b { display: block; font-weight: 600; font-size: 17px; }
.spec li span { display: block; margin-top: 4px; color: var(--text-2); font-size: 17px; line-height: 1.42; }
@media (min-width: 834px) {
  .spec { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
  .spec ul { grid-template-columns: 1fr 1fr; }
}

/* Particle scenes (wwwroot/js/particles.js and scene-*.js) ------------------------------------------------------ */
.pt-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }

/* Built to stay up: a failover, live. JavaScript only (the screenshots below tell it without). */
.failover { display: none; margin: clamp(8px, 2vw, 24px) auto clamp(56px, 7vw, 96px); max-width: 980px; }
.js .failover { display: block; }
.js .failover.is-broken { display: none; }
.pill-btn[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.failover-stage { position: relative; aspect-ratio: 760 / 360; }
.failover-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 12px; }
.failover-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font: 400 13px/1.4 var(--mono); color: var(--band-text-2); }
.failover-stats b { color: var(--band-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.failover-state { color: var(--band-text); }
.failover figcaption { margin-top: 14px; max-width: 46em; font-size: 14px; line-height: 1.5; color: var(--band-text-2); }
.pill-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 16px; border: 0; border-radius: 980px; background: rgba(255, 255, 255, 0.12); color: var(--band-text); font: 500 14px/1 var(--font); letter-spacing: -0.01em; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 200ms ease; touch-action: manipulation; }
.pill-btn:hover { background: rgba(255, 255, 255, 0.2); }
.pill-btn:active { transform: scale(0.96); }
.pill-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Security you can see: a record sealed by scroll. Without JavaScript (or with reduced motion) the record is text. */
.cipher { margin-block: clamp(32px, 4vw, 56px) 0; max-width: 760px; }
.cipher-stage { position: relative; display: none; }
.cipher-text { margin: 0; padding: 18px 20px; border-radius: 12px; background: var(--bg-alt); overflow-x: auto; font: 500 14px/1.55 var(--mono); letter-spacing: 0; color: var(--text); }
.cipher.is-live .cipher-stage { display: block; }
.cipher.is-live .cipher-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: pre; border: 0; }
.cipher figcaption { margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--text-2); max-width: 44em; }
/* Desktop: the sealed record and what it shows side by side, instead of a narrow block floating in a wide section. */
@media (min-width: 1000px) {
  .cipher { max-width: none; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
  .cipher figcaption { margin-top: 0; font-size: 17px; line-height: 1.5; max-width: 26em; }
}

/* The bird, perched above the closing call to action: still image first, points over it once with JavaScript. */
.settle { position: relative; width: 40px; height: 38px; margin: 0 auto clamp(20px, 2.4vw, 28px); }
.settle img { display: block; width: 40px; height: 38px; transition: opacity 420ms var(--ease-out); }
.settle.is-live img { opacity: 0; transition: none; }
.settle .settle-canvas { transition: opacity 420ms var(--ease-out); }
.settle:not(.is-live) .settle-canvas { opacity: 0; }

/* The page birds (js/birds.js): each in a box reserved here, so nothing moves when it comes alive; its still mark
   underneath shows without JavaScript and with reduced motion. A bird never sits over text. */
.bird { position: relative; flex: none; }
.bird picture, .bird img { display: block; width: 100%; height: 100%; }
.bird img { object-fit: cover; }
.js .bird img { visibility: hidden; }
.js .bird.bird-still img { visibility: visible; }
.bird .bird-canvas { position: absolute; pointer-events: none; }
.bird-layers { width: min(100%, 440px); aspect-ratio: 11 / 6; margin: -12px auto 16px; }
.bird-layers picture { position: absolute; left: 36%; top: 22%; width: 28%; height: 50%; }
.pg-wrap { position: relative; }
.bird-on-edge.bird-on-pg { top: -35px; bottom: auto; z-index: 1; }
@media (max-width: 599px) {
  .bird-on-edge.bird-on-pg { right: 88px; } /* between the tour's count and its step dots */
  .pg-wrap:has(> .bird-on-pg) .pg-tour-head { padding-top: 12px; } /* and clear of the words, in every language */
}
html:not(.js) .bird-on-pg { display: none; } /* without JavaScript there is no playground to perch on */
.bird-lost { width: 220px; height: 132px; margin: 0 auto 20px; }
.bird-lost picture { position: absolute; left: 22%; top: 4%; width: 56%; height: 62%; }
.page-head-bird { position: relative; }
.bird-side { width: 72px; aspect-ratio: 1.43; margin-bottom: 20px; }
@media (min-width: 1280px) {
  .page-head-bird .bird-side { position: absolute; right: 8px; top: 50%; width: 168px; margin: 0; transform: translateY(-50%); }
  .page-head-bird > :not(.bird) { max-width: calc(100% - 232px); } /* the words keep clear of the bird */
}
.form.has-bird, .trial-strip { position: relative; }
/* a perched bird sits on the edge, its tail hanging over it: the box is the part above the edge */
.bird-on-edge { position: absolute; right: clamp(24px, 5vw, 48px); bottom: calc(100% - 1px); width: 56px; height: 36px; }
.bird-on-edge picture { position: absolute; left: 0; top: 0; width: 100%; height: 150%; }
.bird-on-edge img { object-fit: contain; }
.bird-above { position: absolute; right: clamp(16px, 3vw, 32px); bottom: calc(100% + 8px); width: 64px; aspect-ratio: 1.43; }
.trial-strip:has(> .bird) { margin-top: 18px; }
/* room for the bird's short hover above the band, where the billing switch spans the width */
@media (max-width: 599px) { .trial-strip:has(> .bird) { margin-top: 52px; padding-top: 30px; } }
@media (max-width: 899px) { .page-head .form.has-bird { margin-top: 24px; } .page-head .form.has-bird:has(> .bird-above) { margin-top: 44px; } }
.v-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.v-head h3 { margin-bottom: 0; }
.bird-verdict { width: 44px; aspect-ratio: 1.43; }

/* Chaos Lab in points: the canvas under the SVG draws nodes and packets; the SVG keeps labels and log cells. */
.lab-svg-wrap { position: relative; }
.lab-svg-wrap .raft-canvas { z-index: 0; }
.lab-svg-wrap .lab-svg { position: relative; z-index: 1; }
.lab-particles .node .body, .lab-particles .node .halo, .lab-particles .node .crown, .lab-particles .node .snap-ring,
.lab-particles .node .down, .lab-particles .node.is-down .down, .lab-particles .packets, .lab-particles .links,
.lab-particles .client-box { display: none; }
.lab-particles .node.is-down { opacity: 0.7; }
.pt-legend .sw { width: 22px; height: 3px; border-radius: 0; background: none; }
.pt-legend .sw-faint { border-top: 1.5px dotted var(--text-2); opacity: 0.7; }
.pt-legend .sw-firm { border-top: 2px dotted var(--text); }
.pt-legend .sw-spaced { background: radial-gradient(circle, var(--text) 1.1px, transparent 1.6px) 0 50% / 7px 3px repeat-x; }
.pt-legend .sw-crown { background: radial-gradient(circle, var(--mark-ruby) 1.2px, transparent 1.7px) 0 50% / 4px 3px repeat-x; }

/* Chaos Lab: the live Raft simulation, restyled --------------------------------------------------------------- */
.lab-wrap { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.lab { --lab-panel: var(--surface); position: relative; min-height: 420px; padding: clamp(14px, 2vw, 24px); border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 30px 80px -50px rgba(0, 0, 0, 0.35); font-size: 14px; }
.lab:not(.is-ready) { display: grid; place-items: center; color: var(--text-2); }
.lab:not(.is-ready):not(.is-broken)::before { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--text-2); animation: spin 0.9s linear infinite; }
.lab.is-broken::after { content: ""; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-svg { to { transform: rotate(360deg); } }
.lab-main { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .lab-main { grid-template-columns: minmax(0, 1fr) 300px; } .lab-full .lab-main { grid-template-columns: minmax(0, 1fr) 340px; } }
.lab-stage { position: relative; border-radius: 12px; background: var(--bg-alt); overflow: hidden; }
.lab-svg { width: 100%; height: auto; }
.lab-svg text { font-family: var(--font); fill: var(--lab-ink); }
.lab-t1 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.lab-t2 { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.lab-t3 { font-size: 12px; font-weight: 600; fill: var(--lab-amber) !important; }
.lab-role { font-size: 12px; font-weight: 500; fill: var(--lab-ink-2) !important; }
.lab-legend { position: absolute; left: 14px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; padding: 0; margin: 0; font-size: 12px; color: var(--text-2); }
.lab-legend li { display: flex; align-items: center; gap: 6px; }
.lab-legend i { width: 7px; height: 7px; border-radius: 50%; }
.link { stroke: var(--line-2); stroke-width: 1.5; }
.client-link { stroke-dasharray: 2 5; }
.link.cut { stroke: var(--lab-red); stroke-dasharray: 6 6; }
.link.dead { opacity: 0.3; }
.client-box { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; }
.node .body { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.5; transition: stroke 300ms ease; }
.node .halo { fill: none; stroke: var(--lab-green); stroke-width: 1.5; opacity: 0; }
.node .crown { opacity: 0; fill: var(--lab-ink); transition: opacity 300ms ease; }
.node.is-leader .body { stroke: var(--lab-ink); stroke-width: 2.5; }
.node.is-leader .halo { opacity: 0.35; }
.node.is-leader .crown { opacity: 1; }
.node.is-leader .lab-role { fill: var(--lab-green) !important; font-weight: 600; }
.node.is-candidate .body { stroke-dasharray: 5 5; stroke: var(--lab-amber); }
.node.is-cut .body { stroke: var(--lab-red); stroke-dasharray: 3 5; stroke-width: 2.2; }
.node.is-cut .lab-role { fill: var(--lab-red) !important; }
.node.is-down { opacity: 0.45; }
.node .down { display: none; } .node.is-down .down { display: block; }
.cross { stroke: var(--lab-red); stroke-width: 3; stroke-linecap: round; }
.node .snap-ring { fill: none; stroke: var(--lab-amber); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; opacity: 0; }
.node.is-snap .snap-ring { opacity: 1; animation: spin-svg 3s linear infinite; transform-origin: 0 0; }
.node .chip { opacity: 0; } .node.is-skew .chip { opacity: 1; }
.chip-bg { fill: var(--surface); stroke: var(--lab-amber); stroke-width: 1; }
.cell { fill: transparent; stroke: var(--line-2); stroke-width: 1; }
.cell.on { fill: var(--lab-ink); stroke: var(--lab-ink); }
.cell.pending { fill: transparent; stroke: var(--lab-amber); }
.cell.noop { opacity: 0.4; }
.trail { stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 0.5 5; opacity: 0.7; }
.lab-side { display: grid; gap: 12px; align-content: start; }
.lab-verdict, .lab-history, .lab-stats { border-radius: 12px; background: var(--bg-alt); }
.lab-verdict { padding: 16px 18px; }
.lab-verdict h3, .lab-history h3 { font-size: 12px; font-weight: 600; letter-spacing: 0.01em; color: var(--text-2); margin-bottom: 8px; }
.v-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0; font-size: 14px; }
.v-num { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--lab-green); }
.v-row.bad .v-num { color: var(--lab-red); }
.v-status { margin-top: 8px; font-size: 13px; font-weight: 500; }
.v-status.good { color: var(--lab-green); }
.v-status.warn { color: var(--lab-amber); }
.lab-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; padding: 6px; }
.lab-stats div { padding: 8px 12px; }
.lab-stats dt { font-size: 12px; color: var(--text-2); }
.lab-stats dd { margin: 2px 0 0; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.lab-history { padding: 16px 18px 10px; }
.lab-log { list-style: none; margin: 0; padding: 0; height: 176px; overflow: auto; font-size: 12.5px; line-height: 1.4; display: grid; align-content: start; gap: 2px; scrollbar-width: thin; }
.lab-full .lab-log { height: 246px; }
.lab-log li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 6px; padding: 4px 0; }
.lab-log time { color: var(--text-2); font-variant-numeric: tabular-nums; }
.lab-log .lg-good span { color: var(--lab-green); }
.lab-log .lg-warn span { color: var(--lab-amber); }
.lab-log .lg-bad span { color: var(--lab-red); }
@media (prefers-reduced-motion: no-preference) { .lab-log li:first-child { animation: log-in 240ms var(--ease-out); } }
@keyframes log-in { from { opacity: 0; transform: translateY(-4px); } }
.lab-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.lab-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lab-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 14px; border: 0; border-radius: 980px; background: var(--fill-2); color: var(--text); font-size: 14px; font-weight: 500; letter-spacing: -0.01em; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 200ms ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.lab-btn:hover { background: var(--line-2); }
.lab-btn:active { transform: scale(0.96); }
.lab-btn kbd { font: 500 11px/1 var(--font); padding: 3px 5px; border-radius: 5px; background: var(--surface); color: var(--text-2); box-shadow: 0 0 0 1px var(--line); }
.lab-btn.danger { background: var(--text); color: var(--bg); }
.lab-btn.danger:hover { opacity: 0.86; background: var(--text); }
.lab-btn.danger kbd { background: transparent; color: inherit; opacity: 0.6; box-shadow: 0 0 0 1px currentColor; }
.lab-transport { display: flex; gap: 6px; }
.lab-mini { min-height: 32px; padding: 5px 12px; border: 0; border-radius: 980px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: color 200ms ease, box-shadow 200ms ease, transform 160ms var(--ease-out); }
.lab-mini:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.lab-mini:active { transform: scale(0.96); }
.lab-monkey[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); box-shadow: none; }
@media (max-width: 600px) { .lab-btn kbd { display: none; } .lab-btn { font-size: 13px; padding: 6px 12px; } .lab-legend { display: none; } .lab-t1 { font-size: 22px; } .lab-t2 { font-size: 28px; } .lab-role { font-size: 19px; } .lab-t3 { font-size: 18px; } }
.lab-cta { margin-top: 28px; text-align: center; }
.lab > * { min-width: 0; }
.lab-main > * { min-width: 0; }

/* Pricing: segmented billing control, comparison table, quiet estimator --------------------------------------- */
.segmented { display: inline-flex; padding: 3px; border-radius: 980px; background: var(--fill-2); gap: 0; }
.segmented button, .segmented label { position: relative; min-height: 36px; padding: 7px 18px; border: 0; border-radius: 980px; background: transparent; color: var(--text); font-size: 14px; font-weight: 500; letter-spacing: -0.008em; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background-color 240ms var(--ease-out), box-shadow 240ms var(--ease-out), transform 160ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
.segmented button:active, .segmented label:active { transform: scale(0.97); }
.segmented button[aria-pressed="true"], .segmented label:has(input:checked) { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.06); }
@media (prefers-color-scheme: dark) { .segmented button[aria-pressed="true"], .segmented label:has(input:checked) { background: #3A3A3C; box-shadow: none; } }
.segmented label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.segmented small { font-size: 12px; font-weight: 500; color: var(--text-2); }
.billing-row { display: flex; justify-content: center; margin-bottom: clamp(28px, 4vw, 40px); }
.trial-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 40px); padding: clamp(22px, 3vw, 32px) clamp(22px, 3.5vw, 40px); border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.trial-strip-t { font-size: clamp(20px, 2.2vw, 24px); font-weight: 600; letter-spacing: -0.018em; line-height: 1.2; }
.trial-strip-d { margin-top: 6px; max-width: 58ch; color: var(--text-2); }
.trial-strip-a { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.compare { border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.compare-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.compare-table th, .compare-table td { padding: 14px 20px; text-align: center; vertical-align: middle; font-weight: 400; }
.compare-table thead th { vertical-align: top; padding-top: 32px; padding-bottom: 28px; }
.compare-table col.c-label { width: 34%; }
.compare-table .plan-name { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.018em; }
.compare-table .plan-tag { display: block; margin-top: 4px; min-height: 2.9em; font-size: 14px; line-height: 1.43; color: var(--text-2); }
.compare-table .plan-price { display: block; margin-top: 14px; font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.compare-table .plan-per { display: block; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.compare-table .plan-billed { display: block; margin-top: 2px; min-height: 1.5em; font-size: 12px; color: var(--text-2); }
.compare-table .plan-cta { margin-top: 18px; }
.compare-table .plan-trial { display: block; margin-top: 12px; font-size: 14px; color: var(--text-2); text-decoration: none; }
.compare-table .plan-trial:hover { color: var(--accent); }
.compare-table .plan-trial:hover { text-decoration: underline; }
.compare-table thead th { position: relative; }
.compare-table .plan-note { position: absolute; top: 12px; left: 0; right: 0; font-size: 12px; font-weight: 600; color: var(--accent); }
.compare-table tbody th { text-align: left; font-size: 15px; font-weight: 400; line-height: 1.35; color: var(--text); }
.compare-table tbody td { font-size: 14px; color: var(--text-2); }
.compare-table tbody tr.group th { padding-top: 32px; padding-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; color: var(--text-2); }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { padding-bottom: 32px; }
.mark-yes, .mark-no { display: inline-block; vertical-align: middle; }
.mark-yes { width: 14px; height: 8px; border: solid var(--text); border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
.mark-no { width: 12px; height: 1.5px; background: var(--line-2); border-radius: 1px; }
.compare-table td.featured .mark-yes { border-color: var(--accent); }
.compare-sticky { display: none; }
@media (max-width: 733px) {
  .compare { overflow: clip; }
  .compare-table, .compare-table thead, .compare-table tbody { display: block; }
  .compare-table colgroup { display: none; }
  .compare-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-table thead th:first-child { display: none; }
  .compare-table th, .compare-table td { padding: 10px 6px; }
  .compare-table thead th { padding: 22px 6px 20px; }
  .compare-table .plan-name { display: none; }
  .compare-table .plan-tag, .compare-table .plan-note { display: none; }
  .compare-table .plan-price { font-size: 24px; }
  .compare-table .plan-cta { min-height: 32px; padding: 6px 10px; font-size: 12px; white-space: normal; }
  .compare-table tbody tr:not(.group) th { grid-column: 1 / -1; padding: 18px 12px 2px; text-align: center; font-size: 14px; }
  .compare-table tbody tr.group { display: block; }
  .compare-table tbody tr.group th { display: block; text-align: center; padding-top: 28px; }
  .compare-table tbody td.featured { background: transparent; }
  .compare-sticky { position: sticky; top: var(--nav-h); z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 6px; text-align: center; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); font-size: 14px; letter-spacing: -0.01em; }
}
.faq-title { margin: clamp(80px, 10vw, 128px) 0 48px; }
.story-media .r-shot { position: relative; }
html:not(.js) .gallery-nav { display: none; }

.estimator { margin-top: clamp(48px, 6vw, 72px); display: grid; gap: 32px; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
@media (min-width: 900px) { .estimator { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; } }
.estimator h3 { font-size: 28px; letter-spacing: -0.02em; line-height: 1.14; }
.estimator .t-small { margin-top: 8px; }
.est-form { display: grid; gap: 22px; margin-top: 28px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.est-label, legend { display: block; padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.stepper { display: inline-flex; align-items: center; border-radius: 980px; background: var(--fill-2); padding: 3px; }
.stepper button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; transition: background-color 200ms ease, transform 160ms var(--ease-out); }
.stepper button:hover { background: var(--surface); }
.stepper button:active { transform: scale(0.92); }
.stepper input { width: 3.4rem; height: 38px; border: 0; background: transparent; color: var(--text); text-align: center; font: 600 17px var(--font); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; line-height: 1.4; }
.check-row input { margin: 2px 0 0; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check-row small { display: block; color: var(--text-2); font-size: 14px; margin-top: 2px; }
.est-out { display: grid; gap: 0; margin: 0; }
.est-out div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.est-out dt { color: var(--text-2); font-size: 15px; }
.est-out dd { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.est-out .total { border-bottom: 0; padding-top: 18px; }
.est-out .total dt { color: var(--text); font-weight: 600; }
.est-out .total dd { font-size: 40px; letter-spacing: -0.03em; }
.est-save { min-height: 1.5em; margin-top: 4px; font-size: 14px; color: var(--text-2); }
.est-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
.est-foot { margin-top: 20px; }

.faq { display: grid; gap: 40px 64px; }
@media (min-width: 834px) { .faq { grid-template-columns: 1fr 1fr; } }
.faq h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.012em; }
.faq p { margin-top: 8px; color: var(--text-2); font-size: 17px; line-height: 1.47; }

/* Closing ---------------------------------------------------------------------------------------------------------- */
.closing { text-align: center; }
.closing .t-lead { margin: 20px auto 0; max-width: 620px; }

/* Page heads (inner pages) ---------------------------------------------------------------------------------------- */
.page-head { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 7vw, 88px); }
.page-head.center { text-align: center; }
.page-head.center .t-lead { margin-inline: auto; }
.page-head .t-lead { margin-top: 20px; max-width: 700px; }
.page-head .links { margin-top: 32px; }
.page-head.center .links { justify-content: center; }

/* Security page: layers with their real configuration ----------------------------------------------------------- */
.layers { display: grid; }
.layer { display: grid; gap: 20px 56px; padding-block: 36px; }
.layer h3 { font-size: clamp(21px, 2vw, 24px); letter-spacing: -0.016em; line-height: 1.2; }
.layer p { margin-top: 10px; color: var(--text-2); font-size: 17px; line-height: 1.47; max-width: 30em; }
.layer pre, .code pre { margin: 0; padding: 18px 20px; border-radius: 12px; background: var(--bg-alt); overflow-x: auto; font: 400 13px/1.6 var(--mono); letter-spacing: 0; color: var(--text); }
.sec-alt .layer pre, .sec-alt .code pre { background: var(--surface); }
@media (min-width: 834px) { .layer { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; max-width: 760px; }
.plain-list li { padding-left: 22px; position: relative; font-size: 17px; line-height: 1.47; }
.plain-list li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 1.5px; background: var(--text-2); }
.timeline { display: grid; gap: 40px; margin-top: 48px; }
@media (min-width: 834px) { .timeline { grid-template-columns: 1fr 1fr 1fr; gap: 48px; } }
.timeline .num-v { font-size: clamp(44px, 4.6vw, 64px); }

/* Docs --------------------------------------------------------------------------------------------------------------- */
.split { display: grid; gap: 40px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; } }
.split > * { min-width: 0; }
.steps { margin: 28px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 17px; line-height: 1.47; }
.steps li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; background: var(--fill-2); display: grid; place-items: center; font-size: 13px; font-weight: 600; margin-top: 1px; }
.code { margin: 0; }
.code figcaption { margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.code .cm { color: var(--text-2); }
.table-wrap { overflow-x: auto; margin-top: 40px; border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.matrix { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.matrix th, .matrix td { text-align: left; padding: 14px 20px; vertical-align: top; line-height: 1.4; }
.matrix thead th { font-size: 12px; font-weight: 600; color: var(--text-2); padding-top: 20px; }
.matrix tbody tr + tr th, .matrix tbody tr + tr td { border-top: 1px solid var(--line); }
.matrix tbody th { font-weight: 500; }
.matrix td:last-child { color: var(--text-2); }
.pipe-notes { margin-top: 48px; }
#pipelining .matrix { min-width: 760px; }
/* The developer guide (/docs): an in-page index, code first, then the reference table. */
.doc-nav { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.doc-nav a { padding: 7px 14px; border-radius: 999px; background: var(--fill); color: var(--text); font-size: 14px; text-decoration: none; }
.doc-nav a:hover { background: var(--fill-2, var(--fill)); color: var(--accent); }
.doc-code { margin-bottom: 28px; }
/* A sample that follows a table (or another sample) gets the same air a table gets after a sample. */
.table-wrap + .doc-code, .doc-code + .doc-code { margin-top: 48px; }
.doc-code figcaption { margin-bottom: 12px; }
.doc-code pre { white-space: pre; }
.doc-sub { margin: 8px 0 20px; max-width: 760px; }
.doc-code pre { font-size: 13.5px; line-height: 1.7; padding: 22px 24px; }
/* Syntax colours: quiet, two hues and weight; the one accent stays for links and buttons. */
:root { --tk-str: #2E6B52; --tk-num: #7445A8; --tk-kw: var(--text); --tk-flag: var(--text-2); }
@media (prefers-color-scheme: dark) { :root { --tk-str: #9CD4B4; --tk-num: #C7AEF5; } }
.tk-cm { color: var(--text-2); font-style: italic; }
.tk-st { color: var(--tk-str); }
.tk-nu { color: var(--tk-num); }
.tk-kw { color: var(--tk-kw); font-weight: 600; }
.tk-fl { color: var(--tk-flag); }
/* Client tabs without script: radios first, then the tab list and the panels as siblings. */
.code-tabs { position: relative; }
.code-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.code-tab-list { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 999px; background: var(--fill); }
.code-tab-list label { padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer; user-select: none; transition: background-color 160ms ease, color 160ms ease; }
.code-tab-list label:hover { color: var(--text); }
.code-panel { display: none; }
#lang-dotnet:checked ~ .panel-dotnet, #lang-python:checked ~ .panel-python, #lang-ts:checked ~ .panel-ts { display: block; }
#lang-dotnet:checked ~ .code-tab-list label[for="lang-dotnet"],
#lang-python:checked ~ .code-tab-list label[for="lang-python"],
#lang-ts:checked ~ .code-tab-list label[for="lang-ts"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
#lang-dotnet:focus-visible ~ .code-tab-list label[for="lang-dotnet"],
#lang-python:focus-visible ~ .code-tab-list label[for="lang-python"],
#lang-ts:focus-visible ~ .code-tab-list label[for="lang-ts"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-table { min-width: 680px; }
.doc-table tbody th code { font: 500 13px/1.4 var(--mono); white-space: nowrap; }
html { scroll-padding-top: 72px; }
#pipelining .matrix tbody th { overflow-wrap: anywhere; }
#pipelining .matrix td:nth-child(2), #pipelining .matrix td:nth-child(3) { white-space: nowrap; }
.status { font-size: 13px; font-weight: 600; white-space: nowrap; }
.status.supported { color: var(--lab-green); }
.status.partial { color: var(--lab-amber); }
.status.unsupported { color: var(--text-2); }
.guides { display: grid; gap: 36px 56px; margin-top: 40px; }
@media (min-width: 700px) { .guides { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .guides { grid-template-columns: 1fr 1fr 1fr; } }
.guides h3 { font-size: 19px; letter-spacing: -0.012em; }
.guides p { margin-top: 6px; color: var(--text-2); font-size: 16px; line-height: 1.47; }

/* Forms ------------------------------------------------------------------------------------------------------------ */
.form { display: grid; gap: 20px; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field small { font-weight: 400; color: var(--text-2); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-input);
  background: var(--bg); color: var(--text); font: 400 17px/1.3 var(--font); letter-spacing: -0.012em;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
textarea { resize: vertical; min-height: 120px; }
select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
select option { background: var(--surface); color: var(--text); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
[aria-invalid="true"] { border-color: var(--lab-red) !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: 14px; color: var(--text-2); }
.form-status { min-height: 1.4em; font-size: 15px; }
.form-status.err, .form-error { color: var(--lab-red); }
.form-error { padding: 12px 14px; border-radius: var(--r-input); background: color-mix(in srgb, var(--lab-red) 9%, transparent); font-size: 15px; }
.form .btn { justify-self: start; }
.contact-points { margin-top: 32px; display: grid; gap: 18px; }
.contact-points p { font-size: 17px; line-height: 1.47; color: var(--text-2); }
.contact-points b { color: var(--text); font-weight: 600; }

.prose { max-width: 720px; }
.prose p { margin-top: 18px; font-size: 17px; line-height: 1.53; }
.prose h2 { margin-top: 44px; font-size: 21px; line-height: 1.24; letter-spacing: -0.01em; font-weight: 600; }
.prose .t-small { margin-top: 12px; color: var(--text-2); }
.message { min-height: 64vh; display: grid; place-items: center; text-align: center; }
.message .t-lead { margin: 18px auto 0; max-width: 560px; }

/* Hosted trial ----------------------------------------------------------------------------------------------------- */
.verify-form { max-width: 420px; margin: 28px auto 0; text-align: left; }
.field .field-label { font-size: 14px; font-weight: 600; }
.field-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.field-note[hidden] { display: none; }
.region-fixed { margin: 0; font-size: 17px; }
.field.region select { width: 100%; text-overflow: ellipsis; }

/* Footer ------------------------------------------------------------------------------------------------------------ */
.site-footer { background: var(--bg-alt); color: var(--text-2); font-size: 12px; line-height: 1.5; letter-spacing: 0.01em; padding-block: 28px 36px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.footer-nav a, .footer-legal a { color: var(--text); opacity: 0.86; }
.footer-nav a { font-size: 13px; }
.footer-nav a:hover, .footer-legal a:hover { opacity: 1; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; padding-top: 16px; }
.footer-legal .lang { margin-left: auto; display: flex; gap: 14px; }
.footer-legal .lang a[aria-current="true"] { font-weight: 600; opacity: 1; }
@media (max-width: 733px) { .footer-legal .lang { margin-left: 0; width: 100%; } }

.stack > * + * { margin-top: 20px; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
/* The particle birds may reach past the edge on phones; clip (not hidden) cuts the sideways scroll without breaking position: sticky. */
main { flex: 1 0 auto; overflow-x: clip; }

/* Phones: the whole console window, never a crop of it (a cropped screenshot reads as a broken image). */
@media (max-width: 733px) {
  .story-media .shot + .shot { display: none; }
  .terminal pre { font-size: 12px; }
  .lab-t1 { transform: translateY(-7px); }
  .lab-t2 { transform: translateY(9px); }
  .lab-role { transform: translateY(6px); }
}

/* Brand page ------------------------------------------------------------------------------------------------------ */
.brand-tiles { display: grid; gap: 16px; }
@media (min-width: 834px) { .brand-tiles { grid-template-columns: 1fr 1fr 1.4fr; } }
.brand-lockups { display: grid; gap: 16px; }
@media (min-width: 834px) { .brand-lockups { grid-template-columns: 1.4fr 1.4fr 1fr 1fr; } }
.brand-tile { margin: 0; display: grid; place-items: center; min-height: 260px; padding: 32px; border-radius: var(--r-panel); background: #FFFFFF; box-shadow: 0 0 0 1px var(--line); } /* the colour files are for light backgrounds, in either theme */
.brand-tile img { max-width: 100%; height: auto; }
.brand-tile-dark { background: #0A0A0B; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.brand-sizes { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 22px; align-content: center; }
.brand-sizes figcaption { width: 100%; text-align: center; font-size: 12px; color: #6E6E73; }
.brand-files { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.brand-files li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; font-size: 15px; }
.brand-files span { min-width: 9em; color: var(--text-2); }
.swatches { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.swatch { display: grid; gap: 6px; }
.swatch .chip { display: block; height: 96px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 8px; }
.swatch b { font-size: 17px; font-weight: 600; }
.swatch code { font: 500 14px/1.4 var(--mono); color: var(--text-2); }
.brand-rules { margin-top: 40px; }
.brand-construction { margin: 0; max-width: 1080px; }
.brand-construction img { width: 100%; height: auto; border-radius: var(--r-panel); box-shadow: 0 0 0 1px var(--line); }

/* Home: what teams run on it. A bento with rhythm (wide, narrow / narrow, wide / full), each cell its own commands; the AI cell is the one dark tile. */
.uc-grid { display: grid; gap: 16px; }
.uc { display: grid; gap: 18px; align-content: start; padding: clamp(22px, 2.4vw, 32px); border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px var(--line); min-width: 0; }
.uc h3 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.2; letter-spacing: -0.014em; }
.uc p { margin-top: 8px; font-size: 16px; line-height: 1.47; color: var(--text-2); max-width: 34em; }
.uc-code { margin: 0; padding: 16px 18px; border-radius: 12px; background: var(--bg-alt); overflow-x: auto; font: 400 13px/1.7 var(--mono); letter-spacing: 0; white-space: pre; color: var(--text); }
.uc-ai { background: #161617; color: #F5F5F7; box-shadow: none; --text-2: #A1A1A6; --tk-str: #9CD4B4; --tk-num: #C7AEF5; --tk-kw: #F5F5F7; --tk-flag: #A1A1A6; }
.uc-ai .uc-code { background: #0A0A0B; color: #F5F5F7; }
@media (min-width: 1000px) {
  .uc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .uc-sessions, .uc-locks { grid-column: span 2; }
  .uc-ai { grid-column: 1 / -1; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 40px; }
}
