:root {
  --bg: #F5F9FC;
  --bg-panel: #FFFFFF;
  --bg-panel2: #EDF3F7;
  --border: #DCE5EC;
  --accent: #3D9B5C;
  --accent-hover: #348A51;
  --accent-text: #2F7F4A;
  --accent-soft: #E6F2EA;
  --accent-dark: #13756F;
  --accent-dark-hover: #0F655F;
  --accent-deeper: #0F615C;
  --accent-dark-soft: #E2F0EF;
  --text: #2B3A47;
  --text-muted: #5F6F7C;
  --text-on-accent: #FFFFFF;
  --success: #2F8F57;
  --warn: #C98A12;
  --error: #C8443A;
  --warn-text: #805709;
  --error-text: #A3332B;
  --line-dash: #B7C4CE;
  --card-fade: #F1F7F3;
  --glow-a: rgba(61, 155, 92, 0.13);
  --glow-b: rgba(19, 117, 111, 0.07);
  --glow-c: rgba(19, 117, 111, 0);
  --veil: rgba(43, 58, 71, 0.28);
  --shadow-bar: 0 1px 0 rgba(43, 58, 71, 0.04), 0 4px 14px rgba(43, 58, 71, 0.04);
  --shadow-card: 0 1px 2px rgba(43, 58, 71, 0.04), 0 6px 18px rgba(43, 58, 71, 0.05), 0 22px 44px -28px rgba(43, 58, 71, 0.16);
  --shadow-card-hover: 0 1px 2px rgba(43, 58, 71, 0.05), 0 10px 26px rgba(43, 58, 71, 0.07), 0 26px 50px -28px rgba(43, 58, 71, 0.2);
  --shadow-btn: 0 1px 2px rgba(43, 58, 71, 0.08), 0 4px 12px -4px rgba(61, 155, 92, 0.35);
  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "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;
  --weight-regular: 400;
  --weight-medium: 500;
  --size-body: 16px;
  --size-small: 14px;
  --size-caption: 13px;
  --size-nav: 15px;
  --size-brand: 18px;
  --size-h1: clamp(34px, calc(3.2vw + 12px), 48px);
  --size-hero: clamp(28px, calc(3.2vw + 12px), 46px);
  --size-h2: 30px;
  --size-h3: 22px;
  --size-mobile-h1: clamp(24px, 4.8vw, 30px);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-pill: 999px;
  --radius-round: 50%;
  --radius-indicator: 3px 3px 0 0;
  --gutter: 24px;
  --wrap: 1100px;
  --reading: 800px;
  --bar-h: 64px;
  --section-space: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 180ms;
  --normal: 220ms;
  --reveal-time: 480ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; vertical-align: middle; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  line-height: 1.3;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--size-h1); line-height: 1.22; }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }
p { margin-top: 0; }
strong { font-weight: var(--weight-medium); }
code, pre, kbd { font-family: var(--font-mono); font-size: var(--size-small); }
code { overflow-wrap: anywhere; }
:not(pre) > code {
  background: var(--bg-panel2);
  color: var(--text);
  padding: 2px 5px;
  border-radius: var(--radius-sm);
}
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel2);
  color: var(--text);
  line-height: 1.7;
  overscroll-behavior-inline: contain;
}
pre code { white-space: pre; overflow-wrap: normal; }
:where(section, article, div, li, nav, aside) { min-width: 0; }
:where(h2, h3, [id]) { scroll-margin-top: 24px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.reading { max-width: var(--reading); margin-inline: auto; }
.section { padding-top: var(--section-space); padding-bottom: var(--section-space); }
.section-heading { margin-top: 0; margin-bottom: 28px; }
.prose { line-height: 1.85; overflow-wrap: break-word; }
.prose h2 { margin-top: 48px; margin-bottom: 20px; }
.prose h3 { margin-top: 32px; margin-bottom: 14px; }
.prose p, .prose ul, .prose ol { margin-bottom: 20px; }
.prose li + li { margin-top: 8px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.word { white-space: nowrap; }
.muted { color: var(--text-muted); }
.eyebrow { margin: 0 0 10px; color: var(--accent-dark); font-size: var(--size-caption); letter-spacing: 0.12em; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 16px;
  background: var(--bg-panel);
  color: var(--accent-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.skip-link:focus { transform: none; }
.icon, .btn-ico, .lang-globe, .brand-mark, .hero-tag-dot { flex-shrink: 0; }
.icon { width: 24px; height: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: var(--weight-medium);
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--fast), border-color var(--fast), color var(--fast);
}
.btn:hover { text-decoration: none; }
.btn-ico { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--shadow-btn); }
.btn-primary:hover, .btn-primary.is-hover { background: var(--accent-hover); color: var(--text-on-accent); }
.btn-ghost { background: var(--bg-panel); border-color: var(--accent-dark); color: var(--accent-dark); }
.btn-ghost:hover, .btn-ghost.is-hover { background: var(--accent-dark-soft); color: var(--accent-dark); }
.btn-teal { background: var(--accent-dark); color: var(--text-on-accent); }
.btn-teal:hover, .btn-teal.is-hover { background: var(--accent-dark-hover); color: var(--text-on-accent); }
.btn:active { background: var(--accent-deeper); color: var(--text-on-accent); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel2);
  color: var(--text-muted);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
}
.btn.is-focus { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-dark); font-size: var(--size-small); line-height: 20px; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 18px; }

