:root {
  --bg: #FFFFFF;
  --bg-panel: #F6F7F7;
  --bg-panel-2: #EEF1F0;
  --border: #E3E6E5;
  --border-strong: #D3D8D6;
  --accent: #0F8466;
  --accent-dark: #0A5E49;
  --text: #15201C;
  --text-muted: #5B6662;
  --text-faint: #8D9692;
  --success: #1F8A4C;
  --warn: #B7791F;
  --error: #C2413A;
  --cobalt: #4A68C4;
  --apricot: #E7B65A;
  --dot-slate: #666C9E;
  --accent-10: rgba(15,132,102,.10);
  --accent-16: rgba(15,132,102,.16);
  --cobalt-12: rgba(74,104,196,.12);
  --apricot-30: rgba(231,182,90,.32);
  --field-jade: #ECF5F3;
  --field-cobalt: #EDF0F9;
  --field-apricot: #FBF2E1;
  --field-neutral: var(--bg-panel-2);
  --tint-jade: rgba(15,132,102,.07);
  --tint-cobalt: rgba(74,104,196,.08);
  --tint-apricot: rgba(231,182,90,.20);
  --tint-neutral: rgba(21,32,28,.045);
  --grid-line: rgba(21,32,28,.045);
  --veil: rgba(255,255,255,.55);
  --halo-bg: rgba(255,255,255,.52);
  --halo-line: rgba(255,255,255,.95);
  --nav-veil: rgba(21,32,28,.28);
  --clear: transparent;

  --shadow-hair: 0 1px 2px rgba(21,32,28,.05);
  --shadow-card: 0 1px 2px rgba(21,32,28,.06), 0 12px 32px rgba(21,32,28,.05);
  --shadow-win: 0 1px 2px rgba(21,32,28,.07), 0 14px 30px rgba(21,32,28,.08);
  --shadow-pop: 0 2px 4px rgba(21,32,28,.08), 0 10px 24px rgba(21,32,28,.12);
  --shadow-btn: 0 1px 2px rgba(10,94,73,.28);
  --r-card: 10px;
  --r-btn: 8px;
  --r-win: 8px;
  --r-halo: 14px;
  --r-menu: 7px;
  --r-mini: 6px;
  --r-input: 5px;
  --r-chip: 4px;
  --r-pill: 999px;
  --r-circle: 50%;

  --font-display: "Inter","Noto Sans SC","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  --font-body: "Inter","Noto Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --font-mono: "JetBrains Mono",ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  --size-h1: clamp(34px, 3.4vw, 48px);
  --size-h2: clamp(26px, 3vw, 44px);
  --size-h3: clamp(19px, 2vw, 24px);
  --size-body: 16px;
  --size-lead: 18px;
  --gutter: 24px;
  --nav-gutter: max(var(--gutter), calc((100vw - 1280px) / 2));
  --page-width: 1128px;
  --read-width: 800px;
  --bar-height: 64px;
  --section-space: clamp(72px, 10vw, 150px);
  --reveal-time: 360ms;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--bar-height) + 82px);
}
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--size-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; vertical-align: middle; }
img { height: auto; }
svg, .dot, .icon { flex-shrink: 0; }
button, input, select { font: inherit; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 {
  margin: 0 0 .55em;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: var(--size-h1); line-height: 1.14; }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }
