/* =====================================================================
   九州体育 · 赛季年鉴 —— 共享样式表 /assets/site.css
   视觉基调：夜场墨蓝沉底 + 古铜金锚点 + 草绿/橙状态语义
   版式基调：非对称编辑部网格、两位编号章节、框景与刻度
   ===================================================================== */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption,
blockquote, dl, dt, dd {
  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;
  cursor: pointer;
}

input, select, textarea { font: inherit; color: inherit; }

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

table { border-collapse: collapse; width: 100%; }

hr { border: 0; margin: 0; }

/* ---------- 2. Design tokens ---------- */
:root {
  /* 色板 */
  --ink: #0B1A2E;
  --ink-2: #14263C;
  --ink-3: #0D1E33;
  --black: #05090F;
  --gold: #C9A227;
  --gold-hi: #F0C94A;
  --green: #3FA76A;
  --orange: #E8703A;
  --paper: #F3F0E9;
  --steel: #93A7BC;

  /* 语义线 */
  --line: rgba(147, 167, 188, .20);
  --line-strong: rgba(147, 167, 188, .34);
  --hair: rgba(147, 167, 188, .12);

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

  /* 尺寸 */
  --shell: 1400px;
  --pad-x: clamp(16px, 4vw, 48px);
  --gap: clamp(16px, 2.2vw, 30px);
  --radius: 4px;
  --radius-lg: 6px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. Base typography ---------- */
body {
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: .005em;
}

h1 { font-size: clamp(34px, 5.4vw, 56px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }

strong { font-weight: 700; }

::selection {
  background: var(--gold);
  color: var(--black);
}

/* ---------- 4. Layout utilities ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

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

.layout-rail {
  display: grid;
  grid-template-columns: minmax(220px, 3fr) 9fr;
  gap: clamp(22px, 3.2vw, 48px);
  align-items: start;
}

.slant-rule {
  display: block;
  height: 2px;
  border: 0;
  background: linear-gradient(90deg, var(--gold), rgba(201, 162, 39, 0) 62%);
  transform: skewY(-.7deg);
  transform-origin: left center;
}

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

/* ---------- 5. Focus & accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--black);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: top .18s var(--ease);
}

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

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: background-color .18s var(--ease),
              color .18s var(--ease),
              border-color .18s var(--ease);
}

.btn--gold {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

.btn--gold:hover {
  background: var(--gold-hi);
  border-color: var(--gold-hi);
}

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

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

.btn--sm {
  padding: 9px 16px;
  font-size: 14px;
}

/* ---------- 7. Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(5, 9, 15, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid var(--line);
  transition: background-color .24s var(--ease);
}

.site-header[data-scrolled="true"] {
  background: rgba(5, 9, 15, .96);
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 16px);
  padding-block: 14px;
  transition: padding-block .24s var(--ease);
}

.site-header[data-scrolled="true"] .site-header-inner {
  padding-block: 8px;
}

/* 品牌浮岛 */
.brand {
  order: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 12px;
  border-radius: 999px;
  background: var(--ink-2);
  border: 1px solid rgba(201, 162, 39, .38);
  transition: border-color .18s var(--ease);
}

.brand:hover {
  border-color: var(--gold-hi);
}

.brand-mark {
  flex: none;
  width: 24px;
  height: 24px;
  background: linear-gradient(140deg, var(--gold-hi), var(--gold));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

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

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--paper);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--gold);
}

/* 栏目胶囊浮岛 */
.site-nav {
  order: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: 999px;
  background: rgba(20, 38, 60, .74);
  border: 1px solid var(--line);
}

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

.nav-item {
  display: flex;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--steel);
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}

.nav-link::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-hi);
  transform: scale(0);
  transition: transform .2s var(--ease);
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(147, 167, 188, .10);
}

.nav-link[aria-current="page"] {
  color: var(--gold-hi);
  background: rgba(201, 162, 39, .14);
}

.nav-link[aria-current="page"]::before {
  transform: scale(1);
}

