/* ============================================================
   易贝体育主站 · 共享样式 /assets/site.css
   设计母题：擦亮的战术板 + 记分牌
   ============================================================ */

:root {
  --green-ink: #0E2A22;
  --green-mid: #14382E;
  --red: #D7263D;
  --red-soft: #ef344d;
  --yellow: #F2C230;
  --paper: #F7F5EE;
  --gray-light: #E3E8E5;
  --gray-mid: #9AA8A2;
  --gray-dark: #4B5A54;
  --glass: rgba(247, 245, 238, 0.10);
  --line: rgba(247, 245, 238, 0.22);
  --line-strong: rgba(247, 245, 238, 0.38);

  --rail-w: 88px;
  --bar-h: 56px;
  --page-max: 1240px;

  --radius-s: 4px;
  --radius-m: 10px;
  --radius-l: 18px;

  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  --num: "Helvetica Neue", "Arial Narrow", Arial, "Segoe UI", sans-serif;

  --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;
  padding-top: var(--bar-h);
  min-height: 100vh;
  background: var(--green-ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

button { font: inherit; }

::selection { background: var(--red); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ------------------------- 布局外壳 ------------------------- */
@media (min-width: 900px) {
  body {
    padding-left: var(--rail-w);
    padding-top: var(--bar-h);
  }
}

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 720px) { .container { padding: 0 28px; } }
@media (min-width: 1080px) { .container { padding: 0 40px; } }

.section { padding: 56px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }

.grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .grid { gap: 28px; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------- 跳转链接 ------------------------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--yellow);
  color: #20180a;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-s);
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  text-decoration: none;
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* ------------------------- 品牌轨 ------------------------- */
.site-header { position: relative; z-index: 80; }

.rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 95;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: var(--green-mid);
  border-bottom: 1px solid var(--line);
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
}
.rail__brand:hover { text-decoration: none; }

.rail__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  background: var(--red);
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  border-radius: 2px;
  letter-spacing: 0;
}

.rail__word {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
  line-height: 1;
}

.rail__tag {
  font-family: var(--num);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--gray-mid);
  text-transform: uppercase;
  line-height: 1;
}

.rail__rule,
.rail__meter,
.rail__coords { display: none; }

/* 移动端抽屉按钮 */
.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav-toggle:hover { background: var(--glass); border-color: var(--paper); }

.nav-toggle__bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle__bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.22s var(--ease), opacity 0.22s 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; }

