:root {
  --bg: #FEFEFE;
  --bg-panel: #F2F2F2;
  --bg-panel-2: #FFFFFF;
  --border: #E3E3E6;
  --border-strong: #CFCFD4;
  --accent: #3346F0;
  --accent-dark: #2333C4;
  --text: #1C1C21;
  --text-muted: #5E6070;
  --success: #1F9D55;
  --warn: #D9900F;
  --error: #E0444B;
  --on-accent: #FFFFFF;
  --sticky: #FFD233;
  --sticky-note: #FFE680;
  --sticky-back: #FFF3BF;
  --sticky-edge: #E8C02E;
  --halo-a: #E6DDFB;
  --halo-b: #FDE6D6;
  --dot: #D6D6D6;
  --lane: #F7F7F7;
  --wire: #9E9EA6;
  --chrome-dot: #DCDCDF;
  --note-blue: #DDE5FF;
  --note-blue-edge: #AEBDF6;
  --note-green: #DAF2E4;
  --note-green-edge: #9ED5B4;
  --note-pink: #FCE1E4;
  --note-pink-edge: #F0AEB5;
  --cur-violet: #7B5CF5;
  --cur-violet-soft: #EEE8FF;
  --cur-violet-ink: #4D33BC;
  --cur-orange: #EE8A3A;
  --cur-orange-soft: #FFEBDB;
  --cur-orange-ink: #94491A;
  --cur-green: #25A463;
  --cur-green-soft: #DDF4E7;
  --cur-green-ink: #17663D;
  --clear: transparent;
  --veil: rgba(28, 28, 33, .24);
  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 600;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 40px;
  --radius-pill: 999px;
  --radius-circle: 50%;
  --shadow-sm: 0 1px 2px rgba(28, 28, 33, .06);
  --shadow-card: 0 1px 2px rgba(28, 28, 33, .05), 0 6px 16px -6px rgba(28, 28, 33, .10);
  --shadow-float: 0 2px 4px rgba(28, 28, 33, .04), 0 28px 60px -18px rgba(28, 28, 33, .18);
  --shadow-accent: 0 1px 2px rgba(35, 51, 196, .30), 0 8px 20px -8px rgba(51, 70, 240, .55);
  --note-shadow: drop-shadow(0 1px 1px rgba(28, 28, 33, .06)) drop-shadow(0 5px 8px rgba(28, 28, 33, .07));
  --cursor-shadow: drop-shadow(0 2px 4px rgba(28, 28, 33, .14));
  --focus-ring: 0 0 0 3px rgba(51, 70, 240, .30);
  --dot-ring-success: 0 0 0 4px rgba(31, 157, 85, .14);
  --gutter: 32px;
  --reading-width: 800px;
  --content-width: 1120px;
  --header-width: 1280px;
  --nav-h: 68px;
  --peek: 44px;
  --space-section: 80px;
  --ease: cubic-bezier(.2, .65, .3, 1);
  --time-fast: .2s;
  --time-reveal: .55s;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg-panel);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.nav-open { overflow: hidden; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-dark); }
