/* ============================================================
   HP Language — Liquid Glass Design System (iOS 27 style)
   Semi-transparent · specular highlights · refraction blur
   ============================================================ */

:root {
  --bg-0: #080a18;
  --bg-1: #0c0f24;
  --bg-2: #141838;
  --ink: #f4f6ff;
  --ink-soft: #c0c9ea;
  --ink-dim: #858fb8;

  --hp-cyan: #3bd6ff;
  --hp-violet: #9a6cff;
  --hp-pink: #ff6bd8;
  --hp-lime: #b9ff52;
  --hp-amber: #ffc15e;

  --grad-primary: linear-gradient(120deg, #3bd6ff 0%, #9a6cff 52%, #ff6bd8 100%);
  --grad-soft: linear-gradient(140deg, rgba(59,214,255,.16), rgba(154,108,255,.16), rgba(255,107,216,.14));

  /* ---- Liquid Glass tokens ---- */
  --glass: rgba(255,255,255,0.07);
  --glass-strong: rgba(255,255,255,0.13);
  --stroke: rgba(255,255,255,0.14);
  --stroke-strong: rgba(255,255,255,0.26);
  --glass-highlight: rgba(255,255,255,0.32);   /* top specular edge */
  --glass-shadow: 0 24px 60px rgba(2,4,18,0.5);
  --glass-blur: 22px;

  --radius: 22px;
  --radius-sm: 16px;
  --maxw: 1180px;
  --font: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-0);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(154,108,255,.4); }

:focus-visible {
  outline: 2px solid var(--hp-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Animated aurora background ---------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background:
    radial-gradient(52vw 52vw at 86% 92%, rgba(255,107,216,0.30), transparent 62%),
    radial-gradient(46vw 46vw at 8% 100%, rgba(59,214,255,0.22), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 55%, var(--bg-0));
}
.bg-fx::before,
.bg-fx::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.bg-fx::before {
  width: 62vw; height: 62vw; left: -18vw; top: -22vw;
  background: radial-gradient(circle, rgba(118,92,255,0.55), rgba(118,92,255,0) 66%);
  animation: drift-a 30s ease-in-out infinite alternate;
}
.bg-fx::after {
  width: 58vw; height: 58vw; right: -16vw; top: 2vh;
  background: radial-gradient(circle, rgba(40,214,255,0.42), rgba(40,214,255,0) 66%);
  animation: drift-b 36s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(9vw, 7vh) scale(1.16); }
}
@keyframes drift-b {
  from { transform: translate(0,0) scale(1.1); }
  to   { transform: translate(-8vw, -5vh) scale(0.94); }
}

.bg-grid {
  position: fixed;
  inset: -2px;
  z-index: -2;
  background-image:
    linear-gradient(rgba(160,180,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160,180,255,0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 26%, black, transparent 82%);
  mask-image: radial-gradient(circle at 50% 26%, black, transparent 82%);
  animation: gridDrift 26s linear infinite;
}
@keyframes gridDrift { to { background-position: 46px 46px, 46px 46px; } }

/* ---------- Layout ---------- */
.container { width: min(var(--maxw), 92vw); margin-inline: auto; }
section { padding: 96px 0; position: relative; }

/* ---------- Naked-eye 3D scene wrapper ---------- */
.scene3d { perspective: 1400px; transform-style: preserve-3d; }
.layer { transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; }

/* ============================================================
   Liquid Glass surfaces — refraction + specular + spotlight
   ============================================================ */
.card, .table-wrap, .toc, .step, .cta-band, .callout {
  position: relative;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 42%, rgba(255,255,255,0.08) 100%);
  border: 1px solid var(--stroke);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(255,255,255,0.05),
    inset 1px 0 0 rgba(255,255,255,0.08),
    inset -1px 0 0 rgba(255,255,255,0.04),
    var(--glass-shadow);
}
/* refraction layer — blur + liquid distortion of the backdrop */
.card::before, .table-wrap::before, .toc::before, .step::before,
.cta-band::before, .callout::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  backdrop-filter: blur(var(--glass-blur)) saturate(175%) brightness(1.07);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(175%) brightness(1.07);
  filter: url(#liquid-distort);
  -webkit-filter: url(#liquid-distort);
}
/* cursor-tracking specular glow */
.card::after, .table-wrap::after, .toc::after, .step::after,
.cta-band::after, .callout::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,50%),
    rgba(255,255,255,0.16), rgba(255,255,255,0.05) 40%, transparent 70%);
}
.card:hover::after, .table-wrap:hover::after, .toc:hover::after,
.step:hover::after, .cta-band:hover::after, .callout:hover::after { opacity: 1; }
/* raise content above the glass layers */
.card > *, .table-wrap > *, .toc > *, .step > *,
.cta-band > *, .callout > * { position: relative; z-index: 1; }

