/* =========================================================
   /assets/site.css — 万博体育中文站 共享层
   01 Reset · 02 Tokens · 03 Base · 04 Utilities
   05 Header Rail · 06 Mobile Drawer · 07 Footer · 08 A11y
   ========================================================= */

/* ---------- 01 Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
main { display: block; }

/* ---------- 02 Tokens ---------- */
:root {
  --ink: #06131E;
  --ink-2: #0B2B33;
  --violet: #241B4A;
  --wine: #4A1E2B;
  --cyan: #3DE0D0;
  --amber: #FFB13B;
  --white: #F3F8F8;
  --silver: #9DB2BC;
  --mint: #DFFFF9;
  --coral: #FF6B5E;
  --line: #1E3A46;
  --line-soft: rgba(157, 178, 188, 0.16);

  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Heiti SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --rail-w: 88px;
  --offset: 128px;
  --bar-h: 64px;
  --maxw: 1440px;
  --pad: clamp(20px, 4vw, 56px);

  --dur: 160ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --scroll-p: 0;
}

/* ---------- 03 Base ---------- */
body {
  background-color: var(--ink);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  padding-left: var(--offset);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-stretch: condensed;
}

#main-content { display: block; scroll-margin-top: 90px; }

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

/* ---------- 04 Utilities ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: 0 auto;
  padding-inline: var(--pad);
}

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

.section__index {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(157, 178, 188, 0.5);
  font-variant-numeric: tabular-nums;
}

.section__title {
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--white);
}

.prose {
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(243, 248, 248, 0.88);
}
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3 {
  margin-top: 1.9em;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--white);
}
.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose strong { color: var(--white); font-weight: 700; }

.grid { display: grid; gap: clamp(20px, 3vw, 40px); }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid--8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.btn--primary { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.btn--primary:hover { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.btn--ghost { border-color: rgba(157, 178, 188, 0.35); color: var(--white); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn--line { padding-inline: 0; color: var(--cyan); }
.btn--line:hover { text-decoration: underline; text-underline-offset: 4px; }

.link-sweep { position: relative; display: inline-block; }
.link-sweep::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
.link-sweep:hover::after,
.link-sweep:focus-visible::after { transform: scaleX(1); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--silver);
}
.crumbs__link { color: var(--silver); transition: color var(--dur) var(--ease); }
.crumbs__link:hover { color: var(--cyan); }
.crumbs__sep { color: rgba(157, 178, 188, 0.4); }
.crumbs__current { color: var(--white); }

.panel {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 32px);
}
.panel--violet { background: var(--violet); border-color: rgba(243, 248, 248, 0.12); }
.panel--wine { background: var(--wine); border-color: rgba(243, 248, 248, 0.12); }

.media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(61, 224, 208, 0.16) 0%, rgba(255, 177, 59, 0.1) 52%, rgba(36, 27, 74, 0.6) 100%);
}
.media img,
.media video { width: 100%; height: 100%; object-fit: cover; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }
.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--silver);
}

.table-track {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--ink-2);
  -webkit-overflow-scrolling: touch;
}
.table-track table { min-width: 640px; }
.table-track th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-align: left;
  white-space: nowrap;
  color: var(--silver);
}
.table-track td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(30, 58, 70, 0.7);
  font-size: 14.5px;
  vertical-align: top;
}
.table-track tbody tr { transition: background-color var(--dur) var(--ease); }
.table-track tbody tr:hover { background: rgba(243, 248, 248, 0.045); }
.table-track th:first-child,
.table-track td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--ink-2);
}
.table-track td[data-num] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--mint);
  color: #062220;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 0;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
}
.accordion__icon {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--cyan);
  border-bottom: 1.5px solid var(--cyan);
  transform: rotate(45deg);
  transition: transform 220ms var(--ease);
}
.accordion__trigger[aria-expanded="true"] .accordion__icon { transform: rotate(-135deg); }
.accordion__panel {
  padding-bottom: 18px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--silver);
}
.accordion__panel[hidden] { display: none; }

.rule {
  width: 100%;
  height: 1px;
  border: 0;
  background: var(--line);
}

/* ---------- 05 Header · Side Rail ---------- */
.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  z-index: 120;
  background: var(--ink);
  border-right: 1px solid var(--line);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-header[data-scrolled] { background: #040F18; }

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 20px 0 22px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand__mark {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  color: var(--cyan);
  transition: color var(--dur) var(--ease);
}
.brand:hover .brand__mark { color: var(--mint); }
.brand__rule { width: 1px; height: 26px; background: var(--line); }
.brand__name {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 11px;
  letter-spacing: 0.2em;
  line-height: 1;
  color: var(--silver);
}

.nav-toggle { display: none; }

.site-nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  width: 100%;
  min-height: 0;
  margin-top: 22px;
}
.site-nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.site-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--silver);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-nav__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  background: var(--amber);
  transform: translateY(-50%);
  transition: height var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-nav__link:hover { color: var(--white); }
.site-nav__link:hover::before { height: 46%; }
.site-nav__link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(61, 224, 208, 0.07);
}
.site-nav__link[aria-current="page"]::before {
  height: 100%;
  background: var(--cyan);
}

