/* ============================================================
   云开赛场 /assets/site.css — 共享外壳与基础组件
   ============================================================ */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 88% -10%, rgba(34, 224, 214, .10), transparent 62%),
    radial-gradient(760px 520px at 4% 108%, rgba(255, 122, 47, .08), transparent 60%),
    var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.05;
}
p { margin: 0; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--cyan); color: #04110F; }
#main-content { display: block; scroll-margin-top: 96px; }

/* ---------- tokens ---------- */
:root {
  --ink: #05070E;
  --panel: #0B1220;
  --panel-2: #0E1728;
  --indigo: #1B2050;
  --teal: #06302E;
  --wine: #3A1220;
  --cyan: #22E0D6;
  --orange: #FF7A2F;
  --silver: #C7CEDA;
  --grey: #7C8798;
  --paper: #F2F5F9;
  --line: rgba(199, 206, 218, .16);
  --line-strong: rgba(199, 206, 218, .34);
  --rail-w: 236px;
  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 120;
  padding: 10px 18px;
  background: var(--cyan);
  color: #04110F;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
  border-radius: 0 0 8px 8px;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

/* ---------- rail / header ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: var(--rail-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 0 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(160deg, rgba(34, 224, 214, .10), transparent 42%),
    linear-gradient(200deg, rgba(255, 122, 47, .07), transparent 46%),
    var(--panel);
  border-right: 1px solid var(--line);
}
.rail::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 2px;
  height: 36%;
  background: linear-gradient(180deg, var(--cyan), rgba(34, 224, 214, 0));
  pointer-events: none;
}
.rail__brand { padding: 0 18px 18px; border-bottom: 1px solid var(--line); }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(34, 224, 214, .22), rgba(255, 122, 47, .16));
  transform: skewX(-6deg);
}
.brand__mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(34, 224, 214, .75);
}
.brand__pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 122, 47, .9);
  animation: pulse 3s ease-in-out infinite;
}
.brand__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand__name { font-family: var(--font-display); font-weight: 900; font-size: 20px; line-height: 1; letter-spacing: .02em; }
.brand__tag { font-size: 12px; color: var(--grey); letter-spacing: .2em; }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 224, 214, .5); }
  50% { opacity: .55; box-shadow: 0 0 0 6px rgba(34, 224, 214, 0); }
}

/* ---------- nav toggle (mobile) ---------- */
.rail__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .18em;
  transition: border-color .2s ease, color .2s ease;
}
.rail__toggle:hover { border-color: var(--cyan); }
.rail__toggle-bars { display: grid; gap: 4px; width: 18px; }
.rail__toggle-bars i { display: block; height: 2px; background: var(--cyan); transition: opacity .2s ease; }
.rail[data-open] .rail__toggle-bars i:nth-child(2) { opacity: .25; }
.rail__toggle-label { color: var(--silver); }

/* ---------- nav ---------- */
.nav { display: flex; flex-direction: column; flex: 1 1 auto; gap: 14px; padding: 18px 14px 0; }
.nav__label {
  margin: 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--grey);
}
.nav__list { display: flex; flex-direction: column; gap: 2px; }
.nav__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  color: var(--silver);
  font-size: 15px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.nav__link:hover {
  color: var(--paper);
  background: rgba(34, 224, 214, .07);
  border-color: var(--line);
  transform: translateX(2px);
}
.nav__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--grey);
  background: transparent;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.nav__text { min-width: 0; }
.nav__idx { font-family: var(--font-mono); font-size: 11px; color: var(--grey); }
.nav__link[aria-current="page"] {
  color: var(--paper);
  background: linear-gradient(90deg, rgba(34, 224, 214, .16), rgba(34, 224, 214, 0));
  border-color: rgba(34, 224, 214, .42);
}
.nav__link[aria-current="page"] .nav__dot {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(34, 224, 214, .85);
}
.nav__link[aria-current="page"] .nav__idx { color: var(--cyan); }

