/* ==========================================================================
   ReClash — site.css
   Brand color is three numbers (--bl --bc --bh) written by theme.js.
   Spring easings (--ease-*, --dur-*) are written by motion.js from real physics;
   the cubic-bezier values below are only fallbacks for browsers without linear().
   ========================================================================== */

@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/assets/fonts/unbounded-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/assets/fonts/unbounded-latin.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: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/onest-latin.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: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-latin.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; }

:root {
  color-scheme: dark;
  --bl: 0.7247; --bc: 0.1822; --bh: 46.04;

  /* surfaces lean slightly toward the brand hue, so a recolor is felt everywhere but never loud */
  --bg:   oklch(0.155 calc(0.012 + var(--bc) * 0.07) var(--bh));
  --bg-2: oklch(0.195 calc(0.014 + var(--bc) * 0.08) var(--bh));
  --bg-3: oklch(0.245 calc(0.016 + var(--bc) * 0.09) var(--bh));
  --fg:   oklch(0.945 0.012 85);              /* warm paper #F2EDE3 */
  --fg-2: oklch(0.945 0.012 85 / 0.72);
  --fg-3: oklch(0.945 0.012 85 / 0.5);
  --line: oklch(0.945 0.012 85 / 0.1);
  --line-2: oklch(0.945 0.012 85 / 0.2);

  --brand:   oklch(var(--bl) var(--bc) var(--bh));
  --brand-2: oklch(min(0.9, calc(var(--bl) + 0.07)) calc(var(--bc) * 0.85) calc(var(--bh) + 52));
  --brand-3: oklch(calc(var(--bl) - 0.05) var(--bc) calc(var(--bh) - 64));
  --brand-soft: oklch(var(--bl) var(--bc) var(--bh) / 0.14);
  --brand-line: oklch(var(--bl) var(--bc) var(--bh) / 0.42);
  --glow: oklch(0.55 calc(var(--bc) * 0.9) var(--bh) / 0.42);
  --on-brand: oklch(0.17 0.03 var(--bh));

  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --text: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --ease-gentle: cubic-bezier(0.22, 1, 0.36, 1);   --dur-gentle: 900ms;
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);   --dur-smooth: 600ms;
  --ease-snappy: cubic-bezier(0.2, 0.9, 0.3, 1);   --dur-snappy: 380ms;
  --ease-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);--dur-bouncy: 700ms;
  --ease-jelly:  cubic-bezier(0.34, 1.8, 0.64, 1); --dur-jelly: 1000ms;

  --pad: clamp(20px, 4vw, 48px);
  --r-s: 14px; --r-m: 22px; --r-l: 34px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 96px; }
body {
  margin: 0; font: 400 1.0625rem/1.65 var(--text); letter-spacing: 0.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand);
  padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; transition: top 0.2s; }
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--pad); }

/* paper grain — static, keeps big dark fields from looking flat */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.05; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, footer { position: relative; z-index: 1; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 3.75rem); line-height: 1.04; letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(1.06rem, 1.3vw, 1.2rem); color: var(--fg-2); max-width: 54ch; }
.muted { color: var(--fg-2); }
.tlink { color: var(--fg); text-decoration: underline; text-decoration-color: var(--brand-line);
  text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; transition: text-decoration-color 0.2s, color 0.2s; }
.tlink:hover { text-decoration-color: var(--brand); color: var(--brand-2); }
code, .mono { font-family: var(--mono); font-size: 0.9em; }

/* word reveal: masked, rises from a stretched state and settles on a spring */
.js [data-words] .w { display: inline-block; overflow: clip; overflow-clip-margin: 0.12em; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.js [data-words] .wi { display: inline-block; transform: translateY(108%) scaleY(1.35); transform-origin: 50% 100%;
  transition: transform var(--dur-bouncy) var(--ease-bouncy); transition-delay: calc(var(--i) * 38ms); }
.js [data-words].is-in .wi { transform: none; }
.js [data-fade] { opacity: 0; transform: translateY(14px);
  transition: opacity 0.7s ease, transform var(--dur-gentle) var(--ease-gentle); transition-delay: var(--d, 0ms); }
.js [data-fade].is-in { opacity: 1; transform: none; }

/* ---------- buttons (no magnets: press physics only) ---------- */
.btn {
  --h: 54px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-bouncy) var(--ease-bouncy), box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.955); transition-duration: 120ms; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 10px 30px -12px var(--glow); }
.btn-primary:hover { background: oklch(min(0.92, calc(var(--bl) + 0.06)) var(--bc) var(--bh)); }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--fg-3); background: oklch(0.945 0.012 85 / 0.04); }
.btn-s { --h: 42px; padding: 0 18px; font-size: 0.94rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- magnet indicator (shared look) ---------- */
[data-group] { position: relative; isolation: isolate; }
.mg-ind { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; opacity: 0;
  border-radius: 999px; background: var(--bg-3); }
/* Light plates: the label under the plate turns dark, and the selected label lets go of its
   dark color while the plate visits a neighbour, so no label ever sits light-on-light. */
.lang a.is-mg, .plat-tabs button.is-mg { color: var(--bg); }
.lang:has(.is-mg) a[aria-current='true']:not(.is-mg),
.plat-tabs:has(.is-mg) button[aria-pressed='true']:not(.is-mg) { color: var(--fg-2); }
[data-mg] .mg-c { display: inline-block; transform: translate(var(--mx, 0), var(--my, 0));
  transition: transform var(--dur-smooth) var(--ease-smooth); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav { position: fixed; inset: 14px var(--pad) auto; z-index: 60; display: flex; justify-content: center;
  transition: translate var(--dur-smooth) var(--ease-smooth); }
.nav.is-hidden { translate: 0 calc(-100% - 28px); }
/* Chrome drops the backdrop blur while the bar slides back, so it stays nearly opaque until the slide ends */
.nav-bar { transition: background-color 0.3s var(--dur-smooth); }
.nav.is-hidden .nav-bar { background-color: color-mix(in oklab, var(--bg-2) 96%, transparent); transition-delay: 0s; }
.nav-bar { width: 100%; max-width: 1240px; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px;
  border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg-2) 74%, transparent); backdrop-filter: blur(20px) saturate(1.4); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.06rem var(--display); letter-spacing: -0.02em; margin-right: auto; padding: 6px 4px; }
