/* ==========================================================================
   物品盒 · PersonalBox — 官方网站样式
   设计语言与产品保持一致：靛蓝强调色、清爽面板、细边框、柔和阴影。
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #f6f7f9;
  --bg-tint: #fbfbfd;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --panel-3: #f1f2f6;
  --line: #e7e9ef;
  --line-strong: #d5d9e2;
  --text: #111318;
  --text-2: #3c424e;
  --muted: #767e8c;
  --accent: #4f46e5;
  --accent-2: #6366f1;
  --accent-3: #818cf8;
  --accent-soft: #eef0ff;
  --accent-ink: #3730a3;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #b91c1c;
  --radius: 18px;
  --radius-sm: 11px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 18px 44px -26px rgba(16, 24, 40, .28);
  --shadow-lg: 0 48px 110px -48px rgba(49, 46, 129, .38);
  --max: 1160px;
  --max-narrow: 780px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif CJK SC",
    Georgia, serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas,
    "Noto Sans Mono CJK SC", monospace;
  --header-h: 68px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c0e12;
  --bg-tint: #0f1218;
  --panel: #14171d;
  --panel-2: #191d24;
  --panel-3: #1e232b;
  --line: #252a33;
  --line-strong: #333a46;
  --text: #edeff3;
  --text-2: #c3c9d4;
  --muted: #8d96a5;
  --accent: #818cf8;
  --accent-2: #6366f1;
  --accent-3: #a5b4fc;
  --accent-soft: #1e1e3f;
  --accent-ink: #c7d2fe;
  --ok: #34d399;
  --ok-soft: #10281f;
  --warn: #fbbf24;
  --warn-soft: #2a2110;
  --danger: #f87171;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 20px 48px -28px rgba(0, 0, 0, .75);
  --shadow-lg: 0 52px 120px -50px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.22; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track { background: transparent; }

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

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { width: 100%; max-width: var(--max-narrow); margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; position: relative; }
.section.tight { padding: 68px 0; }
.section.paneled { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  letter-spacing: -.03em;
  margin: 14px 0 14px;
}
.section-head .lede { font-size: 1.06rem; color: var(--text-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.eyebrow.center::before { display: none; }

.lede { font-size: 1.1rem; color: var(--text-2); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 24px; }
.mt-l { margin-top: 40px; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- skip link ---------- */
.skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  transition: top .2s;
}
.skip:focus { top: 12px; color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: saturate(1.7) blur(16px);
  -webkit-backdrop-filter: saturate(1.7) blur(16px);
  border-bottom-color: var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; flex: none; }
.brand:hover { color: inherit; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #6366f1, #4f46e5 60%, #4338ca);
  box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .75), inset 0 1px 0 rgba(255, 255, 255, .28);
  color: #fff;
  flex: none;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text strong { display: block; font-size: .96rem; font-weight: 700; letter-spacing: .01em; }
