/* ==========================================================================
   易倍CN / site.css — 共享骨架
   1. reset  2. 变量  3. 排版  4. 工具  5. 按钮  6. 标签
   7. 头部  8. 页脚  9. 面包屑  10. 面板  11. 图片容器
   12. 正文  13. 布局  14. 章节  15. 响应式  16. 无障碍
   ========================================================================== */

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

html {
  background: #081914;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 128px;
}

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

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

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

button { font: inherit; color: inherit; }

a { color: inherit; }

/* 2. 变量 ---------------------------------------------------------------- */
:root {
  --ink-900: #081914;
  --ink-800: #0F2A23;
  --ink-700: #16382F;
  --line: #22483D;
  --text: #E9F5EF;
  --muted: #9BB8AE;
  --path: #2BE6A8;
  --path-deep: #14B98A;
  --amber: #FFA53D;
  --amber-soft: #FFD08A;
  --shadow: #050F0C;

  --rail: 96px;
  --shell: 1320px;
  --gutter: 20px;
  --header-h: 104px;

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

  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-panel: 0 8px 24px rgba(5, 15, 12, .45);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* 3. 排版 ---------------------------------------------------------------- */
body {
  min-height: 100vh;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 赛程刻度网格：与左侧 96px 轨道对齐 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(43, 230, 168, .055) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(to bottom, rgba(43, 230, 168, .028) 0 1px, transparent 1px 96px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}

main {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: var(--text);
}

h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }
h4 { font-size: 18px; }

p { line-height: 1.75; }

::selection {
  background: var(--path);
  color: #04140E;
}

/* 4. 工具 ---------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.display {
  font-family: var(--font-head);
  font-weight: 900;
  font-stretch: condensed;
  font-size: clamp(48px, 7.4vw, 88px);
  line-height: .94;
  letter-spacing: -.035em;
}

.h-lg { font-size: clamp(28px, 3.6vw, 36px); }
.h-md { font-size: clamp(20px, 2.2vw, 26px); }
.h-sm { font-size: 18px; }

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
}

.kicker--amber { color: var(--amber); }

.lede {
  max-width: 34em;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.8;
  color: var(--muted);
}

.stack { display: flex; flex-direction: column; gap: 16px; }

/* 5. 按钮 ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), transform .2s var(--ease);
}

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

.btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #05150F;
}

.btn--primary:hover {
  background: var(--amber-soft);
  border-color: var(--amber-soft);
}

.btn--path {
  background: transparent;
  border-color: var(--path);
  color: var(--path);
}

.btn--path:hover {
  background: rgba(43, 230, 168, .12);
  color: var(--path);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn--ghost:hover {
  border-color: var(--path);
  color: var(--path);
}

/* 6. 标签与状态 ---------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}

.tag--path {
  border-color: rgba(43, 230, 168, .45);
  color: var(--path);
}

.tag--amber {
  border-color: rgba(255, 165, 61, .5);
  color: var(--amber);
}

.dot-live {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: dot-pulse 2.4s var(--ease) infinite;
}

@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 165, 61, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 165, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 165, 61, 0); }
}

/* 7. 头部 ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 25, 20, .95);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .24s var(--ease), background-color .24s var(--ease);
}

@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .site-header {
    background: rgba(8, 25, 20, .86);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.site-header[data-scrolled="true"] {
  box-shadow: 0 10px 28px rgba(5, 15, 12, .55);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--amber);
  color: #05150F;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: top .18s var(--ease);
}

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

.site-header__brandbar {
  position: relative;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--text);
}

.brand__glyph {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--path);
}

.brand__glyph::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: linear-gradient(135deg, var(--path) 0 47%, transparent 47%);
}

.brand__glyph::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 7px;
  height: 7px;
  background: var(--amber);
}

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

.brand__name {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
}

.brand__tag {
  margin-top: 1px;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

.path-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}

.path-note__label {
  padding: 1px 6px;
  border: 1px solid rgba(43, 230, 168, .35);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--path);
}

.path-note__arrow { color: var(--amber); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 3;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--path-deep), var(--path));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--path);
  color: var(--path);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.site-header[data-open="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.site-header[data-open="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.site-header[data-open="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.site-header__navbar {
  background: var(--ink-700);
  border-top: 1px solid var(--line);
}

.site-nav { display: block; }

.site-nav__list {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.site-nav__item { display: flex; }

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-right: 1px solid rgba(34, 72, 61, .8);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.site-nav__link:hover {
  color: var(--path);
  background: rgba(43, 230, 168, .08);
}

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(155, 184, 174, .55);
}

.site-nav__link[aria-current="page"] {
  background: var(--path);
  color: #04140E;
  font-weight: 700;
}

.site-nav__link[aria-current="page"] .site-nav__num {
  color: rgba(4, 20, 14, .6);
}

/* 8. 页脚 ---------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(64px, 8vw, 96px);
  background: var(--ink-900);
  border-top: 1px solid var(--line);
}

.site-footer__track {
  height: 8px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 24px);
}

.site-footer__inner {
  display: grid;
  gap: 40px;
  padding-block: clamp(40px, 5vw, 64px);
  grid-template-columns: 1fr;
}

.site-footer__lead { max-width: 34em; }

.brand--footer .brand__name { font-size: 20px; }

.site-footer__claim {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

.contact-list > div {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.contact-list dt {
  flex: 0 0 44px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--path);
}

.contact-list dd { margin: 0; }

.footer-col__title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--path);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-col__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease), transform .2s var(--ease);
}

.footer-col__link::before {
  content: "";
  width: 10px;
  height: 1px;
  background: var(--path);
  opacity: 0;
  transition: opacity .2s var(--ease);
}

.footer-col__link:hover {
  color: var(--text);
  transform: translateX(4px);
}

.footer-col__link:hover::before { opacity: 1; }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 28px;
  padding-block: 20px 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.site-footer__legal { color: var(--text); }

.site-footer__legal .mono { color: var(--muted); }

.site-footer__meta { max-width: 46em; }

/* 9. 面包屑 -------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
}

.breadcrumb__link {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease);
}

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

.breadcrumb__sep { color: var(--line); }

.breadcrumb [aria-current="page"] { color: var(--text); }

/* 10. 面板与卡片 -------------------------------------------------------- */
.panel {
  background: var(--ink-800);
  border: 1px solid var(--line);
  padding: 24px;
}

.card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(5, 15, 12, .28);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.card:hover { border-color: rgba(43, 230, 168, .45); }

.card__body { padding: 20px; }

/* 11. 图片容器 ---------------------------------------------------------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(22, 56, 47, .95), rgba(8, 25, 20, .95));
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(45deg, rgba(43, 230, 168, .13) 0 1px, transparent 1px 16px);
}

.media__img,
.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

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

.media__cap {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

/* 12. 正文 -------------------------------------------------------------- */
.prose {
  max-width: 34em;
  font-size: 16px;
  line-height: 1.78;
  color: rgba(233, 245, 239, .88);
}

.prose p + p { margin-top: 1em; }

.prose h2,
.prose h3 {
  margin-top: 1.6em;
  margin-bottom: .6em;
}

.prose a {
  color: var(--path);
  text-underline-offset: 3px;
}

.prose ul {
  margin-top: .8em;
  display: flex;
  flex-direction: column;
  gap: .35em;
}

.prose ul li {
  position: relative;
  padding-left: 18px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 8px;
  height: 1px;
  background: var(--path);
}

/* 13. 布局 -------------------------------------------------------------- */
.layout-rail {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
}

.rail {
  align-self: start;
  position: sticky;
  top: var(--header-h);
  padding-block: 24px;
  border-right: 1px solid var(--line);
}

.rail__head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
  padding-inline: 10px;
  margin-bottom: 14px;
}

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-left: 2px solid transparent;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}