/* 头部 CTA */
.header-cta {
  order: 3;
  margin-left: 6px;
}

/* 移动端开关 */
.nav-toggle {
  order: 4;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  color: var(--paper);
}

.nav-toggle-bars {
  position: relative;
  width: 16px;
  height: 10px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-hi);
  transition: transform .2s var(--ease);
}

.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-4px) rotate(-45deg);
}

.nav-toggle-label {
  font-size: 13px;
  letter-spacing: .18em;
}

/* 阅读进度 */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(147, 167, 188, .14);
}

.read-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-hi) 58%, var(--green) 100%);
}

/* ---------- 8. Site footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--black);
  color: var(--steel);
  border-top: 1px solid rgba(201, 162, 39, .32);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(147, 167, 188, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 167, 188, .055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

.footer-top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 3fr);
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(44px, 6vw, 82px) clamp(26px, 3.6vw, 44px);
}

.footer-brand-name {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--paper);
}

.footer-brand-name em {
  font-style: normal;
  color: var(--gold);
}

.footer-brand-note {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--steel);
}

.footer-brand-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--gold);
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  color: var(--steel);
  transition: color .18s var(--ease);
}

.footer-link::before {
  content: "";
  width: 6px;
  height: 1px;
  background: currentColor;
  opacity: .7;
  transition: width .18s var(--ease), background-color .18s var(--ease), opacity .18s var(--ease);
}

.footer-link:hover {
  color: var(--paper);
}

.footer-link:hover::before {
  width: 16px;
  background: var(--gold-hi);
  opacity: 1;
}

.footer-meta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px clamp(24px, 4vw, 56px);
  align-items: end;
  padding-block: 26px 36px;
  border-top: 1px solid var(--line);
}

.footer-contact {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--steel);
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-icp {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--gold);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: rgba(147, 167, 188, .8);
}

/* ---------- 9. Editorial components ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  flex: none;
}

.chapter-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 800;
  line-height: .84;
  letter-spacing: -.02em;
  color: var(--gold);
}

@supports (-webkit-text-stroke: 1px red) {
  .chapter-num {
    color: transparent;
    -webkit-text-stroke: 1px var(--gold);
  }
}

[data-chapter] .chapter-num {
  transition: color .3s var(--ease), -webkit-text-stroke-color .3s var(--ease);
}

[data-chapter] .eyebrow {
  transition: color .3s var(--ease);
}

[data-chapter].is-current .chapter-num {
  color: var(--gold-hi);
  -webkit-text-stroke-color: var(--gold-hi);
}

[data-chapter].is-current .eyebrow {
  color: var(--gold-hi);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--steel);
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(147, 167, 188, .5);
}

.breadcrumbs a:hover {
  color: var(--gold-hi);
}

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

.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 30px);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel--cut {
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - 24px) 0,
    100% 24px,
    100% 100%,
    24px 100%,
    0 calc(100% - 24px)
  );
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: rgba(147, 167, 188, .06);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--steel);
  white-space: nowrap;
}

.tag--gold {
  color: var(--gold-hi);
  border-color: rgba(201, 162, 39, .48);
  background: rgba(201, 162, 39, .12);
}

.tag--green {
  color: var(--green);
  border-color: rgba(63, 167, 106, .44);
  background: rgba(63, 167, 106, .12);
}

.tag--orange {
  color: var(--orange);
  border-color: rgba(232, 112, 58, .44);
  background: rgba(232, 112, 58, .12);
}

/* ---------- 10. Prose & paper section ---------- */
.section--paper {
  --line: rgba(16, 26, 38, .14);
  --line-strong: rgba(16, 26, 38, .3);
  --steel: #4A5C70;

  position: relative;
  background: var(--paper);
  color: #101A26;
}

.section--paper .eyebrow {
  color: #8A6C10;
}

.section--paper .eyebrow::before {
  background: #8A6C10;
}

.section--paper .tag {
  color: #4A5C70;
  border-color: rgba(16, 26, 38, .24);
  background: rgba(16, 26, 38, .05);
}

