/* ============================================================
 * VectorVein Homepage · Artifact Gallery (home.css)
 * Pale gallery wall, white plinths, ink type, one cyan accent.
 * Deliverables are drawn as schematics from verified copy only.
 * Tokens are documented in docs/COLOR_UPDATE_SUMMARY.md.
 * ============================================================ */

:root {
  --wall: #e9ecef;
  --wall-2: #e1e5e9;
  --plinth: #ffffff;
  --ink: #0f1419;
  --ink-2: #434c56;
  --ink-3: #5b646e;
  --line: #d3d8dd;
  --line-soft: #e6e9ec;
  --brand: #28c5e5;
  --brand-ink: #086478;
  --brand-tint: #d8f2f8;
  --on-dark-2: rgba(255, 255, 255, 0.72);
  --on-dark-line: rgba(255, 255, 255, 0.14);
  --shadow: 0 1px 1px rgba(15, 20, 25, 0.06), 0 10px 24px -10px rgba(15, 20, 25, 0.18);
  --shadow-lift: 0 1px 2px rgba(15, 20, 25, 0.08), 0 22px 40px -16px rgba(15, 20, 25, 0.26);
  --radius: 6px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --shell: 1240px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); overflow-x: clip; }
body.homepage {
  margin: 0; min-width: 320px; overflow-x: clip;
  background: var(--wall); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
html[lang^="zh"] :is(h1, h2, h3, .ag-ex__title, .ag-pick__what, .ag-caps__list li) { word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; }
::selection { background: var(--brand-tint); }

.mc-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 200; padding: 10px 14px; background: var(--plinth); border: 1px solid var(--line); border-radius: 4px; transform: translateY(-160%); transition: transform 160ms ease; }
.skip-link:focus { transform: none; }
.ag-shell { width: min(var(--shell), calc(100% - 64px)); margin-inline: auto; }

/* ---------- buttons & links ---------- */
.ag-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 13px 24px; border: 1px solid var(--ink); border-radius: 4px;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.3;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.ag-btn i { transition: transform 160ms ease; }
.ag-btn:hover { background: #26303a; border-color: #26303a; }
.ag-btn:hover i { transform: translateX(3px); }
.ag-btn--ghost { background: transparent; color: var(--ink); }
.ag-btn--ghost:hover { background: var(--plinth); border-color: var(--ink); }
.ag-btn--small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.ag-btn--inverse { background: #fff; border-color: #fff; color: var(--ink); }
.ag-btn--inverse:hover { background: var(--brand); border-color: var(--brand); }
.ag-textlink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--ink); }
.ag-textlink i { transition: transform 160ms ease; }
.ag-textlink:hover i { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(233, 236, 239, 0.97); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 32px; width: min(1320px, calc(100% - 48px)); height: 100%; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; width: 156px; height: 40px; }
.brand img { width: 100%; max-height: 32px; object-fit: contain; object-position: left center; }
.primary-navigation { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 24px; color: var(--ink-2); }
.primary-navigation__links, .account-actions, .language-switcher { display: flex; align-items: center; gap: 22px; }
.primary-navigation__links { margin-right: auto; margin-left: 8px; }
.primary-navigation__links a, .account-actions__login, .language-switcher a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: color 160ms ease; }
.primary-navigation__links a:hover, .account-actions__login:hover, .language-switcher a:hover { color: var(--ink); }
.language-switcher { gap: 6px; color: var(--ink-3); }
.nav-toggle { display: none; width: 44px; height: 44px; margin-left: auto; padding: 0; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; }
.nav-toggle i { font-size: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; transition: background-color 160ms ease, border-color 160ms ease; }
.button:hover { background: #26303a; border-color: #26303a; }

/* ---------- hero ---------- */
.ag-hero { padding: 64px 0 40px; }
.ag-hero h1 { font-size: clamp(40px, 6.2vw, 92px); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; }
html[lang^="en"] .ag-hero h1 { font-size: clamp(36px, 5.4vw, 80px); letter-spacing: -0.035em; max-width: 1140px; }
.ag-hero h1 span { display: block; }
.ag-hero h1 .ag-nowrap { display: inline; }
html[lang^="zh"] .ag-hero h1 .ag-nowrap { white-space: nowrap; }
.ag-hero h1 em { font-style: normal; color: var(--brand-ink); }
.ag-hero__l2 { color: var(--ink-3); }
.ag-hero__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; align-items: center; margin-top: 8px; }
.ag-hero__lead { max-width: 380px; color: var(--ink-2); font-size: 18px; line-height: 1.7; }
.ag-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ag-hero__note { margin-top: 14px; color: var(--ink-3); font-size: 13px; }

