/* ============================================================
   BC赛场 · 共享样式 /assets/site.css
   高原夜空深蓝底 + 经幡五色状态位 + 记分牌式粗边硬阴影
   ============================================================ */

:root {
  --night: #0B1B33;
  --night-deep: #07121F;
  --board: #12294A;
  --snow: #F4F7FB;
  --orange: #FF7A1A;
  --orange-soft: #FF8E3D;
  --cyan: #3FD0D4;
  --yellow: #E8B33A;
  --red: #E24B3C;
  --green: #2E9E6B;
  --mist: #C7D6E8;
  --ink: #16233A;
  --edge: #0A0F18;

  --line: rgba(199, 214, 232, 0.22);
  --line-cy: rgba(63, 208, 212, 0.38);
  --mist-dim: rgba(199, 214, 232, 0.7);

  --shadow: 6px 6px 0 var(--edge);
  --shadow-sm: 3px 3px 0 var(--edge);
  --shadow-cy: 3px 3px 0 rgba(63, 208, 212, 0.35);
  --radius: 4px;

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

  --wrap: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--mist);
  background-color: var(--night);
  background-image:
    linear-gradient(rgba(63, 208, 212, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 208, 212, 0.045) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }

::selection { background: var(--orange); color: #1A0D02; }

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

/* ---------- 容器 ---------- */
.wrap {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 300;
  padding: 0.6rem 1.1rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #1A0D02;
  background: var(--orange);
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: top 0.22s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { top: 0.75rem; }

/* ============================================================
   页头
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  color: var(--snow);
  background: var(--night);
  border-bottom: 2px solid var(--edge);
  box-shadow: 0 5px 0 rgba(10, 15, 24, 0.55);
  transition: box-shadow 0.24s var(--ease);
}
.site-header[data-stuck="true"] {
  box-shadow: 0 8px 0 rgba(10, 15, 24, 0.75), 0 0 0 2px rgba(63, 208, 212, 0.18);
}

/* 顶部属性条 */
.header-rail {
  background: var(--night-deep);
  border-bottom: 1px solid var(--line);
}
.rail-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 34px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist-dim);
}
.rail-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}
.rail-tag--code { color: var(--yellow); }
.rail-tag--live { color: var(--cyan); }
.rail-tag:last-child { margin-left: auto; }
.rail-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--cyan);
  box-shadow: 0 0 0 2px rgba(63, 208, 212, 0.25);
  animation: railPulse 2.4s ease-in-out infinite;
}
@keyframes railPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 刊头 */
.masthead { position: relative; }
.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-block: 1.15rem 0.95rem;
  transition: padding 0.24s var(--ease);
}
.masthead-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist-dim);
}
.masthead-num { color: var(--yellow); }

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  justify-self: center;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.85rem, 4.4vw, 2.85rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--snow);
  transition: font-size 0.24s var(--ease), color 0.18s var(--ease);
}
.brand:hover { color: #FFFFFF; }
.brand-code {
  font-family: var(--font-mono);
  font-size: 0.44em;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan);
}
.brand-name { display: inline-block; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mist-dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}
.header-cta {
  font-size: 0.8125rem;
  padding: 0.55rem 0.95rem;
  white-space: nowrap;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--snow);
  background: var(--board);
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.nav-toggle:hover { background: #18365E; }
.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 1rem;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--cyan);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.nav-toggle-text { line-height: 1; }

/* 导航 */
.nav-wrap { border-top: 1px solid var(--line-cy); }
.site-nav { display: block; }
.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding-block: 0.5rem;
}
.nav-item { display: block; }
.nav-link {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--mist);
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav-link:hover {
  color: var(--snow);
  background: rgba(63, 208, 212, 0.12);
}
.nav-link[aria-current="page"] {
  color: var(--yellow);
  border-bottom-color: var(--orange);
  background: rgba(255, 122, 26, 0.08);
}

/* 滚动进度 */
.scroll-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(63, 208, 212, 0.14);
  pointer-events: none;
}
.scroll-thumb {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
}

