/* ==========================================================================
   平博赛场 / assets/site.css
   共享外壳：框架式导轨导航、页脚、排版基座、通用组件
   ========================================================================== */

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

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

body { margin: 0; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }

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

img, svg, video { max-width: 100%; height: auto; }

button { font: inherit; color: inherit; background: none; border: 0; }

a { color: inherit; }

main { display: block; }

[hidden] { display: none !important; }

/* ---------- tokens ---------- */
:root {
  --turf-deep: #0A3A2A;
  --turf-mid: #12513A;
  --turf-bright: #1C7A56;
  --ref-red: #D42B3C;
  --whistle: #F5C518;
  --fluoro: #33E6C0;
  --cool-gray: #93A4A0;
  --paper: #F5F1E6;
  --ink: #07130E;
  --glass: rgba(245, 241, 230, 0.08);

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

  --rail-w: 238px;
  --shell-w: 1180px;
  --gutter: clamp(18px, 3.4vw, 46px);
}

/* ---------- base ---------- */
body {
  padding-left: var(--rail-w);
  background-color: var(--turf-deep);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:focus-visible {
  outline: 2px solid var(--whistle);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.stat {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--whistle);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fluoro);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 11px 20px;
  background: var(--whistle);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

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

/* ==========================================================================
   框架式导轨导航
   ========================================================================== */
.site-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  width: var(--rail-w);
  display: flex;
  background:
    linear-gradient(180deg, #0C4534 0%, var(--turf-deep) 52%, var(--ink) 100%);
  border-right: 1px solid var(--turf-bright);
}

.rail__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 24px 0 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--turf-bright) transparent;
}

.rail__inner::-webkit-scrollbar { width: 6px; }
.rail__inner::-webkit-scrollbar-thumb { background: var(--turf-bright); }

/* 品牌 */
.rail__brand {
  padding: 0 22px 20px;
  border-bottom: 1px solid rgba(28, 122, 86, 0.45);
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}

.brand__mark {
  position: relative;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  margin-top: 3px;
  border: 2px solid var(--whistle);
  transition: border-color 0.2s ease;
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--ref-red);
  transition: background-color 0.2s ease;
}

.brand:hover .brand__mark { border-color: var(--ref-red); }
.brand:hover .brand__mark::after { background: var(--whistle); }

.brand__text { display: block; min-width: 0; }

.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.05;
}

.brand__tag {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  line-height: 1.55;
  color: var(--cool-gray);
}

/* 移动端开关 */
.rail__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-right: 16px;
  padding: 9px 13px;
  border: 1px solid var(--turf-bright);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.rail__toggle:hover { border-color: var(--whistle); color: var(--whistle); }

.rail__toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 12px;
}

.rail__toggle-bars i {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.rail__toggle-bars i:nth-child(1) { top: 0; }
.rail__toggle-bars i:nth-child(2) { top: 5px; }
.rail__toggle-bars i:nth-child(3) { top: 10px; }

.site-rail[data-open] .rail__toggle-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-rail[data-open] .rail__toggle-bars i:nth-child(2) { opacity: 0; }
.site-rail[data-open] .rail__toggle-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 导航 */
.rail__nav { padding-top: 20px; }

.rail__nav-label {
  margin: 0 0 10px;
  padding: 0 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cool-gray);
}

.nav-list { display: block; }

.nav-list a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 22px;
  color: var(--paper);
  font-size: 14.5px;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-list a::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: transparent;
  transition: background-color 0.18s ease, width 0.18s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--glass);
}

.nav-list a:hover::before,
.nav-list a:focus-visible::before {
  background: var(--ref-red);
}

.nav-list__idx {
  flex: 0 0 20px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--cool-gray);
  transition: color 0.18s ease;
}

.nav-list__label { display: block; }

.nav-list a[aria-current="page"] {
  background: var(--glass);
  color: var(--whistle);
}

.nav-list a[aria-current="page"]::before {
  width: 4px;
  background: var(--ref-red);
}

.nav-list a[aria-current="page"] .nav-list__idx { color: var(--ref-red); }

/* 工具区 */
.rail__utility {
  margin-top: auto;
  padding: 22px 22px 0;
}

.season { position: relative; }