.nav-links { display: flex; align-items: center; gap: 2px; padding: 0; margin: 0; list-style: none; }
.nav-links .mg-ind { background: oklch(0.945 0.012 85 / 0.08); }
.nav-a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 15px; border-radius: 999px; color: var(--fg-2);
  text-decoration: none; font-size: 0.95rem; font-weight: 500; background: none; border: 0; cursor: pointer; transition: color 0.2s; }
.nav-a.is-mg, .nav-a[aria-current='page'], .nav-a[aria-expanded='true'] { color: var(--fg); }
.nav-a[aria-current='page']::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.nav-a .chev { width: 12px; height: 12px; transition: transform var(--dur-bouncy) var(--ease-bouncy); }
.nav-a[aria-expanded='true'] .chev { transform: rotate(180deg); }

.dd { position: relative; }
.dd-panel { position: absolute; top: calc(100% + 12px); left: 50%; width: 300px; padding: 8px; margin: 0; list-style: none;
  border-radius: var(--r-m); border: 1px solid var(--line); background: var(--bg-2); box-shadow: 0 30px 60px -20px oklch(0 0 0 / 0.6);
  transform-origin: 50% 0; translate: -50% -6px; scale: 0.92 0.7; opacity: 0; visibility: hidden;
  transition: scale var(--dur-bouncy) var(--ease-bouncy), translate var(--dur-bouncy) var(--ease-bouncy), opacity 0.18s, visibility 0s 0.3s; }
.dd.is-open .dd-panel { translate: -50% 0; scale: 1; opacity: 1; visibility: visible; transition-delay: 0s; }
.dd-panel .mg-ind { border-radius: 14px; background: var(--bg-3); }
.dd-panel a { display: block; padding: 11px 14px; border-radius: 14px; text-decoration: none; }
.dd-panel b { display: block; font-weight: 600; font-size: 0.95rem; }
.dd-panel span.s { display: block; color: var(--fg-3); font-size: 0.84rem; line-height: 1.4; margin-top: 2px; }

.lang { display: flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.lang .mg-ind { background: var(--fg); }
.lang a { position: relative; padding: 7px 11px; font: 600 0.78rem var(--display); text-decoration: none; color: var(--fg-2);
  border-radius: 999px; transition: color 0.25s; }
.lang a[aria-current='true'] { color: var(--bg); }
.nav .btn { margin-left: 4px; }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--bg-3); cursor: pointer; place-items: center; }
.burger svg { width: 22px; height: 22px; }
.burger path { transition: d var(--dur-bouncy) var(--ease-bouncy); }

.menu { position: fixed; inset: 0; z-index: 55; background: var(--bg-2); padding: 104px var(--pad) 32px; overflow: auto;
  clip-path: circle(0 at var(--ox, 90%) var(--oy, 40px)); visibility: hidden;
  transition: clip-path var(--dur-gentle) var(--ease-gentle), visibility 0s var(--dur-gentle); }
.menu.is-open { clip-path: circle(150% at var(--ox, 90%) var(--oy, 40px)); visibility: visible; transition-delay: 0s; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 10px 0; text-decoration: none; font: 600 clamp(1.6rem, 7vw, 2.4rem)/1.15 var(--display); letter-spacing: -0.02em;
  transform: translateY(30px); opacity: 0; transition: transform var(--dur-bouncy) var(--ease-bouncy), opacity 0.3s; transition-delay: calc(var(--i) * 40ms); }
.menu .sub a { font: 500 1.05rem var(--text); padding: 8px 0; color: var(--fg-2); }
.menu.is-open a { transform: none; opacity: 1; }
.menu h4 { margin: 28px 0 6px; font: 500 0.9rem var(--text); color: var(--fg-3); }

@media (max-width: 960px) {
  .nav-links, .nav .lang { display: none; }
  .burger { display: grid; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; height: 270vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-glow { position: absolute; left: 0; top: 0; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent 72%); pointer-events: none; will-change: transform; }
.hero-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; touch-action: pan-y; }
.hero-svg .orbit { fill: none; stroke: var(--line-2); stroke-width: 1; }
.hero-svg .ticks { fill: none; stroke: var(--fg-3); stroke-width: 1; stroke-dasharray: 1 9; }
.hero-svg .pnode circle.dot { fill: var(--bg); stroke: var(--brand); stroke-width: 2.5; }
.hero-svg .pnode circle.halo { fill: var(--brand-soft); }
.hero-svg .pnode text { fill: var(--fg); font: 600 15px var(--text); }

.hero-copy { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-46%); z-index: 2; pointer-events: none; }
.hero-copy .wrap > * { pointer-events: auto; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 999px; font-size: 0.86rem;
  color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line-2); text-decoration: none; background: color-mix(in oklab, var(--bg) 60%, transparent); }
