:root {
  --c-bg: #FFFFFF;
  --c-panel: #F5F7FA;
  --c-panel-2: #FDF7E4;
  --c-border: #E4E8EE;
  --c-accent: #1C6DF2;
  --c-accent-dark: #1452C4;
  --c-text: #0E1A2B;
  --c-muted: #5E6B7E;
  --c-success: #22A559;
  --c-warn: #E8A317;
  --c-error: #E5484D;
  --c-ink-soft: #22344C;
  --c-on-accent: #FFFFFF;
  --c-sky-top: #5AB2EC;
  --c-sky-bottom: #A9D8F6;
  --c-sun: rgba(255,247,226,.92);
  --c-sun-mid: rgba(255,247,226,.38);
  --c-sun-fade: rgba(255,247,226,0);
  --c-texture: rgba(255,255,255,.34);
  --c-grass: #4DB548;
  --c-grass-dark: #2E8B3A;
  --c-grass-far: #86CF72;
  --c-flower: #FFF8E7;
  --c-path: #FFFFFF;
  --c-path-shade: rgba(46,139,58,.38);
  --c-wood: #EBC48C;
  --c-wood-dark: #8E5F33;
  --c-glass: rgba(255,255,255,.72);
  --c-glass-line: rgba(255,255,255,.92);
  --c-glass-rule: rgba(255,255,255,.6);
  --c-tint-blue: #E4EEFE;
  --c-tint-green: #DFF3E6;
  --c-tint-amber: #FBEFD5;
  --c-dot: #D3D9E1;
  --c-toggle-off: #D5DBE3;
  --c-trace: rgba(142,95,51,.16);
  --c-on-accent-soft: rgba(255,255,255,.22);
  --c-veil: rgba(14,26,43,.28);
  --c-clear: transparent;
  --c-mask: #000000;

  --font-display: 'Inter','Noto Sans SC','PingFang SC','Hiragino Sans','Microsoft YaHei','Malgun Gothic',system-ui,sans-serif;
  --font-body: 'Inter','Noto Sans SC','PingFang SC','Hiragino Sans','Microsoft YaHei','Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;
  --font-mono: 'JetBrains Mono','SFMono-Regular','Cascadia Code',Menlo,Consolas,monospace;

  --r-canvas: 40px;
  --r-panel: 36px;
  --r-mobile: 28px;
  --r-tabs: 24px;
  --r-window: 16px;
  --r-card: 14px;
  --r-row: 12px;
  --r-segment: 11px;
  --r-md: 10px;
  --r-item: 9px;
  --r-sm: 8px;
  --r-port: 7px;
  --r-pill: 999px;
  --r-circle: 50%;

  --shadow-hair: 0 1px 2px rgba(14,26,43,.06);
  --shadow-window: 0 1px 2px rgba(14,26,43,.06),0 18px 40px -14px rgba(14,26,43,.22),0 52px 100px -28px rgba(14,26,43,.26);
  --shadow-card: 0 1px 2px rgba(14,26,43,.07),0 16px 34px -12px rgba(14,26,43,.26);
  --shadow-btn: 0 0 0 6px rgba(255,255,255,.66),0 14px 28px -10px rgba(20,82,196,.6);
  --shadow-active: 0 6px 14px -6px rgba(28,109,242,.65);
  --gutter: 24px;
  --reading-width: 1128px;
  --header-height: 72px;
  --ease: cubic-bezier(.2,.65,.3,1);
  --time-fast: 180ms;
  --time-reveal: 600ms;
  --tab-cycle: 8s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a, button, summary { -webkit-tap-highlight-color: var(--c-clear); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
[hidden] { display: none !important; }
:where(main, section, article, aside, nav, div, li) { min-width: 0; }
:where(h1,h2,h3) {
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(34px,3.2vw,48px); font-weight: 900; }
h2 { font-size: clamp(26px,2.5vw,32px); font-weight: 900; }
h3 { font-size: 21px; font-weight: 800; }
p { margin: 0 0 1.2em; }
.nowrap { white-space: nowrap; }
.muted { color: var(--c-muted); }
.accent { color: var(--c-accent); }
.mono { font-family: var(--font-mono); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.wrap {
  width: 100%;
  max-width: calc(var(--reading-width) + var(--gutter) * 2);
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.section { padding-top: 72px; padding-bottom: 72px; }
.section-title { margin: 0 0 20px; }
.section-lede { max-width: 660px; color: var(--c-muted); }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.grid > *, .row-flex > * { min-width: 0; }
.row-flex { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
code {
  font-family: var(--font-mono);
  font-size: .88em;
  overflow-wrap: anywhere;
  word-break: normal;
}
:not(pre) > code {
  padding: .12em .35em;
  border-radius: var(--r-sm);
  background: var(--c-panel);
  color: var(--c-ink-soft);
}
pre {
  max-width: 100%;
  margin: 20px 0;
  padding: 20px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-panel);
  color: var(--c-text);
  font-family: var(--font-mono);
  line-height: 1.8;
  tab-size: 2;
}
pre code { overflow-wrap: normal; white-space: pre; font-size: 13px; }
.prose { max-width: 800px; min-width: 0; }
.prose :where(h2,h3) { margin-top: 2em; margin-bottom: .75em; scroll-margin-top: 100px; }
.prose :where(p,li,dd) { overflow-wrap: break-word; }
.prose a:not(.button) { color: var(--c-accent-dark); text-decoration: underline; text-underline-offset: .2em; }
.prose li + li { margin-top: .5em; }
.prose :where(ul,ol) { padding-left: 1.5em; }
.prose blockquote { margin-inline: 0; }

.button, .btn-main, .btn-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  transition: background-color var(--time-fast), color var(--time-fast), box-shadow var(--time-fast);
}
.button:hover, .btn-sub:hover { color: var(--c-accent-dark); background: var(--c-panel); }
.button--primary, .btn-main {
  border-color: var(--c-accent);
  background: var(--c-accent);
  color: var(--c-on-accent);
}
.button--primary:hover, .btn-main:hover {
  border-color: var(--c-accent-dark);
  background: var(--c-accent-dark);
  color: var(--c-on-accent);
}
.button--quiet { border-color: var(--c-clear); background: var(--c-panel); color: var(--c-text); }
.button:active { box-shadow: var(--shadow-hair); }
.button:disabled, .button[aria-disabled="true"] {
  background: var(--c-panel);
  color: var(--c-muted);
  border-color: var(--c-border);
  box-shadow: none;
  cursor: not-allowed;
}
.card {
  padding: 28px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-window);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: var(--shadow-card);
}
.card h3 { margin-top: 0; }
.panel {
  position: relative;
  padding: 40px;
  border-radius: var(--r-panel);
  background: var(--c-panel);
  color: var(--c-text);
  overflow-x: clip;
}
.panel--cream { background: var(--c-panel-2); color: var(--c-text); }
.decorated { position: relative; overflow-x: clip; }

#site-header { position: relative; z-index: 50; background: var(--c-bg); color: var(--c-text); }
.topbar {
  position: relative;
  width: 100%;
  max-width: min(100%,calc(1280px + var(--gutter) * 2));
  height: var(--header-height);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 44px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.topnav { min-width: 0; margin-left: auto; }
.topnav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 36px;
}
.topnav a { display: block; padding-block: 12px; font-size: 15px; font-weight: 500; color: var(--c-ink-soft); white-space: nowrap; }
.topnav a:hover { color: var(--c-accent); }
.topnav a[aria-current="page"] { font-weight: 800; color: var(--c-text); }
.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: 6px;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-text);
  font: 600 14px/1.3 var(--font-body);
  white-space: nowrap;
}
.lang-caret { color: var(--c-muted); font-size: 12px; }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 190px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: var(--shadow-card);
  z-index: 5;
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: var(--r-sm); }
.language-menu a:hover, .language-menu [aria-current] { background: var(--c-panel); color: var(--c-accent-dark); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg);
  color: var(--c-text);
}
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.mobile-drawer { display: none; }
.nav-veil {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 40;
  border: 0;
  background: var(--c-veil);
  color: var(--c-text);
}