.rail__link:hover {
  color: var(--path);
  border-left-color: var(--path);
  transform: translateX(4px);
}

.rail__link[aria-current="page"] {
  color: var(--path);
  border-left-color: var(--path);
}

.rail__dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  background: currentColor;
}

.layout-aside {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr);
}

.sticky-card {
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.grid-2 {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
}

/* 14. 章节 -------------------------------------------------------------- */
.section { padding-block: clamp(48px, 6vw, 96px) 0; }
.section--flush { padding-top: 0; }

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-head__title {
  position: relative;
  padding-left: 16px;
  font-family: var(--font-head);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.section-head__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  bottom: .2em;
  width: 4px;
  background: var(--path);
}

.section-head__num {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--amber);
  white-space: nowrap;
}

.section-head__num::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--amber);
}

/* 15. 响应式 ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .path-note { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }

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

  .site-header__inner { height: 60px; gap: 12px; }

  .site-header__actions .btn--ghost { display: none; }

  .nav-toggle { display: inline-flex; }

  .site-nav { display: none; }

  .site-header[data-open="true"] .site-nav {
    display: block;
    background: var(--ink-800);
    border-top: 1px solid var(--line);
    padding-block: 6px 10px;
  }

  .site-nav__list {
    flex-direction: column;
    overflow: visible;
  }

  .site-nav__item { width: 100%; }

  .site-nav__link {
    width: 100%;
    height: 52px;
    padding-inline: 4px;
    border-right: 0;
    border-bottom: 1px solid rgba(34, 72, 61, .7);
    font-size: 15px;
  }

  .site-nav__item:last-child .site-nav__link { border-bottom: 0; }

  .layout-rail { grid-template-columns: minmax(0, 1fr); }

  .rail {
    position: static;
    padding-block: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail__list {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail__list::-webkit-scrollbar { display: none; }

  .rail__link {
    border-left: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .rail__link:hover,
  .rail__link[aria-current="page"] {
    border-bottom-color: var(--path);
    transform: none;
  }

  .sticky-card { position: static; }
}

@media (max-width: 560px) {
  .site-header__actions { display: none; }
  .nav-toggle { margin-left: auto; }
  .brand__tag { display: none; }
  .site-footer__base { flex-direction: column; }
}

@media (min-width: 900px) {
  .site-footer__inner {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (min-width: 820px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .layout-aside {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
  }
}

/* 16. 无障碍与降级动效 -------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .dot-live { animation: none; }

  .footer-col__link:hover,
  .rail__link:hover { transform: none; }

  .scroll-progress { transition: none; }
}
