:root {
  --color-bg: #F6EFE3;
  --color-hero-top: #FBF6EC;
  --color-hero-bottom: #F2E9D8;
  --color-panel: #FCF7EE;
  --color-panel-alt: #EDE3D2;
  --color-border: #DDD0B8;
  --color-border-soft: #E9DFCB;
  --color-accent: #D08A12;
  --color-accent-dark: #9C6407;
  --color-amber: #E8A93A;
  --color-text: #241B14;
  --color-muted: #6B5E52;
  --color-ink: #241B14;
  --color-ink-panel: #2A1D14;
  --color-ink-deep: #1F150F;
  --color-ink-card: #33251B;
  --color-paper: #FCF7EE;
  --color-success: #3C7A48;
  --color-warn: #B85C1A;
  --color-error: #A8362B;
  --color-white: #FFFFFF;
  --color-black: #1B1B1B;
  --color-flag-red: #C8102E;
  --color-flag-blue: #1F3A7A;
  --color-flag-gold: #F2C219;
  --color-shadow: rgb(36 27 20 / 14%);
  --color-shadow-strong: rgb(36 27 20 / 45%);
  --color-accent-08: rgb(208 138 18 / 8%);
  --color-accent-10: rgb(208 138 18 / 10%);
  --color-accent-12: rgb(208 138 18 / 12%);
  --color-accent-16: rgb(208 138 18 / 16%);
  --color-accent-22: rgb(208 138 18 / 22%);
  --color-accent-32: rgb(208 138 18 / 32%);
  --color-accent-55: rgb(208 138 18 / 55%);
  --color-paper-06: rgb(252 247 238 / 6%);
  --color-paper-12: rgb(252 247 238 / 12%);
  --color-paper-42: rgb(252 247 238 / 42%);
  --color-paper-72: rgb(252 247 238 / 72%);
  --font-display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, 'Songti SC', 'Noto Serif CJK SC', 'Source Han Serif SC', SimSun, serif;
  --font-body: Inter, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-card: 20px;
  --radius-block: 28px;
  --radius-pill: 999px;
  --page-width: 1320px;
  --gutter: 40px;
  --header-height: 72px;
  --space-section: 88px;
  --focus-size: 2px;
  --transition-fast: 180ms ease;
  --transition-base: 420ms cubic-bezier(.2, .75, .25, 1);
  --shadow-panel: 0 24px 52px -30px var(--color-shadow-strong);
  --shadow-accent: 0 34px 72px -34px var(--color-accent-32);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -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);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main,
section,
article,
header,
footer,
nav,
div {
  min-width: 0;
}

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

img {
  height: auto;
}

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

button,
summary {
  cursor: pointer;
}

button {
  border: 0;
}

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

p,
ul,
ol,
blockquote,
pre,
table {
  margin-top: 0;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 1.25rem;
}

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

:not(pre) > code {
  overflow-wrap: anywhere;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-panel-alt);
  padding: .12em .38em;
  font-size: .9em;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

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

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

h1 {
  font-size: clamp(52px, 5vw, 68px);
  line-height: 1.1;
  letter-spacing: -.02em;
}

h2 {
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.14;
  letter-spacing: -.015em;
}

h3 {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.25;
}

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

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

.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section-head {
  max-width: 780px;
  margin-bottom: 42px;
}

.section-kicker,
.mono-label {
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-head p {
  max-width: 42rem;
  color: var(--color-muted);
  font-size: 18px;
}

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

.text-accent,
.kw {
  color: var(--color-accent);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.notice {
  background: var(--color-ink);
  color: var(--color-paper-72);
  padding: 9px var(--gutter);
  text-align: center;
  font-size: 13.5px;
  line-height: 1.4;
}

.notice a {
  display: inline;
  border-bottom: 1px solid var(--color-accent-55);
  color: var(--color-accent);
  font-weight: 600;
}

.notice a:hover {
  border-color: var(--color-accent);
}

.topbar {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel);
}

.topbar-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand img,
.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand-word {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: .02em;
}

.brand-local {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
}

.desktop-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--color-muted);
  font-size: 14px;
}

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

.desktop-nav a[aria-current="page"] {
  border-bottom-color: var(--color-accent);
  font-weight: 600;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.login-button,
.button,
.platform-action {
  display: inline-flex;
  min-width: 24px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-weight: 650;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.login-button {
  border: 1.5px solid var(--color-text);
  padding-inline: 20px;
  font-size: 14px;
}

.login-button:hover {
  background: var(--color-text);
  color: var(--color-paper);
}

.language {
  position: relative;
}

.language-toggle {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-muted);
  padding-inline: 10px;
  font-size: 13px;
}

.language-toggle svg {
  width: 12px;
  height: 12px;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 166px;
  margin: 0;
  padding: 7px;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
}

.language-menu[hidden] {
  display: none;
}

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

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

.menu-toggle {
  display: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-panel);
}

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

