/* =========================================================
   优德赛事中心 · 共享样式表 /assets/site.css
   夜间赛场指挥中心：墨绿底 + 荧光青柠 + 信号橙
   ========================================================= */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--pitch);
  color: var(--mist);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -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, picture, svg, video { display: block; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

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

:target { scroll-margin-top: 118px; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  --pitch: #06110D;
  --stand: #0B1F17;
  --line: #1C3A2C;
  --lime: #C6FF3D;
  --lime-mist: #16301F;
  --orange: #FF6A2B;
  --mist: #EAF3EC;
  --grey: #8FA79A;
  --paper: #F2F6F1;
  --ink: #10201A;

  --frame-bar: 48px;
  --frame-nav: 44px;
  --frame-h: 93px;
  --rail-w: 240px;

  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "Roboto Mono", Menlo, Consolas, "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 浅色阅读底：整站令牌翻转，只由页面按钮触发 */
html[data-theme="paper"] {
  --pitch: #F2F6F1;
  --stand: #E7EEE6;
  --line: #C5D4C8;
  --lime: #3B6B10;
  --lime-mist: #DDEBC6;
  --orange: #B84210;
  --mist: #10201A;
  --grey: #4E6A59;
}

/* ---------- 3. 排版基元 ---------- */
.mono,
.version-badge,
.stat__value,
.section__num,
.data-table th,
.footer__heading {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

b, strong { font-weight: 600; }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  display: block;
  padding: 10px 16px;
  background: var(--lime);
  color: #06110D;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 页头框架 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--pitch);
  border-bottom: 1px solid var(--line);
}

.site-header__progress {
  display: block;
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--lime);
  width: 0;
}

/* 状态条 */
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--frame-bar);
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding-right: 12px;
  margin-right: 2px;
  border-right: 1px solid var(--line);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  background: var(--lime);
  color: #06110D;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--mist);
  white-space: nowrap;
}

.brand__sub {
  display: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grey);
  white-space: nowrap;
}

@media (min-width: 1080px) {
  .brand__sub { display: inline; }
}

.version-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--lime);
  background: var(--lime-mist);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.status-bar__section {
  display: none;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--grey);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.status-bar__section::before {
  content: "—";
  margin-right: 8px;
  color: var(--line);
}

@media (min-width: 1024px) {
  .status-bar__section { display: block; }
}

.status-bar__quick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--grey);
  text-decoration: none;
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: color 120ms linear, background-color 120ms linear, border-color 120ms linear;
}

.quick-link:hover,
.quick-link:focus-visible {
  color: #06110D;
  background: var(--lime);
  border-color: var(--lime);
}

/* 移动端栏目开关 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grey);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: color 120ms linear, border-color 120ms linear;
}

.nav-toggle__bars {
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 -4px 0 currentColor, 0 4px 0 currentColor;
}

.nav-toggle[aria-expanded="true"] {
  color: var(--lime);
  border-color: var(--lime);
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}

/* 栏目条 */
.site-nav {
  background: var(--stand);
}

.site-nav__list {
  display: flex;
  align-items: stretch;
  height: var(--frame-nav);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.site-nav__list::-webkit-scrollbar { display: none; }

.site-nav__list > li { display: flex; }

.site-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--frame-nav);
  padding: 0 18px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--grey);
  text-decoration: none;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  transition: color 120ms linear, background-color 120ms linear;
}

.site-nav__list > li:first-child .site-nav__link {
  border-left: 1px solid var(--line);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--mist);
  background: var(--lime-mist);
}

.site-nav__link[aria-current="page"] {
  color: var(--lime);
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--lime);
}

@media (max-width: 1023px) {
  .site-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 200ms ease;
  }
  .site-nav[data-open="true"] { max-height: 320px; }
  .site-nav__list { width: 100%; }
  .site-nav__link { padding: 0 14px; }
}

@media (min-width: 1024px) {
  .site-nav[data-open] { max-height: none; }
}

/* ---------- 6. 仪表盘骨架 ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  align-items: start;
  max-width: 1560px;
  margin: 0 auto;
}

.rail {
  position: sticky;
  top: var(--frame-h);
  max-height: calc(100vh - var(--frame-h) - 16px);
  overflow-y: auto;
  padding: 22px 16px 28px;
  background: var(--pitch);
  border-right: 1px solid var(--line);
}

.rail__title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.rail__list { display: flex; flex-direction: column; }

.rail__link {
  display: block;
  padding: 7px 0;
  font-size: 13px;
  color: var(--grey);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

.rail__link:hover,
.rail__link[aria-current="true"] {
  color: var(--lime);
}

.content {
  min-width: 0;
  padding: 24px 16px 0;
}

@media (min-width: 1024px) {
  .content { padding: 30px 26px 0; }
}

@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: static;
    max-height: none;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail__title {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border-bottom: 0;
  }
  .rail__list { flex-direction: row; gap: 8px; }
  .rail__link {
    padding: 4px 10px;
    border: 1px solid var(--line);
    white-space: nowrap;
  }
  .rail__link[aria-current="true"] { border-color: var(--lime); }
}

/* ---------- 7. 章节头 ---------- */
.section { margin-bottom: 28px; }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section__num {
  font-size: 13px;
  font-weight: 700;
  color: var(--lime);
}

.section__title {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--mist);
}

.section__sub {
  flex: 1 1 240px;
  font-size: 13px;
  color: var(--grey);
  letter-spacing: 0.04em;
}

