/* =========================================================
   开云竞猜 · KAIYUN 中国站 共享样式表  /assets/site.css
   高原星空下的战术室：夜色底 / 玻璃层 / 纸张层 / 轮次轴
   ========================================================= */

/* ---------- 1. 变量 ---------- */
:root {
  --night: #07161F;
  --deep: #0E2A3A;
  --moss: #16465A;
  --neon: #3DF2C0;
  --amber: #E3A73B;
  --cinnabar: #C8462F;
  --paper: #F3ECDD;
  --mist: #7C9AA6;
  --ink: #1B1512;

  --glass: rgba(243, 236, 221, 0.06);
  --glass-line: rgba(243, 236, 221, 0.16);
  --hair: rgba(243, 236, 221, 0.10);

  --tier-1: #0E2A3A;
  --tier-2: #1F6B7E;
  --tier-3: #2FB79A;
  --tier-4: #3DF2C0;

  --font-display: "Noto Sans SC Condensed", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail-w: 88px;
  --maxw: 1080px;
  --gutter: clamp(18px, 4vw, 56px);
  --radius: 4px;
  --scroll-pct: 0%;
}

/* ---------- 2. reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-left: var(--rail-w);
  background-color: var(--night);
  background-image:
    radial-gradient(circle at 16% 6%, rgba(61, 242, 192, 0.07), transparent 40%),
    radial-gradient(circle at 88% 58%, rgba(227, 167, 59, 0.05), transparent 44%),
    radial-gradient(circle at 62% 92%, rgba(31, 107, 126, 0.18), transparent 52%),
    radial-gradient(1.2px 1.2px at 21% 17%, rgba(243, 236, 221, 0.32), transparent 100%),
    radial-gradient(1.2px 1.2px at 71% 9%, rgba(243, 236, 221, 0.26), transparent 100%),
    radial-gradient(1px 1px at 43% 41%, rgba(243, 236, 221, 0.20), transparent 100%),
    radial-gradient(1px 1px at 87% 74%, rgba(243, 236, 221, 0.18), transparent 100%),
    radial-gradient(1px 1px at 12% 68%, rgba(243, 236, 221, 0.16), transparent 100%);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
main { display: block; }
hr { border: 0; }

#main-content { scroll-margin-top: 24px; }

/* ---------- 3. 中文排版 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: -0.008em;
  color: var(--paper);
  font-stretch: 92%;
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.06; }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: clamp(19px, 1.8vw, 22px); font-weight: 400; letter-spacing: 0; }
h4 { font-size: 17px; font-weight: 500; letter-spacing: 0.01em; }

p { text-wrap: pretty; }

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

/* ---------- 4. 可访问性 ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail-w) + 12px);
  z-index: 400;
  padding: 10px 18px;
  background: var(--neon);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* ---------- 5. 头部 / 纵向轮次轴 ---------- */
.site-header {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  z-index: 200;
}

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 20px 0 24px;
  background: linear-gradient(180deg, #0B2130 0%, #07161F 56%, #061218 100%);
  border-right: 1px solid var(--glass-line);
}

.rail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(61, 242, 192, 0.42) 42%, transparent);
  pointer-events: none;
}

.rail__brand {
  display: block;
  width: 100%;
  padding: 6px 6px 14px;
  text-align: center;
  border-bottom: 1px solid var(--hair);
}

.rail__brand-mark {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.12em;
  color: var(--paper);
  font-stretch: 92%;
}
.rail__brand-mark span { color: var(--neon); }

.rail__brand-sub {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--mist);
}

.rail__nav {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 11px 4px;
  color: var(--mist);
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.rail__num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(124, 154, 166, 0.68);
  transition: color 0.18s ease;
}

.rail__label {
  font-size: 12px;
  line-height: 1.32;
  letter-spacing: 0.02em;
  text-align: center;
  word-break: break-word;
}

.rail__link:hover,
.rail__link:focus-visible {
  color: var(--paper);
  background: rgba(61, 242, 192, 0.07);
}
.rail__link:hover .rail__num,
.rail__link:focus-visible .rail__num { color: var(--neon); }

