:root {
  --bg: #FFFFFF;
  --bg-panel: #E8F7FC;
  --bg-panel2: #F3F6FA;
  --border: #D3E2EE;
  --accent: #0A93CC;
  --accent-hover: #0784B8;
  --accent-dark: #1E4B87;
  --text: #1A2333;
  --text-muted: #5A6678;
  --success: #17A673;
  --warn: #C98700;
  --error: #E2513F;
  --sun: #FBE08A;
  --coral: #F26B5B;
  --lid: #13325C;
  --lid-deep: #0B2343;
  --alu-edge: #DCE6F0;
  --alu-line: #B7C9DB;
  --switch-off: #C4D3E2;
  --on-dark: #FFFFFF;
  --on-dark-muted: #CBDAEE;
  --on-dark-line: rgba(255, 255, 255, .26);
  --on-dark-line-strong: rgba(255, 255, 255, .55);
  --on-dark-fill: rgba(255, 255, 255, .10);
  --on-dark-fill-hover: rgba(255, 255, 255, .18);
  --clear: transparent;
  --veil: rgba(11, 35, 67, .48);
  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Noto Sans SC', 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;
  --weight-display: 900;
  --fs-tiny: 10px;
  --fs-micro: 11px;
  --fs-caption: 12px;
  --fs-small: 13px;
  --fs-ui: 14px;
  --fs-lede: 15px;
  --fs-body: 16px;
  --fs-intro: 18px;
  --fs-brand: 20px;
  --fs-h3: 22px;
  --fs-h2: clamp(26px, 2.5vw, 36px);
  --fs-h1: clamp(34px, 3.2vw, 48px);
  --fs-hero: clamp(30px, 2.8vw, 40px);
  --fs-h1-mobile: 26px;
  --r-pill: 999px;
  --r-circle: 50%;
  --r-lg: 16px;
  --r-md: 10px;
  --r-sm: 6px;
  --r-notice-mobile: 24px;
  --r-lid: 18px 18px 6px 6px;
  --r-file: 14px;
  --gutter: 24px;
  --content-width: 1180px;
  --wide-width: 1320px;
  --header-width: 1280px;
  --reading-width: 780px;
  --header-height: 72px;
  --section-space: 80px;
  --motion-time: 420ms;
  --motion-ease: cubic-bezier(.2, .7, .3, 1);
  --shadow-flat: 0 3px 0 var(--lid-deep);
}
*, *::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-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img, svg, video { max-width: 100%; }
img { display: block; height: auto; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
a { color: var(--accent-dark); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a, button, summary { -webkit-tap-highlight-color: var(--clear); }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 4px;
}
button:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; }
h1, h2, h3, h4 {
  margin: 0 0 .65em;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: 1.25;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.2; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1.1em; }
ul, ol { padding-inline-start: 1.4em; }
li + li { margin-top: .35em; }
strong { font-weight: var(--weight-bold); }
code, kbd, samp, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-panel2);
  color: var(--text);
  font-size: var(--fs-ui);
  line-height: 1.8;
  tab-size: 2;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 32px; }
