:root {
  color-scheme: light;
  --bg: #EAEBF8;
  --bg-panel: #F8F8FE;
  --bg-panel-2: #DCDFF2;
  --border: #CDD1EA;
  --accent: #C24D2C;
  --accent-2: #CE6C35;
  --accent-dark: #8E3519;
  --text: #151A2D;
  --ink-2: #2A3050;
  --text-muted: #5A6082;
  --success: #1E9E6A;
  --warn: #D99413;
  --error: #B4233F;
  --dot-gray: #9CA1BF;
  --white: #FFFFFF;
  --clear: transparent;
  --hero-top: #F3F4FC;
  --hero-bot: #E4E6F5;
  --tint-rgb: 194 77 44;
  --ink-rgb: 21 26 45;
  --hl-rgb: 255 255 255;
  --peri-rgb: 118 130 202;
  --peri-200: #C9CCEE;
  --peri-300: #A9B1E4;
  --peri-400: #8E98D8;
  --peri-500: #7682CA;
  --peri-600: #5D68AC;
  --peri-700: #4B5594;
  --sky-top: #8C96D6;
  --sky-mid: #B6B8E7;
  --sky-bot: #DED8F2;
  --wall-top: #EEEFFA;
  --wall-bot: #DFE2F3;
  --floor-top: #D4D8EE;
  --floor-bot: #C7CCE7;
  --cream: #F5E9CC;
  --cream-2: #E8D6AF;
  --skin: #E8D0B4;
  --skin-2: #D9BB9B;
  --hair: var(--ink-2);
  --shirt-a: #3D4574;
  --shirt-b: #262C4D;
  --shirt-c: #48508A;
  --pants: var(--text-muted);
  --pants-dark: #4A506F;
  --screen-a: #272E4E;
  --screen-b: #1A2037;
  --tv-label: var(--bg-panel-2);
  --flag-red: #D22F3A;
  --flag-blue: #2B3577;
  --flag-navy: #1F2A6C;
  --flag-white: var(--white);
  --r-card: 10px;
  --r-btn: 3px;
  --r-chip: 6px;
  --r-pill: 999px;
  --r-round: 50%;
  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Apple SD Gothic Neo", "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", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --shadow-panel: inset 0 1px 0 rgb(var(--hl-rgb) / .9), 0 1px 2px rgb(var(--ink-rgb) / .05), 0 18px 48px -18px rgb(var(--tint-rgb) / .10);
  --shadow-float: inset 0 1px 0 rgb(var(--hl-rgb) / .95), inset 0 0 0 1px rgb(var(--hl-rgb) / .5), 0 2px 6px rgb(var(--ink-rgb) / .05), 0 28px 64px -18px rgb(var(--tint-rgb) / .10);
  --shadow-btn: inset 0 1px 0 rgb(var(--hl-rgb) / .14), 0 1px 2px rgb(var(--ink-rgb) / .2), 0 10px 24px -12px rgb(var(--ink-rgb) / .45);
  --gutter: 40px;
  --measure: 42em;
  --head-height: 68px;
  --toc-offset: 64px;
  --section-space: clamp(48px, 7vw, 96px);
  --u: 1px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-body); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 800; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(52px, 4.6vw, 64px); line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 20px; line-height: 1.35; text-wrap: pretty; }