.rail__link[aria-current="page"] {
  color: var(--neon);
  background: rgba(61, 242, 192, 0.09);
  box-shadow: inset -2px 0 0 var(--neon);
}
.rail__link[aria-current="page"] .rail__num { color: var(--neon); }

.rail__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
  text-align: center;
}

.rail__round {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--amber);
}

.rail__progress {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: rgba(124, 154, 166, 0.14);
  overflow: hidden;
  pointer-events: none;
}

.rail__progress-bar {
  display: block;
  width: 100%;
  height: var(--scroll-pct);
  background: linear-gradient(180deg, var(--tier-2), var(--tier-3) 55%, var(--neon));
  transition: height 0.12s linear, width 0.12s linear;
}

.rail__toggle {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--glass-line);
  border-radius: 2px;
  color: var(--paper);
}
.rail__toggle-line {
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
}
.rail__toggle-text {
  margin-left: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 128px);
  padding: clamp(40px, 6vw, 76px) 0 30px;
  background: var(--ink);
  border-top: 1px solid rgba(61, 242, 192, 0.24);
  color: var(--paper);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(360px, 46%);
  height: 2px;
  background: linear-gradient(90deg, var(--neon), transparent);
}

.foot-grid {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1.15fr 2fr 1.35fr;
  gap: clamp(26px, 4vw, 56px);
}

.foot-brand__mark {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.07em;
  line-height: 1.2;
  color: var(--paper);
  font-stretch: 92%;
}

.foot-brand__sub {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--mist);
  max-width: 30ch;
}

.foot-brand__note {
  margin-top: 18px;
  padding-left: 13px;
  border-left: 2px solid rgba(61, 242, 192, 0.5);
  font-size: 13px;
  line-height: 1.8;
  color: rgba(243, 236, 221, 0.72);
  max-width: 30ch;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.foot-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--neon);
  line-height: 1.4;
}

.foot-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-col__list a {
  display: inline-block;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(243, 236, 221, 0.78);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.foot-col__list a:hover,
.foot-col__list a:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--neon);
}

.foot-contact__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(243, 236, 221, 0.78);
}

.foot-contact__mail,
.foot-contact__num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--paper);
  word-break: break-all;
}

.foot-bottom {
  max-width: var(--maxw);
  margin: clamp(34px, 5vw, 58px) auto 0;
  padding: 20px var(--gutter) 0;
  border-top: 1px solid rgba(243, 236, 221, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  justify-content: space-between;
  align-items: baseline;
}

.foot-stamp {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--amber);
}

.foot-legal {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(243, 236, 221, 0.55);
}