.topbar, #site-header {
  position: relative;
  z-index: 50;
  height: var(--bar-h);
  background: var(--bg-panel);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-bar);
}
.topbar-inner {
  position: relative;
  width: 100%;
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--size-brand);
  font-weight: var(--weight-medium);
  letter-spacing: 0.01em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 32px; height: 32px; }
.tabs { height: 100%; min-width: 0; }
.tabs-list {
  display: flex;
  align-items: center;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.tabs-list li { height: 100%; }
.tab-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: 14px;
  color: var(--text-muted);
  font-size: var(--size-nav);
  white-space: nowrap;
  transition: color var(--fast);
}
.tab-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 3px;
  border-radius: var(--radius-indicator);
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--normal) var(--ease);
}
.tab-link:hover, .tab-link[aria-current="page"] { color: var(--text); text-decoration: none; }
.tab-link[aria-current="page"]::after { transform: scaleX(1); }
.header-tools { display: flex; align-items: center; flex-shrink: 0; gap: 10px; }
.bar-divider { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }
.language-control { position: relative; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--size-small);
}
.lang-switch:hover { background: var(--bg-panel2); color: var(--text); }
.lang-globe { width: 16px; height: 16px; }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 180px;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--radius-sm); }
.language-menu a:hover, .language-menu a[aria-current="true"] { background: var(--bg-panel2); color: var(--accent-dark); text-decoration: none; }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--accent-dark);
}
.mobile-drawer { display: none; }
.menu-veil {
  position: fixed;
  inset: var(--bar-h) 0 0;
  z-index: 40;
  background: var(--veil);
  color: var(--text);
  border: 0;
}
.mobile-drawer ul { list-style: none; padding: 0; margin: 0; }