.season__toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  background: var(--glass);
  border: 1px solid var(--turf-bright);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.season__toggle:hover { border-color: var(--ref-red); }
.season__toggle[aria-expanded="true"] { border-color: var(--whistle); }

.season__kicker {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--cool-gray);
}

.season__value { color: var(--whistle); font-weight: 700; }

.season__caret {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.season__toggle[aria-expanded="true"] .season__caret {
  transform: rotate(-135deg) translateY(-1px);
}

.season__menu {
  margin-top: 6px;
  max-height: 186px;
  overflow-y: auto;
  background: #0C4534;
  border: 1px solid var(--turf-bright);
}

.season__opt {
  display: block;
  width: 100%;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(28, 122, 86, 0.35);
  border-left: 2px solid transparent;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.season__opt:last-child { border-bottom: 0; }

.season__opt:hover { background: var(--glass); color: var(--whistle); }

.season__opt[aria-pressed="true"],
.season__opt.is-current {
  border-left-color: var(--ref-red);
  color: var(--whistle);
  background: var(--glass);
}

.rail__search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px dashed rgba(28, 122, 86, 0.8);
  color: var(--cool-gray);
  font-size: 12.5px;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.rail__search .mono {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--turf-bright);
  transition: color 0.18s ease;
}

.rail__search:hover { color: var(--whistle); border-color: var(--whistle); }
.rail__search:hover .mono { color: var(--whistle); }

.rail__coords {
  margin: 18px 22px 0;
  padding-top: 14px;
  border-top: 1px solid rgba(28, 122, 86, 0.4);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--turf-bright);
}

/* 刻度与进度 */
.rail__ticks {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 11px;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--turf-bright) 0 1px,
    transparent 1px 26px
  );
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
}

.rail__progress {
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: var(--ref-red);
  transform-origin: top center;
  transform: scaleY(var(--p, 0));
  pointer-events: none;
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-foot {
  position: relative;
  margin-top: 0;
  background: var(--ink);
  color: var(--paper);
  border-top: 2px solid var(--turf-bright);
}

.site-foot::before {
  content: "";
  display: block;
  height: 7px;
  background-image: repeating-linear-gradient(
    to right,
    var(--turf-bright) 0 2px,
    transparent 2px 18px
  );
  opacity: 0.55;
}

.foot__grid {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(104px, 0.72fr)) minmax(200px, 1.25fr);
  gap: clamp(20px, 2.6vw, 40px);
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: clamp(36px, 4.6vw, 60px) var(--gutter) clamp(24px, 3vw, 36px);
}

.foot__brandline {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.foot__sub {
  margin-top: 10px;
  max-width: 24ch;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--cool-gray);
}

.foot__legend {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--turf-bright);
}

.foot__legend-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  background: var(--fluoro);
}

.foot__coltitle {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 15px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.foot__coltitle .mono {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ref-red);
}

.foot__col li { margin-bottom: 9px; }

.foot__col a {
  display: inline-block;
  padding-bottom: 2px;
  color: var(--cool-gray);
  font-size: 14px;
  text-decoration: none;
  background-image: linear-gradient(var(--whistle), var(--whistle));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 0.22s ease, color 0.18s ease;
}

.foot__col a:hover,
.foot__col a:focus-visible {
  color: var(--paper);
  background-size: 100% 1px;
}

.foot__contact-list li {
  display: flex;
  gap: 10px;
  margin-bottom: 11px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--cool-gray);
}

.ft-label {
  flex: 0 0 40px;
  padding-top: 4px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--turf-bright);
}

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 26px;
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: 16px var(--gutter) 34px;
  border-top: 1px solid rgba(28, 122, 86, 0.45);
}

.foot__legal-line {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cool-gray);
}

.foot__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.foot__legal-links a {
  color: var(--cool-gray);
  font-size: 12.5px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.foot__legal-links a:hover,
.foot__legal-links a:focus-visible {
  color: var(--whistle);
  border-bottom-color: var(--whistle);
}

/* ==========================================================================
   通用版式与组件
   ========================================================================== */
.page-shell {
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(42px, 5.6vw, 78px) 0; }

.rule {
  height: 1px;
  border: 0;
  background: var(--turf-bright);
  opacity: 0.7;
}

.sec-head {
  display: flex;
  align-items: baseline;
  gap: clamp(12px, 1.6vw, 22px);
  margin-bottom: clamp(18px, 2.2vw, 30px);
}

.sec-head__idx {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ref-red);
}

