:root {
  --bg: #ffffff;
  --bg-panel: #f6f7fa;
  --bg-ink: #0f1226;
  --border: #e6e8ef;
  --accent: #2e5ef4;
  --accent-dark: #1c41c4;
  --text: #14162b;
  --text-muted: #5d6278;
  --success: #1fae5b;
  --warn: #ef8a17;
  --error: #dc3f36;
  --dot: #e3e6ee;
  --on-ink: var(--bg);
  --ink-muted: #b9bfd5;
  --ink-link: #b0c1ff;
  --clear: transparent;
  --tint: color-mix(in srgb, var(--accent) 6%, var(--bg));
  --first-top: color-mix(in srgb, var(--accent) 8%, var(--bg));
  --first-mid: color-mix(in srgb, var(--accent) 3%, var(--bg));
  --glass: color-mix(in srgb, var(--bg) 72%, var(--clear));
  --badge-bg: color-mix(in srgb, var(--bg) 78%, var(--clear));
  --note-bg: color-mix(in srgb, var(--bg-panel) 72%, var(--clear));
  --veil: color-mix(in srgb, var(--bg-ink) 32%, var(--clear));
  --free-text: color-mix(in srgb, var(--success) 64%, var(--bg-ink));
  --focus: var(--accent);
  --color-primary: var(--accent);
  --color-accent: var(--accent);
  --color-text: var(--text);
  --color-bg: var(--bg);

  --font-display: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --weight-display: 800;
  --weight-poster: 900;
  --fs-small: .8125rem;
  --fs-body: 1rem;
  --fs-h1: clamp(34px, 3.4vw, 48px);
  --fs-h1-small: clamp(26px, 7.2vw, 30px);
  --fs-h2: clamp(24px, 3vw, 38px);
  --fs-h3: clamp(18px, 2vw, 22px);

  --r-stage: 28px;
  --r-card: 18px;
  --r-menu: 14px;
  --r-note: 16px;
  --r-logo: 9px;
  --r-shot: 10px;
  --r-chip: 7px;
  --r-line: 1px;
  --r-pill: 999px;
  --r-round: 50%;

  --maxw: 1232px;
  --readw: 74ch;
  --head-span: 1280px;
  --head-h: 72px;
  --gutter: 32px;
  --gap: 20px;
  --section-pad: clamp(48px, 6.5vw, 96px);
  --fab-edge: 24px;
  --fab-bottom: max(var(--fab-edge), env(safe-area-inset-bottom));
  --ease: .2s ease;

  --hero-gradient: linear-gradient(180deg, var(--first-top) 0%, var(--first-mid) 28%, var(--bg) 58%);
  --hero-dots: radial-gradient(circle at center, var(--dot) 1px, var(--clear) 1.5px);
  --hero-mask: radial-gradient(ellipse 58% 64% at 33% 54%, var(--bg-ink) 0%, color-mix(in srgb, var(--bg-ink) 55%, var(--clear)) 45%, var(--clear) 100%);
  --hero-fade: linear-gradient(180deg, var(--clear) 70%, var(--bg) 100%);
  --glow-main: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 15%, var(--clear)), color-mix(in srgb, var(--accent) 5%, var(--clear)) 55%, var(--clear));
  --glow-deep: radial-gradient(closest-side, color-mix(in srgb, var(--accent-dark) 8%, var(--clear)), var(--clear));
  --glow-warm: radial-gradient(closest-side, color-mix(in srgb, var(--warn) 9%, var(--clear)), var(--clear));
  --gradient-cta: linear-gradient(180deg, var(--accent), var(--accent-dark));
  --gradient-word: linear-gradient(100deg, var(--accent) 10%, var(--accent-dark));
  --gradient-mark: linear-gradient(160deg, var(--bg), var(--bg-panel));
  --shadow-stage: 0 40px 120px color-mix(in srgb, var(--bg-ink) 22%, var(--clear)), 0 14px 36px color-mix(in srgb, var(--bg-ink) 10%, var(--clear));
  --shadow-card: 0 40px 120px color-mix(in srgb, var(--bg-ink) 9%, var(--clear));
  --shadow-menu: 0 24px 60px color-mix(in srgb, var(--bg-ink) 12%, var(--clear)), 0 2px 6px color-mix(in srgb, var(--bg-ink) 6%, var(--clear));
  --shadow-btn: inset 0 1px 0 color-mix(in srgb, var(--on-ink) 26%, var(--clear)), 0 14px 28px -10px color-mix(in srgb, var(--accent) 60%, var(--clear)), 0 2px 5px color-mix(in srgb, var(--accent-dark) 28%, var(--clear));
  --shadow-soft: 0 1px 2px color-mix(in srgb, var(--bg-ink) 5%, var(--clear));
  --shadow-fab: 0 18px 40px -12px color-mix(in srgb, var(--bg-ink) 45%, var(--clear)), 0 2px 6px color-mix(in srgb, var(--bg-ink) 14%, var(--clear));
  --shadow-state: 0 0 0 3px color-mix(in srgb, var(--success) 18%, var(--clear));
  --shadow-stage-edge: inset 0 0 0 1px color-mix(in srgb, var(--on-ink) 7%, var(--clear)), inset 0 1px 0 color-mix(in srgb, var(--on-ink) 12%, var(--clear));
  --shadow-ring: 0 0 0 1.1cqw color-mix(in srgb, var(--on-ink) 14%, var(--clear));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--fs-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; max-width: 100%; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