@media (max-width: 639px) {
  .section__title { font-size: 22px; }
}

/* ---------- 8. Bento 网格与卡片 ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  grid-column: span 1;
  padding: 18px;
  background: var(--stand);
  border: 1px solid var(--line);
  transition: border-color 140ms linear, background-color 140ms linear;
}

.card:hover { border-color: #2C5A44; }

.card--wide { grid-column: span 2; }
.card--tall { grid-row: span 2; }
.card--focus { border-color: var(--lime); }

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  margin-bottom: 12px;
}

.card__title {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--mist);
}

.card__body {
  font-size: 15px;
  color: var(--mist);
  flex: 1 1 auto;
}

.card__body p + p { margin-top: 8px; }

.card__body ul { list-style: none; }

.card__body ul li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.card__body ul li:last-child { border-bottom: 0; }

.card__meta {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grey);
}

@media (max-width: 1023px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--tall { grid-row: auto; }
}

@media (max-width: 639px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .card--wide { grid-column: span 1; }
}

/* ---------- 9. 数据块 ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.stat__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.stat__value {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--lime);
}

.stat__value--big { font-size: 56px; letter-spacing: -0.02em; }
.stat__value--away { color: var(--orange); }

.stat__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grey);
}

@media (min-width: 900px) {
  .stat__value--big { font-size: 72px; }
}

/* ---------- 10. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grey);
  background: var(--lime-mist);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.tag--lime {
  color: #06110D;
  background: var(--lime);
  border-color: var(--lime);
  font-weight: 600;
}

.tag--orange {
  color: #1A0A02;
  background: var(--orange);
  border-color: var(--orange);
  font-weight: 600;
}

/* ---------- 11. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--mist);
  background: transparent;
  transition: color 120ms linear, background-color 120ms linear, border-color 120ms linear;
}

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

.btn--primary {
  color: #06110D;
  background: var(--lime);
  border-color: var(--lime);
  font-weight: 600;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  color: #06110D;
  background: #D9FF74;
  border-color: #D9FF74;
}

.btn--ghost { color: var(--grey); }

.btn--sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grey);
}

.breadcrumb__list > li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}

.breadcrumb__link {
  color: var(--grey);
  text-decoration: none;
}

.breadcrumb__link:hover { color: var(--lime); }

/* ---------- 13. 页内目录 ---------- */
.toc {
  padding: 14px 16px;
  background: var(--stand);
  border: 1px solid var(--line);
  border-left: 2px solid var(--lime);
}

.toc__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toc__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--grey);
  text-decoration: none;
  border: 1px solid var(--line);
  transition: color 120ms linear, border-color 120ms linear;
}

.toc__link:hover { color: var(--mist); border-color: var(--grey); }

.toc__link[aria-current="true"] {
  color: #06110D;
  background: var(--lime);
  border-color: var(--lime);
  font-weight: 600;
}

/* ---------- 14. 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--lime-mist);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  border: 1px solid var(--line);
}

.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 9 / 16; }

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.06) brightness(0.9);
}

.media__caption {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--grey);
}

/* ---------- 15. 数据表 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.data-table {
  min-width: 520px;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  background: var(--lime-mist);
}

.data-table td { color: var(--mist); }

.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table tbody tr:hover { background: var(--lime-mist); }

/* ---------- 16. 长文阅读 ---------- */
.prose {
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.85;
  color: var(--mist);
}

.prose h2 {
  margin: 36px 0 12px;
  padding-top: 16px;
  font-size: 24px;
  line-height: 1.35;
  border-top: 1px solid var(--line);
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 19px;
  line-height: 1.4;
}

.prose p { margin: 0 0 16px; }

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li { margin-bottom: 6px; }

.prose strong { color: var(--lime); font-weight: 600; }

.prose a {
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

/* ---------- 17. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 140;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #06110D;
  background: var(--lime);
  border: 1px solid var(--lime);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms linear, visibility 160ms linear;
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
}

/* ---------- 18. 页脚 ---------- */
.site-footer {
  margin-top: 64px;
  background: var(--stand);
  border-top: 1px solid var(--line);
}

.footer__inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 42px 16px 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 32px 24px;
}

.footer__col { min-width: 0; }

.site-footer .brand {
  border-right: 0;
  padding-right: 0;
  margin: 0 0 14px;
}

.footer__tagline {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--grey);
  line-height: 1.8;
}

.footer__heading {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}

.footer__list li { margin-bottom: 8px; }

.footer__list a {
  font-size: 14px;
  color: var(--grey);
  text-decoration: none;
  transition: color 120ms linear;
}

.footer__list a:hover,
.footer__list a:focus-visible { color: var(--lime); }

.footer__meta {
  font-size: 13px;
  line-height: 1.9;
  color: var(--grey);
  overflow-wrap: break-word;
}

.footer__meta a { color: var(--mist); text-decoration: none; }

.footer__service {
  margin-top: 30px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--grey);
  background: var(--pitch);
  border: 1px solid var(--line);
  border-left: 2px solid var(--lime);
}

.footer__note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--grey);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
  padding: 16px 0 34px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grey);
  border-top: 1px solid var(--line);
}

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

@media (max-width: 639px) {
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .footer__inner { padding-top: 32px; }
  .site-footer { margin-top: 48px; }
}

/* ---------- 19. 动效降级 ---------- */
@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;
  }
}