.section--paper .tag--gold {
  color: #8A6C10;
  border-color: rgba(138, 108, 16, .4);
  background: rgba(201, 162, 39, .16);
}

.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.78;
  color: rgba(243, 240, 233, .86);
}

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

.prose h2 {
  margin-top: 1.7em;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: .01em;
  color: var(--paper);
}

.prose h3 {
  margin-top: 1.5em;
  font-size: 19px;
  color: var(--paper);
}

.prose strong { color: var(--gold-hi); }

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

.prose ul { list-style: disc; padding-left: 1.25em; }
.prose ol { list-style: decimal; padding-left: 1.5em; }
.prose li + li { margin-top: .45em; }

.prose blockquote {
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  color: var(--steel);
}

.prose code {
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(147, 167, 188, .14);
  font-family: var(--font-mono);
  font-size: .92em;
}

.prose--paper { color: #1B2735; }
.prose--paper h2,
.prose--paper h3 { color: #05090F; }
.prose--paper strong { color: #8A6C10; }
.prose--paper a { color: #8A6C10; }
.prose--paper blockquote { color: #4A5C70; }

/* ---------- 11. Data tables ---------- */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  min-width: 620px;
  font-size: 14.5px;
  line-height: 1.5;
}

.data-table caption {
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--steel);
  border-bottom: 1px solid var(--hair);
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
  background: var(--ink-3);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--steel);
}

.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hair);
  color: rgba(243, 240, 233, .9);
  vertical-align: top;
}

.data-table tbody tr {
  transition: background-color .15s var(--ease);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(20, 38, 60, .62);
}

.data-table tbody tr:hover {
  background: rgba(201, 162, 39, .1);
}

.data-table tbody tr:hover td:first-child {
  box-shadow: inset 2px 0 0 var(--gold);
}

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

.data-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.section--paper .table-wrap {
  background: #FFFFFF;
  border-color: rgba(16, 26, 38, .16);
}

.section--paper .data-table tbody td { color: #1B2735; }
.section--paper .data-table thead th { background: #E7E2D6; color: #4A5C70; }
.section--paper .data-table tbody tr:nth-child(even) { background: rgba(16, 26, 38, .035); }

/* ---------- 12. Media frames ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 18% 8%, rgba(201, 162, 39, .22), transparent 58%),
    linear-gradient(145deg, var(--ink-2), var(--black));
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(147, 167, 188, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 167, 188, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  box-shadow:
    inset 0 0 0 1px rgba(5, 9, 15, .4),
    inset 0 -70px 100px -46px rgba(5, 9, 15, .92);
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 16px 16px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(5, 9, 15, 0), rgba(5, 9, 15, .92));
}

/* ---------- 13. Responsive ---------- */
@media (max-width: 1080px) {
  .site-nav {
    order: 5;
    position: absolute;
    top: calc(100% + 6px);
    left: var(--pad-x);
    right: var(--pad-x);
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding: 10px;
    border-radius: 18px;
    background: rgba(8, 18, 32, .985);
    border-color: var(--line-strong);
    box-shadow: 0 26px 64px rgba(0, 0, 0, .62);
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 16px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: 8px;
  }

  .header-cta {
    order: 3;
    margin-left: auto;
  }

  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .layout-rail { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .footer-meta {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col:last-child { grid-column: 1 / -1; }
}

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

  .brand { padding: 6px 14px 6px 10px; }
  .brand-name { font-size: 14px; letter-spacing: .06em; }
  .brand-sub { font-size: 9px; letter-spacing: .22em; }
  .brand-mark { width: 20px; height: 20px; }

  .header-cta { padding: 8px 13px; font-size: 13px; }
  .nav-toggle { padding: 8px 12px; }
  .nav-toggle-label { display: none; }

  .footer-cols { grid-template-columns: 1fr; }
  .footer-col:last-child { grid-column: auto; }
}

/* ---------- 14. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .skip-link { transition: none; }
}
