/*
 * dyrakarmy.online — "Sealed Post", loud edition.
 * The app's palette (sky blue + electric magenta, IBM Plex) taken to a full-bleed night sky.
 * The two accent hues are registered custom properties, so the whole page eases from one palette
 * to the next as you scroll (each <section data-palette> sets them, see site.js).
 * Everything moves only when the visitor allows motion (prefers-reduced-motion).
 */

/* ---------- fonts (self-hosted, copied by the build; no external request) ---------- */
@font-face { font-family: "Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-serif-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-serif-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Serif"; font-style: italic; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-serif-cyrillic-500-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Serif"; font-style: italic; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-serif-latin-500-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- palette: two hues that travel ---------- */
@property --ha { syntax: "<number>"; inherits: true; initial-value: 222; }
@property --hb { syntax: "<number>"; inherits: true; initial-value: 350; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --ha: 222;
  --hb: 350;
  transition: --ha 1.6s cubic-bezier(.65, 0, .35, 1), --hb 1.6s cubic-bezier(.65, 0, .35, 1);

  /* dark (default): night ink */
  --bg: #070b16;
  --bg-2: #0b1220;
  --surface: rgba(17, 26, 44, 0.62);
  --surface-solid: #111a2c;
  --line: rgba(160, 190, 230, 0.14);
  --line-strong: rgba(160, 190, 230, 0.28);
  --text: #d9e4f3;
  --text-h: #ffffff;
  --muted: #9fb0c8;
  --ink-on-accent: #070b16;

  /* accents, before oklch support is known */
  --a: #6cc4ff;
  --b: #ff4fb0;
  --a-soft: rgba(108, 196, 255, 0.14);
  --b-soft: rgba(255, 79, 176, 0.14);
  --glow-a: rgba(108, 196, 255, 0.55);
  --glow-b: rgba(255, 79, 176, 0.5);

  --serif: "Plex Serif", "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "Plex Sans", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --r-s: 10px;
  --r: 18px;
  --r-l: 28px;
  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 40px);
  --bar-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

@supports (color: oklch(0 0 0)) {
  :root {
    --a: oklch(0.8 0.14 var(--ha));
    --b: oklch(0.72 0.22 var(--hb));
    --a-soft: oklch(0.8 0.14 var(--ha) / 0.14);
    --b-soft: oklch(0.72 0.22 var(--hb) / 0.14);
    --glow-a: oklch(0.8 0.16 var(--ha) / 0.55);
    --glow-b: oklch(0.72 0.24 var(--hb) / 0.5);
  }
}

/* light: cool paper (system setting, or the toggle) */
:root[data-theme="light"] {
  --bg: #eef3fa;
  --bg-2: #f6f9fd;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --line: rgba(19, 33, 58, 0.12);
  --line-strong: rgba(19, 33, 58, 0.24);
  --text: #1a2a44;
  --text-h: #0a1426;
  --muted: #4f5d75;
  --ink-on-accent: #ffffff;
  --a: #1f6fc4;
  --b: #c0136f;
  --a-soft: rgba(31, 111, 196, 0.1);
  --b-soft: rgba(192, 19, 111, 0.1);
  --glow-a: rgba(31, 111, 196, 0.35);
  --glow-b: rgba(192, 19, 111, 0.3);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #eef3fa;
    --bg-2: #f6f9fd;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-solid: #ffffff;
    --line: rgba(19, 33, 58, 0.12);
    --line-strong: rgba(19, 33, 58, 0.24);
    --text: #1a2a44;
    --text-h: #0a1426;
    --muted: #4f5d75;
    --ink-on-accent: #ffffff;
    --a: #1f6fc4;
    --b: #c0136f;
    --a-soft: rgba(31, 111, 196, 0.1);
    --b-soft: rgba(192, 19, 111, 0.1);
    --glow-a: rgba(31, 111, 196, 0.35);
    --glow-b: rgba(192, 19, 111, 0.3);
    color-scheme: light;
  }
}
@supports (color: oklch(0 0 0)) {
  :root[data-theme="light"] {
    --a: oklch(0.5 0.16 var(--ha));
    --b: oklch(0.5 0.21 var(--hb));
    --a-soft: oklch(0.5 0.16 var(--ha) / 0.1);
    --b-soft: oklch(0.5 0.21 var(--hb) / 0.1);
    --glow-a: oklch(0.6 0.16 var(--ha) / 0.35);
    --glow-b: oklch(0.6 0.22 var(--hb) / 0.3);
  }
  @media (prefers-color-scheme: light) {
    :root[data-theme="auto"] {
      --a: oklch(0.5 0.16 var(--ha));
      --b: oklch(0.5 0.21 var(--hb));
      --a-soft: oklch(0.5 0.16 var(--ha) / 0.1);
      --b-soft: oklch(0.5 0.21 var(--hb) / 0.1);
      --glow-a: oklch(0.6 0.16 var(--ha) / 0.35);
      --glow-b: oklch(0.6 0.22 var(--hb) / 0.3);
    }
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--text-h); margin: 0; font-weight: 500; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.02em; line-height: 1.02; }
h1 em, h2 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--a), var(--b), var(--a));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 9s linear infinite;
  padding-right: 0.06em; /* italic overhang */
}
p { margin: 0; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--a); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--b); color: var(--ink-on-accent); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--a); color: var(--ink-on-accent); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- living background ---------- */
.aurora { position: fixed; inset: -20vmax; z-index: -3; pointer-events: none; filter: blur(70px) saturate(1.2); opacity: 0.9; }
.blob { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; mix-blend-mode: screen; will-change: transform; }
.b1 { left: 5%; top: 0%; background: radial-gradient(circle at 50% 50%, var(--glow-a), transparent 62%); animation: drift1 26s ease-in-out infinite alternate; }
.b2 { right: 0%; top: 18%; background: radial-gradient(circle at 50% 50%, var(--glow-b), transparent 60%); animation: drift2 32s ease-in-out infinite alternate; }
.b3 { left: 30%; bottom: -10%; background: radial-gradient(circle at 50% 50%, var(--glow-a), transparent 58%); opacity: 0.6; animation: drift3 38s ease-in-out infinite alternate; }
:root[data-theme="light"] .blob { mix-blend-mode: multiply; }
@media (prefers-color-scheme: light) { :root[data-theme="auto"] .blob { mix-blend-mode: multiply; } }
.grid-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.55;
}
.grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--a), var(--b)); box-shadow: 0 0 12px var(--glow-b); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--gut);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.bar.scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-h); font-weight: 600; letter-spacing: -0.01em; flex: none; }
.seal { width: 36px; height: 36px; filter: drop-shadow(0 4px 14px var(--glow-b)); transition: transform 0.6s var(--ease); }
.seal svg { width: 100%; height: 100%; }
.brand:hover .seal { transform: rotate(-14deg) scale(1.06); }
.brand-name { font-size: 1.05rem; }
.brand-name em { font-family: var(--serif); font-style: italic; font-weight: 500; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { position: relative; padding: 8px 12px; text-decoration: none; color: var(--muted); font-size: 0.95rem; border-radius: 999px; transition: color 0.25s; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--a), var(--b)); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.35s var(--ease); }
.nav a:hover, .nav a.active { color: var(--text-h); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.bar-tools { display: flex; align-items: center; gap: 8px; }
.chip { height: 38px; min-width: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; display: grid; place-items: center; transition: border-color 0.25s, transform 0.25s var(--ease); }
a.chip { color: inherit; text-decoration: none; }
.chip:hover { border-color: var(--a); transform: translateY(-1px); }
.chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* language menu: a <details>, so it opens without JavaScript too */
.langs { position: relative; }
.langs > summary { list-style: none; display: inline-flex; align-items: center; gap: 2px; padding: 0 8px 0 12px; }
.langs > summary::-webkit-details-marker { display: none; }
.langs > summary svg { width: 14px; height: 14px; stroke-width: 2.2; transition: transform 0.25s var(--ease); }
.langs[open] > summary { border-color: var(--a); }
.langs[open] > summary svg { transform: rotate(180deg); }
.lang-list { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; margin: 0; padding: 6px; list-style: none; min-width: 200px; border-radius: 16px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); animation: lang-in 0.22s var(--ease); }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 0.95rem; transition: background 0.2s, color 0.2s; }
.lang-list a:hover, .lang-list a:focus-visible { background: color-mix(in srgb, var(--a) 16%, transparent); }
.lang-list a[aria-current="page"] { color: var(--a); font-weight: 600; }
.lang-list a[aria-current="page"]::after { content: "✓"; }
@keyframes lang-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lang-list { animation: none; } }
.theme .moon { display: none; }
:root[data-theme="light"] .theme .sun { display: none; }
:root[data-theme="light"] .theme .moon { display: inline; }
.burger { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.4s var(--ease), opacity 0.3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- full-screen menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 45;
  padding: calc(var(--bar-h) + 24px) var(--gut) 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  clip-path: circle(0 at calc(100% - 44px) 34px);
  transition: clip-path 0.7s cubic-bezier(.7, 0, .2, 1);
  overflow-y: auto;
}
.menu.open { clip-path: circle(150vmax at calc(100% - 44px) 34px); }
.menu nav { display: flex; flex-direction: column; }
.menu nav a {
  display: flex; align-items: baseline; gap: 16px;
  font-family: var(--serif); font-size: clamp(2.2rem, 9vw, 4.4rem); line-height: 1.15; text-decoration: none; color: var(--text-h);
  padding: 6px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), color 0.3s;
  transition-delay: calc(0.25s + var(--i) * 0.06s);
}
.menu nav a:nth-child(1) { --i: 0; } .menu nav a:nth-child(2) { --i: 1; } .menu nav a:nth-child(3) { --i: 2; } .menu nav a:nth-child(4) { --i: 3; } .menu nav a:nth-child(5) { --i: 4; }
.menu-quick { --i: 5; }
.menu nav a small { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.menu nav a:hover span { background: linear-gradient(90deg, var(--a), var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.menu.open nav a, .menu.open .menu-quick { opacity: 1; transform: none; }
.menu-quick { opacity: 0; transform: translateY(30px); transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); transition-delay: calc(0.25s + var(--i) * 0.06s); }
.menu-quick p { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.menu-os { display: flex; flex-wrap: wrap; gap: 8px; }
.menu-os a { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; background: var(--surface); font-weight: 600; transition: border-color 0.25s, background 0.25s; }
.menu-os a:hover { border-color: var(--a); background: var(--a-soft); }
body.menu-open { overflow: hidden; }

/* ---------- buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; border: 0;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, border-color 0.3s;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn-main { color: var(--ink-on-accent); background: linear-gradient(110deg, var(--a), var(--b)); box-shadow: 0 10px 30px -10px var(--glow-b), 0 0 0 1px rgba(255, 255, 255, 0.12) inset; }
.btn-main:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 44px -12px var(--glow-b), 0 0 0 1px rgba(255, 255, 255, 0.2) inset; }
.btn-glow { position: absolute; inset: -2px; z-index: -1; background: conic-gradient(from var(--spin), transparent 0 70%, rgba(255, 255, 255, 0.55) 80%, transparent 90%); animation: spin 3.6s linear infinite; mix-blend-mode: soft-light; }
.btn-ghost { color: var(--text-h); background: var(--surface); border: 1px solid var(--line-strong); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--a); transform: translateY(-2px); }
.bar-open { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }

/* ---------- layout ---------- */
main > section { position: relative; max-width: var(--wrap); margin: 0 auto; padding: clamp(64px, 9vw, 108px) var(--gut); }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 6vw, 64px); }
.sec-head h2 { font-size: clamp(2.3rem, 6vw, 4.2rem); }
.sec-lead { margin-top: 18px; color: var(--muted); font-size: 1.05rem; max-width: 560px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a); margin-bottom: 22px; }
.kicker::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--a), var(--b)); }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100svh - var(--bar-h));
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(32px, 6vw, 64px) !important; padding-bottom: 96px !important;
}
.hero h1 { font-size: clamp(3rem, 7.6vw, 6.6rem); margin-bottom: 26px; }
.hero h1 em { display: inline-block; }
.lead { font-size: clamp(1.06rem, 1.6vw, 1.22rem); color: var(--text); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cta-note { margin-top: 18px; font-size: 0.9rem; color: var(--muted); }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; border: 2px solid var(--line-strong); border-radius: 14px; transform: translateX(-50%); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--a); animation: wheel 1.8s ease-in-out infinite; }