/* 3D stack of deliverables */
.ag-stage { --p: 1; --tx: 0; --ty: 0; --W: 250px; position: relative; height: 540px; perspective: 1700px; perspective-origin: 50% 30%; }
.ag-stack {
  position: absolute; left: 54%; top: 46%; width: 0; height: 0; transform-style: preserve-3d;
  transform:
    rotateX(calc((56 * (1 - var(--p)) + var(--ty)) * 1deg))
    rotateZ(calc(-34deg * (1 - var(--p))))
    rotateY(calc(var(--tx) * 1deg));
}
.ag-card {
  position: absolute; left: calc(var(--W) / -2); top: calc(var(--W) * -0.68);
  width: var(--W); font-size: calc(var(--W) / 25.5);
  transform-origin: 50% 130%;
  transform:
    translate3d(
      calc((var(--i) - 2.5) * var(--p) * var(--W) * 0.3),
      calc(var(--p) * 22px),
      calc(var(--i) * (34px - 30px * var(--p))))
    rotate(calc((var(--i) - 2.5) * 5.5deg * var(--p)));
  filter: drop-shadow(0 1px 1px rgba(15, 20, 25, 0.08)) drop-shadow(0 12px 16px rgba(15, 20, 25, 0.12));
}

/* ---------- artifacts (schematic deliverables, em-based) ---------- */
.art {
  display: flex; flex-direction: column; gap: 1.1em;
  width: 25.5em; height: 34em; padding: 1.6em;
  background: var(--plinth); border: 1px solid var(--line); border-radius: 3px;
  color: var(--ink); font-size: 1em; line-height: 1.3; overflow: hidden; text-align: left;
}
.art__chrome { display: flex; align-items: center; gap: 0.4em; padding-bottom: 0.9em; border-bottom: 1px solid var(--line-soft); }
.art__chrome span { width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--line); }
.art__chrome b { min-width: 0; margin-left: 0.6em; overflow: hidden; color: var(--ink-3); font-family: var(--mono); font-size: 0.72em; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.art__lines, .art__title { display: flex; flex-direction: column; gap: 0.55em; }
.art__lines i, .art__title i { display: block; width: var(--w); height: 0.7em; border-radius: 2px; background: var(--line-soft); }
.art__title i:first-child { height: 1.3em; background: var(--ink); }
.art__foot { margin-top: auto; padding-top: 0.9em; border-top: 1px solid var(--line-soft); font-size: 0.92em; font-weight: 600; }

.art__tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6em; }
.art__tiles i { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 2px; background: #f6f7f8; }
.art__tiles i.is-on { border-color: var(--brand); background: var(--brand-tint); }

.art__globe { display: block; width: 100%; flex: 1; min-height: 0; }
.art__globe .g-rim { fill: #f6f7f8; stroke: var(--ink); stroke-width: 0.8; }
.art__globe .g-mer { fill: none; stroke: var(--line); stroke-width: 0.6; }
.art__globe .g-arcs path { fill: none; stroke: var(--ink-3); stroke-width: 0.55; opacity: 0.7; }
.art__globe .g-arcs path.is-hot { stroke: var(--brand); stroke-width: 1.3; opacity: 1; }
.art__globe .g-dots circle { fill: var(--ink); }

.art__table { display: flex; flex-direction: column; gap: 0.75em; }
.art__head, .art__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35em 0.6em; }
.art__head { padding-bottom: 0.6em; border-bottom: 1px solid var(--ink); }
.art__head span { overflow: hidden; color: var(--ink); font-family: var(--mono); font-size: 0.62em; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.art__row { padding-bottom: 0.7em; border-bottom: 1px solid var(--line-soft); }
.art__row i { display: block; width: var(--w); height: 0.5em; border-radius: 2px; background: var(--line-soft); }

.art--video { align-items: center; }
.art__frame { position: relative; display: grid; place-items: center; width: 11.6em; height: 20.6em; border-radius: 3px; background: var(--ink); color: #fff; }
.art__frame > i { font-size: 3em; }
.art__ratio { position: absolute; top: 0.8em; left: 0.9em; color: var(--on-dark-2); font-size: 0.7em; font-weight: 600; }
.art__scrub { position: absolute; left: 0.9em; right: 0.9em; bottom: 1em; height: 0.25em; border-radius: 2px; background: var(--on-dark-line); }
.art__scrub i { display: block; width: 38%; height: 100%; border-radius: 2px; background: var(--brand); }
.art__slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4em; width: 100%; }
.art__slots span { display: grid; place-items: center; height: 2.4em; border: 1px solid var(--line); border-radius: 2px; color: var(--ink-3); font-size: 0.72em; font-weight: 600; }
.art--video .art__foot { width: 100%; }

.art__toc { display: flex; flex-direction: column; gap: 0.62em; }
.art__toc li { display: grid; grid-template-columns: 1.8em 1fr; align-items: center; gap: 0.5em; }
.art__toc span { color: var(--brand-ink); font-size: 0.66em; font-weight: 700; font-variant-numeric: tabular-nums; }
.art__toc i { display: block; width: var(--w); height: 0.55em; border-radius: 2px; background: var(--line-soft); }
.art__cycles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5em; height: 3.2em; }
.art__cycles i { border: 1px solid var(--ink); border-radius: 2px; }

.art__group { display: flex; flex-direction: column; gap: 0.7em; }
.art__group p { font-size: 0.78em; font-weight: 600; color: var(--ink-2); }
.art__blocks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5em; }
.art__blocks--b { grid-template-columns: repeat(7, 1fr); }
.art__blocks i { aspect-ratio: 1; border-radius: 2px; }
.art__blocks--a i { background: var(--ink); }
.art__blocks--b i { border: 1px solid var(--ink); }
.art--memory .art__group + .art__group { margin-top: 0.4em; }