a.tag:hover { color: var(--fg); }
.tag .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 var(--brand-line); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero-h1 { font-size: clamp(2.5rem, 5.4vw, 6.2rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; text-wrap: nowrap; }
.hero-h1 .hl { display: block; will-change: transform; transform-origin: 0 60%; }
.hero-h1 .hl > .t { display: inline-block; }
.slot { position: relative; display: inline-flex; align-items: center; height: 1.2em; padding: 0 0.34em; margin-left: -0.08em;
  border-radius: 999px; background: var(--brand); color: var(--on-brand); overflow: hidden; vertical-align: -0.2em; }
.slot-in { position: relative; display: inline-flex; white-space: pre; line-height: 1; translate: 0 -0.02em; }
.slot .ch { display: inline-block; transition: transform var(--dur-bouncy) var(--ease-bouncy), opacity 0.25s; transition-delay: calc(var(--i) * 26ms); }
.slot .ch.from-top { transform: translateY(-115%) scaleY(1.4); }
.slot-out { position: absolute; left: 0.34em; top: 50%; translate: 0 -50%; display: inline-flex; white-space: pre; line-height: 1; }
.slot-out .ch { transition: transform 0.5s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.4s; transition-delay: calc(var(--i) * 18ms); }
.slot-out .ch.gone { transform: translateY(120%) rotate(8deg); opacity: 0; }
.hero-dot { color: var(--brand); }
.slot-measure { position: absolute; visibility: hidden; white-space: pre; left: -9999px; }

.hero-sub { margin-top: 28px; max-width: 44ch; font-size: clamp(1.04rem, 1.25vw, 1.18rem); color: var(--fg-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-cue { position: absolute; left: var(--pad); bottom: 26px; display: flex; align-items: center; gap: 12px; color: var(--fg-3); font-size: 0.88rem; z-index: 2; }
.hero-cue i { position: relative; width: 1.5px; height: 42px; background: var(--line); overflow: hidden; }
.hero-cue i::after { content: ''; position: absolute; inset: 0; background: var(--fg); animation: cue 2.2s var(--ease-gentle) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

.hero-manifesto { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; padding: 0 var(--pad); }
.hero-manifesto p { font: 500 clamp(1.3rem, 2.6vw, 2.35rem)/1.28 var(--display); letter-spacing: -0.02em; text-align: center; max-width: 21ch; }
.hero-manifesto .mw { opacity: var(--o, 0.12); transition: opacity 0.12s linear; }
.hero-manifesto .mw.em { color: var(--brand-2); }

@media (max-width: 760px) {
  .hero-copy { top: 13%; transform: none; }
  .hero-h1 { font-size: clamp(2.1rem, 10.4vw, 3.4rem); text-wrap: wrap; }
  .hero-sub { margin-top: 20px; }
  .hero-cta { margin-top: 24px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-tags { margin-bottom: 20px; }
}

/* reduced motion: no pin, no scrub — the manifesto becomes a plain statement */
.rm .hero { height: auto; }
.rm .hero-stage { position: relative; height: 100svh; }
.rm .hero-manifesto { position: relative; inset: auto; padding: 96px var(--pad); }
.rm .hero-manifesto .mw { --o: 1 !important; }
.rm .hero-cue { display: none; }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.sec { padding-block: clamp(96px, 15vh, 180px); position: relative; }
.sec-head { display: grid; gap: 22px; margin-bottom: clamp(44px, 7vh, 80px); max-width: 860px; }

/* ---- screens ---- */
.slider { --sh: clamp(380px, 64vh, 640px); display: grid; gap: clamp(20px, 3vh, 32px); }
.slider-track { display: flex; align-items: start; gap: clamp(24px, 4vw, 64px); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 8px calc(50% - var(--sh) * 0.254) 12px; scrollbar-width: none; outline: none; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track:focus-visible .slide.is-active img { outline: 2px solid var(--brand); outline-offset: 6px; }
.slide { flex: none; margin: 0; display: grid; grid-template-rows: var(--sh) auto; justify-items: center; gap: 22px; scroll-snap-align: center;
  opacity: 0.38; transform: scale(0.93); transition: opacity 0.45s, transform var(--dur-bouncy) var(--ease-bouncy); cursor: pointer; }
.slide.is-active { opacity: 1; transform: none; cursor: default; }
.slide img { align-self: center; height: var(--sh); width: auto; border-radius: var(--r-m); filter: drop-shadow(0 34px 48px oklch(0 0 0 / 0.5)); user-select: none; }
.slide.is-wide img { height: auto; width: min(calc(var(--sh) * 1.546), 86vw); }
.slide figcaption { display: grid; gap: 6px; text-align: center; max-width: 34ch; }
.slide figcaption b { font: 600 1.12rem var(--display); letter-spacing: -0.01em; }
.slide figcaption span { color: var(--fg-2); font-size: 0.95rem; line-height: 1.5; }
.slider-bar { display: flex; align-items: center; justify-content: center; gap: 20px; }
.slider-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bg-2); color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background 0.2s, color 0.2s, opacity 0.2s; }
.slider-btn svg { width: 22px; height: 22px; }
.slider-btn:hover:not(:disabled) { background: var(--brand); color: var(--on-brand); }
.slider-btn:disabled { opacity: 0.3; cursor: default; }
.slider-dots { display: flex; gap: 8px; }
.slider-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--fg-3); opacity: 0.5; cursor: pointer;
  transition: width var(--dur-bouncy) var(--ease-bouncy), background 0.2s, opacity 0.2s; }
.slider-dot.is-active { width: 28px; background: var(--brand); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .slide, .slider-dot { transition: none; } }
@media (max-width: 640px) { .slider { --sh: min(62vh, 520px); } .slide { gap: 16px; } }

/* ---- compare ---- */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
.cmp th, .cmp td { padding: 20px 22px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.98rem; line-height: 1.5; }
.cmp thead th { font: 600 0.82rem/1.2 var(--text); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); padding-block: 14px; border-bottom-color: var(--line-2); }
.cmp tbody th { font-weight: 600; color: var(--fg); width: 22%; }
.cmp td { color: var(--fg-2); width: 34%; }
.cmp .cmp-us { background: var(--brand-soft); box-shadow: inset 1px 0 0 var(--brand-line), inset -1px 0 0 var(--brand-line); color: var(--fg); }
.cmp thead .cmp-us { color: var(--brand-2); border-top-left-radius: var(--r-s); border-top-right-radius: var(--r-s); box-shadow: inset 1px 0 0 var(--brand-line), inset -1px 0 0 var(--brand-line), inset 0 1px 0 var(--brand-line); }
.cmp tbody tr:last-child .cmp-us { border-bottom-left-radius: var(--r-s); border-bottom-right-radius: var(--r-s); box-shadow: inset 1px 0 0 var(--brand-line), inset -1px 0 0 var(--brand-line), inset 0 -1px 0 var(--brand-line); border-bottom-color: transparent; }
@media (max-width: 640px) {
  .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; width: auto; }
  .cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cmp tbody tr { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-2); overflow: hidden; }
  .cmp tbody th { width: auto; padding: 16px 18px 6px; border: 0; font-size: 1.04rem; }
  .cmp td { padding: 10px 18px; border: 0; }
  .cmp td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
  .cmp .cmp-us, .cmp tbody tr:last-child .cmp-us { box-shadow: none; border-radius: 0; }
  .cmp .cmp-us::before { color: var(--brand-2); }
}