.rail__actions { display: grid; gap: 8px; margin-top: auto; padding-top: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  background: rgba(199, 206, 218, .05);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  letter-spacing: .04em;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #160A02;
  box-shadow: 0 8px 24px rgba(255, 122, 47, .24);
}
.btn--primary:hover { background: #FF8F4D; transform: translateY(-2px); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.btn--sm { padding: 8px 12px; font-size: 13px; }

/* ---------- status dots ---------- */
.dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grey);
}
.dot--live { background: var(--cyan); animation: pulse 3s ease-in-out infinite; }
.dot--warn { background: var(--orange); }

.rail__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding: 16px 18px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
}
.rail__status { display: flex; align-items: center; gap: 8px; color: var(--silver); }
.rail__icp { font-size: 11px; letter-spacing: .1em; color: var(--grey); }

/* ---------- footer ---------- */
.foot {
  position: relative;
  margin-top: 96px;
  background: linear-gradient(180deg, var(--panel), #070B14);
  border-top: 1px solid var(--line);
}
.foot::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: min(360px, 58%);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.25fr 1.4fr;
  gap: 48px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 24px 44px;
}
.foot__brand .brand { margin-bottom: 16px; }
.foot__brand .brand__name { font-size: 22px; }
.foot__note { max-width: 34ch; margin-bottom: 20px; font-size: 14px; color: var(--grey); }
.foot__contact { display: grid; gap: 8px; }
.foot__addr, .foot__online { font-size: 13px; color: var(--grey); }
.foot__online { color: var(--silver); }

.foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot__title {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--silver);
}
.foot__list { display: grid; gap: 10px; }
.foot__link {
  display: inline-block;
  font-size: 15px;
  color: var(--grey);
  transition: color .18s ease, padding-left .18s ease;
}
.foot__link:hover { color: var(--cyan); padding-left: 6px; }

.foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--grey);
}
.foot__legal, .foot__copy { margin: 0; }

/* ---------- copy button ---------- */
.copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(199, 206, 218, .03);
  transition: border-color .2s ease, background .2s ease;
}
.copy:hover { border-color: var(--cyan); background: rgba(34, 224, 214, .06); }
.copy__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--grey);
}
.copy__value { font-family: var(--font-mono); font-size: 13px; color: var(--paper); word-break: break-all; }
.copy__state { margin-left: auto; font-size: 12px; color: var(--cyan); white-space: nowrap; }
.copy[data-copied="true"] { border-color: var(--orange); background: rgba(255, 122, 47, .08); }
.copy[data-copied="true"] .copy__state { color: var(--orange); }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  pointer-events: none;
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { position: relative; padding: 72px 0; }
.section--panel { background: var(--panel); }
.section--indigo { background: linear-gradient(160deg, var(--indigo), var(--panel)); }
.section--teal { background: linear-gradient(160deg, var(--teal), var(--panel)); }
.section--wine { background: linear-gradient(160deg, var(--wine), var(--panel)); }
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cyan);
}
.section__title { font-size: clamp(28px, 4vw, 40px); }
.lede { max-width: 680px; font-size: 17px; color: var(--silver); }
.prose { max-width: 680px; color: var(--silver); }
.prose p + p { margin-top: 16px; }
.prose ul, .prose ol { display: grid; gap: 8px; margin-top: 16px; }
.prose li { position: relative; padding-left: 16px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .74em;
  width: 6px;
  height: 1px;
  background: var(--cyan);
}
.numeric { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--7-5 { grid-template-columns: 7fr 5fr; }
.grid--8-4 { grid-template-columns: 8fr 4fr; }

.panel { background: var(--panel); border: 1px solid var(--line); padding: 24px; }
.card {
  position: relative;
  padding: 20px;
  background: linear-gradient(180deg, rgba(11, 18, 32, .96), rgba(5, 7, 14, .96));
  border: 1px solid var(--line);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 224, 214, .55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
.card__title { margin-bottom: 8px; font-size: 20px; }
.card__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--grey); }
.card__body { margin-top: 10px; font-size: 15px; color: var(--silver); }

