/* ============================================================
   新利体育赛事 — /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部轨道 / 页脚 / 基础组件
   ============================================================ */

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

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

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

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

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

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

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

table { border-collapse: collapse; }

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

/* ---------- 变量 ---------- */
:root {
  --pitch-900: #08251C;
  --pitch-700: #0E3B2C;
  --charcoal-900: #101317;
  --indigo-800: #17233F;
  --wine-800: #5A1E2C;
  --signal-orange: #FF6B1A;
  --warning-yellow: #F2C744;
  --cool-slate: #93A9BF;
  --paper: #F1F4F1;
  --glass-white: rgba(244, 246, 244, 0.08);

  --line: rgba(147, 169, 191, 0.22);
  --line-strong: rgba(147, 169, 191, 0.42);

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

  --rail-w: 216px;
  --head-h: 60px;
  --gap: 24px;
  --pad-x: clamp(18px, 4vw, 40px);
  --radius: 2px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 180ms;

  --density-scale: 1;
  --scroll: 0;
}

:root[data-density="compact"] { --density-scale: 0.82; }
:root[data-density="wide"] { --density-scale: 1.22; }

/* ---------- 基础排版 ---------- */
body {
  background: var(--pitch-900);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  padding-top: var(--head-h);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h1 { font-size: 96px; }
h2 { font-size: 40px; }
h3 { font-size: 28px; }
h4 { font-size: 20px; }

p { text-wrap: pretty; }

::selection {
  background: var(--signal-orange);
  color: var(--pitch-900);
}

.mono,
[data-mono] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.prose {
  max-width: 42em;
  color: var(--cool-slate);
}

.prose strong {
  color: var(--paper);
  font-weight: 700;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 999;
  display: inline-block;
  padding: 10px 18px;
  background: var(--signal-orange);
  color: var(--pitch-900);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: top 160ms var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ============================================================
   头部 / 轨道导航
   ============================================================ */
.site-header {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  height: var(--head-h);
  background: var(--pitch-900);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--pad-x);
}

/* --- 品牌 --- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.brand__mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  background: var(--signal-orange);
  color: var(--pitch-900);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand__name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--cool-slate);
  white-space: nowrap;
}

/* --- 移动端按钮 --- */
.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--signal-orange);
  background: var(--glass-white);
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
}

/* --- 导航 --- */
.site-nav {
  position: fixed;
  z-index: 79;
  top: var(--head-h);
  left: 0;
  right: 0;
  display: none;
  background: var(--pitch-900);
  border-bottom: 1px solid var(--line);
  padding: 10px var(--pad-x) 22px;
  max-height: calc(100vh - var(--head-h));
  overflow-y: auto;
}

.site-nav[data-open] {
  display: block;
}

.site-nav__list {
  display: block;
}

.site-nav__item + .site-nav__item {
  border-top: 1px solid var(--line);
}

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 12px 13px 14px;
  border-left: 2px solid transparent;
  color: var(--cool-slate);
  font-size: 16px;
  font-weight: 500;
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.nav-link:hover {
  color: var(--paper);
  border-left-color: var(--signal-orange);
  background: var(--glass-white);
}

.nav-link[aria-current="page"] {
  color: var(--paper);
  border-left-color: var(--signal-orange);
  background: linear-gradient(90deg, rgba(255, 107, 26, 0.16), rgba(255, 107, 26, 0) 72%);
}

.nav-link__code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cool-slate);
  opacity: 0.75;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-link[aria-current="page"] .nav-link__code,
.nav-link:hover .nav-link__code {
  color: var(--signal-orange);
  opacity: 1;
}

/* --- 头部工具区 --- */
.header__utility {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
  flex: 1 1 auto;
}

/* --- 轮次快讯 --- */
.ticker {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
}

.ticker__row {
  display: none;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker__row--live {
  display: flex;
  align-items: center;
}

.ticker__k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cool-slate);
}

.ticker__v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--paper);
}

.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--signal-orange);
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 26, 0.45);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 107, 26, 0);
    opacity: 0.6;
  }
}

/* --- 密度切换（桌面） --- */
.density {
  display: none;
  gap: 4px;
  flex-wrap: wrap;
}

.density__btn {
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--cool-slate);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.density__btn:hover {
  color: var(--paper);
  border-color: var(--signal-orange);
}

.density__btn[data-active] {
  color: var(--pitch-900);
  background: var(--signal-orange);
  border-color: var(--signal-orange);
}

/* --- 滚动进度 --- */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(147, 169, 191, 0.16);
  overflow: hidden;
  pointer-events: none;
}

.scroll-progress > i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--signal-orange);
  transform-origin: left center;
  transform: scaleX(var(--scroll, 0));
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: var(--charcoal-900);
  border-top: 1px solid var(--line);
  color: var(--cool-slate);
  font-size: 14px;
  padding: clamp(40px, 6vw, 76px) var(--pad-x) 28px;
  margin-top: clamp(48px, 8vw, 104px);
}

.footer__inner {
  max-width: 1240px;
  margin: 0 auto;
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px 28px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.footer__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--signal-orange);
  color: var(--charcoal-900);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  margin-bottom: 6px;
}

.footer__name {
  font-size: 18px;
  font-weight: 800;
  color: var(--paper);
  letter-spacing: 0.02em;
}

.footer__tag {
  font-size: 13px;
  color: var(--cool-slate);
}