/* ---- lineage ---- */
.lineage { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.lineage-copy { display: grid; gap: 22px; }
.lineage-note { font-size: 0.92rem; color: var(--fg-3); }
.stack { display: grid; grid-template-columns: minmax(240px, 1.15fr) 1fr; align-items: center; gap: 12px; }
.stack-svg { width: 100%; overflow: visible; }
.slab { transform-box: view-box; }
.slab .top { stroke: oklch(1 0 0 / 0.14); stroke-width: 1; }
.slab-0 .top { fill: oklch(0.32 0.02 var(--bh)); } .slab-0 .l { fill: oklch(0.22 0.02 var(--bh)); } .slab-0 .r { fill: oklch(0.26 0.02 var(--bh)); }
.slab-1 .top { fill: oklch(0.42 0.035 var(--bh)); } .slab-1 .l { fill: oklch(0.28 0.03 var(--bh)); } .slab-1 .r { fill: oklch(0.33 0.03 var(--bh)); }
.slab-2 .top { fill: url(#slabGrad); } .slab-2 .l { fill: oklch(calc(var(--bl) - 0.28) calc(var(--bc) * 0.7) var(--bh)); } .slab-2 .r { fill: oklch(calc(var(--bl) - 0.2) calc(var(--bc) * 0.8) var(--bh)); }
.stack-list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; }
.stack-list .mg-ind { border-radius: 18px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.stack-list li { padding: 14px 16px; border-radius: 18px; cursor: default; }
.stack-list b { display: block; font: 600 1.02rem var(--display); letter-spacing: -0.01em; }
.stack-list span.s { display: block; color: var(--fg-2); font-size: 0.93rem; line-height: 1.45; margin-top: 3px; }
.stack-list li:first-of-type b { color: var(--brand-2); }
@media (max-width: 900px) { .lineage { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .stack { grid-template-columns: 1fr; } .stack-svg { max-width: 280px; justify-self: center; } }

/* ---- features ---- */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 0; list-style: none;
  border-top: 1px solid var(--line); }
.feats .mg-ind { border-radius: var(--r-l); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--brand-line), 0 30px 60px -40px var(--glow); }
.feat { position: relative; padding: clamp(28px, 3vw, 40px); border-bottom: 1px solid var(--line); display: grid; gap: 14px; align-content: start; min-height: 290px; }
.feat:not(:nth-of-type(3n)) { border-right: 1px solid var(--line); }
.feat .ico { width: 72px; height: 72px; margin-bottom: 10px; overflow: visible; }
.feat p { color: var(--fg-2); font-size: 0.99rem; line-height: 1.6; max-width: 36ch; }
.feat .tlink { font-size: 0.94rem; font-weight: 500; justify-self: start; margin-top: 4px; }
@media (max-width: 1000px) {
  .feats { grid-template-columns: repeat(2, 1fr); }
  .feat:not(:nth-of-type(3n)) { border-right: 0; }
  .feat:nth-of-type(odd) { border-right: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .feats { grid-template-columns: 1fr; }
  .feat:nth-of-type(odd) { border-right: 0; }
  .feat { min-height: 0; }
}

/* icon language: 2px strokes, brand only where something "happens" */
.ico * { vector-effect: non-scaling-stroke; }
.ico .s { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico .b { fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ico .f { fill: var(--brand); }
.ico .dim { opacity: 0.35; }
.ico .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease-gentle); transition-delay: var(--d, 0s); }
.is-in .ico .draw { stroke-dashoffset: 0; }
.ico g, .ico path, .ico circle, .ico rect { transform-box: fill-box; transform-origin: center; }
.feat .ico * { transition-property: transform, opacity, stroke-dashoffset, fill, d; transition-duration: var(--dur-bouncy); transition-timing-function: var(--ease-bouncy); }

/* core: orbit spins up */
.i-core .orb { transform-origin: 32px 32px; transform-box: view-box; transition: transform 1.2s var(--ease-gentle); }
.feat.is-mg .i-core .orb { transform: rotate(240deg); }
.feat.is-mg .i-core .nuc { transform: scale(1.18); }
/* auto: route reroutes */
.i-auto .r1 { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 0.5s ease, opacity 0.3s; }
.i-auto .r2 { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.8s var(--ease-gentle) 0.15s; }
.i-auto .x { opacity: 0; transform: scale(0.3); }
.feat.is-mg .i-auto .r1 { stroke-dashoffset: -1; opacity: 0.25; }
.feat.is-mg .i-auto .r2 { stroke-dashoffset: 0; }
.feat.is-mg .i-auto .x { opacity: 1; transform: none; }
/* provider: a drop lands and floods the tile */
.i-prov .drop { transform: translateY(-4px); }
.i-prov .fill { transform: scaleY(0); transform-origin: 50% 100%; }
.feat.is-mg .i-prov .drop { transform: translateY(16px) scale(0.6); opacity: 0; transition-duration: 0.45s; transition-timing-function: cubic-bezier(0.5, 0, 0.8, 0.4); }
.feat.is-mg .i-prov .fill { transform: none; transition-delay: 0.32s; }
/* dpi: packet splits through the wall */
.i-dpi .pa, .i-dpi .pb { transition-duration: var(--dur-jelly); transition-timing-function: var(--ease-jelly); }
.feat.is-mg .i-dpi .pa { transform: translate(38px, -6px); }
.feat.is-mg .i-dpi .pb { transform: translate(16px, 0); }
/* scope: whole system ↔ apps */
.i-scope .all { transition-duration: var(--dur-jelly); transition-timing-function: var(--ease-jelly); }
.feat.is-mg .i-scope .all { transform: translate(-12px, -8px) scale(0.42); }
.feat.is-mg .i-scope .app { fill: var(--brand); }
/* traffic gauge fills */
.i-meter .arc { stroke-dasharray: 1; stroke-dashoffset: 0.82; transition: stroke-dashoffset 1s var(--ease-bouncy); }
.feat.is-mg .i-meter .arc { stroke-dashoffset: 0.45; }

/* ---- setup steps ---- */
.setup { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 34px; counter-reset: s; }
.steps::before, .steps::after { content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; border-radius: 2px; background: var(--line); }
.steps::after { background: linear-gradient(var(--brand), var(--brand-2)); transform-origin: 0 0; transform: scaleY(var(--p, 0)); }
.step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 20px; }
.step-n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 600 0.95rem var(--display);
  background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--fg-2); position: relative; z-index: 1;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform var(--dur-jelly) var(--ease-jelly); }