.site-footer { margin-top: 48px; padding-top: 56px; padding-bottom: 28px; background: var(--c-panel); color: var(--c-text); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 40px; }
.footer-brand p { max-width: 280px; margin-top: 18px; color: var(--c-muted); font-size: 14px; }
.footer-title { margin: 0 0 14px; font-size: 14px; font-weight: 800; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-list a { font-size: 14px; color: var(--c-muted); }
.footer-list a:hover { color: var(--c-accent-dark); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-border); font-size: 13px; color: var(--c-muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }

.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(16px); }
.reveal-ready .reveal { transition: opacity var(--time-reveal) var(--ease),transform var(--time-reveal) var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .topbar { gap: 24px; }
  .topnav ul { gap: 24px; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 960px) {
  .topnav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]) {
    display: block;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 4;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px var(--gutter) 24px;
    background: var(--c-bg);
    color: var(--c-text);
    border-top: 1px solid var(--c-border);
    box-shadow: var(--shadow-card);
  }
  .mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-sm); }
  .mobile-drawer a:hover, .mobile-drawer [aria-current] { background: var(--c-panel); color: var(--c-accent-dark); }
  .drawer-languages { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--c-border); }
  .drawer-label { margin: 0 16px 8px; color: var(--c-muted); font-size: 13px; }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px,6vw,30px); }
  .grid { grid-template-columns: 1fr; }
  .section { padding-top: 48px; padding-bottom: 48px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .topbar { gap: 10px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 15px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-tools { gap: 6px; margin-left: auto; }
  .lang { padding-inline: 11px; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .panel { padding: 28px 20px; border-radius: var(--r-mobile); }
  .card { padding: 22px; }
  .tilt, .tilt-left, .tilt-right, .chip-card { transform: none !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}