.brand-text em {
  display: block;
  font-style: normal;
  font-size: .56rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1px;
}
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: .9rem;
  color: var(--text-2);
  transition: background .16s, color .16s;
}
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .moon { display: block; }
.icon-btn .sun { display: none; }
html[data-theme="dark"] .icon-btn .moon { display: none; }
html[data-theme="dark"] .icon-btn .sun { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .icon-btn .moon { display: none; }
  html:not([data-theme]) .icon-btn .sun { display: block; }
}
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s, color .16s;
}
.btn:hover { transform: translateY(-1px); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn-primary {
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  border-color: #4338ca;
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(79, 70, 229, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { color: #fff; box-shadow: 0 16px 32px -14px rgba(79, 70, 229, .9); }
.btn-ghost { background: var(--panel); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 9px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 1rem; border-radius: 13px; }
.btn-block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: .92rem; }
.link-arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 78px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -240px 0 auto 0;
  height: 820px;
  background:
    radial-gradient(46% 46% at 72% 34%, rgba(99, 102, 241, .18), transparent 70%),
    radial-gradient(38% 40% at 20% 12%, rgba(129, 140, 248, .14), transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(17, 19, 24, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 19, 24, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 52% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(70% 52% at 50% 0%, #000 0%, transparent 78%);
  pointer-events: none;
  opacity: .7;
}
html[data-theme="dark"] .hero::after {
  background-image:
    linear-gradient(to right, rgba(237, 239, 243, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(237, 239, 243, .055) 1px, transparent 1px);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 56px;
}
.hero-copy { max-width: 560px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px 6px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  font-size: .8rem;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}
.hero-badge b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.hero-badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
h1.display {
  margin: 26px 0 22px;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  font-weight: 760;
}
.display .grad {
  background: linear-gradient(112deg, #4338ca 2%, #6366f1 44%, #8b8ff8 78%, #a5b4fc 105%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
html[data-theme="dark"] .display .grad {
  background: linear-gradient(112deg, #a5b4fc 0%, #818cf8 46%, #c7d2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-sub { font-size: 1.08rem; line-height: 1.75; color: var(--text-2); max-width: 520px; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); }
.hero-visual { position: relative; isolation: isolate; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 6% -4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(99, 102, 241, .22), transparent 72%);
  filter: blur(26px);
  opacity: 0;
  transition: opacity .3s;
}
html[data-theme="dark"] .hero-visual::before { opacity: 1; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .hero-visual::before { opacity: 1; }
}
.hero-visual img { width: 100%; height: auto; filter: drop-shadow(0 40px 70px rgba(49, 46, 129, .18)); }
html[data-theme="dark"] .hero-visual img { filter: drop-shadow(0 40px 80px rgba(0, 0, 0, .6)); }
.hero-note {
  position: absolute;
  left: -14px;
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  font-size: .8rem;
  color: var(--text-2);
  animation: float 7s ease-in-out infinite;
}
.hero-note .ni {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--warn-soft);
  color: var(--warn);
}
.hero-note .ni svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-note strong { display: block; font-size: .78rem; color: var(--text); line-height: 1.35; }
.hero-note span { font-size: .72rem; color: var(--muted); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* 移动端主视觉：通过 <picture> 换成手机截图，避免下载桌面大图 */
.hero-pic { display: block; }

/* 主题感知图片 */
.theme-dark-only { display: none; }
html[data-theme="dark"] .theme-light-only { display: none; }
html[data-theme="dark"] .theme-dark-only { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .theme-light-only { display: none; }
  html:not([data-theme]) .theme-dark-only { display: block; }
}

/* ---------- figures ---------- */
.figure { margin: 0; }
.figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.figure-plain img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: none; background: var(--panel); }
figcaption {
  margin-top: 14px;
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
.frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.frame-bar i:nth-child(1) { background: #fca5a5; }
.frame-bar i:nth-child(2) { background: #fcd34d; }
.frame-bar i:nth-child(3) { background: #86efac; }
.frame-bar span {
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 14px;
}
.frame img { width: 100%; display: block; }

/* ---------- tldr / answer ---------- */
.tldr {
  position: relative;
  padding: 22px 26px 22px 30px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px var(--radius) var(--radius) 4px;
  background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, var(--panel) 60%, transparent) 62%);
  color: var(--text-2);
  font-size: .98rem;
}
.tldr b { color: var(--text); }
.tldr .tag {
  display: inline-block;
  margin-bottom: 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.tldr p + p { margin-top: 8px; }

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat { padding: 26px 26px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b {
  display: block;
  font-size: clamp(1.6rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat b small { font-size: .52em; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.stat span { display: block; margin-top: 8px; font-size: .84rem; color: var(--muted); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card h3 { font-size: 1.04rem; margin-bottom: 9px; letter-spacing: -.015em; }
.card p { font-size: .9rem; color: var(--muted); line-height: 1.7; }
.card .card-link { margin-top: 16px; display: inline-flex; font-size: .85rem; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }

.icon-tile {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.icon-tile svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.icon-tile.em { background: color-mix(in srgb, var(--panel-2) 80%, transparent); font-size: 1.15rem; }
.icon-tile.ok { background: var(--ok-soft); color: var(--ok); }
.icon-tile.warn { background: var(--warn-soft); color: var(--warn); }

.kicker {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .04em;
  color: var(--muted);
}

/* feature cards with accent line */
.feature-card { overflow: hidden; }
.feature-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.feature-card:hover::after { opacity: 1; }
.feature-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: .72rem;
  color: var(--text-2);
  line-height: 1.5;
}
.tag.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
html[data-theme="dark"] .tag.accent { color: var(--accent-3); }

/* ---------- split rows ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-copy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.03em; margin: 14px 0 16px; }
.split-copy p { color: var(--text-2); }
.split-copy .checks { margin-top: 24px; display: grid; gap: 12px; }
.split-media img { width: 100%; border-radius: var(--radius); }
.split + .split { margin-top: 88px; }

.checks li {
  display: flex;
  gap: 11px;
  font-size: .93rem;
  color: var(--text-2);
  line-height: 1.6;
}
.checks li svg { width: 19px; height: 19px; margin-top: 2px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.checks li b { color: var(--text); font-weight: 600; }

/* ---------- steps ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 34px;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  z-index: 1;
}
.step::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(var(--line-strong), var(--line));
}
.step:last-child::after { display: none; }
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: .9rem; color: var(--muted); }
.step .step-body > * + * { margin-top: 12px; }

/* ---------- code ---------- */
.code {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  overflow: hidden;
  font-size: .84rem;
}
.code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 15px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 65%, transparent);
}
.code-head span { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font-size: .7rem;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent-3); }
.copy-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-btn.done { color: var(--ok); border-color: var(--ok); }
.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--text-2);
  line-height: 1.75;
  font-family: var(--font-mono);
  font-size: .8rem;
  tab-size: 2;
}
.code pre code { font-family: inherit; }
.code .c { color: var(--muted); }
.code .k { color: var(--accent); }
.code .s { color: var(--ok); }
.code .p { color: var(--text); font-weight: 600; }
.code.dark { background: #0f1218; border-color: #252a33; }
.code.dark .code-head { border-color: #252a33; background: #14171d; }
.code.dark .code-head span { color: #8d96a5; }
.code.dark pre { color: #c3c9d4; }
.code.dark .copy-btn { background: #1e232b; border-color: #333a46; color: #8d96a5; }
.code.dark .c { color: #6b7484; }
.code.dark .k { color: #a5b4fc; }
.code.dark .s { color: #6ee7b7; }
.code.dark .p { color: #edeff3; }

/* ---------- tables ---------- */
.table-wrap {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 560px; }
thead th {
  text-align: left;
  padding: 13px 18px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody td { padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
tbody td:first-child { color: var(--text); font-weight: 600; }
td .mono, th .mono { font-size: .82rem; }
td code, p code, li code, .qa-body code {
  font-family: var(--font-mono);
  font-size: .85em;
  padding: 1.5px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--accent-ink);
  white-space: nowrap;
}
html[data-theme="dark"] td code, html[data-theme="dark"] p code,
html[data-theme="dark"] li code, html[data-theme="dark"] .qa-body code { color: var(--accent-3); }

.method {
  display: inline-block;
  min-width: 52px;
  padding: 1px 7px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
}
.method.get { background: var(--ok-soft); color: var(--ok); }
.method.post { background: var(--accent-soft); color: var(--accent); }
.method.put { background: var(--warn-soft); color: var(--warn); }
.method.delete { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

/* ---------- callout ---------- */
.callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  font-size: .9rem;
  color: var(--text-2);
}
.callout svg { width: 20px; height: 20px; flex: none; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.callout.warn svg { stroke: var(--warn); }
.callout b { color: var(--text); }

/* ---------- page hero (sub pages) ---------- */
.page-hero {
  position: relative;
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: -320px 0 auto;
  height: 620px;
  background: radial-gradient(42% 50% at 78% 40%, rgba(99, 102, 241, .13), transparent 72%);
  pointer-events: none;
}
.page-hero .wrap { position: relative; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: .78rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--line-strong); }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); letter-spacing: -.035em; margin-bottom: 18px; }
.page-hero .lede { max-width: 660px; }
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
  font-size: .8rem;
  color: var(--muted);
}
.page-meta span { display: inline-flex; align-items: center; gap: 6px; }
.page-meta b { color: var(--text-2); font-weight: 600; }

/* ---------- doc layout + toc ---------- */
.doc-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 60px; align-items: start; }
.doc-layout > *, .doc-body, .doc-body > section { min-width: 0; }
.toc {
  position: sticky;
  top: 96px;
  padding: 4px 0 4px 0;
  font-size: .85rem;
  border-left: 1px solid var(--line);
}
.toc h2 {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px 18px;
  font-weight: 650;
}
.toc a {
  display: block;
  padding: 6px 0 6px 18px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  line-height: 1.45;
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.doc-body > section { padding-top: 8px; margin-bottom: 64px; scroll-margin-top: 96px; }
.doc-body > section > h2 {
  font-size: 1.55rem;
  letter-spacing: -.025em;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.doc-body h3 { font-size: 1.06rem; margin: 32px 0 10px; }
.doc-body h4 { font-size: .95rem; margin: 24px 0 8px; }
.doc-body p { color: var(--text-2); margin: 12px 0; }
.doc-body ul:not(.checks):not(.tag-list) { margin: 14px 0; display: grid; gap: 8px; }
.doc-body ul:not(.checks):not(.tag-list) li {
  position: relative;
  padding-left: 18px;
  color: var(--text-2);
  font-size: .94rem;
}
.doc-body ul:not(.checks):not(.tag-list) li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-3);
}
.doc-body ul:not(.checks):not(.tag-list) li b { color: var(--text); }
.doc-body .code { margin: 18px 0; }
.doc-body .table-wrap { margin: 18px 0; }
.doc-body .callout { margin: 20px 0; }

/* ---------- feature detail blocks ---------- */
.detail-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.detail-block + .detail-block { margin-top: 32px; }
.detail-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 26px 30px;
  border-bottom: 1px solid var(--line);
}
.detail-block-head h2 { font-size: 1.2rem; margin: 0; }
.detail-block-head p { font-size: .86rem; color: var(--muted); width: 100%; margin: 0; }
.detail-block-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; padding: 30px; align-items: start; }
.detail-block-body.flip .detail-copy { order: 2; }
.detail-copy > * + * { margin-top: 14px; }
.detail-copy p { font-size: .92rem; color: var(--text-2); }
.detail-media img { width: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-md); }

/* ---------- quotes / values ---------- */
.quote {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.quote blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  line-height: 1.6;
  letter-spacing: -.01em;
  color: var(--text);
}
.quote blockquote em { font-style: normal; color: var(--accent); }
.quote cite { display: block; margin-top: 20px; font-style: normal; font-size: .82rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- FAQ ---------- */
.qa-group + .qa-group { margin-top: 44px; }
.qa-group > h2 { font-size: 1.25rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.qa-group > h2 .count {
  font-size: .7rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  letter-spacing: 0;
}
.qa {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.qa[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.qa summary {
  position: relative;
  padding: 17px 52px 17px 20px;
  font-size: .96rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  line-height: 1.55;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -6px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s, border-color .2s;
}
.qa[open] summary::after { transform: rotate(225deg); margin-top: -1px; border-color: var(--accent); }
.qa summary:hover { color: var(--accent); }
.qa-body { padding: 0 20px 20px; font-size: .91rem; color: var(--text-2); }
.qa-body p + p { margin-top: 10px; }
.qa-body ul:not(.checks) { margin-top: 10px; display: grid; gap: 6px; }
.qa-body ul:not(.checks) li { position: relative; padding-left: 16px; }
.qa-body ul:not(.checks) li::before { content: ""; position: absolute; left: 2px; top: .65em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-3); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: 76px 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(50% 90% at 50% 0%, rgba(99, 102, 241, .16), transparent 72%),
    var(--bg-tint);
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(17, 19, 24, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 19, 24, .04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(56% 80% at 50% 40%, #000, transparent 76%);
  mask-image: radial-gradient(56% 80% at 50% 40%, #000, transparent 76%);
  pointer-events: none;
}
html[data-theme="dark"] .cta-band::after {
  background-image:
    linear-gradient(to right, rgba(237, 239, 243, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(237, 239, 243, .05) 1px, transparent 1px);
}
.cta-band .wrap { position: relative; z-index: 1; text-align: center; }
.cta-band h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); letter-spacing: -.03em; margin-bottom: 14px; }
.cta-band p { color: var(--text-2); max-width: 560px; margin: 0 auto; }
.cta-band .hero-cta { justify-content: center; }
.cta-band .hero-meta { justify-content: center; border-top: 0; margin-top: 26px; padding-top: 0; }
.cta-band .code { max-width: 620px; margin: 28px auto 0; text-align: left; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 60px 0 30px;
  font-size: .87rem;
}
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { color: var(--muted); max-width: 320px; margin-top: 14px; font-size: .86rem; line-height: 1.7; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.footer-badges .tag { font-size: .68rem; }
.footer-col h3 {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 650;
}
.footer-col a { display: block; padding: 4px 0; color: var(--text-2); font-size: .86rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- 404 ---------- */
.error-page {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 24px;
}
.error-page .code404 {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.error-page h1 { margin: 22px 0 12px; font-size: 1.7rem; }
.error-page p { color: var(--muted); max-width: 460px; }
.error-page .hero-cta { justify-content: center; }

/* ---------- misc ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-row .tag { font-size: .76rem; padding: 4px 11px; }
.divider-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0 26px;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.divider-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.mini-list { display: grid; gap: 10px; }
.mini-list li { display: flex; gap: 10px; font-size: .89rem; color: var(--text-2); }
.mini-list svg { width: 17px; height: 17px; margin-top: 3px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* architecture legend */
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: .8rem; color: var(--muted); margin-top: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* reveal animation */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-note { animation: none; }
  .card:hover, .btn:hover { transform: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .hero-copy { max-width: 660px; }
  .hero-visual { max-width: 760px; }
  .split { gap: 40px; }
  .detail-block-body { gap: 26px; padding: 24px; }
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 2 / -1; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .section { padding: 76px 0; }
  .section.tight { padding: 52px 0; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s, transform .18s, visibility .18s;
  }
  .nav.open { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: 12px 14px; font-size: .95rem; }
  .menu-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text-2);
    cursor: pointer;
  }
  .menu-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
  .header-actions .btn { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 30px; }
  .split.reverse .split-media { order: 0; }
  .split + .split { margin-top: 60px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-block-body, .detail-block-body.flip { grid-template-columns: 1fr; }
  .detail-block-body.flip .detail-copy { order: 0; }
  .hero { padding-top: 54px; }
  .hero-note { display: none; }
  .page-hero { padding: 44px 0 40px; }
  .hero-pic {
    position: relative;
    max-height: 536px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: var(--shadow-lg);
  }
  .hero-pic img { width: 100%; height: auto; aspect-ratio: 390 / 844; filter: none; }
  .hero-pic::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
  }
}

@media (max-width: 620px) {
  .wrap, .wrap-narrow { padding: 0 18px; }
  h1.display { font-size: clamp(2.15rem, 10.4vw, 2.9rem); }
  .hero-sub { font-size: 1rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .grid-2, .grid-3, .grid-4, .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px; }
  .detail-block-head { padding: 22px; }
  .detail-block-body { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-grid > :last-child { grid-column: auto; }
  .section-head { margin-bottom: 34px; }
  .footer-bottom { flex-direction: column; }
  .doc-body > section { margin-bottom: 48px; }
  .qa summary { padding: 15px 46px 15px 17px; font-size: .92rem; }
  .qa-body { padding: 0 17px 18px; }
  .page-meta { gap: 6px 16px; }
}