small, .muted { color: var(--text-muted); }
img, svg { max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
button, input, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
code, pre { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre { max-width: 100%; min-width: 0; overflow-x: auto; padding: 16px; background: var(--bg-panel-2); border-radius: var(--r-card); }
pre code { white-space: pre; }
.no-break, .nowrap { white-space: nowrap; }
.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: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap > *, .grid-safe > * { min-width: 0; }
.sec { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.reading-wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.prose > * + * { margin-top: 1em; }
.prose :is(h2,h3) { margin-top: 1.6em; }
.prose a, .text-link { text-decoration: underline; text-underline-offset: .2em; }
.prose ul { list-style: disc; padding-inline-start: 1.4em; }
.prose ol { counter-reset: step; }
.prose ol > li { counter-increment: step; position: relative; padding-inline-start: 2.5em; margin-block: .65em; }
.prose ol > li::before { content: counter(step); position: absolute; inset-inline-start: 0; display: grid; place-items: center; width: 1.75em; height: 1.75em; border-radius: var(--r-round); background: var(--bg-panel-2); font: 600 .85em var(--font-mono); }
.panel, .card { min-width: 0; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-panel); padding: clamp(16px, 2.5vw, 32px); }
.inset-panel { background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: var(--r-card); }
.decor-zone { position: relative; overflow-x: clip; }
.stripe-halo { position: absolute; inset-inline: 0; max-width: 100%; pointer-events: none; }
.tw-accent { color: var(--accent-dark); }
@supports (background-clip: text) {
  .tw-accent { background-image: linear-gradient(105deg,var(--accent) 12%,var(--accent-2) 88%); background-clip: text; color: var(--clear); }
}
:root .motion-line { display: block; overflow: clip; }
@media (forced-colors: active) { .tw-accent { background: none; color: inherit; } }

.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pf { width: 16px; height: 16px; fill: currentColor; }
.chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 8px; min-height: 48px; max-width: 100%; padding: 0 22px; border: 1px solid var(--clear); border-radius: var(--r-btn); font: 600 15px/1 var(--font-body); letter-spacing: -.005em; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
.btn--solid, .btn-primary { background: var(--text); border-color: var(--text); color: var(--white); box-shadow: var(--shadow-btn); }
.btn--solid:hover, .btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn--line, .btn-secondary { background: var(--white); border-color: var(--text); color: var(--text); }
.btn--line:hover, .btn-secondary:hover { background: var(--bg-panel-2); }
.btn--sm { min-height: 36px; padding-inline: 14px; font-size: 14px; gap: 6px; }
.btn:active:not(:disabled) { box-shadow: inset 0 2px 4px rgb(var(--ink-rgb) / .24); }
.btn:disabled { background: var(--bg-panel-2); border-color: var(--border); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }

.site-head { position: relative; z-index: 30; background: var(--hero-top); }
.site-head__bar { position: relative; z-index: 4; background: var(--hero-top); }
.site-head__inner { display: flex; flex-wrap: nowrap; align-items: center; height: var(--head-height); gap: 12px; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; flex: none; align-items: center; gap: 10px; min-height: 32px; white-space: nowrap; }
.brand__mark { width: 26px; height: 26px; }
.brand__word { font: 800 19px/1.2 var(--font-display); letter-spacing: -.02em; }
.main-nav { flex: 1; min-width: 0; margin-left: 28px; }
.main-nav__list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav-link, .lang-switch { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 8px 11px; border: 0; border-radius: var(--r-chip); background: var(--clear); color: var(--text-muted); font: 500 14.5px/1.2 var(--font-body); white-space: nowrap; }
.nav-link:hover, .lang-switch:hover { background: var(--bg-panel-2); color: var(--text); }
.nav-link[aria-current], .nav-link.is-current { color: var(--text); font-weight: 600; background: var(--bg-panel); box-shadow: inset 0 0 0 1px var(--border), var(--shadow-panel); }
.drop { position: relative; }
.drop > summary { list-style: none; }
.drop > summary::-webkit-details-marker { display: none; }
.drop[open] > summary .chev, .lang-switch[aria-expanded="true"] .chev { transform: rotate(180deg); }
.drop__panel { position: absolute; top: calc(100% + 8px); left: 0; min-width: 188px; padding: 6px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-float); z-index: 40; }
.drop__panel--end { left: auto; right: 0; min-width: 160px; }
.drop__item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 8px 10px; border-radius: var(--r-chip); font-size: 14px; font-weight: 500; white-space: nowrap; }
.drop__item:hover, .drop__item[aria-current] { background: var(--bg); }
.drop__item .ico { color: var(--text-muted); }
.head-tools { margin-left: auto; display: flex; flex-shrink: 0; align-items: center; gap: 10px; }
.lang-switch { gap: 6px; padding-inline: 10px; font-size: 14px; }
.lang-switch__name { white-space: nowrap; }
.m-menu__btn { display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--bg-panel); }
.m-menu__btn .ico { width: 20px; height: 20px; }
.m-menu__btn[aria-expanded="true"] { background: var(--bg-panel-2); }
.m-menu__veil { position: fixed; inset: var(--head-height) 0 0; z-index: 1; background: rgb(var(--ink-rgb) / .26); }
.m-menu__panel { position: fixed; top: var(--head-height); right: 0; z-index: 2; width: min(380px,100%); height: calc(100vh - var(--head-height)); height: calc(100dvh - var(--head-height)); max-height: calc(100dvh - var(--head-height)); padding: 8px var(--gutter) 24px; overflow-y: auto; overscroll-behavior: contain; background: var(--bg-panel); border-left: 1px solid var(--border); box-shadow: var(--shadow-float); }
.m-menu__panel a { display: flex; width: 100%; min-height: 44px; padding-block: 10px; }
.m-menu__languages { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
html.nav-open { overflow: hidden; }
html.nav-open .site-head__bar { position: fixed; inset: 0 0 auto; }
html.nav-open .site-head { min-height: var(--head-height); }

.site-foot { border-top: 1px solid var(--border); background: var(--bg-panel); }
.foot-search { background: var(--bg-panel-2); border-bottom: 1px solid var(--border); }
.foot-search__inner { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 28px; padding-block: 16px; }
.foot-search__inner strong { flex: none; font-size: 14px; }
.foot-search__links, .foot-legal, .foot-langs { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-foot nav a { display: inline-flex; align-items: center; min-width: 24px; min-height: 28px; font-size: 14px; }
.site-foot nav a:hover { text-decoration: underline; text-underline-offset: .2em; }
.foot-grid { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,4fr) minmax(0,3fr); gap: 32px; padding-block: 40px; }
.foot-grid > * { min-width: 0; }
.foot-grid p { max-width: 23em; margin-top: 10px; color: var(--text-muted); }
.foot-grid strong { display: block; margin-bottom: 6px; }
.foot-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 12px; }
.foot-end { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-block: 16px; border-top: 1px solid var(--border); }

#server-status { margin: 24px 0; padding: 16px; overflow: hidden; background: var(--bg-panel); border-radius: var(--r-card); border: 1px solid var(--border); }
.reveal { transition: opacity .36s ease, transform .36s ease; }
.reveal.pending { opacity: 0; transform: translateY(16px); }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  :root { --gutter: 24px; }
  .main-nav { display: none; }
  .m-menu__btn { display: inline-flex; }
  .head-tools { margin-left: auto; }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(28px,6vw,40px); }
  .foot-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --head-height: 60px; }
  .no-break { white-space: normal; }
  .tilt { transform: none; }
  .site-head__inner { gap: 6px; }
  .head-tools { gap: 4px; }
  .brand { gap: 5px; }
  .brand__mark { width: 21px; height: 21px; }
  .brand__word { font-size: 16px; }
  .lang-switch { min-height: 44px; gap: 4px; padding-inline: 4px; font-size: 12px; }
  .lang-switch .chev { display: none; }
  .site-head .btn--sm { padding-inline: 8px; font-size: 13px; }
  .foot-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
}
@media (max-width: 480px) {
  .m-menu__panel { width: 100%; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.pending { opacity: 1; transform: none; transition: none; }
  .btn, .chev { transition: none; }
}