@media (min-width: 900px) {
  .rail {
    right: auto;
    bottom: 0;
    width: var(--rail-w);
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 24px 0 28px;
    background: var(--green-mid);
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .rail__brand {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .rail__mark { width: 36px; height: 36px; font-size: 17px; }

  .rail__word {
    writing-mode: vertical-rl;
    letter-spacing: 0.36em;
    font-size: 15px;
    padding-top: 4px;
  }

  .rail__tag {
    writing-mode: vertical-rl;
    letter-spacing: 0.32em;
    font-size: 10px;
    padding-top: 2px;
  }

  .rail__rule {
    display: block;
    width: 1px;
    flex: 1 1 auto;
    min-height: 24px;
    margin: 20px 0;
    background: linear-gradient(180deg, var(--line-strong), rgba(247, 245, 238, 0.04));
  }

  .rail__meter {
    display: block;
    position: relative;
    width: 2px;
    height: 88px;
    flex: none;
    margin: 0 0 16px;
    background: rgba(247, 245, 238, 0.14);
    border-radius: 2px;
    overflow: hidden;
  }
  .rail__meter-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(var(--p, 0) * 100%);
    background: var(--yellow);
    border-radius: 2px;
    transition: height 0.12s linear;
  }

  .rail__coords {
    display: block;
    margin-top: auto;
    font-family: var(--num);
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.1em;
    color: var(--gray-mid);
    text-align: center;
  }

  .nav-toggle { display: none; }
}

/* ------------------------- 顶部导航条 ------------------------- */
.topbar {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  right: 0;
  z-index: 85;
  pointer-events: none;
}

.topbar__nav {
  pointer-events: auto;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  background: var(--green-mid);
  border-bottom: 1px solid var(--line);
  transition: max-height 0.3s var(--ease), opacity 0.2s var(--ease), visibility 0.3s linear;
}

.topbar__nav[data-open] {
  max-height: calc(100vh - var(--bar-h));
  overflow-y: auto;
  visibility: visible;
  opacity: 1;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 6px 0 12px;
  display: flex;
  flex-direction: column;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  border-left: 3px solid transparent;
  background: transparent;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav-link:hover {
  background: var(--glass);
  color: #fff;
  text-decoration: none;
}
.nav-link[aria-current="page"] {
  border-left-color: var(--red);
  background: linear-gradient(90deg, rgba(215, 38, 61, 0.30), rgba(215, 38, 61, 0));
  color: #fff;
}
.nav-link[aria-current="page"] .nav-link__num { color: var(--yellow); }

.nav-link__num {
  font-family: var(--num);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gray-mid);
  min-width: 18px;
}

.nav-link__text { line-height: 1.4; }

.topbar__tools { display: none; }

@media (min-width: 900px) {
  .topbar {
    top: 0;
    left: var(--rail-w);
    right: 0;
    height: var(--bar-h);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    padding: 0 24px 0 18px;
    background: rgba(14, 42, 34, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    pointer-events: auto;
  }

  .topbar__nav,
  .topbar__nav[data-open] {
    pointer-events: auto;
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    max-height: none;
    overflow: visible;
    visibility: visible;
    opacity: 1;
    background: none;
    border-bottom: 0;
    transition: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    gap: 2px;
    height: 100%;
  }

  .nav-list > li { display: flex; }

  .nav-link {
    height: 100%;
    padding: 0 14px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    gap: 7px;
  }
  .nav-link[aria-current="page"] {
    background: transparent;
    border-bottom-color: var(--red);
    border-left-color: transparent;
  }

  .nav-link__num { font-size: 10px; min-width: 0; }

  .topbar__tools {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: none;
    align-self: center;
  }
}

.topbar__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gray-mid);
  white-space: nowrap;
}

.topbar__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 0 rgba(242, 194, 48, 0.65);
  animation: pulse-ring 2.6s ease-out infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(242, 194, 48, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(242, 194, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 194, 48, 0); }
}

/* ------------------------- 右缘红黄牌侧标 ------------------------- */
.edge-flag {
  position: fixed;
  right: 0;
  bottom: 18px;
  z-index: 78;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(20, 56, 46, 0.94);
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: none;
  box-shadow: -8px 0 22px rgba(0, 0, 0, 0.32);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}
.edge-flag:hover {
  background: var(--green-mid);
  transform: translateX(-3px);
  text-decoration: none;
}

.edge-flag__text { line-height: 1; }

.edge-flag__card {
  display: block;
  width: 9px;
  height: 13px;
  border-radius: 2px;
  flex: none;
}
.edge-flag__card--red { background: var(--red); }
.edge-flag__card--yellow { background: var(--yellow); }

@media (min-width: 900px) {
  .edge-flag {
    bottom: 90px;
    flex-direction: column;
    gap: 12px;
    padding: 16px 9px;
    border: 1px solid var(--line-strong);
    border-right: 0;
    border-radius: 8px 0 0 8px;
  }
  .edge-flag__text {
    writing-mode: vertical-rl;
    letter-spacing: 0.3em;
    font-size: 12px;
  }
}