/* 吸顶收窄 */
.site-header[data-stuck="true"] .header-rail { display: none; }
.site-header[data-stuck="true"] .masthead-inner { padding-block: 0.5rem; }
.site-header[data-stuck="true"] .brand { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
.site-header[data-stuck="true"] .brand-sub { display: none; }
.site-header[data-stuck="true"] .nav-list { padding-block: 0.2rem; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--edge); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.btn--primary { background: var(--orange); color: #1A0D02; }
.btn--primary:hover { background: var(--orange-soft); }
.btn--ghost {
  background: transparent;
  color: var(--snow);
  border-color: var(--cyan);
  box-shadow: var(--shadow-cy);
}
.btn--ghost:hover { box-shadow: 5px 5px 0 rgba(63, 208, 212, 0.4); }
.btn--dark { background: var(--board); color: var(--snow); }
.btn--block { width: 100%; }

.section--light .btn--ghost,
.panel--light .btn--ghost {
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 rgba(10, 15, 24, 0.25);
}

/* ============================================================
   区块与标题
   ============================================================ */
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section--light { background: var(--snow); color: var(--ink); }
.section--board { background: var(--board); color: var(--snow); }

.section-head {
  max-width: 52rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.section-kicker {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.15rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1A1300;
  background: var(--yellow);
  border: 1px solid var(--edge);
  border-radius: 2px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.section-lead {
  margin-top: 0.85rem;
  max-width: 40em;
  font-size: 1.0625rem;
  opacity: 0.88;
}

/* ============================================================
   卡片 / 标签 / 清单
   ============================================================ */
.panel {
  padding: clamp(1.1rem, 2.4vw, 1.75rem);
  background: var(--board);
  color: var(--snow);
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel--light { background: var(--snow); color: var(--ink); }
.panel--cyan {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(63, 208, 212, 0.22), var(--shadow);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--snow);
  background: var(--board);
  border: 1px solid var(--edge);
  border-radius: 2px;
}
.tag--yellow { background: var(--yellow); color: #1A1300; }
.tag--cyan { background: var(--cyan); color: #06232A; }
.tag--red { background: var(--red); color: #FFFFFF; }
.tag--green { background: var(--green); color: #04231A; }
.tag--orange { background: var(--orange); color: #1A0D02; }

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--snow);
  background: var(--board);
  border: 1px solid var(--line-cy);
  border-radius: 2px;
}

.meta-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.list-line { display: grid; gap: 0.6rem; }
.list-line > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  font-size: 1rem;
  line-height: 1.7;
}
.list-line > li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.6rem;
  background: var(--yellow);
}
.section--light .list-line > li::before { background: var(--orange); }

.divider {
  height: 2px;
  border: 0;
  margin-block: 1.5rem;
  background: linear-gradient(90deg, var(--cyan), rgba(63, 208, 212, 0));
}

/* ============================================================
   面包屑
   ============================================================ */
.crumbs {
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.crumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist-dim);
}
.crumbs-item { display: inline-flex; align-items: center; gap: 0.45rem; }
.crumbs-item + .crumbs-item::before { content: "/"; color: var(--cyan); }
.crumbs-link { color: var(--mist); }
.crumbs-link:hover { color: var(--orange); }
.crumbs-current { color: var(--snow); }
.section--light .crumbs-list { color: rgba(22, 35, 58, 0.65); }
.section--light .crumbs-current { color: var(--ink); }

/* ============================================================
   网格 / 堆叠 / 正文
   ============================================================ */
.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); align-items: start; }
.grid--index { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.stack > * + * { margin-top: 1rem; }
.stack--tight > * + * { margin-top: 0.5rem; }

.prose {
  max-width: 38em;
  font-size: 1.0625rem;
  line-height: 1.85;
}
.prose p + p { margin-top: 1.05em; }
.prose ul,
.prose ol { margin-top: 0.85em; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose strong { color: var(--snow); font-weight: 700; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.section--light .prose,
.panel--light .prose { color: var(--ink); }
.section--light .prose strong,
.panel--light .prose strong { color: var(--ink); }
.section--light .prose a,
.panel--light .prose a { color: #0B5F62; }

/* ============================================================
   图片容器基础
   ============================================================ */
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--board);
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.media-frame > img,
.media-frame > picture,
.media-frame > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame > picture { height: 100%; }
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--std { aspect-ratio: 4 / 3; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--tilt { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
.media-caption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--mist-dim);
}
.section--light .media-caption,
.panel--light .media-caption { color: rgba(22, 35, 58, 0.68); }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  background: var(--night-deep);
  border-top: 2px solid var(--edge);
  color: var(--mist);
}
.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--cyan) 0 25%,
    var(--yellow) 25% 50%,
    var(--red) 50% 75%,
    var(--green) 75% 100%
  );
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.1fr 1fr;
  gap: 2rem;
  padding-block: clamp(2rem, 4vw, 3rem) 2.25rem;
}
.footer-col { min-width: 0; }
.footer-title {
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-list { display: grid; gap: 0.3rem; }
.footer-list--chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}
.footer-list--contact { gap: 0.75rem; }

.footer-link {
  display: inline-block;
  padding-block: 0.2rem;
  font-size: 0.9375rem;
  color: var(--mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer-link:hover {
  color: var(--snow);
  border-bottom-color: var(--orange);
}
.footer-link--cta {
  margin-top: 1rem;
  padding: 0.35rem 0.8rem;
  font-weight: 700;
  color: #1A0D02;
  background: var(--orange);
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.footer-link--cta:hover {
  color: #1A0D02;
  background: var(--orange-soft);
  border-bottom-color: var(--edge);
}

.footer-contact-item {
  display: grid;
  gap: 0.1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.footer-key {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
}
.footer-val { color: var(--snow); word-break: break-word; }

.footer-note {
  margin-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--mist-dim);
}

.footer-base {
  background: #050B14;
  border-top: 1px solid var(--line);
}
.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.5rem;
  padding-block: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--mist-dim);
}
.footer-icp { color: var(--yellow); }
.footer-copy { margin-left: auto; }

/* ============================================================
   滚动显现
   ============================================================ */
[data-js="on"] [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
[data-js="on"] [data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: none;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .grid--split { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col--legal { grid-column: 1 / -1; }
}

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

@media (max-width: 860px) {
  .masthead-inner {
    grid-template-columns: auto 1fr;
    grid-template-areas: "brand actions";
    gap: 0.75rem;
    padding-block: 0.8rem;
  }
  .masthead-meta { display: none; }
  .brand-block { grid-area: brand; justify-self: start; align-items: flex-start; }
  .header-actions { grid-area: actions; justify-self: end; }
  .header-cta { font-size: 0.75rem; padding: 0.45rem 0.7rem; }
  .nav-toggle { display: inline-flex; }

  .site-nav { display: none; }
  .site-nav[data-open="true"] {
    display: block;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 0.4rem 0.7rem;
  }
  .nav-link {
    display: block;
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
  }
  .nav-link:hover { background: rgba(63, 208, 212, 0.1); }
  .nav-link[aria-current="page"] {
    border-bottom-color: var(--line);
    border-left-color: var(--orange);
  }
  .site-header[data-stuck="true"] .brand-sub { display: none; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 1.5rem); }
  body { font-size: 1rem; }
  .rail-tag:not(.rail-tag--live) { display: none; }
  .rail-tag:last-child { margin-left: 0; }
  .rail-inner { gap: 1rem; }
  .brand-sub { display: none; }
  .nav-toggle-text { display: none; }
  .nav-toggle { padding: 0.45rem 0.55rem; }
  .brand { font-size: clamp(1.6rem, 8vw, 2.1rem); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; padding-block: 2.25rem 1.75rem; }
  .footer-col--legal { grid-column: auto; }
  .footer-base-inner { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .footer-copy { margin-left: 0; }
}

/* ============================================================
   可访问性：减少动态
   ============================================================ */
@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;
  }
  .rail-dot { animation: none; }
  .btn:hover,
  .btn:active { transform: none; }
  [data-js="on"] [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .scroll-thumb { transition: none; }
}