.sec-head__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.note {
  padding-left: 14px;
  border-left: 2px solid var(--turf-bright);
  color: var(--cool-gray);
  font-size: 13px;
  line-height: 1.75;
}

/* 框景容器 */
.frame {
  position: relative;
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--turf-bright);
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid var(--whistle);
  pointer-events: none;
}

.frame::before {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
}

.frame::after {
  right: -2px;
  bottom: -2px;
  border-left: 0;
  border-top: 0;
}

/* 面板 */
.panel {
  padding: clamp(18px, 2.4vw, 30px);
  background: var(--turf-mid);
}

.panel--glass {
  background: var(--glass);
  border: 1px solid var(--turf-bright);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.panel--paper {
  background: var(--paper);
  color: var(--ink);
}

.panel--paper .note,
.panel--paper .media__cap { color: #4A5A55; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn--primary {
  background: var(--ref-red);
  color: #FFFFFF;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--whistle);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  border-color: var(--turf-bright);
  color: var(--paper);
}

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

/* 网格 */
.grid {
  display: grid;
  gap: clamp(16px, 2vw, 26px);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cool-gray);
}

.crumbs li { display: flex; align-items: center; gap: 8px; }

.crumbs li:not(:first-child)::before {
  content: "/";
  color: var(--turf-bright);
}

.crumbs a {
  color: var(--cool-gray);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.crumbs a:hover,
.crumbs a:focus-visible {
  color: var(--whistle);
  border-bottom-color: var(--whistle);
}

/* 页面内章节锚点导航协议 */
[data-section-link] {
  transition: color 0.18s ease, border-color 0.18s ease;
}

[data-section-link].is-active {
  color: var(--whistle);
}

/* 图片容器基座 */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--turf-mid);
  border: 1px solid var(--turf-bright);
}

.media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }

.media--framed::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(245, 241, 230, 0.22);
  pointer-events: none;
}

.media--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(51, 230, 192, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 230, 192, 0.18) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
}

.media__cap {
  display: block;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--cool-gray);
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1100px) {
  .foot__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot__brand { grid-column: 1 / -1; }
  .foot__contact { grid-column: 1 / -1; }
}

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

  body { padding-left: 0; }

  .site-rail {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--turf-bright);
    background: var(--turf-deep);
  }

  .rail__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav"
      "util util";
    align-items: center;
    height: auto;
    padding: 0;
    overflow: visible;
  }

  .rail__brand {
    grid-area: brand;
    padding: 12px 16px;
    border-bottom: 0;
    min-width: 0;
  }

  .brand__name { font-size: 19px; }
  .brand__tag { margin-top: 4px; font-size: 10px; }
  .brand__mark { flex-basis: 22px; width: 22px; height: 22px; }

  .rail__toggle {
    grid-area: toggle;
    display: inline-flex;
    align-self: center;
  }

  .rail__nav {
    grid-area: nav;
    display: none;
    padding: 10px 0 6px;
    border-top: 1px solid rgba(28, 122, 86, 0.5);
  }

  .rail__nav-label { padding: 0 16px; }

  .nav-list a { padding: 12px 16px; }

  .rail__utility {
    grid-area: util;
    display: none;
    margin-top: 0;
    padding: 0 16px 18px;
  }

  .rail__coords { display: none; }

  .rail__ticks { display: none; }

  .rail__progress {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3px;
    transform-origin: left center;
    transform: scaleX(var(--p, 0));
  }

  .site-rail[data-open] .rail__nav,
  .site-rail[data-open] .rail__utility {
    display: block;
  }

  .season__menu { max-height: 168px; }

  html { scroll-padding-top: 96px; }
}

@media (max-width: 560px) {
  .foot__grid { grid-template-columns: 1fr; }

  .foot__contact-list li { flex-direction: column; gap: 3px; }

  .ft-label { flex: none; padding-top: 0; }

  .foot__legal { flex-direction: column; align-items: flex-start; }
}

/* ---------- 动效偏好 ---------- */
@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;
  }
}
