:root {
  --color-bg: #E9ECF8;
  --color-panel: #F6F7FD;
  --color-panel-recessed: #DEE3F3;
  --color-border: #CDD4EA;
  --color-accent: #0E8F82;
  --color-accent-bright: #12A896;
  --color-accent-dark: #0A6E64;
  --color-text: #14192C;
  --color-text-muted: #58627E;
  --color-success: #1F9D5A;
  --color-warning: #D9930A;
  --color-error: #D9433C;
  --color-white: #FFFFFF;
  --color-transparent: transparent;
  --color-accent-02: rgba(14, 143, 130, .02);
  --color-accent-06: rgba(14, 143, 130, .06);
  --color-accent-10: rgba(14, 143, 130, .10);
  --color-accent-12: rgba(14, 143, 130, .12);
  --color-accent-14: rgba(14, 143, 130, .14);
  --color-accent-22: rgba(14, 143, 130, .22);
  --color-accent-30: rgba(14, 143, 130, .30);
  --color-accent-45: rgba(14, 143, 130, .45);
  --color-accent-55: rgba(14, 143, 130, .55);
  --color-accent-70: rgba(14, 143, 130, .70);
  --color-accent-dark-35: rgba(10, 110, 100, .35);
  --color-text-18: rgba(20, 25, 44, .18);
  --color-white-35: rgba(255, 255, 255, .35);
  --color-white-70: rgba(255, 255, 255, .70);
  --color-cylinder-top-a: #DDF2EE;
  --color-cylinder-top-b: #B7E4DB;
  --color-cylinder-side-b: #E1F0EC;
  --color-flag-red: #D9433C;
  --color-flag-blue: #263F82;
  --color-flag-green: #178B57;
  --color-flag-gold: #F4C24D;
  --font-display: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --radius-panel: 10px;
  --radius-button: 8px;
  --radius-small: 6px;
  --radius-round: 50%;
  --radius-pill: 999px;
  --shadow-panel: 0 20px 40px var(--color-accent-12);
  --shadow-soft: 0 10px 24px var(--color-accent-10);
  --shadow-button: 0 10px 22px var(--color-accent-22);
  --shadow-dark: 0 4px 12px var(--color-text-18);
  --highlight-inner: inset 0 0 0 1px var(--color-white);
  --content-width: 1200px;
  --reading-width: 780px;
  --gutter: clamp(16px, 3vw, 28px);
  --header-offset: 96px;
  --section-space: clamp(72px, 9vw, 128px);
  --transition-fast: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
  -webkit-text-size-adjust: 100%;
}

html.nav-open {
  overflow: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  color: inherit;
}

button,
summary,
select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4,
ul,
ol,
figure,
blockquote,
pre {
  margin-top: 0;
}

p,
ul,
ol,
blockquote,
pre {
  margin-bottom: 1.25em;
}

ul,
ol {
  padding-left: 1.35em;
}

h1,
h2,
h3,
h4 {
  color: var(--color-text);
  font-family: var(--font-display);
  text-wrap: balance;
}

h1,
.hero-title,
.h1 {
  margin-bottom: 20px;
  font-size: clamp(52px, 5.4vw, 68px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.14;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 800;
  line-height: 1.25;
}

h4 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 800;
}

strong {
  font-weight: 750;
}

small {
  color: var(--color-text-muted);
}

code,
kbd,
samp {
  font-family: var(--font-mono);
}

:not(pre) > code {
  padding: .14em .38em;
  overflow-wrap: anywhere;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-panel-recessed);
  color: var(--color-accent-dark);
  font-size: .9em;
}

pre {
  max-width: 100%;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-text);
  color: var(--color-panel);
  box-shadow: var(--shadow-soft);
  -webkit-overflow-scrolling: touch;
}

pre code {
  white-space: pre;
  overflow-wrap: normal;
}

hr {
  height: 1px;
  margin: 48px 0;
  border: 0;
  background: var(--color-border);
}

::selection {
  background: var(--color-accent-22);
  color: var(--color-text);
}