/* ---------- gallery ---------- */
.ag-gallery { position: relative; padding: 96px 0 112px; border-top: 1px solid var(--line); }
.ag-gallery__head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 40px; margin-bottom: 48px; }
.ag-gallery__head h2 { font-size: clamp(34px, 4.4vw, 60px); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
.ag-gallery__track { width: min(var(--shell), calc(100% - 64px)); margin-inline: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ag-gallery__rail { display: none; }

.ag-ex__link { display: flex; flex-direction: column; gap: 18px; height: 100%; }
.ag-ex__plinth {
  display: grid; place-items: center; padding: 36px 20px; font-size: 9px;
  background: var(--plinth); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: box-shadow 240ms ease, transform 240ms ease;
}
.ag-ex__plinth .art { box-shadow: 0 1px 2px rgba(15, 20, 25, 0.06), 0 8px 18px -10px rgba(15, 20, 25, 0.2); transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1); }
.ag-ex__link:hover .ag-ex__plinth { box-shadow: var(--shadow-lift); }
.ag-ex__link:hover .art { transform: translateY(-6px) rotate(-1deg); }
.ag-ex__link:focus-visible { outline-offset: 6px; }
.ag-ex__label { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--ink); }
.ag-ex__num { color: var(--ink-3); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ag-ex__tag { color: var(--brand-ink); font-size: 14px; font-weight: 600; }
.ag-ex__title { font-size: 22px; font-weight: 700; line-height: 1.3; }
.ag-ex__meta { color: var(--ink-2); font-size: 14px; }
.ag-ex__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.ag-ex__go i { transition: transform 160ms ease; }
.ag-ex__link:hover .ag-ex__go i { transform: translate(2px, -2px); }

/* pinned horizontal gallery (enabled by JS on large screens) */
.ag-gallery.is-pinned { padding: 0; }
.ag-gallery.is-pinned .ag-gallery__frame {
  position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow: clip;
  display: flex; flex-direction: column; justify-content: center; padding-block: 40px 28px;
}
.ag-gallery.is-pinned .ag-gallery__head { margin-bottom: 36px; }
.ag-gallery.is-pinned .ag-gallery__track {
  display: flex; gap: 72px; width: max-content; margin: 0;
  padding-inline: max(32px, calc((100vw - var(--shell)) / 2));
  will-change: transform;
}
.ag-gallery.is-pinned .ag-ex { flex: 0 0 auto; }
.ag-gallery.is-pinned .ag-ex__link { flex-direction: row; align-items: flex-end; gap: 40px; }
.ag-gallery.is-pinned .ag-ex__plinth {
  --art-h: min(calc(100vh - var(--header-h) - 250px), 520px);
  padding: calc(var(--art-h) * 0.09) calc(var(--art-h) * 0.14);
  font-size: calc(var(--art-h) / 34);
}
.ag-gallery.is-pinned .ag-ex__label { width: 360px; padding-bottom: 8px; opacity: calc(1 - var(--aoff, 0) * 0.6); transform: translateX(calc(var(--off, 0) * 60px)); }
.ag-gallery.is-pinned .ag-ex__title { font-size: 30px; line-height: 1.25; }
.ag-gallery.is-pinned .ag-ex__plinth { perspective: 1400px; }
.ag-gallery.is-pinned .ag-ex__plinth .art { transform: rotateY(calc(var(--off, 0) * -22deg)) translateZ(calc(var(--aoff, 0) * -60px)); transition: none; }
.ag-gallery.is-pinned .ag-ex__link:hover .art { transform: rotateY(calc(var(--off, 0) * -22deg)) translateY(-6px); }
.ag-gallery.is-pinned .ag-gallery__rail { display: flex; align-items: center; gap: 20px; margin-top: 32px; }
.ag-gallery__count { color: var(--ink-3); font-size: 14px; font-variant-numeric: tabular-nums; }
.ag-gallery__count b { color: var(--ink); }
.ag-gallery__bar { flex: 1; height: 2px; background: var(--line); }
.ag-gallery__bar i { display: block; width: 100%; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(var(--g, 0)); }

/* ---------- sections ---------- */
.ag-section { padding: 128px 0; }
.ag-h2 { max-width: 920px; margin-bottom: 56px; font-size: clamp(34px, 4.4vw, 60px); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
.ag-h2 em { font-style: normal; color: var(--brand-ink); }
.ag-lead { margin-top: 20px; max-width: 520px; color: var(--ink-2); font-size: 18px; }
.ag-lead a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 0.2em; }
.ag-plinth { background: var(--plinth); border-radius: var(--radius); box-shadow: var(--shadow); }

/* stats */
.ag-stats { padding: 112px 0; background: var(--wall-2); border-block: 1px solid var(--line); }
.ag-stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.ag-stat { padding-top: 20px; border-top: 2px solid var(--ink); }
.ag-stat b { display: flex; align-items: baseline; font-size: clamp(56px, 7.6vw, 116px); font-weight: 700; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.ag-stat b i { font-style: normal; font-weight: 500; color: var(--brand-ink); }
.ag-stat > span { display: block; margin-top: 14px; color: var(--ink-2); font-size: 16px; }
.ag-models { display: flex; flex-wrap: wrap; gap: 8px 30px; margin-top: 64px; color: var(--ink-2); font-size: 15px; font-weight: 500; }

/* two ways */
.ag-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ag-duo__item { display: flex; flex-direction: column; padding: 40px; }
.ag-duo__item h3 { margin-top: 36px; font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.ag-duo__item p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.ag-loop { position: relative; height: 220px; }
.ag-loop svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ag-loop rect { fill: none; stroke: var(--ink-3); stroke-width: 0.6; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.ag-loop span, .ag-chain span {
  position: absolute; z-index: 1; display: grid; place-items: center; min-width: 88px; height: 44px; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: 4px; background: var(--plinth); color: var(--ink);
  font-size: 15px; font-weight: 600; white-space: nowrap; animation: ag-node 4.8s calc(var(--k) * 1.2s) infinite;
}
.ag-loop span:nth-child(1) { left: 14%; top: 16%; transform: translate(-50%, -50%); }
.ag-loop span:nth-child(2) { left: 86%; top: 16%; transform: translate(-50%, -50%); }
.ag-loop span:nth-child(3) { left: 86%; top: 84%; transform: translate(-50%, -50%); }
.ag-loop span:nth-child(4) { left: 14%; top: 84%; transform: translate(-50%, -50%); }
.ag-chain { position: relative; display: flex; flex-wrap: wrap; align-items: center; align-content: center; height: 220px; }
.ag-chain span { position: static; animation-duration: 3.6s; }
.ag-chain > i { flex: 1; min-width: 20px; height: 1px; background: var(--ink); }
.ag-chain em { display: inline-flex; align-items: center; gap: 8px; flex-basis: 100%; margin-top: 22px; color: var(--ink-2); font-size: 14px; font-style: normal; font-weight: 500; }
@keyframes ag-node { 0%, 22% { background: var(--ink); color: #fff; } 26%, 100% { background: var(--plinth); color: var(--ink); } }
.ag-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; color: var(--ink-2); font-size: 15px; }
.ag-note i { margin-top: 3px; color: var(--ink); }

/* team */
.ag-team { background: var(--plinth); border-block: 1px solid var(--line); }
.ag-team__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.ag-team__steps li { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px 18px; padding-top: 26px; border-top: 2px solid var(--ink); }
.ag-team__icon { grid-row: span 2; font-size: 36px; line-height: 1; }
.ag-team__steps b { color: var(--brand-ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.ag-team__steps li > span:last-child { font-size: 22px; font-weight: 700; line-height: 1.35; }
.ag-team__steps li + li::before { content: "\2192"; position: absolute; top: -15px; left: -38px; padding: 0 6px; background: var(--plinth); color: var(--ink-3); font-size: 20px; line-height: 1; }

/* compare */
.ag-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.ag-pick__item { display: flex; flex-direction: column; gap: 10px; padding: 44px; border: 1px solid var(--line); border-radius: var(--radius); }
.ag-pick__item.is-vv { background: var(--plinth); border-color: var(--plinth); box-shadow: var(--shadow-lift); transform: translateY(-8px); }
.ag-pick__need { color: var(--ink-3); font-size: 14px; font-weight: 500; }
.ag-pick__what { font-size: clamp(28px, 3vw, 40px); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
.ag-pick__extra { color: var(--ink-2); font-size: 15px; }
.ag-pick__start { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }
.ag-pick__item > .ag-pick__extra + .ag-pick__start { margin-top: 32px; }
.ag-pick__start strong { color: var(--ink); font-size: 26px; font-weight: 700; }
.ag-pick__item.is-vv .ag-pick__start strong { color: var(--brand-ink); }

/* capabilities */
.ag-caps { background: var(--wall-2); border-block: 1px solid var(--line); }
.ag-caps__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.ag-caps__grid .ag-h2 { position: sticky; top: calc(var(--header-h) + 40px); }
.ag-caps__list { counter-reset: cap; border-top: 2px solid var(--ink); }
.ag-caps__list li {
  display: flex; align-items: baseline; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(22px, 2.4vw, 32px); font-weight: 700; line-height: 1.3; counter-increment: cap;
}
.ag-caps__list li::before { content: "0" counter(cap); flex: 0 0 32px; color: var(--brand-ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* byok */
.ag-byok { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.ag-byok .ag-h2 { margin-bottom: 0; font-size: clamp(32px, 3.6vw, 50px); }
.ag-keys { overflow: hidden; }
.ag-keys__row { display: flex; align-items: center; gap: 16px; padding: 24px 28px; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.ag-keys__row:last-child { border-bottom: 0; }
.ag-keys__row b { font-weight: 600; }
.ag-keys__row small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.ag-keys__row > span { margin-left: auto; color: var(--brand-ink); font-size: 13px; font-weight: 600; text-align: right; }

/* access */
.ag-access { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.ag-ent > .ag-ent__action { margin-top: 18px; }
.ag-ent { display: flex; flex-direction: column; padding: 32px 26px 26px; }
.ag-ent__icon { font-size: 28px; line-height: 1; }
.ag-ent--link { transition: box-shadow 200ms ease; }
.ag-ent--link:hover { box-shadow: var(--shadow-lift); }
.ag-ent--link:focus-visible { outline-offset: 4px; }
.ag-ent h3 { flex: 1; margin-top: 22px; font-size: 20px; font-weight: 700; line-height: 1.35; }
.ag-ent__links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 18px; }
.ag-ent__links a, .ag-ent__action { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--brand-ink); font-size: 14px; font-weight: 600; }
.ag-ent__links a:hover, .ag-ent--link:hover .ag-ent__action { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }

/* faq */
.ag-faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.ag-faq .ag-h2 { margin-bottom: 0; }
.ag-faq__list { border-top: 2px solid var(--ink); }
.ag-faq__list details { border-bottom: 1px solid var(--line); }
.ag-faq__list summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; padding: 22px 0; list-style: none; cursor: pointer; font-size: 18px; font-weight: 600; line-height: 1.45; }
.ag-faq__list summary::-webkit-details-marker { display: none; }
.ag-faq__list summary i { flex-shrink: 0; color: var(--ink-3); transition: transform 160ms ease; }
.ag-faq__list details[open] summary i { transform: rotate(45deg); color: var(--ink); }
.ag-faq__list details p { padding: 0 40px 24px 0; color: var(--ink-2); font-size: 15px; line-height: 1.8; }
.ag-faq__list details a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 0.2em; }

/* final + footer */
.ag-final { padding: 128px 0; background: var(--ink); color: #fff; }
.ag-final__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px 64px; align-items: end; }
.ag-final__inner > div { max-width: 420px; }
.ag-final h2 { font-size: clamp(38px, 5.2vw, 76px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
html[lang^="zh"] .ag-final h2 { font-size: clamp(34px, 4.2vw, 60px); }
.ag-final p { margin-bottom: 28px; color: var(--on-dark-2); font-size: 17px; }
.site-footer { padding: 72px 0 28px; background: var(--ink); color: var(--on-dark-2); border-top: 1px solid var(--on-dark-line); }
.section-shell { width: min(var(--shell), calc(100% - 64px)); margin-inline: auto; }
.site-footer__inner { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.4fr); gap: 96px; padding-bottom: 56px; }
.site-footer .brand { width: 148px; }
.site-footer__brand p { max-width: 340px; margin-top: 20px; font-size: 14px; line-height: 1.75; }
.site-footer__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.site-footer__links > div { display: flex; flex-direction: column; gap: 10px; }
.site-footer__links .site-footer__heading { margin-bottom: 6px; color: #fff; font-size: 14px; font-weight: 600; }
.site-footer__links a { width: fit-content; font-size: 14px; }
.site-footer__links a:hover, .site-footer__bottom a:hover { color: #fff; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 24px; padding-top: 22px; border-top: 1px solid var(--on-dark-line); font-size: 12.5px; }
.ag-final :focus-visible, .site-footer :focus-visible { outline-color: var(--brand); }

/* compare: full table behind a disclosure */
.ag-compare { margin-top: 32px; }
.ag-compare summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; list-style: none; cursor: pointer; color: var(--ink); font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--ink); }
.ag-compare summary::-webkit-details-marker { display: none; }
.ag-compare summary i { transition: transform 160ms ease; }
.ag-compare[open] summary i { transform: rotate(180deg); }
.mc-compare__lead { max-width: 820px; margin-top: 24px; color: var(--ink-2); font-size: 15px; line-height: 1.8; }
.mc-compare__table-wrap { margin-top: 20px; overflow: hidden; border-radius: var(--radius); background: var(--plinth); box-shadow: var(--shadow); }
.mc-compare__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.mc-compare__table th, .mc-compare__table td { padding: 18px 22px; border-top: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.mc-compare__table tr > :last-child { border-right: 0; }
.mc-compare__table thead th { border-top: 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 16px; font-weight: 600; }
.mc-compare__table thead th:first-child { width: 16%; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.mc-compare__table tbody th { color: var(--ink-3); font-size: 13.5px; font-weight: 600; line-height: 1.6; }
.mc-compare__table tbody td { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.mc-compare__table .is-vectorvein { background: var(--brand-tint); color: var(--ink); }
.mc-compare__table thead .is-vectorvein { color: var(--brand-ink); }
.mc-compare__mobile-label { display: none; }
.mc-compare__decision { margin-top: 24px; }
.mc-compare__decision p { max-width: 900px; color: var(--ink-2); font-size: 15px; line-height: 1.75; }
.mc-compare__decision b { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; font-weight: 600; }
.mc-compare__source { margin-top: 18px; color: var(--ink-3); font-size: 13px; line-height: 1.7; }
a.mc-link { color: var(--brand-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a.mc-link:hover { color: var(--ink); }

/* reveal (JS-only) */
.js .rv { opacity: 0; translate: 0 18px; transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), translate 520ms cubic-bezier(0.22, 1, 0.36, 1); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; translate: 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .primary-navigation { gap: 16px; }
  .primary-navigation__links, .account-actions { gap: 14px; }
  .ag-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 28px; }
  .ag-hero__lead { max-width: 560px; }
  .ag-stage { --W: 220px; height: 480px; }
  .ag-gallery__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-access { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ag-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .site-header__inner { width: calc(100% - 32px); gap: 16px; }
  .brand { width: 140px; }
  .nav-toggle { display: inline-flex; }
  .primary-navigation {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 12px;
    padding: 12px 24px 24px; background: var(--wall);
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px -12px rgba(15, 20, 25, 0.2);
  }
  .primary-navigation.is-open { display: flex; }
  .primary-navigation__links { flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
  .primary-navigation__links a { border-bottom: 1px solid var(--line); color: var(--ink); font-size: 16px; }
  .account-actions { justify-content: space-between; }
  .account-actions .button { min-height: 44px; }
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 820px) {
  .ag-section { padding: 96px 0; }
  .ag-duo, .ag-pick, .ag-byok, .ag-faq, .ag-caps__grid, .ag-final__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ag-caps__grid .ag-h2 { position: static; margin-bottom: 0; }
  .ag-pick__item.is-vv { transform: none; }
  .ag-team__steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ag-team__steps li { padding: 24px 0; border-top: 0; border-bottom: 1px solid var(--line); }
  .ag-team__steps li:first-child { border-top: 2px solid var(--ink); }
  .ag-team__steps li + li::before { display: none; }
  .ag-access { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-compare__table-wrap { margin-top: 28px; overflow: visible; border-radius: 0; background: transparent; box-shadow: none; border-top: 2px solid var(--ink); }
  .mc-compare__table, .mc-compare__table tbody, .mc-compare__table tr, .mc-compare__table th, .mc-compare__table td { display: block; width: 100%; }
  .mc-compare__table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .mc-compare__table tbody tr { padding: 22px 0 16px; border-bottom: 1px solid var(--line); }
  .mc-compare__table tbody th, .mc-compare__table tbody td { padding: 8px 0; border: 0; background: transparent; }
  .mc-compare__table tbody th { margin-bottom: 4px; color: var(--ink); font-size: 16px; }
  .mc-compare__table .is-vectorvein { padding: 12px 14px; border-radius: 4px; background: var(--plinth); }
  .mc-compare__mobile-label { display: block; margin-bottom: 2px; color: var(--ink); font-size: 13px; font-weight: 600; }
  .mc-compare__table td.is-vectorvein .mc-compare__mobile-label { color: var(--brand-ink); }
}

@media (max-width: 640px) {
  .ag-shell, .ag-gallery__track { width: calc(100% - 40px); }
  .section-shell { width: calc(100% - 40px); }
  .site-footer__links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .site-footer__bottom { flex-direction: column; gap: 8px; }
  .ag-hero { padding: 40px 0 24px; }
  .ag-hero h1 { font-size: 38px; line-height: 1.16; }
  html[lang^="en"] .ag-hero h1 { font-size: 34px; }
  .ag-hero__lead { font-size: 17px; }
  .ag-hero__actions .ag-btn { flex: 1 1 100%; }
  .ag-stage { --W: 150px; height: 340px; margin: 24px -20px 0; }
  .ag-stack { left: 50%; top: 52%; }
  .ag-gallery { padding: 72px 0 80px; }
  .ag-gallery__head { margin-bottom: 32px; }
  .ag-gallery__track { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ag-ex__plinth { font-size: 10px; padding: 32px 16px; }
  .ag-section { padding: 80px 0; }
  .ag-h2, .ag-gallery__head h2 { margin-bottom: 36px; font-size: 30px; }
  .ag-gallery__head h2 { margin-bottom: 0; }
  .ag-team__steps li > span:last-child { font-size: 19px; }
  .ag-final h2 { font-size: 34px; }
  .ag-stats { padding: 80px 0; }
  .ag-stat b { font-size: 60px; }
  .ag-stat > span { font-size: 14px; }
  .ag-models { margin-top: 48px; gap: 6px 20px; font-size: 14px; }
  .ag-duo__item, .ag-pick__item { padding: 28px 22px; }
  .ag-duo__item h3 { margin-top: 24px; font-size: 26px; }
  .ag-loop { height: 180px; }
  .ag-loop span, .ag-chain span { min-width: 64px; height: 44px; padding: 0 10px; font-size: 14px; }
  .ag-loop span:nth-child(1), .ag-loop span:nth-child(4) { left: 18%; }
  .ag-loop span:nth-child(2), .ag-loop span:nth-child(3) { left: 82%; }
  .ag-chain { height: auto; padding: 24px 0; }
  .ag-access { grid-template-columns: minmax(0, 1fr); }
  .ag-caps__list li { gap: 16px; padding: 20px 0; font-size: 21px; }
  .ag-faq__list summary { font-size: 16px; }
  .ag-faq__list details p { padding-right: 0; }
  .ag-final { padding: 88px 0; }
  .ag-final .ag-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ag-loop span, .ag-chain span { animation: none; }
  .js .rv { opacity: 1; translate: none; transition: none; }
  .ag-ex__plinth, .ag-ex__plinth .art, .ag-btn i, .ag-textlink i, .ag-ex__go i { transition: none; }
}

/* ---------- privacy controls ---------- */
.vv-consent-open {
  display: block; margin-top: 4px; padding: 0; border: 0; background: transparent;
  color: var(--on-dark-2); font: inherit; font-size: 14px; text-align: left;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.vv-consent-open:hover, .vv-consent-open:focus-visible { color: #fff; }
.vv-consent {
  position: fixed; z-index: 1200; left: 16px; right: 16px; bottom: 16px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  max-width: 1120px; margin-inline: auto; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--plinth); color: var(--ink); box-shadow: 0 4px 12px rgba(15, 20, 25, 0.08), 0 16px 32px rgba(15, 20, 25, 0.08);
}
.vv-consent__copy { min-width: 0; }
.vv-consent__copy h2 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.vv-consent__copy p { max-width: 760px; margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.65; }
.vv-consent__detail { margin-top: 7px !important; color: var(--ink-3) !important; }
.vv-consent__signal { margin-top: 7px !important; color: var(--brand-ink) !important; }
.vv-consent__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.vv-consent__button {
  min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--plinth); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer;
}
.vv-consent__button:hover { border-color: var(--ink); }
.vv-consent__button--primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.vv-consent__button--primary:hover { background: #26303a; }
.vv-consent__button--link { border-color: transparent; background: transparent; color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
body.vv-consent-visible { padding-bottom: 190px; }
@media (max-width: 700px) {
  .vv-consent { display: block; bottom: 10px; padding: 16px; }
  .vv-consent__actions { justify-content: flex-start; margin-top: 13px; }
  body.vv-consent-visible { padding-bottom: 270px; }
}