.step.is-on .step-n { background: var(--brand); color: var(--on-brand); box-shadow: none; transform: scale(1.08); }
.step h3 { font-size: 1.3rem; margin: 8px 0 8px; }
.step p { color: var(--fg-2); }

.importer { position: sticky; top: 110px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-l); background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 18px; }
.importer.is-static { position: relative; top: 0; }
.imp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.importer h3 { font-size: 1.35rem; }
.imp-local { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 500; color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; }
.imp-local svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.imp-text { margin-top: -6px; font-size: 0.98rem; }
.field { display: grid; gap: 8px; }
.field label, .field .lbl { font-size: 0.92rem; font-weight: 500; color: var(--fg-2); }
.input { width: 100%; height: 54px; padding: 0 18px; border-radius: 16px; border: 0; background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 1rem; transition: box-shadow 0.2s; }
.input::placeholder { color: var(--fg-3); }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.input[aria-invalid='true'] { box-shadow: inset 0 0 0 2px oklch(0.7 0.18 25); }
.field .err { color: oklch(0.78 0.14 25); font-size: 0.9rem; min-height: 0; }
.field .err:empty { display: none; }
/* input and button share one row; the demo types into a ghost layer, never into the value */
.imp-row { display: flex; gap: 8px; padding: 5px; border-radius: 20px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow 0.2s; }
.imp-row:focus-within { box-shadow: inset 0 0 0 2px var(--brand); }
.imp-row:has([aria-invalid='true']) { box-shadow: inset 0 0 0 2px oklch(0.7 0.18 25); }
.imp-input { position: relative; flex: 1; min-width: 0; }
.imp-row .input { height: 46px; padding: 0 12px; background: none; box-shadow: none; font: 0.94rem var(--mono); }
.imp-row .input:focus, .imp-row .input[aria-invalid='true'] { box-shadow: none; }
.imp-row .btn { --h: 46px; padding: 0 18px; font-size: 0.94rem; flex: none; }
.imp-ghost { position: absolute; inset: 0 12px; display: flex; align-items: center; pointer-events: none; overflow: hidden;
  font: 0.94rem var(--mono); color: var(--fg-3); white-space: pre; }
.imp-ghost:empty { display: none; }
.imp-ghost.is-over { justify-content: flex-end; }
.imp-ghost::after { content: ''; flex: none; width: 2px; height: 1.15em; margin-left: 1px; border-radius: 1px; background: var(--brand); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.importer.is-typing .imp-input .input::placeholder { color: transparent; }

.out { position: relative; border-radius: 18px; background: var(--bg); padding: 14px 18px 16px; box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden; display: grid; gap: 8px; transition: box-shadow 0.3s; }
.out.is-valid { box-shadow: inset 0 0 0 1px var(--brand-line); }
.out-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.out .lbl { font-size: 0.86rem; color: var(--fg-3); }
.out-state { display: inline-flex; align-items: center; gap: 7px; font: 500 0.76rem var(--mono); color: var(--fg-3); }
.out-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); transition: background-color 0.3s, box-shadow 0.3s; }
.out.is-building .out-state i { background: var(--brand); animation: impPulse 0.9s ease-in-out infinite; }
.out.is-valid .out-state i { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
@keyframes impPulse { 50% { opacity: 0.35; } }
.out code { display: block; min-height: 3.1em; word-break: break-all; color: var(--fg); font-size: 0.88rem; line-height: 1.55; }
.out code .seg-s, .out code .seg-q { color: var(--fg-3); }
.out code .hl { color: var(--brand-2); }
.out code .ch { display: inline-block; animation: chIn 0.42s var(--ease-bouncy) both; }
@keyframes chIn { from { opacity: 0; transform: translateY(0.5em) scale(0.6); filter: blur(2px); } }
.out-parts { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; font-size: 0.76rem; color: var(--fg-3); }
.out-parts li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); }
.out-parts li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); }
.out-parts .p-a::before { background: var(--fg); }
.out-parts .p-u::before { background: var(--brand-2); }
.out.flash::after { content: ''; position: absolute; inset: 0; background: var(--brand-soft); animation: flash 0.9s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 520px) { .imp-row { flex-direction: column; } .imp-row .btn { width: 100%; } }
.copy-btn .ok { display: none; }
.copy-btn.is-done .ok { display: block; }
.copy-btn.is-done .cp { display: none; }
.copy-btn .ico-m path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .setup { grid-template-columns: 1fr; } .importer { position: relative; top: 0; } }
@media (prefers-reduced-motion: reduce) { .out code .ch, .imp-ghost::after, .out.is-building .out-state i { animation: none; } }

