/* ============================================================
   6688赛场 · 共享样式 /assets/site.css
   夜场深靛底 · 左侧导览轨道 · 框景容器 · 三色状态体系
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body,
h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd, hr {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

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

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

button { background: none; border: 0; cursor: pointer; }

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

hr { border: 0; }

/* ---------- tokens ---------- */
:root {
  --ink-900: #060A18;
  --ink-800: #0B1230;
  --ink-750: #101838;
  --paper:   #F7F1E5;
  --lime:    #B8FF3D;
  --orange:  #FF7A1A;
  --red:     #8E2030;
  --steel:   #66738F;
  --aqua:    #3AD6C2;
  --mist:    #CFC8BA;

  --line: rgba(102, 115, 143, .34);
  --line-soft: rgba(102, 115, 143, .18);
  --line-faint: rgba(102, 115, 143, .10);

  --font-head: 'Noto Sans SC Narrow', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', ui-monospace, SFMono-Regular, 'Courier New', monospace;

  --rail-w: 18.5rem;
  --shell: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --r-lg: 24px;
  --r-md: 16px;
  --ease: cubic-bezier(.22, .68, .31, 1);
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-800);
  background-image:
    repeating-linear-gradient(90deg, var(--line-faint) 0 1px, transparent 1px 96px);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: .005em;
}

p { line-height: 1.78; }

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

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

#main-content {
  display: block;
  min-height: 55vh;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  top: .7rem;
  left: .7rem;
  z-index: 130;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink-900);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  transform: translateY(-220%);
  transition: transform .22s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ============================================================
   HEADER · 侧边导览轨道
   ============================================================ */
.rail {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--ink-900);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(3, 6, 16, .55);
}

.rail__progress {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(102, 115, 143, .25);
  overflow: hidden;
}

.rail__progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(184, 255, 61, .7);
}

.rail__inner {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: .7rem var(--gutter) .85rem;
}

.rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
}

.rail__mark {
  flex: none;
  display: grid;
  place-items: center;
  padding: .38rem .5rem;
  border-radius: 12px 12px 3px 12px;
  background: var(--lime);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .01em;
  transform: rotate(-2.5deg);
}

.rail__title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rail__name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .03em;
  color: var(--paper);
}

.rail__tagline {
  font-size: .66rem;
  line-height: 1.45;
  letter-spacing: .08em;
  color: var(--steel);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail__toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem .8rem .42rem .62rem;
  border: 1px solid rgba(184, 255, 61, .45);
  border-radius: 999px;
  background: rgba(184, 255, 61, .08);
  color: var(--lime);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}

.rail__toggle:hover {
  background: rgba(184, 255, 61, .18);
  border-color: var(--lime);
}

.rail__burger {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.rail__burger::before,
.rail__burger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s var(--ease), top .2s var(--ease), opacity .2s var(--ease);
}

.rail__burger::before { top: -5px; }
.rail__burger::after  { top: 5px; }

.rail[data-open] .rail__burger { background: transparent; }
.rail[data-open] .rail__burger::before { top: 0; transform: rotate(45deg); }
.rail[data-open] .rail__burger::after  { top: 0; transform: rotate(-45deg); }

/* ---------- 常用入口快取条 ---------- */
.quickbar {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding-top: .55rem;
  border-top: 1px dashed var(--line);
}

.quickbar__label {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--steel);
}

.quickbar__list {
  display: flex;
  flex-wrap: nowrap;
  gap: .4rem;
  overflow-x: auto;
  padding-bottom: .2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--steel) transparent;
}

.quickbar__list::-webkit-scrollbar { height: 4px; }
.quickbar__list::-webkit-scrollbar-thumb { background: var(--steel); border-radius: 999px; }

.chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: .32rem .74rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 18, 48, .72);
  color: var(--mist);
  font-size: .77rem;
  line-height: 1.35;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}

.chip:hover,
.chip:focus-visible {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink-900);
}

/* ---------- 主导航 ---------- */
.rail__nav {
  display: none;
  flex-direction: column;
  gap: .75rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem var(--gutter) 1.2rem;
  background: var(--ink-900);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 44px rgba(3, 6, 16, .62);
}

.rail[data-open] .rail__nav { display: flex; }

.rail__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .2rem;
}

.rail__link {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  padding: .5rem .6rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--paper);
  font-size: .88rem;
  line-height: 1.4;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.rail__link:hover,
.rail__link:focus-visible {
  background: rgba(184, 255, 61, .1);
  border-color: rgba(184, 255, 61, .34);
  color: var(--lime);
}

.rail__link[aria-current="page"] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink-900);
  font-weight: 700;
}

.rail__idx {
  flex: none;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .05em;
  color: var(--steel);
}

.rail__link[aria-current="page"] .rail__idx { color: rgba(6, 10, 24, .62); }

.rail__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .6rem;
  padding-top: .7rem;
  border-top: 1px solid var(--line-soft);
  font-size: .69rem;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--steel);
}

.dot {
  flex: none;
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
}

.dot--ok   { background: var(--lime);   box-shadow: 0 0 0 3px rgba(184, 255, 61, .16); }
.dot--warn { background: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 26, .16); }
.dot--off  { background: var(--red);    box-shadow: 0 0 0 3px rgba(142, 32, 48, .34); }

.rail__foot {
  display: flex;
  justify-content: flex-start;
}

.rail__totop {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .36rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mist);
  font-size: .73rem;
  letter-spacing: .1em;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}