:where(a, button, summary, input, select, textarea, [role="tab"]):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + (var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.reading-wrap {
  width: 100%;
  max-width: calc(var(--reading-width) + (var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.section--compact {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 46px;
  text-align: center;
}

.section-heading p {
  color: var(--color-text-muted);
  font-size: clamp(17px, 2vw, 20px);
}

.muted {
  color: var(--color-text-muted);
}

.mono {
  font-family: var(--font-mono);
}

.no-break {
  white-space: nowrap;
}

.text-accent {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-bright));
  background-clip: text;
  color: var(--color-transparent);
  -webkit-background-clip: text;
}

.panel {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-panel);
  box-shadow: var(--highlight-inner), var(--shadow-panel);
}

.panel--recessed {
  background: var(--color-panel-recessed);
}

.badge,
.eyebrow,
.chip {
  display: inline-flex;
  min-height: 28px;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  box-shadow: var(--highlight-inner);
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.badge-dot,
.eyebrow-dot,
.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: var(--radius-round);
  background: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-14);
}

.badge--success {
  color: var(--color-success);
}

.badge--warning {
  color: var(--color-warning);
}

.btn {
  display: inline-flex;
  min-width: 24px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 20px;
  border: 1px solid var(--color-transparent);
  border-radius: var(--radius-button);
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(180deg, var(--color-accent-bright), var(--color-accent));
  box-shadow: inset 0 1px 0 var(--color-white-35), var(--shadow-button);
  color: var(--color-white);
}

.btn--primary:hover {
  box-shadow: inset 0 1px 0 var(--color-white-35), 0 14px 28px var(--color-accent-30);
}

.btn--secondary,
.btn--ghost {
  border-color: var(--color-border);
  background: var(--color-panel);
  box-shadow: var(--highlight-inner), var(--shadow-soft);
  color: var(--color-text);
}

.btn--secondary:hover,
.btn--ghost:hover {
  border-color: var(--color-accent-45);
  color: var(--color-accent-dark);
}

.btn--dark {
  background: var(--color-text);
  box-shadow: var(--shadow-dark);
  color: var(--color-white);
}

.btn--small {
  min-height: 36px;
  padding: 7px 15px;
  font-size: 14px;
}

.statusbar {
  min-height: 44px;
  padding: 7px var(--gutter);
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-white);
}

.statusbar__inner {
  display: flex;
  max-width: var(--content-width);
  min-width: 0;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.statusbar__text {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: .01em;
}

.statusbar__sep {
  opacity: .55;
}

.statusbar__pill {
  display: inline-flex;
  min-height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  box-shadow: 0 2px 8px var(--color-accent-dark-35);
  color: var(--color-accent-dark);
  font-size: 13px;
  font-weight: 750;
}

.statusbar__pill svg {
  width: 12px;
  height: 12px;
}

.navwrap {
  position: relative;
  z-index: 40;
  max-width: calc(var(--content-width) + 40px);
  margin: 16px auto 0;
  padding-inline: 20px;
}

.site-nav {
  position: relative;
  display: flex;
  min-height: 64px;
  align-items: center;
  padding: 9px 18px 9px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-panel);
  box-shadow: var(--highlight-inner), var(--shadow-soft);
}

.site-brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 10px;
}

.site-brand img {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.site-brand__local {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.desktop-nav {
  display: flex;
  min-width: 0;
  margin-left: auto;
  align-items: center;
  font-size: 14px;
  font-weight: 550;
}

.desktop-nav a {
  min-height: 32px;
  padding: 5px 4px;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--color-accent);
}

.desktop-nav a[aria-current="page"] {
  font-weight: 750;
}

.nav-separator {
  margin-inline: 7px;
  color: var(--color-border);
  user-select: none;
}

.nav-tools {
  display: flex;
  margin-left: 16px;
  align-items: center;
  gap: 10px;
}

.language-picker {
  position: relative;
}

.language-trigger {
  display: inline-flex;
  min-width: 24px;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 0;
  background: var(--color-transparent);
  color: var(--color-text-muted);
}

.language-trigger svg {
  width: 11px;
  height: 11px;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: 160px;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
}

.language-picker.is-open .language-menu {
  display: grid;
}

.language-menu a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-small);
  font-size: 14px;
}

.language-menu a:hover,
.language-menu a[aria-current="true"] {
  background: var(--color-panel-recessed);
  color: var(--color-accent-dark);
}