/* the demo */
.demo { position: relative; display: grid; grid-template-columns: 1fr 0.7fr 1fr; align-items: center; gap: 0; perspective: 1200px; }
.device {
  position: relative; z-index: 2;
  min-height: 300px; padding: 16px; border-radius: 26px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface-solid) 92%, transparent), color-mix(in srgb, var(--surface-solid) 70%, transparent));
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  display: flex; flex-direction: column; gap: 12px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.device.left { transform: rotateY(14deg) rotateZ(-2deg); animation: float 7s ease-in-out infinite; }
.device.right { transform: rotateY(-14deg) rotateZ(2deg); animation: float 7s ease-in-out -3.5s infinite; }
.device-top { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.device-top b { color: var(--text-h); font-weight: 600; }
.device-top .dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--a); box-shadow: 0 0 10px var(--a); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; font-size: 0.85rem; }
.a1 { background: linear-gradient(135deg, var(--a), #3b4cca); }
.a2 { background: linear-gradient(135deg, var(--b), #7a1fa2); }
.bubble { max-width: 92%; padding: 10px 13px; border-radius: 16px; font-size: 0.92rem; line-height: 1.4; min-height: 2.6em; transition: opacity 0.4s, transform 0.4s var(--ease); }
.bubble.out { align-self: flex-end; background: linear-gradient(135deg, var(--a), color-mix(in srgb, var(--a) 60%, var(--b))); color: var(--ink-on-accent); border-bottom-right-radius: 4px; }
.bubble.in { align-self: flex-start; background: var(--a-soft); border: 1px solid var(--line-strong); color: var(--text-h); border-bottom-left-radius: 4px; }
.bubble.in:empty { opacity: 0; transform: translateY(8px); }
.cipher { font-family: var(--mono); font-size: 0.72rem; line-height: 1.35; color: var(--b); word-break: break-all; min-height: 3.2em; opacity: 0.9; }
.words { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.words span { font-size: 0.74rem; padding: 6px 8px; border-radius: 8px; background: var(--b-soft); color: var(--text-h); text-align: center; border: 1px solid color-mix(in srgb, var(--b) 35%, transparent); }
.device-foot { font-size: 0.7rem; color: var(--muted); margin-top: auto; letter-spacing: 0.03em; }
.wire { position: relative; z-index: 1; height: 120px; margin: 0 -12px; }
.wire svg { position: absolute; inset: 30px 0; width: 100%; height: 60px; overflow: visible; }
.wire path { fill: none; stroke: url(#none); stroke: var(--a); stroke-width: 2; stroke-dasharray: 4 7; opacity: 0.8; animation: dash 1.2s linear infinite; filter: drop-shadow(0 0 6px var(--glow-a)); }
.packet { position: absolute; left: 0; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 5px; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 0 16px var(--b), 0 0 34px var(--glow-b); opacity: 0; }
.no-server { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; font-size: 0.72rem; font-family: var(--mono); color: var(--muted); white-space: nowrap; }
.no-server s { text-decoration-color: var(--b); text-decoration-thickness: 2px; }
.no-server b { color: var(--b); font-weight: 500; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.track { display: flex; gap: 28px; width: max-content; animation: marquee 38s linear infinite; font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.9rem); color: var(--text-h); white-space: nowrap; }
.track span:nth-child(4n+2), .track span:nth-child(4n) { color: var(--b); font-family: var(--sans); }
.marquee:hover .track { animation-play-state: paused; }

/* ---------- numbers ---------- */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-block: clamp(56px, 9vw, 100px) !important; }
.stat { padding: 26px 22px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--a), var(--b)); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.2s var(--ease) 0.2s; }
.stat.in::before { transform: scaleX(1); }
.stat b { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; color: var(--text-h); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.stat span { color: var(--muted); font-size: 0.95rem; }

/* ---------- features (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(210px, auto); gap: 16px; }
.card {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden; isolation: isolate;
  padding: 26px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease), border-color 0.3s, box-shadow 0.4s;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx) var(--my), var(--a-soft), transparent 45%); opacity: 0; transition: opacity 0.4s; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient(260px circle at var(--mx) var(--my), var(--b), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.card:hover { box-shadow: 0 30px 60px -30px var(--glow-a); }
.card:hover::before, .card:hover::after { opacity: 1; }
.card.big { grid-column: span 2; grid-row: span 2; }
.card.wide { grid-column: span 2; }
.card h3 { font-size: 1.22rem; font-weight: 600; margin: 18px 0 8px; letter-spacing: -0.01em; }
.card.big h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.1; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card.big p { font-size: 1.08rem; max-width: 30em; }
.card-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--a-soft), var(--b-soft)); border: 1px solid var(--line-strong); }
.card-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--a); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-art { position: absolute; pointer-events: none; }
.ratchet { right: -30px; bottom: -30px; width: 280px; height: 280px; }
.ratchet i { position: absolute; inset: calc(var(--k) * 22px); border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--a) 55%, transparent); animation: spin-r calc(14s + var(--k) * 4s) linear infinite; }
.ratchet i:nth-child(1) { --k: 0; } .ratchet i:nth-child(2) { --k: 1; border-color: color-mix(in srgb, var(--b) 55%, transparent); animation-direction: reverse; }
.ratchet i:nth-child(3) { --k: 2; } .ratchet i:nth-child(4) { --k: 3; border-color: color-mix(in srgb, var(--b) 55%, transparent); animation-direction: reverse; }
.ratchet i:nth-child(5) { --k: 4; } .ratchet i:nth-child(6) { --k: 5; border-style: solid; border-color: var(--b); box-shadow: 0 0 30px var(--glow-b); }
.orbit { right: 22px; top: 50%; width: 120px; height: 120px; margin-top: -60px; }
.orbit i { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 0 12px var(--glow-b); animation: orbit 9s linear infinite; animation-delay: calc(var(--k) * -1.8s); }
.orbit i:nth-child(1) { --k: 0; } .orbit i:nth-child(2) { --k: 1; } .orbit i:nth-child(3) { --k: 2; } .orbit i:nth-child(4) { --k: 3; } .orbit i:nth-child(5) { --k: 4; }
.card.wide p { max-width: calc(100% - 140px); }

/* ---------- how ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; position: relative; counter-reset: s; }
.steps::before { content: ""; position: absolute; left: 8%; right: 8%; top: 34px; height: 2px; background: linear-gradient(90deg, var(--a), var(--b)); transform: scaleX(var(--line-p, 0)); transform-origin: 0 50%; transition: transform 1.6s var(--ease); opacity: 0.7; }
.steps.in::before { --line-p: 1; }
.step { position: relative; padding: 0 8px; }
.step-n { position: relative; z-index: 1; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 1.9rem; color: var(--text-h); background: var(--bg-2); border: 1px solid var(--line-strong); box-shadow: 0 0 0 6px var(--bg), 0 0 30px -4px var(--glow-a); margin-bottom: 22px; }
.step h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--muted); }
.versus { margin-top: clamp(48px, 8vw, 88px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vs-col { padding: 28px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); }
.vs-col.new { border-color: color-mix(in srgb, var(--b) 45%, transparent); background: linear-gradient(160deg, var(--b-soft), var(--a-soft)); box-shadow: 0 30px 70px -40px var(--glow-b); }
.vs-h { font-weight: 600; color: var(--text-h); margin-bottom: 18px; font-size: 1.1rem; }
.vs-col.old .vs-h { color: var(--muted); }
.vs-diagram { display: flex; align-items: center; gap: 0; margin-bottom: 20px; font-size: 1.6rem; }
.vs-diagram .node { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-solid); border: 1px solid var(--line-strong); }
.vs-diagram .srv { filter: grayscale(1); opacity: 0.8; position: relative; }
.vs-diagram .srv::after { content: "👁"; position: absolute; right: -8px; top: -10px; font-size: 0.9rem; }
.vs-diagram .line { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--muted) 0 6px, transparent 6px 12px); opacity: 0.6; }
.vs-diagram .line.live { height: 3px; background: linear-gradient(90deg, var(--a), var(--b), var(--a)); background-size: 200% 100%; animation: sheen 2.4s linear infinite; opacity: 1; box-shadow: 0 0 12px var(--glow-b); }
.vs-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.vs-col li { padding-left: 28px; position: relative; }
.vs-col.old li { color: var(--muted); }
.vs-col.old li::before { content: "✕"; position: absolute; left: 0; color: #e0686b; font-weight: 600; }
.vs-col.new li::before { content: "✓"; position: absolute; left: 0; color: var(--b); font-weight: 700; }

/* ---------- security ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.sec-item { padding: 30px 28px; background: var(--bg-2); position: relative; transition: background 0.4s; }
.sec-item:hover { background: color-mix(in srgb, var(--bg-2) 88%, var(--a)); }
.sec-item b { display: block; color: var(--text-h); font-size: 1.12rem; margin-bottom: 8px; }
.sec-item b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; vertical-align: 2px; background: var(--a); box-shadow: 0 0 10px var(--a); }
.sec-item.warn b::before { background: #f5b13d; box-shadow: 0 0 10px #f5b13d; }
/* The honest warning closes the grid: with an item count that leaves it alone in its row, it takes the whole row. */
.sec-item.warn:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
.sec-item p { color: var(--muted); font-size: 0.97rem; }

/* ---------- download ---------- */
.os-tabs { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); margin-bottom: 22px; }
.os-tabs button { position: relative; z-index: 1; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-weight: 600; font-size: 0.95rem; color: var(--muted); transition: color 0.3s; }
.os-tabs button[aria-selected="true"] { color: var(--ink-on-accent); }
.os-tabs button .rec { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 7px; vertical-align: 2px; background: currentColor; }
.tab-ink { position: absolute; z-index: 0; top: 6px; left: 0; height: calc(100% - 12px); width: 0; border-radius: 999px; background: linear-gradient(110deg, var(--a), var(--b)); box-shadow: 0 8px 24px -8px var(--glow-b); transition: transform 0.5s var(--ease), width 0.5s var(--ease); }
.panels { position: relative; }
.panel { padding: clamp(22px, 4vw, 36px); border-radius: var(--r-l); border: 1px solid var(--line-strong); background: var(--surface); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: panel-in 0.55s var(--ease); }
.panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.panel-head h3 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.badge { font-family: var(--mono); font-size: 0.78rem; padding: 5px 11px; border-radius: 999px; background: var(--a-soft); color: var(--text-h); border: 1px solid var(--line-strong); }
.badge:empty { display: none; }
.badge.preview { background: rgba(245, 177, 61, 0.14); border-color: rgba(245, 177, 61, 0.45); }
.badge.soft { background: var(--b-soft); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.file {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 18px 18px 16px 58px; min-height: 92px; border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--bg-2);
  text-decoration: none; transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}
.file::before { content: ""; position: absolute; left: 18px; top: 20px; width: 26px; height: 26px; border-radius: 9px; background: var(--a-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fb0c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 4v11m0 0-4-4m4 4 4-4M5 20h14'/></svg>") center/16px no-repeat; border: 1px solid var(--line-strong); }
.file b { color: var(--text-h); font-size: 1.02rem; }
.file small { color: var(--muted); font-size: 0.86rem; }
.file .meta { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-top: 4px; }
.file:hover { transform: translateY(-3px); border-color: var(--a); box-shadow: 0 18px 40px -22px var(--glow-a); }
.file.main { border-color: color-mix(in srgb, var(--b) 55%, transparent); background: linear-gradient(150deg, var(--b-soft), var(--a-soft)), var(--bg-2); }
.file.main::before { background-color: var(--b); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 4v11m0 0-4-4m4 4 4-4M5 20h14'/></svg>"); border-color: transparent; box-shadow: 0 0 16px var(--glow-b); }
.file.missing { opacity: 0.62; }
.file.missing::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fb0c8' stroke-width='2' stroke-linecap='round'><path d='M7 17 17 7M9 7h8v8'/></svg>"); }
.code-line { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-strong); overflow: hidden; }
.code-line .mono { flex: 1; font-size: 0.84rem; color: var(--text-h); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.copy { flex: none; min-height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: border-color 0.25s, background 0.25s; }
.copy:hover { border-color: var(--a); }
.copy.done { background: var(--b); color: #fff; border-color: transparent; }
.hint { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }
.panel-lead { color: var(--muted); margin-bottom: 22px; max-width: 40em; }
.mini-steps { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: m; display: grid; gap: 10px; }
.mini-steps li { counter-increment: m; position: relative; padding-left: 40px; min-height: 28px; }
.mini-steps li::before { content: counter(m); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-on-accent); background: linear-gradient(135deg, var(--a), var(--b)); }
.mini-steps.big li { font-size: 1.08rem; }
.mini-steps a { color: var(--a); font-weight: 600; }
.all-releases { margin-top: 22px; }
.all-releases a { color: var(--a); text-decoration: none; font-weight: 600; border-bottom: 1px solid currentColor; }

/* ---------- faq ---------- */
.qa { display: grid; gap: 10px; max-width: 880px; }
.qa details { border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.3s, background 0.3s; overflow: hidden; }
.qa details[open] { border-color: color-mix(in srgb, var(--a) 50%, transparent); background: linear-gradient(160deg, var(--a-soft), transparent 70%), var(--surface); }
.qa summary { cursor: pointer; list-style: none; padding: 20px 60px 20px 22px; font-weight: 600; color: var(--text-h); font-size: 1.06rem; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: linear-gradient(var(--text-h), var(--text-h)) center/10px 2px no-repeat, linear-gradient(var(--text-h), var(--text-h)) center/2px 10px no-repeat, var(--a-soft); transition: transform 0.4s var(--ease); }
.qa details[open] summary::after { transform: rotate(135deg); }
.qa details p { padding: 0 22px 22px; color: var(--muted); animation: panel-in 0.45s var(--ease); }

/* ---------- final ---------- */
.final { text-align: center; }
.final-inner { position: relative; padding: clamp(48px, 9vw, 110px) var(--gut); border-radius: 40px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface); isolation: isolate; }
.final-inner::before { content: ""; position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from var(--spin), var(--a), var(--b), var(--a), var(--b), var(--a)); animation: spin 14s linear infinite; opacity: 0.32; filter: blur(50px); }
.final h2 { font-size: clamp(2.3rem, 6vw, 4.4rem); }
.final .cta { justify-content: center; }

/* ---------- footer ---------- */
.foot { max-width: var(--wrap); margin: 0 auto; padding: 48px var(--gut) 64px; display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; border-top: 1px solid var(--line); }
.foot-brand { display: flex; flex-direction: column; gap: 4px; }
.foot-brand b { color: var(--text-h); font-size: 1.05rem; }
.foot-brand span { color: var(--muted); font-size: 0.92rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.foot-links a:hover { color: var(--text-h); }
.foot-small { grid-column: 1 / -1; font-size: 0.82rem; color: var(--muted); }

/* ---------- reveal on scroll (only when the script runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); filter: blur(8px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }
.js .demo.reveal { transform: translateY(40px) scale(0.96); }
.js .demo.reveal.in { transform: none; }

/* ---------- keyframes ---------- */
@keyframes sheen { to { background-position: -220% 0; } }
@keyframes spin { to { --spin: 360deg; } }
@keyframes spin-r { to { transform: rotate(360deg); } }
@keyframes drift1 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(18vmax, 10vmax) scale(1.25); } }
@keyframes drift2 { 0% { transform: translate(0, 0) scale(1.1); } 100% { transform: translate(-22vmax, 14vmax) scale(0.9); } }
@keyframes drift3 { 0% { transform: translate(0, 0) scale(0.9); } 100% { transform: translate(-10vmax, -18vmax) scale(1.2); } }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes dash { to { stroke-dashoffset: -22; } }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes orbit { from { transform: rotate(0deg) translateX(52px) rotate(0deg); } to { transform: rotate(360deg) translateX(52px) rotate(-360deg); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- seven ways to connect ---------- */
/* 8 tracks of 2: four cards in the first row, and the last three centred under them */
.ways { display: grid; grid-template-columns: repeat(8, 1fr); gap: 16px; }
.ways > .way { grid-column: span 2; }
.ways > .way:nth-child(5) { grid-column: 2 / span 2; }
.way { padding: 18px 18px 24px; display: flex; flex-direction: column; }
.way-art { border-radius: calc(var(--r-l) - 8px); background: linear-gradient(135deg, var(--a-soft), var(--b-soft)); border: 1px solid var(--line); padding: 8px 6px; overflow: hidden; }
.way .art { display: block; width: 100%; height: auto; max-height: 150px; overflow: visible; }
.way .card-ico { display: none; }
.way h3 { margin: 18px 8px 8px; }
.way p { margin: 0 8px; }
.way-when { margin-top: auto !important; padding-top: 14px; font-size: 0.9rem !important; color: var(--text) !important; }
.way-when b { color: var(--b); font-weight: 600; }
.way-n { position: absolute; top: 24px; left: 26px; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); }
.way-new { position: absolute; top: 22px; right: 24px; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-on-accent); background: linear-gradient(110deg, var(--a), var(--b)); }
.way-art + .way-n + .way-new { z-index: 1; }

/* the little scenes: everything is a transform or an opacity change */
.art .an { transform-box: fill-box; transform-origin: center; }
.art .ph rect:first-child { fill: var(--surface-solid); stroke: var(--line-strong); stroke-width: 1.5; }
.art .ph .scr { fill: color-mix(in srgb, var(--bg-2) 70%, var(--a)); stroke: none; opacity: 0.55; }
.art .qr rect { fill: var(--a); }
.art .qr rect.dim { fill: var(--b); }
.art .arc { fill: none; stroke: var(--line-strong); stroke-width: 1.4; stroke-dasharray: 3 5; stroke-linecap: round; }
.art .ok circle { fill: var(--surface-solid); stroke: var(--b); stroke-width: 1.8; }
.art .ok path { fill: none; stroke: var(--b); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.art .scan { fill: var(--b); opacity: 0.9; filter: drop-shadow(0 0 3px var(--glow-b)); }
.art .say { fill: var(--b); }
.art .cd { fill: var(--a); }
.art .box rect { fill: var(--surface-solid); stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 3 3; }
.art .box path { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; opacity: 0.5; }
.art .pkt { fill: var(--b); filter: drop-shadow(0 0 4px var(--glow-b)); }
.art .ring { fill: none; stroke: var(--a); stroke-width: 1.6; opacity: 0.35; }
.art .bt circle { fill: var(--surface-solid); stroke: var(--a); stroke-width: 1.6; }
.art .bt path { fill: none; stroke: var(--a); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.art .blip { fill: var(--b); }
.art .mic { fill: var(--b); }
.art .eqb { fill: var(--b); }
.art .wave { fill: none; stroke: var(--a); stroke-width: 2.4; stroke-linecap: round; opacity: 0.6; }
.art .who circle:first-child { fill: var(--surface-solid); stroke: var(--line-strong); stroke-width: 1.5; }
.art .who .hd { fill: var(--a); stroke: none; }
.art .who .sh { fill: none; stroke: var(--a); stroke-width: 2.4; stroke-linecap: round; }
.art .ln { fill: none; stroke: var(--a); stroke-width: 1.8; stroke-linecap: round; opacity: 0.6; }
.art .ln.dash { stroke: var(--b); stroke-dasharray: 4 5; opacity: 0.8; }
.art .pdot { fill: var(--b); filter: drop-shadow(0 0 3px var(--glow-b)); }
.art .bub path:first-child { fill: var(--surface-solid); stroke: var(--b); stroke-width: 1.6; stroke-linejoin: round; }
.art .bub .tx { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; opacity: 0.6; }
.art .plane { fill: var(--a); }
/* light: three soft colours of about the same brightness, no red; a cell only fades, slowly */
.art .lc { fill: #6cc4ff; }
.art .lc.c2 { fill: #6fe0b6; }
.art .lc.c3 { fill: #a99bff; }
.art .ray { fill: none; stroke: var(--a); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 2 6; opacity: 0.4; }
.art .vf path { fill: none; stroke: var(--b); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.art .vf circle { fill: none; stroke: var(--b); stroke-width: 1.6; opacity: 0.7; }
.art .lens { fill: var(--muted); }

.art .qr-l { animation: w-blink 4.8s ease-in-out infinite; }
.art .qr-r { animation: w-blink 4.8s ease-in-out 2.4s infinite; }
.art .scan { animation: w-scan 4.8s ease-in-out infinite; }
.art .scan-r { animation-delay: 2.4s; }
.art .ok { animation: w-pop 4.8s ease-in-out infinite; }
.art .say { animation: w-say 4.8s ease-in-out infinite; }
.art .say:nth-of-type(2) { animation-delay: 0.35s; }
.art .say:nth-of-type(3) { animation-delay: 0.7s; }
.art .cd { animation: w-chip 4.8s ease-in-out infinite; }
.art .cd:nth-child(2) { animation-delay: 0.15s; } .art .cd:nth-child(3) { animation-delay: 0.3s; }
.art .cd:nth-child(4) { animation-delay: 0.45s; } .art .cd:nth-child(5) { animation-delay: 0.6s; }
.art .pkt { animation: w-travel 4.8s linear infinite; }
.art .ring { animation: w-ring 3.6s ease-out infinite; }
.art .ring.r2 { animation-delay: 1.2s; } .art .ring.r3 { animation-delay: 2.4s; }
.art .bt { animation: w-glow 3.6s ease-in-out infinite; }
.art .blip { animation: w-glow 3.6s ease-in-out infinite; }
.art .blip.b2 { animation-delay: 1.8s; }
.art .mic { animation: w-mic 3.6s ease-in-out infinite; }
.art .eqb { animation: w-bar 1.1s ease-in-out infinite; }
.art .eqb.b2 { animation-delay: -0.2s; } .art .eqb.b3 { animation-delay: -0.5s; }
.art .eqb.b4 { animation-delay: -0.35s; } .art .eqb.b5 { animation-delay: -0.8s; }
.art .wave { animation: w-wave 3.6s ease-out infinite; }
.art .wave.w2 { animation-delay: 1.2s; } .art .wave.w3 { animation-delay: 2.4s; }
.art .l1 { animation: w-line 5.4s ease-in-out infinite; }
.art .l2 { animation: w-line 5.4s ease-in-out 0.3s infinite; }
.art .l3 { animation: w-line3 5.4s ease-in-out infinite; }
.art .d1 { animation: w-to-a 5.4s ease-in-out infinite; }
.art .d2 { animation: w-to-b 5.4s ease-in-out infinite; }
.art .who ~ .ok, .art .l3 ~ .ok { animation-name: w-pop-late; animation-duration: 5.4s; }
.art .bub { animation: w-bubble 4.8s ease-in-out infinite; }
.art .plane { animation: w-plane 4.8s ease-in-out infinite; }
.art .lc { animation: w-cell 6s ease-in-out infinite; }
.art .lc:nth-child(3n) { animation-duration: 7.2s; animation-delay: -1.7s; }
.art .lc:nth-child(3n+1) { animation-delay: -3.1s; }
.art .lc:nth-child(5n) { animation-duration: 8.4s; animation-delay: -5.2s; }
.art .lc:nth-child(7n) { animation-delay: -0.8s; }
.art .ray { animation: w-glow 4.2s ease-in-out infinite; }
.art .ray.r2 { animation-delay: -1.4s; } .art .ray.r3 { animation-delay: -2.8s; }
.art .vf { animation: w-glow 4.2s ease-in-out infinite; }

/* off-screen scenes stand still (site.js adds .live while a card is in view) */
.js .way:not(.live) .art * { animation-play-state: paused; }

@keyframes w-cell { 0%, 100% { opacity: 0.85; } 50% { opacity: 0.4; } }
@keyframes w-blink { 0%, 100% { opacity: 1; } 45%, 55% { opacity: 0.35; } }
@keyframes w-scan { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: 0.9; } 42% { transform: translateY(34px); opacity: 0.9; } 50%, 100% { transform: translateY(34px); opacity: 0; } }
@keyframes w-pop { 0%, 55% { opacity: 0; transform: scale(0.5); } 68% { opacity: 1; transform: scale(1.12); } 76%, 92% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes w-pop-late { 0%, 52% { opacity: 0; transform: scale(0.5); } 62% { opacity: 1; transform: scale(1.12); } 70%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes w-say { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 15%, 30% { opacity: 1; transform: scale(1.25); } 45% { opacity: 0.2; transform: scale(0.8); } }
@keyframes w-chip { 0%, 100% { opacity: 0.25; } 12%, 40% { opacity: 1; } 60% { opacity: 0.25; } }
@keyframes w-travel { 0%, 12% { transform: translateX(0); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 92%, 100% { transform: translateX(98px); opacity: 0; } }
@keyframes w-ring { 0% { transform: scale(0.6); opacity: 0.75; } 100% { transform: scale(3.6); opacity: 0; } }
@keyframes w-glow { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(1.08); } }
@keyframes w-mic { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.8); opacity: 1; } }
@keyframes w-bar { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1.9); } }
@keyframes w-wave { 0% { transform: translateX(0) scaleY(0.7); opacity: 0; } 20% { opacity: 0.9; } 100% { transform: translateX(-62px) scaleY(1.5); opacity: 0; } }
@keyframes w-line { 0%, 6% { opacity: 0.2; } 22%, 70% { opacity: 1; } 90%, 100% { opacity: 0.2; } }
@keyframes w-line3 { 0%, 40% { opacity: 0; } 58%, 82% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes w-to-a { 0%, 8% { transform: translate(0, 0); opacity: 0; } 14% { opacity: 1; } 38% { transform: translate(-62px, 56px); opacity: 1; } 44%, 100% { transform: translate(-62px, 56px); opacity: 0; } }
@keyframes w-to-b { 0%, 8% { transform: translate(0, 0); opacity: 0; } 14% { opacity: 1; } 38% { transform: translate(62px, 56px); opacity: 1; } 44%, 100% { transform: translate(62px, 56px); opacity: 0; } }
@keyframes w-bubble { 0%, 100% { transform: scale(1); } 45%, 60% { transform: scale(1.08); } }
@keyframes w-plane { 0%, 8% { transform: translate(0, 0) rotate(0deg); opacity: 0; } 18% { opacity: 1; } 45% { transform: translate(50px, -12px) rotate(-8deg); opacity: 1; } 55% { opacity: 0; } 56% { transform: translate(78px, -12px) rotate(8deg); opacity: 0; } 62% { opacity: 1; } 90% { transform: translate(128px, 0); opacity: 1; } 100% { transform: translate(128px, 0); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: flex; }
  .bar-tools { margin-left: auto; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: repeat(2, 1fr); }
  .ways { grid-template-columns: repeat(2, 1fr); }
  .ways > .way, .ways > .way:nth-child(5) { grid-column: auto; }
  .ways > .way:last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 8px); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-bottom: 88px !important; }
  .demo { max-width: 560px; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { left: 33px; right: auto; top: 34px; bottom: 34px; width: 2px; height: auto; transform: scaleY(var(--line-p, 0)); transform-origin: 50% 0; }
  .step { display: grid; grid-template-columns: 68px 1fr; column-gap: 20px; padding: 0; }
  .step-n { grid-row: span 2; margin: 0; }
  .versus { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --bar-h: 62px; }
  .bar-open { display: none; }
  .brand-name { font-size: 0.98rem; }
  .bento { grid-template-columns: 1fr; }
  .card.big, .card.wide { grid-column: auto; grid-row: auto; }
  .card.wide p { max-width: none; }
  .orbit { display: none; }
  .ratchet { width: 200px; height: 200px; opacity: 0.6; }
  .sec-grid { grid-template-columns: 1fr; }
  .ways { grid-template-columns: 1fr; }
  .ways > .way:last-child { width: auto; }
  .demo { grid-template-columns: 1fr 0.5fr 1fr; }
  .device { min-height: 250px; padding: 12px; border-radius: 20px; }
  .device .words { display: none; }
  .bubble { font-size: 0.8rem; }
  .cipher { font-size: 0.62rem; }
  .os-tabs { display: flex; border-radius: 22px; }
  .os-tabs button { flex: 1 1 auto; padding: 0 12px; }
  .tab-ink { display: none; }
  .os-tabs button[aria-selected="true"] { background: linear-gradient(110deg, var(--a), var(--b)); }
  .cta .btn { flex: 1 1 100%; }
  .foot { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
}

/* ---------- Chrome extension tab: a static copy of the popup (extension/popup.css), light as Chrome shows it by default ---------- */
.ext-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(22px, 4vw, 44px); align-items: start; }
.ext-info .panel-lead { margin-bottom: 18px; }
.ext-info .hint { margin-top: 14px; }
.ext-info .code-line { margin-top: 12px; }
.ext-info .code-line .mono { white-space: normal; word-break: break-all; overflow: visible; line-height: 1.5; }
.sha-label { color: var(--muted); }
.ext-steps { margin-top: 28px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 24px; }
.ext-link { margin-top: 10px; font-size: 0.95rem; }
.ext-link a { color: var(--a); text-decoration: none; font-weight: 600; border-bottom: 1px solid currentColor; }
.mini-steps code, .ext-lead code, .ext-info code { font-family: var(--mono); font-size: 0.86em; padding: 1px 6px; border-radius: 6px; background: var(--a-soft); border: 1px solid var(--line-strong); color: var(--text-h); white-space: nowrap; }

.ext-demo { width: 100%; max-width: 380px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--bg-2); overflow: hidden; box-shadow: 0 30px 60px -36px var(--glow-a); }
.ext-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line-strong); }
.ext-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.ext-addr { flex: 1; margin: 0 8px; padding: 4px 12px; border-radius: 999px; background: var(--bg); font-family: var(--mono); font-size: 0.72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext-pin { width: 22px; height: 22px; border-radius: 6px; background: url("ext-icon.png") center/20px no-repeat; outline: 2px solid var(--b); outline-offset: 2px; }
.ext-popup {
  --p-ink: #f1f5fa; --p-card: #ffffff; --p-line: #cbd7e6; --p-text: #13213a; --p-h: #0c1628; --p-muted: #5c6880; --p-act: #1f6fc4; --p-seal: #d41b7f;
  width: 340px; max-width: calc(100% - 24px); margin: 14px auto 18px; display: flex; flex-direction: column; gap: 14px; padding: 20px 18px 18px;
  color: var(--p-text); font: 15px/1.5 var(--sans); letter-spacing: 0.005em;
  background: var(--p-ink); border-top: 4px solid var(--p-seal); border-image: linear-gradient(90deg, var(--p-seal), var(--p-act)) 1;
  border-radius: 0 0 10px 10px; box-shadow: 0 1px 0 #fff inset, 0 14px 30px -18px rgba(19, 33, 58, 0.5); user-select: none;
}
.ext-brand { display: flex; align-items: center; gap: 12px; }
.ext-ico { flex: none; width: 40px; height: 40px; border-radius: 6px; background: url("ext-icon.png") center/40px no-repeat; }
.ext-h1 { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.15; letter-spacing: -0.01em; color: var(--p-h); }
.ext-sub { margin-top: 2px; color: var(--p-muted); font-size: 13px; }
.ext-status { padding: 11px 14px; border-radius: 6px; background: var(--p-card); color: var(--p-text); }
.ext-btn { min-height: 48px; display: grid; place-items: center; padding: 0.6rem 1rem; text-align: center; border-radius: 6px; font-weight: 600; border: 1.5px solid var(--p-line); background: var(--p-card); color: var(--p-h); }
.ext-btn.primary { border-color: transparent; background: var(--p-act); color: #fff; }
.ext-popup .ext-btn + .ext-btn { margin-top: -4px; }
.ext-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1.5px dashed var(--p-line); color: var(--p-muted); font-size: 12px; }
.ext-foot p { margin: 0; }
@media (max-width: 860px) {
  .ext-grid { grid-template-columns: minmax(0, 1fr); }
  .ext-demo { margin: 0 auto; }
}

/* ---------- motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .grain { display: none; }
  .track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; padding: 0 var(--gut); }
}

/* video tutorials (ADR-010) and experiments */
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.vid { margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.vid video { display: block; width: 100%; height: auto; aspect-ratio: 720 / 616; border-radius: 10px; background: var(--surface-2, #e6eef8); }
.vid figcaption { font-weight: 600; display: flex; gap: 8px; align-items: baseline; padding: 0 4px 4px; }
.exps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.exp { padding: 18px 18px 22px; }
.exp h3 { margin: 0 0 8px; }