.rail__totop:hover,
.rail__totop:focus-visible {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink-900);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(2.5rem, 7vw, 5rem);
  background: var(--ink-900);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--lime) 0 26px,
    var(--orange) 26px 46px,
    var(--aqua) 46px 54px,
    transparent 54px 88px
  );
  opacity: .85;
}

.foot {
  display: grid;
  gap: 1.9rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.4rem) var(--gutter) clamp(1.4rem, 3vw, 2.2rem);
}

.foot__brand {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--paper);
}

.foot__intro {
  max-width: 34ch;
  margin-top: .65rem;
  color: var(--mist);
  font-size: .9rem;
  line-height: 1.85;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .66rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}

.foot__lead .btn { margin-top: 1.1rem; }

.btn--lime {
  background: var(--lime);
  color: var(--ink-900);
}

.btn--lime:hover,
.btn--lime:focus-visible {
  background: #cdff6e;
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--paper);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--lime);
  color: var(--lime);
}

.btn--orange {
  background: var(--orange);
  color: var(--ink-900);
}

.btn--orange:hover,
.btn--orange:focus-visible {
  background: #ff9347;
  transform: translateY(-1px);
}

.foot__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.foot__col h3 {
  margin-bottom: .65rem;
  font-family: var(--font-mono);
  font-size: .63rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--steel);
}

.foot__col li { margin-bottom: .1rem; }

.foot__col li a {
  display: inline-block;
  padding: .14rem 0;
  border-bottom: 1px solid transparent;
  color: var(--mist);
  font-size: .88rem;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.foot__col li a:hover,
.foot__col li a:focus-visible {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.foot__contact {
  color: var(--mist);
  font-size: .85rem;
  line-height: 1.7;
}

.foot__line {
  display: block;
  margin-bottom: .3rem;
  word-break: break-word;
}

.foot__line strong {
  display: block;
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--steel);
  margin-bottom: .05rem;
}

.foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1.4rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 1.1rem var(--gutter) 2.2rem;
  border-top: 1px solid var(--line-soft);
  color: var(--steel);
  font-size: .76rem;
}

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
}

.foot__legal a {
  color: var(--mist);
  transition: color .18s var(--ease);
}

.foot__legal a:hover,
.foot__legal a:focus-visible { color: var(--aqua); }

.foot__icp {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

.foot__note {
  flex-basis: 100%;
  max-width: 62ch;
  line-height: 1.7;
  color: var(--steel);
}

.foot__copy { margin-inline-start: auto; }

/* ============================================================
   通用内容组件
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(1.8rem, 5vw, 3.6rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--lime);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 1.7rem;
  height: 2px;
  background: currentColor;
}

.panel {
  padding: clamp(1rem, 2.6vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 8px;
  background: rgba(6, 10, 24, .55);
}

.frame {
  position: relative;
  padding: clamp(1rem, 2.6vw, 1.85rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 10px 10px;
  background: rgba(6, 10, 24, .42);
}

.frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(102, 115, 143, .22);
  border-radius: inherit;
  pointer-events: none;
}

.frame > * { position: relative; z-index: 1; }

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

.grid {
  display: grid;
  gap: clamp(.9rem, 2.4vw, 1.5rem);
}

.grid--2,
.grid--3 { grid-template-columns: 1fr; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--steel);
}

.crumbs a { color: var(--mist); transition: color .18s var(--ease); }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--lime); }
.crumbs__sep { color: rgba(102, 115, 143, .6); }
.crumbs [aria-current="page"] { color: var(--paper); }

.state {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .16rem .58rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1.6;
}

.state--ok {
  background: rgba(184, 255, 61, .14);
  border-color: rgba(184, 255, 61, .5);
  color: var(--lime);
}

.state--warn {
  background: rgba(255, 122, 26, .14);
  border-color: rgba(255, 122, 26, .5);
  color: var(--orange);
}

.state--off {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* ---------- 图片容器底座 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 8px;
  background-color: var(--ink-900);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(102, 115, 143, .16) 0 2px,
    transparent 2px 14px
  );
}

.media img,
.media video,
.media svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media--wide   { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall   { aspect-ratio: 4 / 5; }

.media__tag {
  position: absolute;
  left: .7rem;
  bottom: .7rem;
  z-index: 2;
  padding: .2rem .55rem;
  border: 1px solid rgba(184, 255, 61, .5);
  border-radius: 999px;
  background: rgba(6, 10, 24, .86);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
}

/* ============================================================
   断点
   ============================================================ */
@media (min-width: 560px) {
  .foot__cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 760px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .rail__list { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1.05fr 1.5fr; gap: 2.4rem; }
}

@media (min-width: 960px) {
  html { scroll-padding-top: 2rem; }

  body { padding-left: var(--rail-w); }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    box-shadow: 18px 0 44px rgba(3, 6, 16, .45);
  }

  .rail__inner {
    flex: 1;
    min-height: 0;
    max-width: none;
    margin: 0;
    gap: 1.1rem;
    padding: 1.3rem 1.2rem 1.5rem;
  }

  .rail__name { font-size: 1.16rem; }
  .rail__tagline { font-size: .7rem; }

  .rail__toggle { display: none; }

  .rail__nav {
    position: static;
    display: flex;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .rail__list { grid-template-columns: 1fr; gap: .12rem; }
  .rail__link { font-size: .92rem; padding: .5rem .65rem; }

  .quickbar__list { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }

  .rail__foot { margin-top: auto; }
}

@media (min-width: 1080px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .foot__cols { gap: 1.8rem; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .btn--lime:hover,
  .btn--orange:hover { transform: none; }
}
