  :root {
    --maxw: 1100px;
    --pad: 20px;
    --radius: 14px;
    --bg: #fbfbfa;
    --surface: #ffffff;
    --surface-2: #f3f4f2;
    --ink: #14171a;
    --ink-2: #3a4149;
    --ink-3: #5a6470;
    --line: #e3e5e2;
    --line-strong: #c9cec9;
    --accent: #1b4fd8;
    --accent-ink: #ffffff;
    --accent-soft: #edf1fe;
    --accent-wash: #f3f6ff;
    --code-bg: #11151b;
    --code-ink: #dde5ef;
    --header-bg: rgba(251, 251, 250, 0.86);
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 18px 40px -22px rgba(16, 24, 40, 0.28);
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0c0f13;
      --surface: #12161c;
      --surface-2: #151a21;
      --ink: #e9edf3;
      --ink-2: #c3cad4;
      --ink-3: #9aa4b2;
      --line: #242b34;
      --line-strong: #37414d;
      --accent: #8fb0ff;
      --accent-ink: #0a1a44;
      --accent-soft: #182137;
      --accent-wash: #141c2b;
      --code-bg: #070a0e;
      --code-ink: #dde5ef;
      --header-bg: rgba(12, 15, 19, 0.86);
      --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px -24px rgba(0, 0, 0, 0.7);
    }
  }

  *, *::before, *::after { box-sizing: border-box; }

  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  img { display: block; max-width: 100%; height: auto; }
  a { color: var(--accent); text-decoration: none; text-underline-offset: 0.18em; }
  a:hover { text-decoration: underline; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
  ::selection { background: var(--accent-soft); color: var(--ink); }

  h1, h2, h3 { text-wrap: balance; }
  p { text-wrap: pretty; }

  .wrap { width: min(100% - (2 * var(--pad)), var(--maxw)); margin-inline: auto; }

  .skip {
    position: absolute; left: -9999px; top: 0; z-index: 60;
    background: var(--surface); color: var(--ink);
    padding: 10px 16px; border: 1px solid var(--line); border-radius: 0 0 10px 0;
    font-size: 14px;
  }
  .skip:focus { left: 0; }

  [data-lang="zh"] .en { display: none; }
  [data-lang="en"] .zh { display: none; }

  /* ---------- header ---------- */
  .site-header {
    position: sticky; top: 0; z-index: 30;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px 24px; flex-wrap: wrap;
    min-height: 58px; padding-block: 9px;
  }
  .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; letter-spacing: -0.01em; }
  .brand:hover { text-decoration: none; }
  .brand-mark { position: relative; flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--accent); }
  .brand-mark::after {
    content: ""; position: absolute; left: 7px; top: 5px; width: 8px; height: 5px;
    border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink);
    transform: rotate(-45deg);
  }
  .brand-name { font-size: 15px; }
  .brand-pkg {
    font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--ink-3);
    border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
  }
  .nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
  .nav a { color: var(--ink-2); }
  .nav a:hover { color: var(--accent); }
  .nav .nav-ext { font-family: var(--mono); font-size: 12.5px; }
  .lang-toggle {
    appearance: none; -webkit-appearance: none;
    font: inherit; font-size: 12.5px; line-height: 1.4; letter-spacing: 0.02em;
    color: var(--ink-2); background: transparent;
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: 5px 12px; cursor: pointer; min-width: 54px;
  }
  .lang-toggle:hover { color: var(--accent); border-color: var(--accent); }

  /* ---------- hero ---------- */
  .hero {
    padding-block: clamp(36px, 5.5vw, 68px) clamp(44px, 6vw, 88px);
    background:
      radial-gradient(820px 340px at 8% -8%, var(--accent-soft), transparent 70%),
      radial-gradient(620px 300px at 100% 0%, var(--accent-soft), transparent 68%);
  }
  .hero-grid { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 52px); align-items: center; }
  .eyebrow {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 18px; font-size: 12.5px; letter-spacing: 0.05em; color: var(--ink-3);
  }
  .eyebrow::before { content: ""; display: block; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; flex: none; }
  h1 { margin: 0 0 16px; font-size: clamp(2.4rem, 5.6vw, 3.7rem); line-height: 1.03; letter-spacing: -0.035em; font-weight: 700; }
  .lede { margin: 0 0 28px; max-width: 33em; color: var(--ink-2); font-size: clamp(1.02rem, 1.6vw, 1.2rem); line-height: 1.68; }

  .install {
    max-width: 520px; margin: 0 0 24px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  }
  .install-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px 0; font-size: 12px; color: var(--ink-3); font-family: var(--mono); letter-spacing: 0.04em; }
  .install-head .hint { font-family: var(--sans); letter-spacing: 0; }
  .cmd {
    margin: 9px 0 0; padding: 14px 16px;
    background: var(--code-bg); color: var(--code-ink);
    font-family: var(--mono); font-size: 13.5px; line-height: 1.5;
    overflow-x: auto; white-space: pre;
    -webkit-user-select: all; user-select: all; cursor: text;
  }
  .cmd:focus-visible { outline-offset: -2px; border-radius: 0; }
  .install-note { margin: 0; padding: 11px 16px 13px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); border-top: 1px solid var(--line); }

  .meta { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 0 0 22px; padding: 0; }
  .meta li {
    font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--ink-3);
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
  }
  .hero-more { margin: 0; font-size: 14px; font-weight: 600; }

  .shot { margin: 0; }
  .shot img {
    width: 100%; border-radius: 12px;
    border: 1px solid var(--line-strong); background: var(--surface-2); box-shadow: var(--shadow);
  }
  .shot figcaption { margin-top: 12px; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }

  .demo { margin-top: clamp(36px, 4.5vw, 62px); }
  .demo figure { margin: 0; max-width: 900px; }
  .demo video {
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
    border-radius: 12px; border: 1px solid var(--line-strong);
    background: #000; box-shadow: var(--shadow);
  }
  .demo figcaption { margin-top: 12px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); max-width: 62ch; }

  /* ---------- sections ---------- */
  section { padding-block: clamp(48px, 6.5vw, 84px); }
  .band { background: var(--surface-2); border-block: 1px solid var(--line); }
  .section-head { max-width: 64ch; margin-bottom: clamp(28px, 3.6vw, 42px); }
  h2 { margin: 0 0 14px; font-size: clamp(1.55rem, 3.2vw, 2.1rem); line-height: 1.16; letter-spacing: -0.025em; font-weight: 680; }
  .section-lede { margin: 0; color: var(--ink-2); font-size: 1.01rem; line-height: 1.72; }

  /* ---------- claims ---------- */
  .claims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 22px); }
  .claim {
    display: flex; flex-direction: column; gap: 13px;
    padding: clamp(20px, 2.4vw, 26px);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .claim-no { margin: 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; color: var(--accent); }
  .claim h3 { margin: 0; font-size: 1.08rem; line-height: 1.4; letter-spacing: -0.01em; font-weight: 650; }
  .claim p { margin: 0; font-size: 14.5px; line-height: 1.72; color: var(--ink-2); }
  .claim .ev {
    margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 9px;
  }
  .claim .ev pre {
    margin: 0; padding: 12px 13px; overflow-x: auto;
    background: var(--code-bg); color: var(--code-ink);
    border-radius: 9px; font-family: var(--mono); font-size: 11.8px; line-height: 1.6;
  }
  .claim .ev-note { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }

  .chips { display: flex; flex-wrap: wrap; gap: 7px; }
  .chip {
    font-size: 12px; line-height: 1.4; padding: 3px 9px; border-radius: 999px;
    border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--surface);
  }
  .chip--accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

  /* ---------- how it works ---------- */
  .steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 20px); }
  .step { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
  .step-no { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--accent); }
  .step h3 { margin: 0; font-size: 0.98rem; font-weight: 650; line-height: 1.4; letter-spacing: -0.005em; }
  .step p { margin: 0; font-size: 12.8px; line-height: 1.65; color: var(--ink-2); }
  .thumb {
    display: block; margin-top: auto; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--line); background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  }
  .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; }
  .thumb:hover { border-color: var(--line-strong); }
  .shots-note { margin: 20px 0 0; font-size: 12.5px; color: var(--ink-3); }

  /* ---------- comparison ---------- */
  .table-wrap {
    overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); -webkit-overflow-scrolling: touch;
  }
  table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: 14px; }
  caption { caption-side: top; text-align: left; padding: 14px 18px; font-size: 12.5px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
  th, td { text-align: left; vertical-align: top; padding: 13px 18px; line-height: 1.62; }
  thead th { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
  thead th.col-this { color: var(--accent); }
  tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
  tbody td { color: var(--ink-2); border-top: 1px solid var(--line); }
  tbody th { border-top: 1px solid var(--line); }
  tbody td.col-this { background: var(--accent-wash); color: var(--ink); }
  tbody tr:first-child th, tbody tr:first-child td { border-top: 0; }

  .nots { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
  .nots li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.68; color: var(--ink-2); }
  .nots li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 8px; height: 2px; border-radius: 2px; background: var(--accent); }
  .nots strong { color: var(--ink); font-weight: 600; }
  .finep { margin: 22px 0 0; max-width: 70ch; font-size: 13.5px; line-height: 1.7; color: var(--ink-3); }

  /* ---------- states ---------- */
  .states { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(16px, 2vw, 22px); }
  .state figure { margin: 0; }
  .state a { display: block; border-radius: 10px; }
  .state img {
    width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  }
  .state a:hover img { border-color: var(--line-strong); }
  .state figcaption { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
  .state figcaption b { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 600; color: var(--ink); }

  /* ---------- footer ---------- */
  .site-footer { border-top: 1px solid var(--line); background: var(--surface-2); padding-block: 40px 48px; }
  .footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 26px 40px; align-items: start; }
  .footer-brand { margin: 0 0 6px; font-weight: 650; letter-spacing: -0.01em; }
  .footer-line { margin: 0; font-size: 12.8px; line-height: 1.65; color: var(--ink-3); max-width: 46ch; }
  .footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; }
  .footer-links a { color: var(--ink-2); }
  .footer-links a:hover { color: var(--accent); }
  .footer-small { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.3px; line-height: 1.7; color: var(--ink-3); max-width: 80ch; }
  code { font-family: var(--mono); font-size: 0.9em; }
  :not(pre) > code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 0.08em 0.34em; color: var(--ink); white-space: nowrap; }
  .band :not(pre) > code, .site-footer :not(pre) > code { background: var(--bg); }

  /* ---------- responsive ---------- */
  @media (max-width: 1000px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-grid .shot { order: 2; }
    .hero-grid .hero-copy { order: 1; }
    .install { max-width: none; }
    .claims { grid-template-columns: minmax(0, 1fr); }
    .claim { gap: 11px; }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
    .nots { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 760px) {
    .nav { gap: 14px; }
    .nav .nav-section { display: none; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .step { display: grid; grid-template-columns: 1fr minmax(0, 40%); gap: 4px 16px; align-items: start; }
    .step-no { grid-column: 1; }
    .step h3 { grid-column: 1; }
    .step p { grid-column: 1; }
    .step .thumb { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  }
  @media (max-width: 460px) {
    :root { --pad: 16px; }
    .brand-pkg { display: none; }
    .header-inner { min-height: 52px; }
    .step { grid-template-columns: minmax(0, 1fr); }
    .step .thumb { grid-column: 1; grid-row: auto; margin-top: 6px; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
  }


/* ==========================================================================
   Motion
   Everything below is progressive: if the browser never runs the script, or the
   reader asked for less motion, the page still reads exactly the same.
   ========================================================================== */

html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Scroll position indicator: 2px, above the header, never intercepts a click. */
.scroll-progress {
  overflow: hidden;
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 55%, #7c5cff));
  transition: width 0.08s linear;
}

/* The header earns a border and a blur only after the page has moved. */
.site-header { transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease; }
.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line), 0 12px 32px -24px rgba(16, 24, 40, 0.55);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header.is-scrolled { backdrop-filter: saturate(1.3) blur(10px); }
}

/* Anchors must not land under the sticky header. */
:where(section[id], h2[id]) { scroll-margin-top: 84px; }

/* The hero sits on a slow wash of colour: two soft gradients drifting against each
   other. It is decoration, so it is a pseudo element with aria-hidden semantics by
   construction and it never takes a pointer event. */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -220px 0 auto 0;
  height: 640px;
  background:
    radial-gradient(46% 52% at 18% 29%, var(--accent-soft) 0%, transparent 68%),
    radial-gradient(38% 46% at 82% 12%, color-mix(in oklab, var(--accent-soft) 70%, #7c5cff 30%) 0%, transparent 70%);
  filter: blur(18px);
  opacity: 0.85;
  animation: hero-drift 22s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  from { transform: translate3d(-1.5%, 0, 0) scale(1); }
  to   { transform: translate3d(1.5%, 10px, 0) scale(1.06); }
}

/* Reveal on scroll. The script adds .is-in; without it these rules never apply
   because they are scoped to [data-reveal-ready]. */
[data-reveal-ready] .reveal-group > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.62s cubic-bezier(0.22, 0.68, 0.2, 1),
    transform 0.62s cubic-bezier(0.22, 0.68, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal-ready] .reveal-group.is-in > * {
  opacity: 1;
  transform: none;
}

/* Hover motion is small on purpose: a card lifts 2px, a screenshot grows 1.5%. */
.claim,
.state,
.thumb { transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; }
.claim:hover,
.state:hover {
  transform: translateY(-2px);
}
.claim:hover { box-shadow: var(--shadow); }
.shot img,
.state img,
.thumb img { transition: transform 0.5s cubic-bezier(0.22, 0.68, 0.2, 1), border-color 0.22s ease; }
.shot:hover img { transform: scale(1.012); }
.state a:hover img { transform: scale(1.02); }

/* The install command reacts to a click without needing a clipboard API. */
.cmd { transition: background 0.18s ease, color 0.18s ease; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal-ready] .reveal-group > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero::before { animation: none; }
  .claim:hover,
  .state:hover,
  .shot:hover img,
  .state a:hover img { transform: none; }
  .scroll-progress span { transition: none; }
}

/* A slow highlight travelling under the header: one animated gradient, no layout,
   paused for readers who asked for less motion. */
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 18%, color-mix(in oklab, var(--accent) 40%, #7c5cff) 50%, var(--accent) 82%, transparent 100%);
  background-size: 220% 100%;
  opacity: 0.55;
  animation: header-flow 9s linear infinite;
}
@keyframes header-flow {
  from { background-position: 0% 0; }
  to   { background-position: 200% 0; }
}

/* The hero wash gets a little more colour, still under the text. */
.hero::before {
  opacity: 1;
  background:
    radial-gradient(46% 52% at 18% 29%, var(--accent-soft) 0%, transparent 68%),
    radial-gradient(38% 46% at 82% 12%, color-mix(in oklab, var(--accent-soft) 65%, #7c5cff 35%) 0%, transparent 70%),
    radial-gradient(34% 40% at 58% -6%, color-mix(in oklab, var(--accent) 10%, transparent) 0%, transparent 72%);
}

/* Install card: a single sheen sweeps across on hover. */
.install { position: relative; overflow: hidden; }
.install::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, color-mix(in oklab, var(--accent) 9%, transparent) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.9s cubic-bezier(0.22, 0.68, 0.2, 1);
  pointer-events: none;
}
.install:hover::after { transform: translateX(120%); }

@media (prefers-reduced-motion: reduce) {
  .site-header::after { animation: none; }
  .install::after { transition: none; transform: none; opacity: 0; }
}

/* Where it is listed: a quiet grid of cards, status carried by a dot and a word, never by colour alone. */
.where-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.where-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.where-card h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }
.where-card p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.where-card :not(pre) > code { white-space: normal; overflow-wrap: anywhere; }
.where-card .where-note { font-size: 12.5px; color: var(--ink-3); }
.where-status {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase;
}
.where-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.where-status--live { color: var(--accent); }
.where-status--pending { color: var(--ink-3); }
.where-status--auto { color: var(--ink-3); }
.where-card--pending { border-style: dashed; }
@media (max-width: 900px) { .where-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .where-grid { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Image preview, pointer aura, and the phone layout
   Everything here is additive: without the script, links still open the PNG.
   ========================================================================== */

/* The whole card is the hit area, not just the pixels of the image. */
.state a,
.thumb { -webkit-tap-highlight-color: transparent; }
.state a { padding-bottom: 2px; }
.state a img,
.thumb img { cursor: zoom-in; }
.shot img { cursor: zoom-in; }

.lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(8, 10, 14, 0.88);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.2s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; gap: 12px; max-width: min(1400px, 94vw); }
.lightbox-figure img {
  max-width: min(1400px, 94vw); max-height: 78vh; width: auto; height: auto;
  border-radius: 10px; background: #0f141a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  transform: scale(0.985); transition: transform 0.22s cubic-bezier(0.22, 0.68, 0.2, 1);
}
.lightbox.is-open .lightbox-figure img { transform: none; }
.lightbox-caption { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; color: #e9edf3; font-size: 13px; }
.lightbox-hint { color: #9aa4b2; font-size: 12px; }
.lightbox-close {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(20, 24, 30, 0.7); color: #e9edf3;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(36, 42, 52, 0.9); }
body.lightbox-open { overflow: hidden; }

/* Pointer aura + a very small parallax on the hero screenshot. Only where a real
   pointer exists and the reader has not asked for less motion. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero { --mx: 52%; --my: 38%; }
  .hero::after {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    inset: -120px 0 auto 0; height: 720px;
    background: radial-gradient(320px 320px at var(--mx) var(--my), color-mix(in oklab, var(--accent) 16%, transparent), transparent 72%);
    opacity: 0; transition: opacity 0.45s ease;
  }
  .hero:hover::after { opacity: 1; }
  .hero .shot img { transform: translate3d(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px), 0); transition: transform 0.35s ease-out; }
}

/* Phone layout: the nav scrolls instead of wrapping into two rows, the hero stacks
   with a smaller headline, and every tap target clears 44px. */
@media (max-width: 620px) {
  .site-header { position: sticky; }
  .header-inner { flex-wrap: nowrap; gap: 12px; padding-block: 8px; }
  .brand-pkg { display: none; }
  .nav {
    flex: 1 1 auto; min-width: 0;
    display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-section, .nav-ext { flex: 0 0 auto; padding: 10px 8px; }
  .hero h1 { font-size: clamp(32px, 10.5vw, 44px); }
  .hero-grid { gap: 24px; }
  .install { border-radius: 12px; }
  .states { grid-template-columns: minmax(0, 1fr); }
  .state figcaption { margin-top: 8px; }
  .lightbox { padding: 12px; }
  .lightbox-figure img { max-height: 72vh; }
  .lightbox-caption { font-size: 12.5px; }
  .site-footer { padding-block: 30px 36px; }
}

/* Keep the section links on a phone, as one scrollable row. Hiding the navigation is a
   valid choice, but these five sections are the page's argument — better to let the row
   scroll than to remove it. */
@media (max-width: 760px) {
  .header-inner { flex-wrap: nowrap; }
  .brand { flex: 0 0 auto; }
  .nav {
    flex: 1 1 auto; min-width: 0; gap: 2px;
    display: flex; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav .nav-section { display: inline-flex; }
  .nav-section, .nav-ext { flex: 0 0 auto; white-space: nowrap; padding: 10px 9px; }
  .lang-toggle { flex: 0 0 auto; margin-left: 2px; }
  html { scroll-padding-top: 68px; }
}

/* Below 620px the header keeps only the two outbound links and the language toggle:
   five section links plus those do not fit, and a half-cut row reads as a bug. The
   sections are still one swipe away; the footer carries the same links. */
@media (max-width: 620px) {
  .nav .nav-section { display: none; }
  .nav { justify-content: flex-end; overflow-x: visible; }
}