:where(section, article, main, aside, nav, div) { min-width: 0; }
:where(h2, h3, [id]) { scroll-margin-top: 24px; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-wide {
  width: 100%;
  max-width: calc(var(--wide-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-width) + var(--gutter) * 2); }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.section-panel { background: var(--bg-panel); color: var(--text); }
.section-white { background: var(--bg); color: var(--text); }
.decorated, .hero { overflow-x: clip; }
.keep { white-space: nowrap; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.intro { font-size: var(--fs-intro); color: var(--text-muted); }
.eyebrow, .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--accent-dark);
  font-size: var(--fs-caption);
  font-weight: var(--weight-bold);
  overflow-wrap: anywhere;
}
.stack > * + * { margin-top: 20px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid > *, .split > * { min-width: 0; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.card, .panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--text);
}
.panel { background: var(--bg-panel); color: var(--text); }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card-link { display: block; text-decoration: none; }
.card-link:hover { background: var(--bg-panel2); color: var(--text); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  max-width: 100%;
  padding: 10px 26px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: var(--weight-heavy);
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.btn svg, .icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover, .btn.is-hover { background: var(--bg-panel2); color: var(--accent-dark); }
.btn:active, .btn.is-active { background: var(--bg-panel); color: var(--accent-dark); }
.btn-main { background: var(--accent); color: var(--lid-deep); border-color: var(--accent); }
.btn-main:hover, .btn-main.is-hover { background: var(--accent-hover); color: var(--lid-deep); border-color: var(--accent-hover); }
.btn-main:active, .btn-main.is-active { background: var(--accent-dark); color: var(--on-dark); border-color: var(--accent-dark); }
.btn-ghost { background: var(--clear); color: var(--on-dark); border: 1.5px solid var(--on-dark); }
.btn-ghost:hover { background: var(--on-dark-fill-hover); color: var(--on-dark); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel2);
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-small { min-height: 40px; padding: 8px 18px; font-size: var(--fs-ui); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.prose { min-width: 0; line-height: 1.9; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose :where(p, li) { overflow-wrap: break-word; }
.prose img { border-radius: var(--r-md); }
.prose blockquote { margin-inline: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(14px); }
html.reveal-ready .reveal {
  transition: opacity var(--motion-time) var(--motion-ease), transform var(--motion-time) var(--motion-ease);
}
html.reveal-ready .reveal.shown { opacity: 1; transform: none; }

/* Header: independent wide container, not the reading column. */
#site-header, .topbar { position: relative; z-index: 50; }
.topbar { background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border); }
.header-inner {
  width: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  min-height: var(--header-height);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: var(--fs-brand); font-weight: var(--weight-display); letter-spacing: -.01em; }
.desktop-nav { margin-left: auto; min-width: 0; }
.menu ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}
.menu li { display: flex; align-items: center; margin: 0; }
.menu li + li::before { content: "·"; color: var(--text-muted); margin-inline: 14px; font-weight: var(--weight-bold); }
.menu a { padding-block: 6px; color: var(--text); font-size: var(--fs-lede); font-weight: var(--weight-medium); white-space: nowrap; text-decoration: none; }
.menu a:hover { color: var(--accent-dark); }
.menu a[aria-current="page"] {
  color: var(--accent-dark);
  font-weight: var(--weight-heavy);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 9px;
}
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.language-picker { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-ui);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  list-style: none;
  text-decoration: none;
}
.lang::-webkit-details-marker { display: none; }
.lang:hover { background: var(--bg-panel2); color: var(--text); }
.lang svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; flex-shrink: 0; }
.caret-down { font-size: var(--fs-micro); color: var(--text-muted); }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--text);
  z-index: 5;
}
.language-menu a, .mobile-drawer a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.language-menu a:hover, .mobile-drawer a:hover { background: var(--bg-panel); color: var(--accent-dark); }
.language-menu a[aria-current="true"], .mobile-drawer a[aria-current] { font-weight: var(--weight-heavy); color: var(--accent-dark); }
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
}
.hamburger svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-veil { position: fixed; inset: var(--header-height) 0 0; background: var(--veil); color: var(--on-dark); border: 0; z-index: 1; }
.mobile-drawer {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  z-index: 2;
  padding: 16px var(--gutter) 24px;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
.mobile-drawer li { margin: 0; }
.drawer-languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.drawer-title { display: block; padding: 8px 14px; color: var(--text-muted); font-size: var(--fs-small); }
.preview-mobile { display: none; }

/* Footer */
.site-footer { background: var(--bg-panel); color: var(--text); border-top: 1px solid var(--border); padding-top: 56px; padding-bottom: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 18px; max-width: 290px; color: var(--text-muted); font-size: var(--fs-ui); }
.footer-heading { margin: 0 0 16px; font-size: var(--fs-body); }
.footer-list { padding: 0; margin: 0; list-style: none; }
.footer-list li { margin-top: 7px; }
.footer-list a { display: inline-block; padding-block: 4px; color: var(--text-muted); font-size: var(--fs-ui); text-decoration: none; }
.footer-list a:hover { color: var(--accent-dark); text-decoration: underline; }
.copyright { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--fs-small); }
.copyright p { margin: 0; }
.copyright a { color: var(--text-muted); }

@media (max-width: 1279px) {
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .hamburger { display: inline-flex; }
  .preview-mobile { display: block; position: relative; margin-left: auto; }
  .preview-mobile .mobile-drawer { position: fixed; top: var(--header-height); }
}
@media (min-width: 1280px) {
  .mobile-drawer, .nav-veil { display: none; }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: var(--fs-h1-mobile); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --section-space: 52px; }
  .header-inner { gap: 10px; }
  .brand-name { font-size: var(--fs-body); }
  .brand-mark { width: 32px; height: 32px; }
  .brand { flex-shrink: 1; min-width: 0; }
  .brand-name { min-width: 0; overflow-wrap: anywhere; }
  .header-tools { gap: 6px; margin-left: auto; }
  .lang { padding-inline: 10px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 20px; }
  .tilt, [data-tilt] { transform: none !important; }
  .footer-grid { gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .cta { gap: 10px; }
  .btn { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}