:target { scroll-margin-top: 24px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--weight-display); line-height: 1.17; margin: 0; }
h1 { font-size: var(--fs-h1); letter-spacing: -.035em; text-wrap: pretty; }
h2 { font-size: var(--fs-h2); letter-spacing: -.02em; text-wrap: balance; }
h3 { font-size: var(--fs-h3); text-wrap: balance; }
:is(h1,h2,h3):is(:lang(zh),:lang(ja),:lang(ko)) { letter-spacing: -.02em; }
:is(h1,h2,h3,.lede):lang(ja) { word-break: auto-phrase; }
:is(h1,h2):lang(ko) { word-break: keep-all; }
p { margin-block: 0 1em; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted-here, var(--text-muted)); }
.wrap {
  width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto; padding-inline: var(--gutter);
}
.wrap--reading { max-width: calc(var(--readw) + var(--gutter) * 2); }
:is(.wrap,.prose,.card-grid,.foot-grid,.head-inner,.hero-grid,.doc-split) > * { min-width: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; z-index: 90; top: 8px; left: var(--gutter); }
.skip-link:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.decor-crop { position: relative; overflow-x: clip; }
.decor-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tilt-decor { transform: rotate(-.45deg); pointer-events: none; }
.prose { min-width: 0; }
.prose :is(h2,h3):not(:first-child) { margin-block: 1.5em .66em; }
.prose :is(ul,ol) { padding-inline-start: 1.5em; }
.prose a:not(.btn,.store-btn) {
  color: var(--link-here, var(--accent-dark)); text-decoration: underline; text-underline-offset: .18em;
}
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
:not(pre) > code { padding: .08em .34em; border-radius: var(--r-chip); background: var(--bg-panel); color: var(--text); }
pre {
  max-width: 100%; overflow-x: auto; padding: 16px; margin-block: 1em;
  border: 1px solid var(--border); border-radius: var(--r-menu);
  background: var(--bg-panel); color: var(--text); tab-size: 2;
}
pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }
.sec { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }
.sec--plain { background: var(--bg); color: var(--text); }
.sec--panel { background: var(--bg-panel); color: var(--text); }
.sec--tint { background: var(--tint); color: var(--text); }
.sec--ink {
  background: var(--bg-ink); color: var(--on-ink);
  --muted-here: var(--ink-muted); --link-here: var(--ink-link); --focus: var(--ink-link);
}
.sec--ink a:not(.btn,.store-btn,.article-card) { color: var(--ink-link); text-decoration: underline; }
.section-intro { max-width: 62ch; margin-bottom: clamp(24px, 4vw, 48px); }
.section-intro p { margin: 12px 0 0; color: var(--muted-here, var(--text-muted)); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--gap); }
.card-grid--three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card-grid:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6,minmax(0,1fr)); }
.card-grid:has(> :nth-child(5):last-child) > * { grid-column: span 2; }
.card-grid:has(> :nth-child(5):last-child) > :nth-child(n+4) { grid-column: span 3; }
.card-grid:has(> :nth-child(7):last-child) { grid-template-columns: repeat(12,minmax(0,1fr)); }
.card-grid:has(> :nth-child(7):last-child) > * { grid-column: span 3; }
.card-grid:has(> :nth-child(7):last-child) > :nth-child(n+5) { grid-column: span 4; }
.card, .panel {
  min-width: 0; padding: clamp(18px, 3vw, 32px);
  border-radius: var(--r-card); border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
  --muted-here: var(--text-muted); --link-here: var(--accent-dark); --focus: var(--accent);
}
.panel { box-shadow: var(--shadow-card); }
.card :is(h2,h3) a:hover { text-decoration: underline; }
.card p, .panel p { margin: .7em 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 0; max-width: 100%; min-height: 52px; padding: 9px 26px;
  border: 1px solid var(--clear); border-radius: var(--r-pill);
  font-size: var(--fs-body); font-weight: 600; line-height: 1.25; letter-spacing: -.005em;
  text-align: center; text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { color: var(--on-ink); background: var(--gradient-cta); box-shadow: var(--shadow-btn); }
.btn-primary:hover, .demo-hover { transform: translateY(-1px); }
.btn-ghost {
  color: var(--text); background: var(--glass); border-color: var(--border);
  box-shadow: var(--shadow-soft); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding-inline: 24px 22px;
}
.btn-ghost svg { width: 14px; height: 14px; color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--text-muted); }
.btn:active, .demo-pressed { transform: translateY(1px); box-shadow: var(--shadow-soft); }
.btn:disabled { background: var(--bg-panel); color: var(--text-muted); border-color: var(--border); box-shadow: none; cursor: not-allowed; transform: none; }
.demo-focus { outline: 2px solid var(--focus); outline-offset: 3px; }

