/* ==========================================================================
   博业体育 · /assets/site.css
   共享外壳：reset / 设计令牌 / 中文排版 / 页头 / 页脚 / 基础组件
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --ink-900: #061A17;
  --ink-800: #0C2A25;
  --ink-700: #12433A;
  --cyan: #4FF0D0;
  --cyan-dim: #17C8A8;
  --orange: #FF8A2B;
  --orange-soft: #FFC15A;
  --text: #C9D8D3;
  --index: #8FA8A1;
  --bright: #E6FBF5;
  --glass: rgba(79, 240, 208, 0.08);
  --line: rgba(79, 240, 208, 0.22);
  --line-soft: rgba(201, 216, 211, 0.13);
  --line-warm: rgba(255, 138, 43, 0.35);

  --rail-w: 260px;
  --header-h: 118px;
  --gutter: 56px;

  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Roboto Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  margin: 0;
  color: var(--bright);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

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

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--bright); }

button { font: inherit; color: inherit; }

hr { border: 0; border-top: 1px solid var(--line-soft); margin: 40px 0; }

::selection { background: var(--cyan); color: #04211C; }

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

/* ---------- 3. 排版工具 ---------- */
.prose { max-width: 38em; font-size: 17px; line-height: 1.8; }
.prose p { margin: 0 0 1.2em; }
.prose h2 { font-size: 22px; margin: 40px 0 16px; }
.prose h3 { font-size: 17px; margin: 32px 0 12px; font-weight: 800; }
.prose ul { margin: 0 0 1.2em; }
.prose li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.prose li::before {
  content: "";
  position: absolute; left: 0; top: 0.85em;
  width: 8px; height: 1px; background: var(--cyan-dim);
}
.prose strong { color: var(--bright); font-weight: 800; }

.lead { font-size: 17px; line-height: 1.8; color: var(--text); max-width: 38em; }

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

.stack > * + * { margin-top: 24px; }

/* ---------- 4. 骨架布局 ---------- */
.shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.page-grid {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.content-column { min-width: 0; }

.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

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

.rail-panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  backdrop-filter: blur(10px);
}

.rail-group + .rail-group { margin-top: 24px; }

.rail-group-title {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--cyan-dim);
  margin-bottom: 12px;
}

/* ---------- 5. 按钮 / 标签 / 胶囊 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn--primary { background: var(--cyan); color: #04211C; }
.btn--primary:hover { background: var(--bright); color: #04211C; }
.btn--ghost {
  background: rgba(79, 240, 208, 0.06);
  border-color: var(--line);
  color: var(--bright);
}
.btn--ghost:hover { background: var(--ink-700); border-color: var(--cyan); color: var(--bright); }
.btn:active { transform: translateY(1px); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--cyan);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.tag--warm { color: var(--orange-soft); border-color: var(--line-warm); }

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--index);
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.pill:hover { color: var(--bright); border-color: var(--line); }
.pill[aria-pressed="true"], .pill.is-active {
  color: #04211C;
  background: var(--cyan);
  border-color: var(--cyan);
}

/* ---------- 6. 章节头 / 面包屑 / 旁注 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.section-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--cyan-dim);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 900;
  font-stretch: 92%;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.section-note {
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--index);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--index);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--line); }
.breadcrumb a { color: var(--index); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--text); }

.note-rail {
  border-left: 1px solid var(--cyan-dim);
  padding: 4px 0 4px 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--index);
}

/* ---------- 7. 卡片 / 索引表 / 数据 / 图片容器 ---------- */
.card {
  background: var(--ink-800);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 20px;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: var(--ink-700);
}
.card-title { font-size: 17px; font-weight: 800; }
.card-meta {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--index);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.index-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--ink-800);
}
.index-table caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--index);
  padding-bottom: 12px;
}
.index-table th {
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--index);
  background: var(--ink-700);
}
.index-table th, .index-table td {
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.index-table tbody tr:nth-child(even) { background: rgba(18, 67, 58, 0.5); }
.index-table tbody tr:hover { background: var(--ink-700); }
.index-table .col-num {
  font-family: var(--mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-figure {
  display: block;
  font-family: var(--mono);
  font-size: clamp(72px, 12vw, 132px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--bright);
  font-variant-numeric: tabular-nums;
}
.data-figure--warm { color: var(--orange); }
.data-unit {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--index);
}

.stat-strip {
  display: flex;
  flex-wrap: wrap;
  background: var(--ink-800);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}
.stat-cell {
  flex: 1 1 160px;
  padding: 24px;
  border-right: 1px solid var(--line-soft);
}
.stat-cell:last-child { border-right: 0; }
.stat-cell .card-meta { margin-bottom: 8px; }

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(160deg, #0C2A25 0%, #061A17 62%, rgba(79, 240, 208, 0.07) 100%);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(79, 240, 208, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79, 240, 208, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.6;
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.06) brightness(0.86);
}
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--wide { aspect-ratio: 21 / 9; }

/* ---------- 8. 显现动效协议 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 9. 页头 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--cyan);
  color: #04211C;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: 16px; color: #04211C; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(6, 26, 23, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) auto;
  grid-template-areas: "brand nav tools";
  align-items: center;
  gap: 24px;
  min-height: 64px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line-soft);
}

.header-brand-cell {
  grid-area: brand;
  display: flex;
  align-items: center;
  align-self: stretch;
  padding-right: 24px;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bright);
  text-decoration: none;
}
.brand:hover { color: var(--bright); }
.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--cyan);
  color: #04211C;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand-copy { display: block; min-width: 0; }
.brand-name {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--bright);
  line-height: 1.3;
}
.brand-line {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--index);
  line-height: 1.4;
}

.nav-toggle {
  grid-area: toggle;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--cyan);
}
.nav-toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 -6px 0 var(--cyan), 0 6px 0 var(--cyan);
  transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; box-shadow: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before,
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 2px;
  background: var(--cyan);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { transform: rotate(-45deg); }

.site-nav { grid-area: nav; min-width: 0; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 3px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.nav-link:hover { color: var(--bright); background: var(--glass); }
.nav-index {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--index);
}
.nav-link:hover .nav-index { color: var(--cyan-dim); }
.nav-link[aria-current="page"] { color: var(--ink-900); background: var(--cyan); }
.nav-link[aria-current="page"] .nav-index { color: rgba(4, 33, 28, 0.66); }

.header-tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  text-decoration: none;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.tool-link:hover { color: var(--bright); border-color: var(--cyan); background: var(--glass); }
.tool-link--accent { color: var(--orange-soft); border-color: var(--line-warm); }
.tool-link--accent:hover { color: var(--orange); border-color: var(--orange); background: rgba(255, 138, 43, 0.08); }

/* 日期轴 */
.date-axis {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(79, 240, 208, 0.05), rgba(6, 26, 23, 0) 40%);
}