/* ---------- 7. 容器与栅格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 720px; }
.wrap--wide { max-width: 1240px; }

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 8. 通用组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
}

.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.92;
  color: rgba(243, 236, 221, 0.82);
  max-width: 46ch;
}

.rule {
  height: 1px;
  margin: clamp(28px, 4vw, 48px) 0;
  background: linear-gradient(90deg, rgba(243, 236, 221, 0.24), rgba(243, 236, 221, 0));
}

.panel {
  position: relative;
  padding: clamp(20px, 2.6vw, 34px);
  border-radius: var(--radius);
}
.panel--glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(9px) saturate(120%);
  backdrop-filter: blur(9px) saturate(120%);
}
.panel--solid {
  background: var(--deep);
  border: 1px solid var(--hair);
}
.panel--ink {
  background: var(--ink);
  border: 1px solid rgba(243, 236, 221, 0.12);
}
.panel--neon { border-color: rgba(61, 242, 192, 0.5); }

.note {
  padding: 14px 16px 14px 18px;
  background: rgba(61, 242, 192, 0.05);
  border-left: 2px solid var(--neon);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13.5px;
  line-height: 1.82;
  color: rgba(243, 236, 221, 0.85);
}
.note--amber {
  background: rgba(227, 167, 59, 0.07);
  border-left-color: var(--amber);
}
.note--cinnabar {
  background: rgba(200, 70, 47, 0.09);
  border-left-color: var(--cinnabar);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  color: var(--mist);
  background: transparent;
}
.tag--neon { color: var(--neon); }
.tag--amber { color: var(--amber); }
.tag--cinnabar { color: var(--cinnabar); }

.round-stamp {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}
.round-stamp::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 0 3px rgba(61, 242, 192, 0.18);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat__num {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.stat__num--neon { color: var(--neon); }
.stat__num--amber { color: var(--amber); }
.stat__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--mist);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
}
.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb li::after {
  content: "/";
  color: rgba(124, 154, 166, 0.5);
}
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--neon); }
.breadcrumb [aria-current="page"] { color: var(--paper); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--neon);
  border-radius: 2px;
  background: var(--neon);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: #6BFFD5; border-color: #6BFFD5; }
.btn:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  border-color: rgba(243, 236, 221, 0.32);
  color: var(--paper);
}
.btn--ghost:hover {
  background: rgba(243, 236, 221, 0.08);
  border-color: var(--paper);
  color: var(--paper);
}

.btn--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn--ink:hover {
  background: #2A211C;
  border-color: #2A211C;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 520px;
  font-size: 14px;
}
.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}
.data-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  border-bottom-color: rgba(243, 236, 221, 0.22);
}
.data-table tbody tr:hover { background: rgba(61, 242, 192, 0.05); }
.data-table .num {
  font-family: var(--font-mono);
  color: var(--paper);
  white-space: nowrap;
}

.img-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(243, 236, 221, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--deep), var(--night) 72%);
  aspect-ratio: 16 / 10;
}
.img-frame img,
.img-frame svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--tall { aspect-ratio: 3 / 4; }
.img-frame--square { aspect-ratio: 1 / 1; }

.img-frame__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: linear-gradient(0deg, rgba(7, 22, 31, 0.9), rgba(7, 22, 31, 0));
}

/* ---------- 9. 滚动显现 ---------- */
[data-reveal][data-reveal-ready] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.52s ease,
    transform 0.52s cubic-bezier(0.22, 0.7, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal][data-reveal-ready].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1080px) {
  .foot-grid { grid-template-columns: 1fr 1.6fr; }
  .foot-contact { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --rail-w: 0px; }

  body {
    padding-left: 0;
    padding-top: 58px;
    font-size: 16px;
    line-height: 1.8;
  }

  #main-content { scroll-margin-top: 72px; }

  .skip-link { left: 12px; }

  .site-header {
    right: 0;
    bottom: auto;
    width: 100%;
    height: auto;
  }

  .rail {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    height: 58px;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--glass-line);
    background: rgba(7, 22, 31, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .rail::after { display: none; }

  .rail__brand {
    width: auto;
    padding: 0;
    text-align: left;
    border-bottom: 0;
    flex: 0 0 auto;
  }
  .rail__brand-mark { font-size: 15px; letter-spacing: 0.1em; }
  .rail__brand-sub { display: none; }

  .rail__meta {
    order: 1;
    width: auto;
    margin-left: auto;
    padding-top: 0;
    border-top: 0;
    flex: 0 0 auto;
  }
  .rail__round { font-size: 10px; white-space: nowrap; }

  .rail__toggle {
    order: 2;
    display: inline-flex;
    margin-left: 10px;
    flex: 0 0 auto;
  }

  .rail__nav {
    order: 3;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    padding: 8px 0 18px;
    background: #0B2130;
    border-bottom: 1px solid var(--glass-line);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5);
  }
  .rail__nav[data-open] { display: block; }

  .rail__list { gap: 0; }

  .rail__link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 13px 20px;
    color: rgba(243, 236, 221, 0.8);
  }
  .rail__link[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--neon);
    background: rgba(61, 242, 192, 0.1);
  }
  .rail__num { font-size: 11px; }
  .rail__label { font-size: 15px; text-align: left; }

  .rail__progress {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 2px;
  }
  .rail__progress-bar {
    height: 2px;
    width: var(--scroll-pct);
    background: linear-gradient(90deg, var(--tier-2), var(--tier-3) 55%, var(--neon));
  }

  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .data-table { min-width: 460px; }
}

@media (min-width: 621px) and (max-width: 900px) {
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 11. 动效降级 ---------- */
@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;
    transition-delay: 0ms !important;
  }

  [data-reveal][data-reveal-ready] {
    opacity: 1;
    transform: none;
  }

  .skip-link { transition: none; }
}