.masthead, #site-header { position: relative; z-index: 40; }
.head-inner {
  display: flex; align-items: center; justify-content: space-between; gap: clamp(8px, 2vw, 24px);
  min-height: var(--head-h); width: 100%;
  max-width: min(100%, calc(var(--head-span) + var(--gutter) * 2));
  padding-inline: var(--gutter); margin-inline: auto;
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: var(--r-logo);
  flex: 0 0 34px;
}
.brand-mark--sample { background: var(--gradient-mark); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.brand-name {
  color: var(--text); font-family: var(--font-display); font-size: 18px; font-weight: var(--weight-display);
  letter-spacing: -.02em; line-height: 1.25; text-wrap: balance;
}
.brand-name span { color: var(--text-muted); font-weight: 600; margin-inline-start: 4px; }
.desktop-nav { display: flex; margin-inline-start: auto; min-width: 0; }
.nav-list { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-item, .nav-pop { position: relative; }
.nav-link, .lang, .hamburger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: var(--r-pill);
  color: var(--text-muted); background: var(--clear); border: 0;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: color var(--ease), background-color var(--ease);
}
.nav-link:hover, .nav-link:focus-visible, .nav-link[aria-current="page"], .nav-link.is-current {
  color: var(--text); background: var(--tint);
}
.nav-link:hover, .menu a:hover, .mobile-drawer a:hover { text-decoration: underline; text-underline-offset: .2em; }
.nav-link[aria-current="page"]::before {
  content: ""; width: 6px; height: 6px; flex: none; border-radius: var(--r-round); background: var(--accent);
}
.head-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.lang { border: 1px solid var(--border); background: var(--glass); color: var(--text); padding-inline: 12px 14px; font-size: 14px; }
.lang svg { width: 15px; height: 15px; color: var(--text-muted); }
.nav-link .chev, .lang .chev { width: 12px; height: 12px; transition: transform var(--ease); }
[aria-expanded="true"] .chev, details[open] > summary .chev { transform: rotate(180deg); }
.hamburger { display: none; padding: 0; min-width: 44px; min-height: 44px; }
.hamburger svg { width: 22px; height: 22px; }
.lang-short { display: none; }
.menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  width: min(280px, calc(100vw - var(--gutter) * 2)); padding: 10px;
  border-radius: var(--r-menu); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-menu);
}
.menu-label { display: block; padding: 4px 10px; color: var(--text-muted); font-size: var(--fs-small); }
.menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 10px; border-radius: var(--r-shot); }
:is(.menu,.mobile-drawer) a:is(:hover,:focus-visible,[aria-current]) { background: var(--tint); color: var(--text); }
.nav-pop > summary { list-style: none; }
.nav-pop > summary::-webkit-details-marker { display: none; }
.mobile-drawer, .nav-veil { display: none; }

