/* ============================================================
   AK赛场 · /assets/site.css
   共享层：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ============================================================ */

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

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

body {
  margin: 0;
  min-height: 100%;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色板 */
  --ink: #06110E;
  --panel: #101614;
  --moss: #17332A;
  --lime: #C6FF3D;
  --signal: #FF6B2C;
  --clay: #A8452B;
  --clay-lit: #C25534;
  --fog: #E8EFE6;
  --slate: #8FA39B;
  --line: #2C4A3F;
  --sand: #F4EFE7;

  /* 字体族 */
  --font-display: "Arial Narrow", "Haettenschweiler", "Impact", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;

  /* 尺度 */
  --gutter: clamp(16px, 3.2vw, 48px);
  --rail: 64px;
  --header-h: 96px;
  --cut: 22px;
  --clip-card: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
  --ease: cubic-bezier(.22, .68, .2, 1);
}

@media (min-width: 1024px) {
  :root { --header-h: 116px; }
}

/* ---------- 3. 中文排版与页面底 ---------- */
body {
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(44, 74, 63, .5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(44, 74, 63, .5) 1px, transparent 1px),
    linear-gradient(to right, rgba(44, 74, 63, .18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(44, 74, 63, .18) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  color: var(--fog);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.015em;
  color: var(--fog);
}

p { max-width: 38em; }

::selection {
  background: var(--lime);
  color: var(--ink);
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

main {
  display: block;
  padding-top: var(--header-h);
}

main[data-hero-overlay] {
  padding-top: 0;
}

html.nav-locked,
html.nav-locked body {
  overflow: hidden;
}

/* ---------- 4. 容器 ---------- */
.wrap {
  width: 100%;
  max-width: 1560px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 1024px) {
  .wrap--rail { padding-left: calc(var(--gutter) + var(--rail)); }
}

/* ---------- 5. skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  transform: translateY(-220%);
  transition: transform .22s var(--ease);
}

.skip-link:focus-visible {
  transform: none;
  outline-color: var(--fog);
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  color: var(--fog);
  background: linear-gradient(to bottom, rgba(6, 17, 14, .92), rgba(6, 17, 14, .28));
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease);
}

.site-header.is-stuck {
  background-color: rgba(16, 22, 20, .97);
  box-shadow: 0 1px 0 var(--line), 0 20px 40px -30px #000;
}

/* 第一层：索引条 */
.index-bar {
  border-bottom: 1px solid rgba(44, 74, 63, .75);
}

.index-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--slate);
  transition: height .35s var(--ease);
}

.site-header.is-stuck .index-bar__inner {
  height: 28px;
}

.index-bar__mark,
.index-bar__status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mark-letter {
  padding: 1px 6px;
  border: 1px solid var(--line);
  color: var(--lime);
  font-weight: 700;
  letter-spacing: .18em;
}

.mark-dot {
  width: 14px;
  height: 1px;
  background: var(--line);
}

.mark-chapter {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate);
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--signal);
  animation: ak-pulse 2.4s var(--ease) infinite;
}

@keyframes ak-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 107, 44, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 107, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 44, 0); }
}

.index-bar__link {
  color: var(--lime);
  border-bottom: 1px solid rgba(198, 255, 61, .45);
  padding-bottom: 1px;
  white-space: nowrap;
  transition: border-color .2s var(--ease);
}

.index-bar__link:hover { border-color: var(--lime); }

/* 第二层：主栏 */
.nav-bar__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  height: 76px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 0 auto;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .06em;
  color: var(--fog);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--slate);
}

.primary-nav { margin-inline: auto; min-width: 0; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 26px);
}

.nav-list__item { display: flex; }

.nav-list__link {
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  font-size: 14px;
  letter-spacing: .03em;
  color: var(--slate);
  white-space: nowrap;
  transition: color .24s var(--ease);
}

.nav-list__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 2px;
  height: 1px;
  background: var(--lime);
  transition: right .3s var(--ease);
}

.nav-list__link:hover,
.nav-list__link:focus-visible { color: var(--fog); }

.nav-list__link:hover::after,
.nav-list__link:focus-visible::after { right: 0; }

.nav-list__link[aria-current="page"] { color: var(--lime); }

.nav-list__link[aria-current="page"]::after {
  right: 0;
  background: var(--lime);
}

/* 主栏右侧 */
.nav-bar__aside {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.nav-updated {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--signal);
  white-space: nowrap;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: var(--lime);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: background-color .22s var(--ease), transform .22s var(--ease);
}

.nav-cta:hover {
  background: #d6ff6b;
  transform: translateY(-1px);
}

/* 抽屉按钮 */
.nav-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 36px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.nav-toggle__bar {
  position: relative;
  display: block;
  width: 18px;
  height: 1px;
  background: var(--fog);
  transition: background-color .24s var(--ease);
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: var(--fog);
  transition: transform .24s var(--ease), top .24s var(--ease);
}