.stat { display: grid; gap: 4px; }
.stat__value { font-family: var(--font-mono); font-size: 40px; line-height: 1; font-weight: 700; color: var(--paper); }
.stat__label { font-size: 13px; letter-spacing: .08em; color: var(--grey); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--silver);
}
.tag--cyan { border-color: rgba(34, 224, 214, .55); color: var(--cyan); }
.tag--orange { border-color: rgba(255, 122, 47, .6); color: var(--orange); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silver);
}
.badge--live { border-color: rgba(34, 224, 214, .5); color: var(--cyan); }
.badge--alert { border-color: rgba(255, 122, 47, .6); color: var(--orange); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, .7);
}
.filter-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--silver);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.filter-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.filter-btn[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: #04110F; }
[data-filter-item][hidden] { display: none; }

.breadcrumbs { margin: 28px 0 0; }
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--grey);
}
.breadcrumbs__item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs__item[aria-current="page"] { color: var(--silver); }
.breadcrumbs__link:hover { color: var(--cyan); }
.breadcrumbs__sep { color: var(--line-strong); }

.divider { height: 1px; margin: 0; border: 0; background: var(--line); }
.diagonal { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
.diagonal--rev { clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%); }
.float-card {
  position: relative;
  z-index: 3;
  border: 1px solid rgba(34, 224, 214, .4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}

.media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(34, 224, 214, .12), rgba(255, 122, 47, .10)), var(--panel-2);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(199, 206, 218, .07) 0 1px, transparent 1px 44px);
  pointer-events: none;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media__img { width: 100%; height: 100%; object-fit: cover; }
.media__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 14, .8);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--silver);
}

.disclosure { border: 1px solid var(--line); background: rgba(11, 18, 32, .6); }
.disclosure + .disclosure { margin-top: 10px; }
.disclosure__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.disclosure__summary::-webkit-details-marker { display: none; }
.disclosure__summary::after { content: "+"; font-family: var(--font-mono); color: var(--cyan); }
.disclosure[open] .disclosure__summary::after { content: "–"; }
.disclosure__body { padding: 0 16px 16px; font-size: 15px; color: var(--silver); }

.skeleton {
  height: 14px;
  background: linear-gradient(90deg, rgba(124, 135, 152, .16), rgba(124, 135, 152, .34), rgba(124, 135, 152, .16));
  background-size: 220% 100%;
  animation: sheen 1.6s linear infinite;
}
@keyframes sheen {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* ---------- reveal ---------- */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .skip-link { left: calc(var(--rail-w) + 12px); }
}

@media (max-width: 1023px) {
  body { padding-left: 0; }
  .rail {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 12px 18px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rail::after { display: none; }
  .rail__brand { flex: 1 1 auto; padding: 0; border-bottom: 0; }
  .rail__toggle { display: inline-flex; }
  .nav {
    flex: 0 0 100%;
    display: none;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 0 4px;
    border-top: 1px solid var(--line);
  }
  .rail[data-open] .nav { display: flex; }
  .rail__actions { margin-top: 12px; padding-top: 0; }
  .rail__meta { display: none; }
  .rail[data-open] .rail__meta {
    display: flex;
    flex: 0 0 100%;
    margin-top: 12px;
    padding: 14px 0 0;
  }
  .foot { margin-top: 72px; }
  .foot__grid { grid-template-columns: 1fr; gap: 36px; padding: 48px 24px 32px; }
}

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

@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .foot__grid { padding: 40px 18px 28px; }
  .foot__cols { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; }
  .foot__base { padding: 16px 18px 24px; }
  .section__title { font-size: 26px; }
  .stat__value { font-size: 32px; }
  .copy__state { margin-left: 0; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