/* ------------------------- 通用按钮 ------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--sm { padding: 8px 16px; font-size: 13px; }

.btn--red { background: var(--red); color: var(--paper); border-color: var(--red); }
.btn--red:hover { background: var(--red-soft); border-color: var(--red-soft); color: var(--paper); }

.btn--yellow { background: var(--yellow); color: #20180a; border-color: var(--yellow); }
.btn--yellow:hover { background: #ffd24a; border-color: #ffd24a; color: #20180a; }

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

/* ------------------------- 排版组件 ------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.4;
  color: var(--yellow);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--red);
  flex: none;
}

.chapter-num {
  display: block;
  font-family: var(--num);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  margin-bottom: 8px;
}

.prose {
  max-width: 72ch;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--gray-light);
}
.prose h2, .prose h3 { color: var(--paper); margin-top: 1.6em; }
.prose a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }

.breadcrumb {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--gray-mid);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.breadcrumb li + li::before { content: "/"; color: var(--line-strong); }
.breadcrumb a { color: var(--gray-mid); }
.breadcrumb a:hover { color: var(--paper); text-decoration: none; }

/* ------------------------- 卡片与标签 ------------------------- */
.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 22px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.card--paper {
  background: var(--paper);
  color: var(--gray-dark);
  border-color: var(--gray-light);
}
.card--paper h2, .card--paper h3 { color: var(--green-mid); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
  color: var(--gray-light);
}
.tag--red { background: rgba(215, 38, 61, 0.16); border-color: rgba(215, 38, 61, 0.55); color: #ffd7dc; }
.tag--yellow { background: rgba(242, 194, 48, 0.16); border-color: rgba(242, 194, 48, 0.55); color: #ffe9a8; }
.tag--green { background: rgba(154, 168, 162, 0.16); border-color: var(--line); color: var(--gray-light); }

/* ------------------------- 数据表 ------------------------- */
.ledger {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  color: var(--gray-dark);
  font-size: 14px;
  line-height: 1.6;
  border-radius: var(--radius-s);
  overflow: hidden;
}
.ledger caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 12px;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--gray-mid);
}
.ledger th {
  background: var(--green-mid);
  color: var(--paper);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 11px 14px;
  white-space: nowrap;
}
.ledger td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--gray-light);
  vertical-align: top;
}
.ledger tbody tr:nth-child(even) { background: var(--gray-light); }
.ledger tbody tr:hover { background: rgba(242, 194, 48, 0.16); }
.ledger .ledger__num { font-family: var(--num); font-weight: 700; letter-spacing: 0.02em; }

/* ------------------------- 图片容器 ------------------------- */
.media {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  background: var(--green-mid);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
.media::after {
  content: "";
  display: block;
  padding-top: 56.25%;
}
.media > img,
.media > picture,
.media > picture > img,
.media > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media--wide::after { padding-top: 42.86%; }
.media--tall::after { padding-top: 125%; }
.media--square::after { padding-top: 100%; }
.media--flush { border: 0; border-radius: 0; }

.media__caption {
  margin-top: 10px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--gray-mid);
}

/* ------------------------- 滚动缓入 ------------------------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal-ready [data-reveal="in"] {
  opacity: 1;
  transform: none;
}

/* ------------------------- 页脚 ------------------------- */
.site-footer {
  margin-top: 72px;
  background: var(--green-mid);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.footer-frame {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 48px 20px 36px;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px) {
  .footer-frame { padding: 56px 28px 40px; }
}
@media (min-width: 1080px) {
  .footer-frame {
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
    gap: 56px;
    padding: 72px 40px 48px;
  }
}

.footer-brand { display: grid; gap: 16px; align-content: start; justify-items: start; }

.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}
.footer-brand__link:hover { text-decoration: none; }

.footer-brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  background: var(--red);
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  border-radius: 2px;
}

.footer-brand__name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.3;
}

.footer-brand__desc {
  margin: 0;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--gray-mid);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 22px;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
}

.footer-col { min-width: 0; }

.footer-col__title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.4;
  color: var(--yellow);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.footer-list li { margin: 0; }
.footer-list a,
.footer-list span {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--gray-light);
  word-break: break-word;
}
.footer-list a { color: var(--gray-light); }
.footer-list a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 20px 20px 30px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 28px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--gray-mid);
}
@media (min-width: 720px) {
  .footer-legal { padding: 22px 28px 34px; }
}
@media (min-width: 1080px) {
  .footer-legal { padding: 22px 40px 36px; }
}

.footer-legal__note { margin: 0; max-width: 62ch; }
.footer-legal__copy {
  margin: 0;
  font-family: var(--num);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ------------------------- 动效降级 ------------------------- */
@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;
  }
  .topbar__nav { transition: none; }
  .rail__meter-fill { transition: none; }
  .reveal-ready [data-reveal],
  .reveal-ready [data-reveal="in"] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