/* ---- providers ---- */
.prov { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.prov-copy { display: grid; gap: 24px; }
.prov-copy .row { display: flex; flex-wrap: wrap; gap: 12px; }
.studio { position: relative; border-radius: var(--r-l); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.studio-top { display: grid; gap: 14px; padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.studio-top .lbl { font-size: 0.88rem; color: var(--fg-3); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; margin: -4px; }
.swatches .mg-ind { border-radius: 50%; background: none; box-shadow: 0 0 0 2px var(--fg); }
.sw { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; background: none; }
.sw i { width: 30px; height: 30px; border-radius: 50%; background: var(--c); transition: transform var(--dur-bouncy) var(--ease-bouncy); }
.sw:hover i { transform: scale(1.12); }
.sw:active i { transform: scale(0.85); transition-duration: 100ms; }
.sw-custom i { background: conic-gradient(from 90deg, #ff5c7c, #ffb03d, #c8ff3d, #3ee8ff, #8a5cff, #ff5c7c); display: grid; place-items: center; }
.sw-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.studio-name { display: flex; gap: 10px; align-items: center; }
.studio-name .input { height: 46px; border-radius: 14px; font-size: 0.95rem; }
.studio-body { display: grid; grid-template-columns: 1.1fr 0.9fr; }
.http { margin: 0; padding: 22px; font: 400 0.8rem/1.7 var(--mono); color: var(--fg-2); border-right: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.http .k { color: var(--fg-3); }
.http .v { color: var(--fg); }
.http .line { display: block; border-radius: 6px; margin: 0 -8px 2px; padding: 0 8px 0 calc(8px + 1.4em); text-indent: -1.4em; }
.http .line.tick { animation: tick 1.1s ease-out; }
@keyframes tick { from { background: var(--brand-soft); } to { background: transparent; } }
.http .rk { color: var(--brand-2); }
.preview { padding: 22px; display: grid; align-content: center; position: relative; overflow: hidden; }
.preview-cap { font-size: 0.82rem; color: var(--fg-3); margin-bottom: 12px; }
.ripple { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); pointer-events: none; opacity: 0.0; }
.subcard { position: relative; border-radius: 22px; background: var(--bg); padding: 18px; display: grid; gap: 14px; box-shadow: 0 20px 50px -30px var(--glow), inset 0 0 0 1px var(--line); }
.sc-head { display: flex; align-items: center; gap: 12px; }
.sc-logo { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font: 700 1.05rem var(--display); color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand-2), var(--brand) 50%, var(--brand-3)); flex: none; }
.sc-name { font: 600 1rem var(--display); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-sub { font-size: 0.82rem; color: var(--fg-3); }
.sc-ann { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; line-height: 1.45; padding: 10px 12px; border-radius: 14px; background: var(--brand-soft); }
.sc-ann svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--brand); }
.sc-traffic { display: grid; gap: 8px; }
.sc-row { display: flex; justify-content: space-between; font-size: 0.86rem; color: var(--fg-2); }
.sc-row b { color: var(--fg); font-weight: 600; }
.sc-bar { height: 8px; border-radius: 99px; background: var(--bg-3); overflow: hidden; }
.sc-bar i { display: block; height: 100%; width: 31%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.sc-btn { height: 42px; border-radius: 999px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 600; font-size: 0.92rem; }
.studio-foot { padding: 14px 22px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--fg-3); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--fg-2); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line-2); font-size: inherit; }
.linkbtn:hover { color: var(--fg); }
@media (max-width: 1060px) { .prov { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .studio-body { grid-template-columns: 1fr; } .http { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---- platforms ---- */
.plats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; list-style: none; margin: 0; padding: 0; }
.plats .mg-ind { border-radius: var(--r-l); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.plat { padding: 30px 26px 34px; display: grid; gap: 18px; align-content: start; border-left: 1px solid var(--line); }
.plat:first-of-type { border-left: 0; }
.plat h3 { font-size: clamp(1.4rem, 2.1vw, 1.9rem); font-weight: 400; letter-spacing: -0.03em; transition: font-weight var(--dur-smooth) var(--ease-smooth), color 0.3s; }
.plat.is-mg h3 { font-weight: 800; color: var(--brand-2); }
.plat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--fg-2); font-size: 0.97rem; }
.plat li { display: flex; gap: 10px; align-items: baseline; }
.plat li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--fg-3); translate: 0 -2px; transition: background 0.3s, transform var(--dur-bouncy) var(--ease-bouncy); }
.plat.is-mg li::before { background: var(--brand); transform: rotate(45deg) scale(1.2); }
.plats-foot { margin-top: 36px; color: var(--fg-2); }
@media (max-width: 900px) { .plats { grid-template-columns: 1fr 1fr; } .plat:nth-of-type(3) { border-left: 0; } }
@media (max-width: 520px) { .plats { grid-template-columns: 1fr; } .plat { border-left: 0; border-top: 1px solid var(--line); } }

/* ---- honest ---- */
.honest { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.chain { width: 100%; max-width: 480px; overflow: visible; justify-self: center; }
.chain .lk { fill: none; stroke-width: 15; stroke-linecap: round; }
.chain .lk-a { stroke: oklch(0.42 0.015 var(--bh)); } .chain .lk-b { stroke: oklch(0.68 0.012 85); } .chain .lk-c { stroke: var(--brand); }
.chain .lk-b { stroke-dasharray: 100 0; stroke-dashoffset: 0; transition: stroke-dasharray 0.9s var(--ease-bouncy) 0.2s; }
.chain.is-in .lk-b { stroke-dasharray: 84 16; }
.chain .free { transform-box: view-box; transform-origin: 300px 100px; transition: transform var(--dur-jelly) var(--ease-jelly) 0.5s; }
.chain.is-in .free { transform: translate(60px, 18px) rotate(16deg); }
@media (max-width: 860px) { .honest { grid-template-columns: 1fr; } }

/* ---- next ---- */
.next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.next .mg-ind { border-radius: 40px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--brand-line); }
.path { position: relative; display: grid; gap: 16px; align-content: start; padding: clamp(28px, 4vw, 52px); text-decoration: none; border-radius: 40px; min-height: 340px; }
.path { box-shadow: inset 0 0 0 1px var(--line); }
.path .who { color: var(--fg-3); font-size: 0.95rem; }
.path h3 { font-size: clamp(1.6rem, 2.8vw, 2.6rem); line-height: 1.06; letter-spacing: -0.03em; max-width: 14ch; }
.path p { color: var(--fg-2); max-width: 40ch; }
.path .go { margin-top: auto; display: inline-flex; align-items: center; gap: 12px; font-weight: 600; }
.path .go svg { width: 40px; height: 40px; border-radius: 50%; padding: 11px; background: var(--brand); color: var(--on-brand);
  transition: transform var(--dur-jelly) var(--ease-jelly); }