.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { top: 0; transform: rotate(-45deg); }

/* 移动抽屉 */
@media (max-width: 1023px) {
  .nav-bar__aside { margin-left: auto; }

  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 95;
    padding: 10px var(--gutter) 48px;
    background: var(--panel);
    border-top: 1px solid var(--line);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s linear;
  }

  .primary-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

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

  .nav-list__item { display: block; }

  .nav-list__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 2px;
    font-size: 17px;
    color: var(--fog);
    border-bottom: 1px solid var(--line);
  }

  .nav-list__link::after { display: none; }

  .nav-list__item:nth-child(3) .nav-list__link {
    color: var(--lime);
    box-shadow: inset 3px 0 0 var(--clay);
    padding-left: 12px;
  }
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}

@media (max-width: 719px) {
  .mark-chapter { display: none; }
}

@media (max-width: 559px) {
  .status-live { display: none; }
  .nav-updated { display: none; }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 112px);
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: clamp(72px, 12vw, 180px);
  height: 2px;
  background: var(--lime);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 76px);
}

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

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.1fr 1.3fr; }
}

.footer-brand__link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.1;
  color: var(--fog);
}

.footer-brand__link:hover { color: var(--lime); }

.footer-brand__line {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--slate);
  max-width: 22em;
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.footer-list a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
  color: var(--fog);
  transition: color .2s var(--ease), transform .2s var(--ease);
}

.footer-list a:hover {
  color: var(--lime);
  transform: translateX(3px);
}

.footer-benefit {
  display: block;
  padding: 14px 18px;
  background: var(--clay);
  color: var(--sand);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .03em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  transition: background-color .24s var(--ease);
}

.footer-benefit:hover { background: var(--clay-lit); }

.footer-note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--slate);
  max-width: 26em;
}

.footer-contact li {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--fog);
  padding: 3px 0;
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 18px 30px;
  border-top: 1px solid var(--line);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--slate);
  max-width: none;
}

.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
}

.footer-bottom__links a {
  color: var(--slate);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-bottom__links a:hover {
  color: var(--lime);
  border-color: var(--lime);
}

/* ---------- 8. 通用按钮 ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fog);
  --btn-bd: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  --btn-bg: var(--lime);
  --btn-fg: var(--ink);
  --btn-bd: var(--lime);
}

.btn--primary:hover { --btn-bg: #d6ff6b; }

.btn--signal {
  --btn-bg: var(--signal);
  --btn-fg: #1B0A03;
  --btn-bd: var(--signal);
}

.btn--signal:hover { --btn-bg: #ff8248; }

.btn--ghost:hover {
  --btn-bd: var(--lime);
  --btn-fg: var(--lime);
}

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

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li::after {
  content: "/";
  color: var(--line);
}

.breadcrumb li:last-child::after { content: none; }

.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--lime); }

/* ---------- 10. 章节标签 / 分隔线 ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
}

.section-label::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--lime);
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line);
}

/* ---------- 11. 卡片 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--panel);
  border: 1px solid var(--line);
  clip-path: var(--clip-card);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}

.card:hover { border-color: #3F6A5A; }

.card--flat { clip-path: none; }

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

/* ---------- 12. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, rgba(23, 51, 42, .9) 0 2px, rgba(16, 22, 20, .9) 2px 14px);
  clip-path: var(--clip-card);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(198, 255, 61, .10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(198, 255, 61, .10) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

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

.media-frame__label {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 8px;
  background: rgba(6, 17, 14, .68);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ---------- 13. 数据 / 标签 ---------- */
.data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -.01em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
}

.chip--live {
  color: var(--signal);
  border-color: rgba(255, 107, 44, .5);
}

.chip--lime {
  color: var(--lime);
  border-color: rgba(198, 255, 61, .4);
}

/* ---------- 14. 可展开组 ---------- */
.disclosure {
  border-top: 1px solid var(--line);
}

.disclosure:last-child {
  border-bottom: 1px solid var(--line);
}

.disclosure__summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fog);
  cursor: pointer;
  list-style: none;
  transition: color .2s var(--ease);
}

.disclosure__summary::-webkit-details-marker { display: none; }
.disclosure__summary:hover { color: var(--lime); }

.disclosure__icon {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: currentColor;
  transition: transform .25s var(--ease);
}

.disclosure__icon::before,
.disclosure__icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.disclosure__icon::before { left: 0; right: 0; top: 50%; height: 1px; }
.disclosure__icon::after { top: 0; bottom: 0; left: 50%; width: 1px; transition: transform .25s var(--ease); }

.disclosure[open] .disclosure__icon::after { transform: scaleY(0); }

.disclosure__body {
  padding: 0 4px 22px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--slate);
}

/* ---------- 15. 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  z-index: 200;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- 16. 显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 17. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .status-dot { animation: none; }
  .btn:hover,
  .nav-cta:hover,
  .footer-list a:hover { transform: none; }
}