.login-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: var(--radius-button);
  background: var(--color-text);
  box-shadow: var(--shadow-dark);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 750;
}

.menu-toggle {
  display: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--color-panel-recessed);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

.mobile-drawer {
  position: absolute;
  top: calc(100% + 8px);
  right: 20px;
  left: 20px;
  z-index: 42;
  display: none;
  max-height: calc(100dvh - 132px);
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer a {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-small);
}

.mobile-drawer a:hover,
.mobile-drawer a[aria-current="page"],
.mobile-drawer a[aria-current="true"] {
  background: var(--color-panel-recessed);
  color: var(--color-accent-dark);
}

.mobile-drawer__languages {
  display: grid;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.nav-veil {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: none;
  border: 0;
  background: var(--color-text-18);
}

.nav-veil.is-open {
  display: block;
}

.site-footer {
  margin-top: var(--section-space);
  padding-top: 64px;
  overflow-x: clip;
  border-top: 1px solid var(--color-border);
  background: var(--color-panel);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.15fr;
  gap: 44px;
}

.footer-brand {
  max-width: 390px;
}

.footer-brand .site-brand {
  margin-bottom: 18px;
}

.footer-brand p {
  color: var(--color-text-muted);
}

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  color: var(--color-accent-dark);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.footer-links a,
.footer-language-links a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--color-text-muted);
}

.footer-links a:hover,
.footer-language-links a:hover,
.hot-links a:hover {
  color: var(--color-accent-dark);
}

.hot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-links a {
  display: inline-flex;
  min-height: 32px;
  max-width: 100%;
  align-items: center;
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-text-muted);
  font-size: 13px;
}

.footer-language-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
}

.footer-bottom {
  display: flex;
  margin-top: 48px;
  padding: 22px 0;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 13px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.reveal {
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.pending {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.shown {
  opacity: 1;
  transform: translateY(0);
}

[data-count] {
  display: inline-block;
  min-width: 3.5ch;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.draw-path {
  fill: none;
}

#server-status {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 32px;
  overflow: hidden;
}

#server-status > * {
  min-width: 0;
}

.prose {
  min-width: 0;
}

.prose h2,
.prose h3 {
  scroll-margin-top: var(--header-offset);
}

.prose a:not(.btn) {
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-45);
  text-underline-offset: .18em;
}

.prose img,
.prose iframe {
  max-width: 100%;
}

.prose table {
  border-collapse: collapse;
}

@media (max-width: 1100px) {
  .desktop-nav {
    display: none;
  }

  .nav-tools {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  :root {
    --header-offset: 82px;
  }

  h1,
  .hero-title,
  .h1 {
    font-size: clamp(30px, 9.6vw, 40px);
    line-height: 1.12;
  }

  h2 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .statusbar__wide {
    display: none;
  }

  .statusbar__inner {
    gap: 10px;
  }

  .statusbar__text {
    gap: 7px;
    font-size: 12px;
  }

  .navwrap {
    margin-top: 10px;
    padding-inline: var(--gutter);
  }

  .site-nav {
    min-height: 58px;
    padding: 6px 8px 6px 10px;
  }

  .site-brand__name {
    font-size: 16px;
  }

  .site-brand__local,
  .language-trigger__label {
    display: none;
  }

  .nav-tools {
    margin-left: auto;
    gap: 5px;
  }

  .login-link {
    min-height: 36px;
    padding-inline: 12px;
  }

  .mobile-drawer {
    right: var(--gutter);
    left: var(--gutter);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .no-break {
    white-space: normal;
  }

  .wrap,
  .reading-wrap {
    padding-inline: max(16px, var(--gutter));
  }

  .section {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .tilt,
  [class*="tilt"] {
    transform: none;
    rotate: 0deg;
  }

  .decor,
  .halo,
  .stripe-halo,
  [class*="decor-"],
  [class*="halo-"] {
    max-width: 100%;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .statusbar__pill {
    padding-inline: 10px;
  }

  .site-brand {
    gap: 7px;
  }

  .site-brand img {
    width: 28px;
    height: 28px;
  }

  .login-link {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal,
  .reveal.pending {
    opacity: 1;
    transform: none;
  }
}