.path.is-mg .go svg { transform: translateX(8px) rotate(-45deg); }
.path .blob { position: absolute; right: 8%; top: 12%; width: 150px; height: 150px; opacity: 0.9; pointer-events: none; }
.path .blob path { fill: var(--brand-soft); }
@media (max-width: 820px) { .next { grid-template-columns: 1fr; } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.foot { padding: 80px 0 28px; border-top: 1px solid var(--line); position: relative; z-index: 1; overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-about p { color: var(--fg-2); max-width: 34ch; margin: 14px 0 18px; font-size: 0.97rem; }
.foot h4 { margin: 0 0 14px; font: 500 0.92rem var(--text); color: var(--fg-3); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot ul a { text-decoration: none; color: var(--fg-2); font-size: 0.97rem; transition: color 0.2s; }
.foot ul a:hover { color: var(--fg); }
.foot-social { display: flex; gap: 8px; }
.wordmark { display: flex; justify-content: space-between; margin: 64px 0 20px; font: 800 clamp(4rem, 17.5vw, 15rem)/0.8 var(--display);
  letter-spacing: -0.05em; color: var(--bg-3); user-select: none; }
.wordmark-text { display: contents; }
.wordmark-text span { display: inline-block; transform-origin: 50% 100%; will-change: transform; }
.wordmark-mark { height: 0.74em; width: 0.74em; flex: none; align-self: center; margin-right: -0.06em; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--fg-3); font-size: 0.86rem; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: pulse 2.4s infinite; box-shadow: 0 0 0 0 var(--brand-line); }
.foot-legal .live { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } .foot-legal .live { margin-left: 0; } }

/* ---------- reduced motion: kill decorative transitions, keep state changes instant ---------- */
.rm *, .rm *::before, .rm *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-delay: 0s !important; }

/* ==========================================================================
   INNER PAGES — shared page head with a small jelly ring
   ========================================================================== */
.ph { position: relative; padding: clamp(130px, 18vh, 180px) 0 clamp(56px, 9vh, 96px); }
.ph-grid { display: grid; grid-template-columns: 1fr minmax(220px, 340px); gap: clamp(28px, 5vw, 80px); align-items: center; }
.ph h1 { font-size: clamp(2.4rem, 5.6vw, 5rem); line-height: 1.02; letter-spacing: -0.035em; }
.ph .lede { margin-top: 24px; }
.ph-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ph-ring { width: 100%; aspect-ratio: 1; overflow: visible; touch-action: pan-y; cursor: pointer; }
.ph-ring .rg { fill: none; stroke: url(#phG); stroke-linejoin: round; }
.ph-ring .glyph { fill: none; stroke: var(--fg); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.ph-ring .glow { fill: var(--glow); filter: blur(40px); opacity: 0.6; }
@media (max-width: 760px) { .ph-grid { grid-template-columns: 1fr; } .ph-ring { max-width: 190px; order: -1; } }

.sub-sec { padding-block: clamp(72px, 11vh, 130px); }
.sub-sec + .sub-sec { border-top: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.two .sec-head { position: sticky; top: 110px; margin: 0; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } .two .sec-head { position: static; } }

.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg-2); font-size: 0.94rem; line-height: 1.55; }
.note svg { width: 18px; height: 18px; flex: none; color: var(--brand); margin-top: 2px; }
.note.warn svg { color: oklch(0.8 0.15 70); }
.step p + p, .step .note { margin-top: 12px; }
.step b { color: var(--fg); font-weight: 600; }

/* ---------- accordion (FAQ) ---------- */
.acc { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.acc .mg-ind { border-radius: 20px; background: var(--bg-2); }
.acc-item { border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.3s, background-color 0.3s; }
.acc-item[data-open] { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--brand-line); }
.acc-item > h3 { margin: 0; font: inherit; }
.acc-btn { width: 100%; display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 0; background: none; cursor: pointer; text-align: left;
  font: 600 1.06rem/1.35 var(--display); letter-spacing: -0.01em; }
.acc-btn .pm { position: relative; width: 28px; height: 28px; border-radius: 50%; flex: none; margin-left: auto; background: var(--bg-3);
  transition: background-color 0.3s, transform var(--dur-bouncy) var(--ease-bouncy); }
.acc-btn .pm::before, .acc-btn .pm::after { content: ''; position: absolute; left: 8px; right: 8px; top: 13px; height: 2px; border-radius: 2px; background: var(--fg);
  transition: transform var(--dur-bouncy) var(--ease-bouncy); }
.acc-btn .pm::after { transform: rotate(90deg); }
.acc-item[data-open] .pm { background: var(--brand); transform: rotate(180deg); }
.acc-item[data-open] .pm::before, .acc-item[data-open] .pm::after { background: var(--on-brand); }
.acc-item[data-open] .pm::after { transform: rotate(0); }
.acc-panel { overflow: hidden; height: 0; }
.acc-item[data-open] .acc-panel { height: auto; }
.acc-body { padding: 0 22px 22px; display: grid; gap: 12px; color: var(--fg-2); max-width: 66ch; }
.acc-body b, .acc-body strong { color: var(--fg); font-weight: 600; }
.acc-body ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.acc-item:target { box-shadow: inset 0 0 0 2px var(--brand); }

/* ---------- deep links ---------- */
.schemes { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 2px; }
.schemes .mg-ind { border-radius: 14px; background: var(--bg-2); }
.scheme { display: grid; grid-template-columns: minmax(0, 300px) 1fr auto; gap: 18px; align-items: center; padding: 12px 14px; border-radius: 14px; }
.scheme code { color: var(--brand-2); font-size: 0.86rem; overflow-wrap: anywhere; }
.scheme span { color: var(--fg-2); font-size: 0.94rem; }
.scheme .cp { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--fg-3); cursor: pointer; display: grid; place-items: center;
  transition: color 0.2s, transform var(--dur-bouncy) var(--ease-bouncy); }