.site-nav__meta { display: none; }

.rail__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 52px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
.rail__cta {
  display: block;
  width: 100%;
  padding: 12px 3px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-align: center;
  color: var(--silver);
  border: 1px solid rgba(157, 178, 188, 0.3);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}
.rail__cta:hover { color: var(--cyan); border-color: var(--cyan); }
.rail__cta--solid {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
  font-weight: 700;
}
.rail__cta--solid:hover { background: var(--mint); border-color: var(--mint); color: var(--ink); }

.rail__progress {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  background: rgba(30, 58, 70, 0.6);
  pointer-events: none;
}
.rail__progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--cyan) 0%, var(--amber) 100%);
  transform-origin: top center;
  transform: scaleY(var(--scroll-p, 0));
  transition: transform 120ms linear;
}

.nav-scrim { display: none; }

@media (max-height: 860px) {
  .rail__foot { display: none; }
}

/* ---------- 06 Mobile · Top Bar + Drawer ---------- */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
    padding-top: var(--bar-h);
  }

  .site-header {
    inset: 0 0 auto 0;
    width: auto;
    height: var(--bar-h);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 18px;
  }

  .brand { flex-direction: row; align-items: center; gap: 10px; }
  .brand__rule { width: 22px; height: 1px; }
  .brand__name {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(157, 178, 188, 0.32);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  }
  .nav-toggle[aria-expanded="true"] { color: var(--cyan); border-color: var(--cyan); }
  .nav-toggle__bars { display: flex; flex-direction: column; gap: 4px; width: 18px; }
  .nav-toggle__bars i {
    display: block;
    height: 1.5px;
    background: currentColor;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  .site-nav {
    position: fixed;
    top: var(--bar-h);
    right: 0;
    bottom: 0;
    z-index: 130;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: min(360px, 86vw);
    margin: 0;
    padding: 20px 18px 28px;
    overflow-y: auto;
    background: var(--ink-2);
    border-left: 1px solid var(--line);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 200ms var(--ease), visibility 200ms var(--ease);
  }
  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
  }

  .site-nav__list { align-items: stretch; }
  .site-nav__link {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    justify-content: flex-start;
    padding: 15px 14px;
    font-size: 16px;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--line-soft);
  }
  .site-nav__link::before { display: none; }
  .site-nav__link[aria-current="page"] {
    background: rgba(61, 224, 208, 0.08);
    box-shadow: inset 2px 0 0 var(--cyan);
  }

  .site-nav__meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }
  .site-nav__note {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--silver);
    text-transform: uppercase;
  }

  .rail__foot { display: none; }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: var(--bar-h) 0 0 0;
    z-index: 125;
    background: rgba(6, 19, 30, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease);
  }
  .nav-scrim[data-open] { opacity: 1; pointer-events: auto; }

  .rail__progress {
    top: auto;
    left: 0;
    right: 0;
    bottom: -1px;
    width: auto;
    height: 2px;
  }
  .rail__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--amber) 100%);
    transform-origin: left center;
    transform: scaleX(var(--scroll-p, 0));
  }
}

/* ---------- 07 Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(72px, 10vw, 140px);
  border-top: 1px solid var(--line);
  background: var(--ink);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(157, 178, 188, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(157, 178, 188, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}
.site-footer::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(420px, 46%);
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(28px, 5vw, 72px);
  max-width: var(--maxw);
  margin-inline: 0 auto;
  padding: clamp(44px, 6vw, 76px) var(--pad) clamp(32px, 4vw, 52px);
}

.footer__masthead {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer__brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__version {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(44px, 6.2vw, 80px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
  transition: color var(--dur) var(--ease);
}
.footer__brand:hover .footer__version { color: var(--mint); }
.footer__brandtext {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--silver);
}
.footer__summary {
  max-width: 38ch;
  font-size: 14px;
  line-height: 1.85;
  color: var(--silver);
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.footer__grouptitle {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--amber);
}
.footer__list { display: flex; flex-direction: column; gap: 8px; }
.footer__link {
  position: relative;
  display: inline-block;
  padding-block: 2px;
  font-size: 14px;
  color: var(--white);
  transition: color var(--dur) var(--ease);
}
.footer__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
.footer__link:hover { color: var(--cyan); }
.footer__link:hover::after { transform: scaleX(1); }

.footer__base {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  max-width: var(--maxw);
  margin-inline: 0 auto;
  padding: 18px var(--pad) 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--silver);
}
.footer__copy { color: var(--silver); }
.footer__icp { color: var(--silver); }
.footer__contact { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer__contact li { display: flex; gap: 8px; }
.footer__label { color: rgba(157, 178, 188, 0.55); }
.footer__note { margin-left: auto; }
.footer__note a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(61, 224, 208, 0.42);
}

@media (max-width: 1023px) {
  .footer__inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .footer__nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__note { margin-left: 0; }
  .footer__base { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---------- 08 A11y · Focus · Motion ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: translateY(-220%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

:where(a, button, [tabindex], summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .grid--7-5,
  .grid--8-4 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