.hero { position: relative; overflow: hidden; overflow-x: clip; padding-top: 34px; padding-bottom: 34px; text-align: center; }
.hero::before {
  content: "";
  position: absolute;
  top: -300px;
  right: -260px;
  width: 1120px;
  height: 860px;
  background: radial-gradient(closest-side, var(--glow-a), var(--glow-b) 48%, var(--glow-c) 100%);
  pointer-events: none;
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin: 0 0 18px;
  padding: 3px 14px 3px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: var(--size-caption);
  letter-spacing: 0.02em;
}
.hero-tag-dot { width: 7px; height: 7px; border-radius: var(--radius-round); background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero-title { margin: 0 0 22px; font-size: var(--size-hero); font-weight: var(--weight-regular); line-height: 1.22; letter-spacing: 0; }
.hero-title-sep { color: var(--accent); padding: 0 0.12em; }
.lede { max-width: 680px; margin: 0 auto 18px; color: var(--text-muted); font-size: var(--size-body); line-height: 1.7; }
.lede strong { color: var(--text); background: linear-gradient(180deg, var(--glow-c) 62%, var(--accent-soft) 62%); padding: 0 2px; }
.plat-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; padding: 0; list-style: none; }
.plat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 14px 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: var(--size-caption);
  transition: color var(--fast), border-color var(--fast);
}
.plat-chip:hover { color: var(--accent-dark); border-color: var(--accent-dark); text-decoration: none; }
.plat-ico { display: block; width: 15px; height: 15px; flex-shrink: 0; }
.plat-ico-tux { width: 14px; height: 16px; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; max-width: 1080px; margin-inline: auto; }
.route-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 22px 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--bg-panel) 52%, var(--card-fade) 100%);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.route-pill { display: inline-flex; align-items: center; min-height: 24px; margin: 0 0 8px; padding: 2px 14px; border-radius: var(--radius-pill); font-size: var(--size-caption); letter-spacing: 0.06em; }
.route-pill, .route-pill:hover { color: inherit; text-decoration: none; cursor: pointer; }
.route-pill-desk { background: var(--accent-soft); color: var(--accent-text); }
.route-pill-droid { background: var(--bg-panel2); color: var(--text); }
.route-art { display: block; width: 100%; max-width: 440px; height: 160px; margin: 0 auto 10px; }
.ink-node { fill: var(--accent-soft); }
.ink-green { fill: var(--accent); }
.ink-teal { fill: var(--accent-dark); }
.ink-teal-deep { fill: var(--accent-deeper); }
.ink-paper { fill: var(--bg-panel); }
.ink-shadow { fill: var(--border); }
.ink-dash { fill: none; stroke: var(--line-dash); stroke-width: 2; stroke-dasharray: 4 6; stroke-linecap: round; }
.ink-outline { fill: none; stroke: var(--accent-dark); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ink-label { fill: var(--text-muted); font-family: var(--font-body); font-size: var(--size-caption); }
.plate { fill: var(--bg-panel); stroke: var(--border); stroke-width: 1; }
.plate-text { fill: var(--text); font-family: var(--font-mono); font-size: var(--size-caption); }
.route-title { margin: 0 0 6px; font-size: var(--size-h3); line-height: 1.3; }
.route-desc { max-width: 420px; margin: 0 0 16px; color: var(--text-muted); font-size: var(--size-small); line-height: 1.65; }
.btn-card { min-height: 40px; min-width: 220px; max-width: 100%; font-size: var(--size-nav); margin: 0 0 10px; box-shadow: none; }
.next-peek { padding-top: 8px; padding-bottom: 72px; text-align: center; }
.next-peek h2 { margin: 0; }
.card, .panel { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-card); }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.reveal { opacity: 1; transform: none; }
.reveal-pending { opacity: 0; transform: translateY(14px); transition: opacity var(--reveal-time) var(--ease), transform var(--reveal-time) var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

.site-footer { padding-top: 56px; padding-bottom: 24px; border-top: 1px solid var(--border); background: var(--bg-panel2); color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.15fr 0.85fr 1.2fr 0.65fr; gap: 32px; }
.footer-title { margin: 0 0 16px; font-size: var(--size-body); }
.footer-copy { max-width: 300px; margin-top: 16px; color: var(--text-muted); font-size: var(--size-small); }
.footer-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: var(--size-small); }
.footer-links a { display: inline-block; padding-top: 3px; padding-bottom: 3px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--size-caption); }
.footer-bottom p { margin: 0; margin-right: auto; }
.footer-languages a[aria-current="true"] { color: var(--text); text-decoration: underline; }

@media (max-width: 1100px) {
  .topbar-inner { gap: 16px; }
  .tab-link { padding-inline: 10px; }
  .tab-link::after { left: 10px; right: 10px; }
}
@media (max-width: 1000px) {
  .desktop-nav { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer:not([hidden]) {
    display: block;
    position: absolute;
    inset: var(--bar-h) 0 auto;
    padding: 16px var(--gutter) 24px;
    max-height: calc(100vh - var(--bar-h));
    max-height: calc(100dvh - var(--bar-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg-panel);
    color: var(--text);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-card);
  }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 10px 16px; color: var(--text-muted); border-radius: var(--radius-sm); }
  .mobile-drawer a[aria-current="page"], .mobile-drawer a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-text); }
  .mobile-drawer a:hover { background: var(--bg-panel2); color: var(--text); text-decoration: none; }
  .drawer-languages { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
  .preview-header .tabs { width: 100%; height: 46px; order: 3; overflow-x: auto; }
  .preview-header { height: auto; }
  .preview-header .topbar-inner { flex-wrap: wrap; padding-top: 10px; }
}
@media (max-width: 920px) {
  .duo { grid-template-columns: minmax(0, 1fr); max-width: 560px; gap: 20px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  h1, .hero-title { font-size: var(--size-mobile-h1); }
  .cta-row { flex-direction: column; align-items: stretch; max-width: 320px; margin-inline: auto; }
  .lede { font-size: var(--size-nav); }
  .route-card { padding: 20px 16px 22px; }
  .next-peek h2 { font-size: var(--size-h3); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --section-space: 48px; --size-h2: 24px; }
  .wrap { padding-inline: var(--gutter); }
  .topbar-inner { gap: 8px; }
  .brand { gap: 7px; font-size: var(--size-nav); }
  .brand-mark { width: 28px; height: 28px; }
  .header-tools { margin-left: auto; gap: 4px; }
  .bar-divider { display: none; }
  .lang-full { display: none; }
  .lang-short { display: inline; }
  .lang-switch { min-height: 44px; padding-inline: 8px; }
  .card-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .panel { padding: 20px; }
  .tilt, [data-tilt] { transform: none !important; }
  .plat-row { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .plat-chip { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal, .reveal-pending { opacity: 1; transform: none; }
}