.scheme .cp:hover { color: var(--fg); }
.scheme .cp:active { transform: scale(0.85); }
.scheme .cp.is-done { color: var(--brand); }
.scheme .cp svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .scheme { grid-template-columns: 1fr auto; } .scheme span { grid-column: 1; } .scheme .cp { grid-row: 1 / span 2; grid-column: 2; } }

.help-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- download ---------- */
.rel { border-radius: var(--r-l); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); padding: clamp(22px, 3vw, 34px); display: grid; gap: 22px; }
.rel-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.rel-ver { font: 700 clamp(1.6rem, 3vw, 2.4rem) var(--display); letter-spacing: -0.03em; }
.rel-meta { color: var(--fg-3); font-size: 0.92rem; }
.rel-top .row { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.pick { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 20px; border-radius: 22px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
.pick .os { width: 52px; height: 52px; border-radius: 16px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font: 700 1.1rem var(--display); }
.pick b { display: block; font: 600 1.05rem var(--display); }
.pick small { color: var(--fg-3); font-size: 0.86rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { .pick { grid-template-columns: 1fr; } .pick .os { display: none; } }
.plat-tabs { position: relative; isolation: isolate; display: inline-flex; flex-wrap: wrap; padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.plat-tabs .mg-ind { background: var(--fg); }
.plat-tabs button { position: relative; border: 0; background: none; cursor: pointer; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; color: var(--fg-2); transition: color 0.25s; }
.plat-tabs button[aria-pressed='true'] { color: var(--bg); }
.assets { position: relative; isolation: isolate; list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.assets .mg-ind { border-radius: 14px; background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--brand-line); }
.asset { display: grid; grid-template-columns: 1fr auto auto 18px; gap: 16px; align-items: center; padding: 12px 14px; border-radius: 14px; text-decoration: none; }
.asset .dl { width: 18px; height: 18px; fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transform: translateY(-6px); transition: opacity 0.2s, transform var(--dur-bouncy) var(--ease-bouncy); }
.asset.is-mg .dl, .asset:focus-visible .dl { opacity: 1; transform: none; }
.asset .n { font: 500 0.88rem var(--mono); overflow-wrap: anywhere; }
.asset .k { color: var(--fg-3); font-size: 0.86rem; white-space: nowrap; }
.asset .s { color: var(--fg-3); font-size: 0.86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.asset .tagx { font-size: 0.78rem; padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-2); margin-left: 8px; }
@media (max-width: 560px) { .asset { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; } .asset .k { grid-row: 2; } .asset .dl { display: none; } }
.asset-anim { animation: assetIn var(--dur-smooth) var(--ease-smooth) both; animation-delay: calc(var(--i) * 30ms); }
@keyframes assetIn { from { opacity: 0; transform: translateY(8px); } }
.rel-empty { color: var(--fg-2); }
.skel { height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--bg-3), oklch(0.3 0.03 var(--bh)), var(--bg-3)); background-size: 200% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }

.pcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pcards .mg-ind { border-radius: var(--r-l); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--brand-line); }
.pcard { padding: 26px; border-radius: var(--r-l); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 12px; align-content: start; }
.pcard h3 { font-size: 1.4rem; letter-spacing: -0.02em; transition: font-weight var(--dur-smooth) var(--ease-smooth); font-weight: 500; }
.pcard.is-mg h3 { font-weight: 800; }
.pcard .fmt { color: var(--fg); font-weight: 500; }
.pcard .arch { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard .arch span { font: 500 0.8rem var(--mono); padding: 4px 10px; border-radius: 99px; background: var(--bg-3); color: var(--fg-2); }
.pcard p { color: var(--fg-2); font-size: 0.95rem; }
@media (max-width: 700px) { .pcards { grid-template-columns: 1fr; } }

.drop { position: relative; display: grid; place-items: center; gap: 8px; padding: 34px 20px; border-radius: var(--r-m); text-align: center; cursor: pointer;
  background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: box-shadow 0.25s, background-color 0.25s, transform var(--dur-jelly) var(--ease-jelly); }
.drop:hover, .drop:focus-within { box-shadow: inset 0 0 0 1.5px var(--fg-3); }
.drop.is-over { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); transform: scale(1.02); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop svg { width: 34px; height: 34px; color: var(--brand); }
.drop b { font-weight: 600; }
.drop small { color: var(--fg-3); }
.verify { display: grid; gap: 16px; }
.verify textarea.input { height: auto; min-height: 92px; padding: 14px 16px; font: 0.82rem/1.5 var(--mono); resize: vertical; }
.verdict { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.verdict .vi { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--bg-3); }
.verdict .vi svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.verdict b { display: block; }
.verdict code { display: block; color: var(--fg-2); font-size: 0.8rem; overflow-wrap: anywhere; margin-top: 4px; }
.verdict.ok { box-shadow: inset 0 0 0 1.5px oklch(0.75 0.15 150); } .verdict.ok .vi { background: oklch(0.75 0.15 150); color: #08130c; }
.verdict.bad { box-shadow: inset 0 0 0 1.5px oklch(0.7 0.18 25); } .verdict.bad .vi { background: oklch(0.7 0.18 25); color: #1a0806; }
.verdict.pop { animation: pop var(--dur-jelly) var(--ease-jelly); }
@keyframes pop { from { transform: scale(0.94); } }

.term { display: grid; gap: 6px; }
.term .th { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.term h3 { font-size: 0.98rem; font-family: var(--text); font-weight: 600; }
.term pre { margin: 0; padding: 16px 18px; border-radius: 16px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  font: 0.84rem/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg); }
.term pre .c { color: var(--fg-3); }
.chips-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; color: var(--fg-2); }
.chips-list li { display: flex; gap: 10px; }
.chips-list li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 0.62em; border-radius: 2px; background: var(--brand); }

:root:lang(zh-CN) {
  --display: 'Unbounded', 'Onest', system-ui, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
  --text: 'Onest', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
}