.site-foot {
  background: var(--bg-panel); color: var(--text); border-top: 1px solid var(--border);
  padding-top: 54px; padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
.foot-grid { display: grid; grid-template-columns: 1.35fr 1fr 1.15fr .7fr; gap: 28px; }
.site-foot .brand { flex-shrink: 1; max-width: 100%; }
.site-foot h2 { font-size: var(--fs-body); margin-bottom: 12px; }
.site-foot p { color: var(--text-muted); font-size: .9375rem; margin: 12px 0 0; }
.site-foot ul { padding: 0; margin: 0; list-style: none; }
.site-foot li + li { margin-top: 5px; }
.site-foot a:hover { text-decoration: underline; text-underline-offset: .2em; }
.site-foot a[aria-current] { text-decoration: underline; text-underline-offset: .2em; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .875rem; }

.reveal-ready .reveal { transition: opacity .44s ease, transform .44s ease; }
.reveal-ready .reveal:not(.shown):not(:focus-within):not(:target):not(:has(:target)) { opacity: 0; transform: translateY(12px); }

@media (width < 1280px) {
  .desktop-nav { display: none; }
  .head-tools { margin-inline-start: auto; }
  .hamburger { display: inline-flex; }
  .head-tools .menu { inset-inline-end: 0; }
  .nav-veil { display: block; position: fixed; inset: 0; z-index: -1; background: var(--veil); color: var(--text); }
  .mobile-drawer {
    display: block; position: fixed; z-index: 1; inset: var(--head-h) 0 auto;
    max-height: calc(100dvh - var(--head-h)); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px var(--gutter) max(20px, env(safe-area-inset-bottom));
    border-block: 1px solid var(--border); box-shadow: var(--shadow-menu);
    background: var(--bg); color: var(--text);
  }
  .mobile-drawer ul { padding: 0; margin: 0; list-style: none; }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--r-shot); }
  .mobile-drawer .menu-label { margin-top: 10px; border-top: 1px solid var(--border); }
}
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  :root { --gutter: 20px; --fab-edge: 16px; --head-h: 64px; }
  .btn { min-height: 48px; padding-inline: 20px; font-size: .9375rem; }
}
@media (max-width: 768px) {
  h1 { font-size: var(--fs-h1-small); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --gap: 16px; }
  .tilt-decor { transform: none; }
  .head-inner .brand { gap: 7px; }
  .head-inner .brand-name { max-width: min(16.5rem, calc(100vw - 128px)); font-size: 15px; }
  .head-inner .brand-name span { display: none; }
  .lang { min-height: 44px; padding-inline: 9px; }
  .lang svg:not(.chev), .lang-full { display: none; }
  .lang-short { display: inline; }
  .card-grid.card-grid { grid-template-columns: minmax(0,1fr); }
  .card-grid.card-grid > * { grid-column: 1; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1 !important; transform: none !important; }
}