/* ---------- Navbar (liquid glass pill) ---------- */
.nav {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: min(var(--maxw), 94vw);
  z-index: 100;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px;
  background: linear-gradient(160deg, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0.05) 55%, rgba(255,255,255,0.09) 100%);
  border: 1px solid var(--stroke-strong);
  border-radius: 999px;
  backdrop-filter: blur(26px) saturate(180%) brightness(1.08);
  -webkit-backdrop-filter: blur(26px) saturate(180%) brightness(1.08);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(255,255,255,0.05),
    var(--glass-shadow);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .5px; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--grad-primary);
  display: grid; place-items: center;
  font-weight: 900; color: #081020; font-size: 19px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 18px rgba(154,108,255,.5);
}
.brand b { font-size: 18px; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand span { font-size: 11px; color: var(--ink-dim); font-weight: 600; letter-spacing: 2px; }

.nav-links { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; transition: .22s;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,.1); }
.nav-links a.active {
  color: var(--ink);
  background: linear-gradient(160deg, rgba(255,255,255,.2), rgba(255,255,255,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}

.lang-toggle {
  border: 1px solid var(--stroke-strong);
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  color: var(--ink-soft);
  border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 13px; cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
  transition: .2s;
}
.lang-toggle:hover { color: var(--ink); border-color: rgba(255,255,255,.45); }

/* ---------- Buttons (liquid glass) ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 16px; font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--stroke-strong);
  background: linear-gradient(160deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.07) 58%, rgba(255,255,255,0.12) 100%);
  color: var(--ink);
  backdrop-filter: blur(18px) saturate(175%) brightness(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(175%) brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    inset 1px 0 0 rgba(255,255,255,0.12),
    inset -1px 0 0 rgba(255,255,255,0.05),
    0 10px 28px rgba(2,4,18,0.42);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.3,1.15), box-shadow .25s, background .25s, border-color .25s;
}
/* top specular refraction edge */
.btn::before {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.30), rgba(255,255,255,0.04) 46%, transparent 62%);
  pointer-events: none;
}
/* cursor-tracking specular glow */
.btn::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(220px circle at var(--mx,50%) var(--my,50%),
    rgba(255,255,255,0.22), rgba(255,255,255,0.06) 40%, transparent 70%);
}
.btn:hover::after { opacity: 1; }
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.45);
  background: linear-gradient(160deg, rgba(255,255,255,0.28), rgba(255,255,255,0.10) 58%, rgba(255,255,255,0.16));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 16px 38px rgba(2,4,18,0.52),
    0 0 0 1px rgba(255,255,255,0.06);
}
.btn:active { transform: translateY(0) scale(.97); }

.btn-primary {
  background: linear-gradient(120deg, rgba(59,214,255,.92), rgba(154,108,255,.92) 55%, rgba(255,107,216,.92));
  color: #081020;
  border-color: rgba(255,255,255,0.5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.16),
    0 12px 32px rgba(154,108,255,0.46);
}
.btn-primary::before {
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.06) 48%, transparent 62%);
}
.btn-primary:hover {
  background: linear-gradient(120deg, #4fe0ff, #ab80ff 55%, #ff82e0);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -1px 0 rgba(0,0,0,0.14),
    0 16px 44px rgba(154,108,255,0.58);
}
.btn-ghost {
  background: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.05) 58%, rgba(255,255,255,0.09));
}

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; z-index: -1; }
.hero-inner { width: min(var(--maxw), 92vw); margin-inline: auto; display: grid; gap: 22px; text-align: center; }