.mobile-nav {
  display: none;
}

.mobile-nav a {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  border-bottom: 1px solid var(--color-border-soft);
  padding: 11px 4px;
}

.mobile-nav a[aria-current="page"] {
  color: var(--color-accent-dark);
  font-weight: 700;
}

.mobile-language {
  padding-top: 12px;
}

.mobile-language strong {
  display: block;
  margin-bottom: 5px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
}

.mobile-language a {
  color: var(--color-muted);
}

.nav-veil {
  display: none;
}

.nav-veil.is-open {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: block;
  background: var(--color-shadow-strong);
}

.button {
  gap: 10px;
  border: 1.5px solid transparent;
  padding: 11px 22px;
}

.button-primary {
  background: var(--color-ink);
  color: var(--color-paper);
  box-shadow: 0 16px 34px -18px var(--color-accent-32);
}

.button-primary:hover {
  background: var(--color-accent);
  color: var(--color-ink);
  transform: translateY(-2px);
}

.button-accent {
  background: var(--color-accent);
  color: var(--color-ink);
}

.button-accent:hover {
  background: var(--color-amber);
  transform: translateY(-2px);
}

.button-outline {
  border-color: var(--color-text);
  background: transparent;
  color: var(--color-text);
}

.button-outline:hover {
  background: var(--color-text);
  color: var(--color-paper);
}

.button-link {
  min-height: 44px;
  border-bottom: 1.5px solid var(--color-accent);
  border-radius: 0;
  padding: 8px 0 4px;
}

.button-link:hover {
  color: var(--color-accent-dark);
}

.badge,
.fact-chip,
.status-chip {
  display: inline-flex;
  min-height: 28px;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  padding: 4px 11px;
  font-size: 12px;
  line-height: 1.4;
}

.badge-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-16);
}

.fact-chip {
  border-color: var(--color-accent-55);
  background: var(--color-accent-10);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.status-chip {
  color: var(--color-success);
}

.status-chip::before {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--color-success);
  content: "";
}

.panel,
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-panel);
  box-shadow: var(--shadow-panel);
}

.card {
  padding: 26px;
}

.reveal {
  transition: opacity .62s ease, transform .62s cubic-bezier(.2, .75, .25, 1);
}

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

.reveal.shown {
  opacity: 1;
  transform: none;
}

.motion-lines,
[data-motion-lines] {
  visibility: visible;
}

.stat-number,
[data-counter] {
  display: inline-block;
  min-width: 3.2ch;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

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

.site-footer {
  overflow-x: clip;
  border-top: 1px solid var(--color-paper-12);
  background: var(--color-ink-deep);
  color: var(--color-paper-72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.2fr .8fr;
  gap: 46px;
  padding-top: 64px;
  padding-bottom: 52px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-paper);
  font-family: var(--font-display);
  font-size: 22px;
}

.footer-brand img {
  width: 38px;
  height: 38px;
}

.footer-intro {
  max-width: 28rem;
  margin-top: 18px;
  color: var(--color-paper-72);
}

.footer-title {
  margin-bottom: 15px;
  color: var(--color-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
}

.footer-links {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--color-paper-12);
  padding-top: 20px;
  padding-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
}

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

.tilt,
.tilt-card {
  transform: rotate(-.45deg);
}

.prose {
  max-width: 820px;
}

.prose p,
.prose li {
  color: var(--color-muted);
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: .65em;
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: .55em;
}

.prose img,
.prose table,
.prose pre {
  margin-block: 28px;
}

.prose a {
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 17px;
  }

  .desktop-nav a {
    font-size: 13px;
  }

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

@media (max-width: 1024px) {
  :root {
    --gutter: 28px;
  }

  .desktop-nav {
    display: none;
  }

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

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

  .mobile-nav.is-open {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 55;
    display: block;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-panel);
    padding: 10px var(--gutter) 18px;
    box-shadow: var(--shadow-panel);
  }
}

@media (max-width: 768px) {
  :root {
    --space-section: 64px;
  }

  h1 {
    font-size: clamp(32px, 9.5vw, 40px);
  }

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

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

  .footer-brand-block {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 18px;
    --header-height: 64px;
  }

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

  .tilt,
  .tilt-card {
    transform: none;
  }

  .notice {
    padding-inline: var(--gutter);
  }

  .language {
    display: none;
  }

  .brand-word {
    font-size: 20px;
  }

  .login-button {
    min-height: 40px;
    padding-inline: 15px;
  }

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

  .footer-brand-block {
    grid-column: auto;
  }

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

  .decorative,
  .stripe-halo,
  .watermark {
    max-width: 100%;
    transform: none;
  }
}

@media (max-width: 390px) {
  :root {
    --gutter: 16px;
  }

  .topbar-inner {
    gap: 9px;
  }

  .brand {
    gap: 7px;
  }

  .brand img,
  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .login-button {
    padding-inline: 12px;
  }
}

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

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

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