p { margin: 0 0 1em; }
.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-width: 0;
}
.wrap--reading { max-width: var(--read-width); }
.section { padding-block: var(--section-space); }
.band { background: var(--bg-panel); color: var(--text); }
.muted, .lead { color: var(--text-muted); }
.lead { font-size: var(--size-lead); }
.keep { white-space: nowrap; }
.prose { min-width: 0; line-height: 1.85; }
.prose > *, .layout-grid > *, .footer-grid > *, .group > * { min-width: 0; }
.prose :is(h2,h3):not(:first-child) { margin-block-start: 1.8em; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
:not(pre) > code {
  padding: .08em .25em;
  border-radius: var(--r-chip);
  background: var(--bg-panel-2);
  color: var(--text);
}
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  margin-block: 1em;
  padding: 1em;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg-panel);
  color: var(--text);
}
pre code { white-space: pre; overflow-wrap: anywhere; }
.decor-clip, [data-hero-visual]:not(.deck) { position: relative; overflow-x: clip; }
.decor-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 20px;
}
.panel {
  min-width: 0;
  padding: clamp(16px, 2.8vw, 28px);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  max-width: 100%;
  padding: 8px 22px;
  border: 1px solid var(--clear);
  border-radius: var(--r-btn);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover, .btn--primary:active { background: var(--accent-dark); color: var(--bg); }
.btn--ghost { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover, .btn--ghost:active { background: var(--bg-panel); color: var(--text); }
.btn:active { box-shadow: var(--shadow-hair); }
.btn:disabled {
  background: var(--bg-panel-2);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
}
.textlink { color: var(--accent-dark); font-weight: 700; text-decoration: none; }
.textlink:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.topbar__inner {
  height: var(--bar-height);
  max-width: min(100%, calc(1280px + var(--nav-gutter) * 2));
  padding-inline: var(--nav-gutter);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font: 800 18px/1.3 var(--font-display);
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand__mark { width: 30px; height: 30px; flex-shrink: 0; }
.mainnav { min-width: 0; margin-inline-start: auto; }
.mainnav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.mainnav__more, .lang-control { position: relative; }
.mainnav__link, .mainnav__trigger, .langswitch, .nav-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding-inline: 14px;
  border: 0;
  border-radius: var(--r-btn);
  background: var(--clear);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.mainnav__link:hover, .mainnav__trigger:hover, .nav-toggle:hover {
  background: var(--bg-panel);
  color: var(--text);
}
.mainnav__link[aria-current="page"], .mainnav__trigger.is-current { font-weight: 700; }
.mainnav__link[aria-current="page"]::after, .mainnav__trigger.is-current::after {
  content: "";
  position: absolute;
  inset: auto 14px -12px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--accent);
}
.mainnav__chev { width: 12px; height: 12px; color: var(--text-muted); }
.mainnav__panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: min(252px, calc(100vw - 2 * var(--gutter)));
  padding: 6px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.mainnav__sublink, .drawer a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: var(--r-btn);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.mainnav__sublink small { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.mainnav__sublink:hover, .drawer a:hover {
  background: var(--bg-panel);
  color: var(--text);
}
.mainnav__sublink[aria-current], .drawer a[aria-current] {
  background: var(--accent-10);
  color: var(--accent-dark);
}
.topbar__tools { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }
.topbar__sep { width: 1px; height: 20px; background: var(--border); margin-inline-end: 10px; }
.langswitch {
  min-height: 36px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}
.langswitch:hover { color: var(--text); border-color: var(--border-strong); }
.langswitch svg { width: 14px; height: 14px; }
.langswitch__short, .nav-toggle, .drawer, .nav-veil, .preview-mobile { display: none; }
.nav-toggle { min-width: 44px; min-height: 44px; padding-inline: 8px; }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-veil {
  position: fixed;
  inset: calc(var(--bar-height) + 1px) 0 0;
  z-index: 0;
  background: var(--nav-veil);
}
.drawer {
  position: absolute;
  z-index: 1;
  inset: 100% 0 auto;
  max-height: calc(100dvh - var(--bar-height) - 1px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px var(--gutter) 20px;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.drawer__label {
  margin: 12px 12px 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.topbar summary { list-style: none; }
.topbar summary::-webkit-details-marker { display: none; }

.site-footer {
  padding-block: 60px 92px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr 1.1fr .7fr;
  gap: 28px;
}
.footer-grid p { margin-top: 14px; color: var(--text-muted); }
.footer-label { margin: 0 0 12px; font: 800 15px/1.4 var(--font-display); }
.footer-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer a:not(.brand) { color: var(--text-muted); text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:not(.brand):hover { color: var(--accent-dark); text-decoration: underline; }
.footer-end {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-tracking .reveal { transition: opacity var(--reveal-time) ease; }
  .reveal-tracking .reveal:not(.shown):not(:focus-within) { opacity: 0; }
  .reveal-tracking .hero .reveal, .reveal-tracking .hero.reveal { opacity: 1; transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (max-width: 1024px) {
  .mainnav, .topbar__sep { display: none; }
  .topbar__tools { margin-inline-start: auto; }
  .nav-toggle, .preview-mobile { display: inline-flex; }
  .drawer:not([hidden]), .nav-veil:not([hidden]) { display: block; }
}
@media (max-width: 768px) {
  :root { --size-h1: 28px; --gutter: 20px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --size-lead: 16px; }
  .topbar__inner { gap: 8px; }
  .topbar__tools { gap: 4px; }
  .brand { font-size: 16px; gap: 7px; }
  .langswitch { padding-inline: 8px; }
  .langswitch__full { display: none; }
  .langswitch__short { display: inline; }
  .lang-control .mainnav__panel { right: -44px; }
  .tilt, [data-tilt] { transform: none; rotate: none; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}