.badge {
  display: inline-flex; align-items: center; gap: 8px; justify-self: center;
  padding: 8px 17px; border: 1px solid var(--stroke-strong); border-radius: 999px;
  background: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
  font-size: 13px; color: var(--ink-soft);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hp-lime); box-shadow: 0 0 12px var(--hp-lime); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.hero h1 { font-size: clamp(40px, 8vw, 92px); line-height: 1.02; margin: 0; font-weight: 900; letter-spacing: -1px; }
.hero h1 .grad { background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { font-size: clamp(16px, 2.4vw, 22px); color: var(--ink-soft); max-width: 760px; margin-inline: auto; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

.hero-stats { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.hero-stats .stat { text-align: center; }
.hero-stats .num { font-size: 30px; font-weight: 800; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .lbl { font-size: 12px; color: var(--ink-dim); letter-spacing: 1px; }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: var(--ink-dim); font-size: 12px; letter-spacing: 2px; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 10px); } }

/* ---------- Section headings ---------- */
.eyebrow { color: var(--hp-cyan); font-weight: 700; letter-spacing: 3px; font-size: 13px; text-transform: uppercase; }
.section-title { font-size: clamp(28px, 4.4vw, 46px); font-weight: 850; margin: 10px 0 14px; letter-spacing: -.5px; }
.section-sub { color: var(--ink-soft); max-width: 680px; }
.center { text-align: center; }
.center .section-sub { margin-inline: auto; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 22px; margin-top: 38px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card {
  padding: 26px;
  border-radius: var(--radius);
  transition: transform .3s cubic-bezier(.2,.8,.3,1), border-color .3s, box-shadow .3s;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--stroke-strong);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -1px 0 rgba(255,255,255,0.06),
    0 30px 70px rgba(2,4,18,0.6);
}
.card .ico {
  font-size: 26px; margin-bottom: 12px;
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px;
  background: var(--grad-soft); border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.card .tag { font-family: var(--mono); font-size: 12px; color: var(--hp-cyan); margin-top: 10px; display: inline-block; }

/* ---------- Feature list / pill chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
  font-size: 13px; color: var(--ink-soft); font-family: var(--mono);
}
.pill {
  display: inline-block; font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 7px;
  background: linear-gradient(160deg, rgba(59,214,255,0.18), rgba(59,214,255,0.06));
  border: 1px solid rgba(59,214,255,0.22);
  color: var(--hp-cyan); margin: 2px;
}

/* ---------- Code blocks ---------- */
.code {
  position: relative; margin: 18px 0; border-radius: var(--radius-sm);
  background: rgba(6,9,20,0.78);
  border: 1px solid var(--stroke);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    var(--glass-shadow);
}
.code .bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border-bottom: 1px solid var(--stroke);
}
.code .bar .dots { display: flex; gap: 6px; }
.code .bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.code .bar .dots i:nth-child(1){ background:#ff5f57; } .code .bar .dots i:nth-child(2){ background:#febc2e; } .code .bar .dots i:nth-child(3){ background:#28c840; }
.code .bar .fname { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); margin-left: 6px; }
.code .copy, .code .dl {
  margin-left: auto; background: transparent;
  border: 1px solid var(--stroke); color: var(--ink-soft); border-radius: 8px;
  padding: 4px 11px; font-size: 12px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
  transition: .2s;
}
.code .dl { margin-left: 6px; }
.code .copy:hover, .code .dl:hover { color: var(--ink); border-color: var(--stroke-strong); }
.code pre { margin: 0; padding: 18px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: #dde5ff; }
.code pre code { font-family: inherit; }

/* HP syntax highlighter tokens */
.tk-com { color: #66739f; font-style: italic; }
.tk-str { color: #92f2a9; }
.tk-num { color: #ffc15e; }
.tk-key { color: #ff7cdd; font-weight: 600; }
.tk-typ { color: #3bd6ff; }
.tk-fn  { color: #cda9ff; }
.tk-bif { color: #72e2ff; }
.tk-op  { color: #ffa271; }
.tk-punc{ color: #8d99c8; }

/* ---------- Comparison / tables ---------- */
.table-wrap { margin-top: 30px; overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); }
th { background: rgba(255,255,255,0.06); color: var(--ink); font-weight: 700; }
td { color: var(--ink-soft); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.05); }
.yes { color: var(--hp-lime); font-weight: 700; }
.no  { color: #ff7190; font-weight: 700; }

/* ---------- Pipeline / steps ---------- */
.steps { display: grid; gap: 14px; margin-top: 30px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; padding: 20px; border-radius: var(--radius-sm); transition: .3s; }
.step:hover { border-color: var(--stroke-strong); transform: translateX(6px); }
.step .n {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; background: var(--grad-primary); color: #081020;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 8px 20px rgba(154,108,255,.45);
}
.step h4 { margin: 2px 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.step code { font-family: var(--mono); color: var(--hp-cyan); font-size: 12.5px; }

/* ---------- Callout ---------- */
.callout {
  border-left: 3px solid var(--hp-cyan);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0; color: var(--ink-soft);
}
.callout b { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 70px 24px; border-radius: 28px; overflow: hidden; }
.cta-band h2 { font-size: clamp(26px, 4vw, 42px); margin: 0 0 12px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--stroke); padding: 50px 0 40px; color: var(--ink-dim); }
.foot-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.foot-grid a { color: var(--ink-soft); text-decoration: none; display: block; margin: 6px 0; font-size: 14px; }
.foot-grid a:hover { color: var(--hp-cyan); }
.foot-col h5 { color: var(--ink); margin: 0 0 10px; font-size: 14px; letter-spacing: 1px; }
.foot-bottom { margin-top: 34px; text-align: center; font-size: 13px; }

/* ============================================================
   Page-specific (consolidated from inline styles)
   ============================================================ */

/* docs.html */
.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.toc { position: sticky; top: 90px; border-radius: 16px; padding: 18px; font-size: 13.5px; }
.toc a { display: block; color: var(--ink-soft); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.toc a:hover, .toc a.active { background: rgba(59,214,255,.14); color: var(--ink); }
.doc h3 { font-size: 22px; margin: 46px 0 14px; border-left: 3px solid var(--hp-violet); padding-left: 12px; }
.doc h4 { font-size: 17px; margin: 26px 0 8px; color: var(--hp-cyan); }
.doc p { color: var(--ink-soft); }
.doc ul { color: var(--ink-soft); }
.doc li { margin: 5px 0; }

/* download.html */
.plat { display: flex; flex-direction: column; }
.plat .ico { font-size: 30px; margin-bottom: 10px; }
.plat .req { font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim); margin: 10px 0 16px; line-height: 1.9; }
.plat .req b { color: var(--hp-cyan); }
.dl-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.ver-tag { font-family: var(--mono); font-size: 12px; color: var(--hp-violet); }
.steps-num { counter-reset: s; list-style: none; padding: 0; margin: 18px 0 0; }
.steps-num li {
  position: relative; padding: 14px 16px 14px 56px; margin-bottom: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  border: 1px solid var(--stroke); border-radius: var(--radius-sm); color: var(--ink-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.steps-num li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 800; background: var(--grad-primary); color: #081020;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.steps-num li b { color: var(--ink); }

/* examples.html */
.ex-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.ex-card { display: flex; flex-direction: column; }
.ex-card .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.ex-card .meta .tag { font-family: var(--mono); font-size: 11px; padding: 3px 9px; border-radius: 6px; background: rgba(59,214,255,0.14); color: var(--hp-cyan); margin: 0; }
.ex-card h3 { margin: 6px 0 2px; font-size: 18px; }
.ex-card .desc { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 12px; }
.ex-card .code { margin: 0; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { transition: none; }
  .bg-fx::before, .bg-fx::after, .bg-grid { animation: none; }
}

/* ---------- i18n ---------- */
html[lang="zh"] .en { display: none !important; }
html[lang="en"] .zh { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: relative; top: 0; }
  .nav-links { display: none; }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: var(--glass-strong); backdrop-filter: blur(24px);
    border: 1px solid var(--stroke); border-radius: 18px; padding: 14px;
  }
  .menu-btn { display: inline-grid !important; }
}
@media (max-width: 760px) {
  .ex-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}
.menu-btn {
  display: none; margin-left: auto;
  background: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.05));
  border: 1px solid var(--stroke); color: var(--ink); border-radius: 11px;
  width: 40px; height: 40px; cursor: pointer; font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