.axis-today {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 96px;
  padding: 0 20px;
  background: var(--glass);
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-decoration: none;
}
.axis-today::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.axis-today:hover { background: rgba(79, 240, 208, 0.16); color: var(--bright); }

.axis-track {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  touch-action: pan-x;
  cursor: grab;
}
.axis-track::-webkit-scrollbar { display: none; }
.axis-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.axis-track:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }

.axis-tick {
  flex: 0 0 auto;
  min-width: 56px;
  padding: 8px 14px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line-soft);
  transition: background-color 160ms var(--ease);
}
.axis-tick:hover { background: rgba(18, 67, 58, 0.55); }
.axis-tick-round {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--cyan-dim);
  line-height: 1.5;
}
.axis-tick-day {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--index);
  line-height: 1.5;
}

.read-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  pointer-events: none;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  margin-top: 120px;
  background: var(--ink-800);
  border-top: 1px solid var(--line);
}

.footer-frame {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 72px var(--gutter) 40px;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(140px, 1fr));
  gap: 40px;
}

.footer-brand { min-width: 0; }
.brand--footer { margin-bottom: 20px; }
.footer-note {
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--index);
  margin: 0 0 24px;
}

.footer-nav {
  display: contents;
}

.footer-col-title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--cyan-dim);
}

.footer-list li + li { margin-top: 8px; }

.footer-link {
  display: inline-block;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.footer-link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.footer-base {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--index);
}
.footer-base p { margin: 0 0 8px; }
.footer-base p:last-child { margin-bottom: 0; }
.footer-legal a { color: var(--index); }
.footer-legal a:hover { color: var(--cyan); }
.footer-sep { margin: 0 6px; color: var(--line); }
.footer-copy { color: var(--text); opacity: 0.75; }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1199px) {
  :root { --gutter: 32px; --rail-w: 220px; }

  .header-bar { gap: 16px; }
  .footer-frame { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}

@media (max-width: 1023px) {
  :root { --header-h: 108px; --rail-w: 200px; }

  .header-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav";
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .header-brand-cell { padding-right: 0; border-right: 0; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    padding-bottom: 12px;
  }
  .site-nav[data-open] {
    display: block;
    animation: nav-drop 180ms var(--ease);
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link {
    justify-content: flex-start;
    padding: 12px 4px;
    font-size: 17px;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
  }
  .nav-link[aria-current="page"] { background: transparent; color: var(--cyan); }
  .nav-link[aria-current="page"] .nav-index { color: var(--cyan-dim); }

  .header-tools { display: none; }

  .page-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rail { position: static; }
  .layout-split { grid-template-columns: minmax(0, 1fr); gap: 32px; }

  .axis-today { min-width: 84px; padding: 0 14px; }
}

@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
  :root { --gutter: 20px; --header-h: 100px; }
  body { font-size: 16px; }

  .brand-line { display: none; }
  .brand-mark { width: 32px; height: 32px; }

  .section-head { gap: 12px; margin-bottom: 24px; }
  .section-note { max-width: none; }

  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }

  .stat-strip { flex-direction: column; }
  .stat-cell { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .stat-cell:last-child { border-bottom: 0; }

  .index-table { font-size: 13px; }
  .index-table th, .index-table td { padding: 0 12px; height: 40px; }

  .footer-frame { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; }
  .footer-note { max-width: none; }
  .site-footer { margin-top: 72px; }
}

/* ---------- 12. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 120ms !important;
  }

  .js [data-reveal] { opacity: 1; transform: none; }
  .card:hover { transform: none; }
  .btn:active { transform: none; }
}