.footer__badge {
  margin-top: 8px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--cool-slate);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--paper);
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

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

.footer__link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  color: var(--cool-slate);
  font-size: 14px;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  align-self: flex-start;
}

.footer__link:hover {
  color: var(--paper);
  border-bottom-color: var(--signal-orange);
}

.footer__code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(147, 169, 191, 0.6);
}

.footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__contact-list > li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(147, 169, 191, 0.7);
}

.footer__v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-word;
}

.footer__hint {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(147, 169, 191, 0.75);
}

.footer__bottom {
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(147, 169, 191, 0.72);
}

/* ============================================================
   通用布局与组件
   ============================================================ */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.container--wide {
  max-width: 1440px;
}

.section {
  padding-block: calc(clamp(44px, 6vw, 88px) * var(--density-scale));
}

.grid {
  display: grid;
  gap: calc(var(--gap) * var(--density-scale));
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

/* 章节编号与色带 */
.chapter {
  position: relative;
  padding-top: 34px;
}

.chapter__num {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--signal-orange);
}

.chapter__title {
  margin-top: 8px;
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 800;
}

.chapter__kicker {
  margin-top: 10px;
  max-width: 34em;
  color: var(--cool-slate);
  font-size: 15px;
}

.band {
  height: 12px;
  width: 100%;
  border-radius: var(--radius);
}

.band--indigo { background: linear-gradient(90deg, var(--indigo-800) 0%, rgba(23, 35, 63, 0) 100%); }
.band--wine { background: linear-gradient(90deg, var(--wine-800) 0%, rgba(90, 30, 44, 0) 100%); }
.band--signal { background: linear-gradient(90deg, var(--signal-orange) 0%, rgba(255, 107, 26, 0) 100%); }

/* 卡片与玻璃层 */
.card {
  background: var(--pitch-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: calc(20px * var(--density-scale));
}

.card--solid {
  background: var(--charcoal-900);
}

.glass {
  background: var(--glass-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: calc(18px * var(--density-scale));
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  white-space: nowrap;
}

.tag--warn {
  background: var(--warning-yellow);
  color: var(--charcoal-900);
  font-weight: 700;
}

.tag--live {
  background: rgba(255, 107, 26, 0.16);
  border: 1px solid rgba(255, 107, 26, 0.42);
  color: var(--signal-orange);
}

.tag--line {
  border: 1px solid var(--line-strong);
  color: var(--cool-slate);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.btn--primary {
  background: var(--signal-orange);
  color: var(--pitch-900);
}

.btn--primary:hover {
  background: #ff8140;
}

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

.btn--ghost:hover {
  border-color: var(--signal-orange);
  background: var(--glass-white);
}

/* 面包屑 */
.breadcrumb {
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cool-slate);
}

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

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(147, 169, 191, 0.5);
}

.breadcrumb a {
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.breadcrumb a:hover {
  color: var(--paper);
  border-bottom-color: var(--signal-orange);
}

/* 数据表 */
.data-table {
  width: 100%;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

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

.data-table th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--cool-slate);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(16, 19, 23, 0.55);
}

.data-table tbody tr:hover {
  background: rgba(255, 107, 26, 0.08);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* 图片容器基础规则 */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--charcoal-900);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

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

.media--placeholder {
  background-image:
    linear-gradient(rgba(147, 169, 191, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 169, 191, 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
  background-color: var(--charcoal-900);
}

/* 网格底纹 */
.grid-texture {
  background-image:
    linear-gradient(rgba(147, 169, 191, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 169, 191, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ============================================================
   响应式：平板
   ============================================================ */
@media (min-width: 640px) {
  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   响应式：桌面 — 左轨道
   ============================================================ */
@media (min-width: 1024px) {
  :root {
    --pad-x: 44px;
  }

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

  h1 { font-size: clamp(64px, 5.6vw, 96px); }

  .site-header {
    right: auto;
    bottom: 0;
    height: auto;
    width: var(--rail-w);
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 26px 20px 22px;
    height: 100%;
    overflow-y: auto;
  }

  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    display: block;
    padding: 0;
    margin-top: 26px;
    border-bottom: 0;
    max-height: none;
    overflow: visible;
    background: transparent;
  }

  .site-nav__item + .site-nav__item {
    border-top: 0;
  }

  .nav-link {
    font-size: 15px;
    padding: 10px 10px 10px 12px;
  }

  .header__utility {
    margin-left: 0;
    margin-top: auto;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .ticker__row {
    display: flex;
    gap: 8px;
  }

  .ticker__row--live {
    align-items: center;
  }

  .ticker__row + .ticker__row {
    margin-top: 6px;
  }

  .ticker__k {
    flex: 0 0 auto;
    min-width: 2.6em;
  }

  .ticker__v {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .density { display: flex; }

  .scroll-progress {
    left: auto;
    top: 0;
    bottom: 0;
    right: 0;
    width: 2px;
    height: auto;
  }

  .scroll-progress > i {
    height: 100%;
    width: 100%;
    transform-origin: top center;
    transform: scaleY(var(--scroll, 0));
  }

  .footer__top {
    grid-template-columns: 1.4fr 1fr 1fr 1.5fr;
    gap: 40px 32px;
  }
}

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

  .dot { animation: none; box-shadow: none; opacity: 1; }
  .scroll-progress > i { transition: none; }
}