button, a { -webkit-tap-highlight-color: var(--clear); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: var(--focus-ring); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-normal);
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 3.4vw, 48px); line-height: 1.14; }
h2 { font-size: clamp(26px, 3vw, 34px); }
h3 { font-size: 23px; }
h4 { font-size: 19px; }
p { margin-top: 0; }
strong, b { font-weight: var(--weight-bold); }
code, kbd, samp, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; font-size: .9em; }
pre {
  max-width: 100%;
  margin: 24px 0;
  padding: 20px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel-2);
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
  tab-size: 2;
}
pre code { font-size: inherit; overflow-wrap: normal; word-break: normal; white-space: pre; }
ul, ol { padding-inline-start: 1.5em; }
li + li { margin-top: .35em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
:where(section, article, aside, main, div, li) { min-width: 0; }
svg, .icon, .eyebrow-dot { flex-shrink: 0; }
.icon { width: 20px; height: 20px; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading {
  width: 100%;
  max-width: calc(var(--reading-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section-white {
  background: var(--bg);
  color: var(--text);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}
.section-head { margin-bottom: 32px; max-width: 760px; }
.section-head h2 { margin-top: 0; margin-bottom: 16px; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.keep { white-space: nowrap; }
.flow > * + * { margin-top: 24px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card, .panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-panel-2);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.card h3, .panel h2 { margin-top: 0; }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card p { color: var(--text-muted); }
.prose { overflow-wrap: break-word; }
.prose h2 { margin-top: 56px; scroll-margin-top: 24px; }
.prose h3 { margin-top: 36px; }
.prose p, .prose li { line-height: 1.85; }
.prose img { border-radius: var(--radius-lg); }
.prose > :first-child { margin-top: 0; }
.prose :where(div, section, article) { max-width: 100%; min-width: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 24px;
  border: 1px solid var(--clear);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--weight-medium);
  line-height: 1.4;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--time-fast), border-color var(--time-fast), transform var(--time-fast);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-ghost { background: var(--bg-panel-2); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover, .btn-ghost.is-hover { border-color: var(--text); color: var(--text); }
.btn-ink { background: var(--text); color: var(--on-accent); min-height: 44px; border-radius: var(--radius-sm); }
.btn-ink:hover { background: var(--accent-dark); color: var(--on-accent); }
.btn:active, .btn.is-pressed { transform: translateY(1px); }
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: var(--focus-ring); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
}
.cta-row { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.topbar, #site-header {
  position: relative;
  z-index: 50;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  position: relative;
  min-height: var(--nav-h);
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--radius-circle); }
.brand-name { font-family: var(--font-display); font-size: 18px; font-weight: var(--weight-medium); letter-spacing: -.01em; }
.mainnav { min-width: 0; }
.mainnav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mainnav li { margin: 0; }
.mainnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--time-fast), background-color var(--time-fast);
}
.mainnav a:hover { background: var(--bg-panel); color: var(--text); }
.mainnav a.is-current { background: var(--sticky); color: var(--text); font-weight: var(--weight-medium); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language-control { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel-2);
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}
.lang svg { width: 16px; height: 16px; color: var(--text-muted); }
.lang-caret { color: var(--text-muted); font-size: 11px; }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 200px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel-2);
  color: var(--text);
  box-shadow: var(--shadow-float);
}
.language-menu a, .mobile-drawer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
}
.language-menu a:hover, .mobile-drawer a:hover { background: var(--bg-panel); color: var(--text); }
.language-menu a[aria-current="true"] { font-weight: var(--weight-bold); color: var(--accent-dark); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel-2);
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; }
.mobile-drawer {
  position: absolute;
  z-index: 3;
  top: 100%;
  inset-inline: 0;
  padding: 16px var(--gutter) 24px;
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel-2);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.mobile-drawer ul { margin: 0; padding: 0; list-style: none; }
.mobile-drawer li { margin: 0; }
.mobile-drawer a.is-current { background: var(--sticky); color: var(--text); }
.drawer-caption { margin: 20px 14px 8px; color: var(--text-muted); font-size: 13px; }
.nav-veil { position: fixed; z-index: 1; inset: var(--nav-h) 0 0; border: 0; background: var(--veil); color: var(--text); }
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 4px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--bg-panel-2);
  color: var(--accent-dark);
  border-radius: var(--radius-sm);
}
.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-footer {
  padding-top: 64px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1.3fr .7fr; gap: 40px; }
.footer-brand p { max-width: 300px; margin: 20px 0 0; font-size: 14px; color: var(--text-muted); }
.footer-title { margin: 0 0 16px; font-size: 15px; font-weight: var(--weight-medium); }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 0 0 8px; }
.footer-links a { display: inline-block; padding-block: 3px; font-size: 14px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent-dark); text-decoration: underline; }
.footer-links a[aria-current="true"] { color: var(--accent-dark); }
.footer-bottom { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }
.reveal { opacity: 1; }
.reveal-ready .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--time-reveal) var(--ease), transform var(--time-reveal) var(--ease); }
.reveal-ready .reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .topbar-inner { gap: 24px; }
  .mainnav a { padding-inline: 12px; }
}
@media (max-width: 1000px) {
  .mainnav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-tools { margin-left: auto; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1001px) {
  .mobile-drawer, .nav-veil { display: none; }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px, 5vw, 30px); }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; --nav-h: 60px; --space-section: 48px; }
  .topbar-inner { gap: 12px; }
  .brand-name { font-size: 16px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .lang { padding-inline: 10px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .footer-grid, .card-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { gap: 28px; }
  .card, .panel { padding: 22px; }
  .tilt, [class*="tilt-"] { transform: none !important; rotate: none !important; }
  .prose h2 { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}