/* ============================================================
   AK赛场 · 共享外壳样式 /assets/site.css
   夜场看台 · 折页索引 · 状态面板
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- 2. 变量 ---------- */
:root {
  --night: #0A1A2F;
  --stand: #12345A;
  --lime: #B6FF3B;
  --orange: #FF7A1A;
  --cream: #F4EAD3;
  --brown: #1B1410;
  --mist: #7E93A8;
  --teal: #2BD9B0;
  --red: #C43B2E;
  --lime-pale: #E6FFB0;

  --rail-w: 250px;
  --bar-h: 62px;
  --maxw: 1180px;
  --gutter: clamp(18px, 4vw, 56px);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "DIN Alternate", Menlo,
    Consolas, "Courier New", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-fold: cubic-bezier(.34, 1.35, .5, 1);
  --dur: 220ms;

  --line: rgba(126, 147, 168, .34);
  --line-strong: rgba(126, 147, 168, .62);
  --shadow-fold: 7px 9px 0 rgba(0, 0, 0, .34);
}

/* ---------- 3. 页面基底：暗场网格 + 看台台阶光 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--cream);
  background-color: var(--night);
  background-image:
    radial-gradient(1100px 520px at 88% -12%, rgba(18, 52, 90, .95), transparent 68%),
    radial-gradient(720px 420px at -8% 108%, rgba(43, 217, 176, .10), transparent 70%),
    repeating-linear-gradient(90deg, rgba(126, 147, 168, .075) 0 1px, transparent 1px 76px);
  background-attachment: fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 900px) {
  body {
    padding-left: 0;
    background-attachment: scroll, scroll, scroll;
  }
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--brown);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  border: 2px solid var(--brown);
  transform: translateY(-220%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 头部：左侧折页轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  background: linear-gradient(180deg, rgba(10, 26, 47, .99), rgba(18, 52, 90, .99));
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.rail__progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 3px;
  height: 100vh;
  background: var(--lime);
  transform: scaleY(0);
  transform-origin: top center;
  opacity: .85;
  pointer-events: none;
  z-index: 70;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
  padding: 18px 16px 22px;
}

.rail::before {
  content: "";
  display: block;
  height: 6px;
  background: repeating-linear-gradient(115deg, var(--lime) 0 14px, transparent 14px 28px);
  opacity: .55;
}

/* 品牌 */
.rail__brand {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand__no {
  display: inline-block;
  padding: 2px 9px 3px;
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--brown);
  background: var(--lime);
  transform: skewX(-9deg);
}
.brand__name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .05em;
  color: var(--cream);
}
.brand__line {
  font-size: 12.5px;
  letter-spacing: .13em;
  color: var(--mist);
}

/* 抽屉按钮（桌面隐藏） */
.rail__toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--lime);
  border: 1px solid rgba(182, 255, 59, .55);
  background: rgba(182, 255, 59, .07);
}
.rail__toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.rail__toggle-bars::before,
.rail__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease);
}
.rail__toggle-bars::before { top: -6px; }
.rail__toggle-bars::after { top: 6px; }
.site-header[data-open] .rail__toggle-bars { background: transparent; }
.site-header[data-open] .rail__toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .rail__toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* 导航 */
.site-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 13px;
}
.site-nav__hint {
  padding-left: 9px;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: .06em;
  color: var(--mist);
  border-left: 2px solid var(--orange);
}
.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-nav__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 8px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--cream);
  border-left: 3px solid transparent;
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    padding-left var(--dur) var(--ease);
}
.site-nav__list a:hover,
.site-nav__list a:focus-visible {
  padding-left: 13px;
  color: var(--lime);
  background: rgba(182, 255, 59, .10);
  border-left-color: var(--lime);
}
.nav-num {
  min-width: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--mist);
  transform: skewX(-9deg);
}
.site-nav__list a:hover .nav-num { color: var(--lime); }
.nav-label { flex: 1 1 auto; }

.site-nav__list a[aria-current="page"] {
  color: var(--brown);
  background: var(--lime);
  border-left-color: var(--brown);
}
.site-nav__list a[aria-current="page"] .nav-num { color: var(--brown); opacity: .6; }

/* 第2栏入口 */
.rail__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .05em;
  color: var(--brown);
  background: var(--orange);
  border: 2px solid transparent;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.rail__cta::after {
  content: "›";
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
}
.rail__cta:hover,
.rail__cta:focus-visible {
  background: var(--lime);
  transform: translateX(3px);
}

.rail__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.rail__foot span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--mist);
}

@media (prefers-reduced-motion: no-preference) {
  .rail__cta { animation: cta-breathe 2.4s var(--ease) 900ms 1 both; }
  @keyframes cta-breathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, 0); }
    45% { box-shadow: 0 0 0 7px rgba(255, 122, 26, .26); }
  }
}

/* ---------- 6. 平板与移动端：顶部条 + 抽屉 ---------- */
@media (max-width: 1080px) {
  :root { --rail-w: 216px; }
}

@media (max-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    background: linear-gradient(180deg, rgba(18, 52, 90, .99), rgba(10, 26, 47, .99));
  }
  .rail__progress {
    position: fixed;
    width: 3px;
    height: 100vh;
  }
  .rail {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--bar-h);
    min-height: var(--bar-h);
    padding: 0 14px;
  }
  .rail::before { display: none; }
  .rail__brand {
    flex-direction: row;
    align-items: center;
    gap: 9px;
    min-width: 0;
  }
  .brand__line {
    font-size: 11.5px;
    letter-spacing: .08em;
    white-space: nowrap;
  }
  .brand__no { font-size: 20px; }
  .brand__name { font-size: 16.5px; }
  .rail__toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    z-index: 65;
    width: min(330px, 88vw);
    height: calc(100vh - var(--bar-h));
    max-height: calc(100vh - var(--bar-h));
    padding: 18px 16px 28px;
    overflow-y: auto;
    background: var(--stand);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 12px 0 34px rgba(0, 0, 0, .48);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 260ms var(--ease), visibility 260ms linear;
  }
  .site-header[data-open] .site-nav {
    transform: translateX(0);
    visibility: visible;
  }
  .site-nav__list a { font-size: 16px; padding: 12px 10px 12px 8px; }
  .rail__cta { padding: 13px 15px; }
}

@media (max-width: 420px) {
  .brand__line { display: none; }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 118px);
  padding: clamp(36px, 5vw, 64px) var(--gutter) 0;
  background: linear-gradient(180deg, rgba(18, 52, 90, .96), rgba(10, 26, 47, .99));
  border-top: 1px solid var(--line);
  z-index: 1;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: repeating-linear-gradient(115deg, var(--lime) 0 18px, transparent 18px 36px);
  opacity: .45;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr .8fr .8fr 1.25fr;
  gap: clamp(20px, 3vw, 46px);
  max-width: var(--maxw);
  margin: 0 auto;
}

.footer__brand { min-width: 0; }
.footer__logo {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--cream);
}
.footer__logo span {
  color: var(--lime);
  margin-left: 2px;
}
.footer__note {
  margin-top: 12px;
  max-width: 36ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--mist);
}

.footer__title {
  margin-bottom: 12px;
  padding-bottom: 10px;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: .2em;
  color: var(--lime);
  border-bottom: 1px solid var(--line);
}
.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer__col li a {
  position: relative;
  display: inline-block;
  font-size: 14.5px;
  color: var(--cream);
}
.footer__col li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: var(--lime);
  transition: width var(--dur) var(--ease);
}
.footer__col li a:hover,
.footer__col li a:focus-visible { color: var(--lime); }
.footer__col li a:hover::after,
.footer__col li a:focus-visible::after { width: 100%; }

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}
.contact-row__label {
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--mist);
}
.footer__email {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: .01em;
  color: var(--cream);
  word-break: break-all;
}
.footer__address {
  font-size: 14px;
  line-height: 1.7;
  color: var(--cream);
}
.contact-copy {
  align-self: flex-start;
  margin-top: 5px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--lime);
  border: 1px solid rgba(182, 255, 59, .5);
  background: rgba(182, 255, 59, .08);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.contact-copy:hover { background: var(--lime); color: var(--brown); border-color: var(--lime); }
.contact-copy[data-copied="true"] {
  color: var(--brown);
  background: var(--teal);
  border-color: var(--teal);
}
.footer__note-sm {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--mist);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  max-width: var(--maxw);
  margin: clamp(28px, 4vw, 46px) auto 0;
  padding: 16px 0 24px;
  border-top: 1px solid var(--line);
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mist);
}

@media (max-width: 1100px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__note { max-width: none; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .footer__base { flex-direction: column; align-items: flex-start; }
}

/* ---------- 8. 通用布局组件 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--mist);
}
.crumb a { color: var(--mist); transition: color var(--dur) var(--ease); }
.crumb a:hover { color: var(--lime); }
.crumb__sep { color: rgba(126, 147, 168, .55); }
.crumb [aria-current="page"] { color: var(--cream); }

.page-head {
  padding-block: clamp(26px, 4vw, 54px) clamp(20px, 3vw, 34px);
}
.page-head__kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .26em;
  color: var(--lime);
  text-transform: uppercase;
}
.page-head__title {
  margin-top: 10px;
  font-size: clamp(34px, 6vw, 76px);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.035em;
  color: var(--cream);
}
.page-head__lead {
  margin-top: 16px;
  max-width: 58ch;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.75;
  color: var(--mist);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-size: clamp(21px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--cream);
}
.section-title::before {
  content: "";
  flex: none;
  width: 26px;
  height: 4px;
  background: var(--lime);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
}

/* ---------- 9. 按钮与标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
  border: 2px solid transparent;
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.btn--lime { background: var(--lime); color: var(--brown); }
.btn--lime:hover,
.btn--lime:focus-visible { background: var(--lime-pale); transform: translateY(-2px); }
.btn--orange { background: var(--orange); color: var(--brown); }
.btn--orange:hover,
.btn--orange:focus-visible { background: #FFA04D; transform: translateY(-2px); }
.btn--ghost { color: var(--cream); border-color: var(--line-strong); }
.btn--ghost:hover,
.btn--ghost:focus-visible { color: var(--lime); border-color: var(--lime); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--mist);
  border: 1px solid var(--line-strong);
}
.tag__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.tag--live { color: var(--teal); border-color: rgba(43, 217, 176, .5); background: rgba(43, 217, 176, .10); }
.tag--hot { color: var(--orange); border-color: rgba(255, 122, 26, .5); background: rgba(255, 122, 26, .10); }
.tag--note { color: #F08275; border-color: rgba(196, 59, 46, .6); background: rgba(196, 59, 46, .14); }

/* ---------- 10. 折页纸面与图片容器 ---------- */
.paper {
  background: var(--cream);
  color: var(--brown);
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(27, 20, 16, .16);
  box-shadow: var(--shadow-fold);
}
.paper h2,
.paper h3,
.paper h4 { color: var(--brown); }
.paper a { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }
.paper a:hover { color: var(--red); }

.fold { position: relative; overflow: hidden; }
.fold::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 22px 22px 0;
  border-color: transparent var(--night) transparent transparent;
}

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--stand);
  border: 1px solid var(--line);
}
.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(126, 147, 168, .14) 0 8px, transparent 8px 16px);
}
.media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media__caption {
  margin-top: 8px;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--mist);
}

/* ---------- 11. 数据与注释 ---------- */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.side-note {
  display: inline-block;
  writing-mode: vertical-rl;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--mist);
}

/* ---------- 12. 时间线 ---------- */
.timeline {
  position: relative;
  padding-left: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--lime), rgba(126, 147, 168, .22));
}

/* ---------- 13. 标签页 ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--mist);
  border-bottom: 3px solid transparent;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tab:hover { color: var(--cream); background: rgba(182, 255, 59, .09); }
.tab[aria-selected="true"] {
  color: var(--brown);
  background: var(--lime);
  border-bottom-color: var(--brown);
}
.panel { padding-top: 22px; }
.panel[hidden] { display: none; }

/* ---------- 14. 折叠面板 ---------- */
.fold-panel {
  background: rgba(18, 52, 90, .45);
  border: 1px solid var(--line);
}
.fold-panel + .fold-panel { margin-top: 10px; }
.fold-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--cream);
  list-style: none;
  cursor: pointer;
}
.fold-panel__head::-webkit-details-marker { display: none; }
.fold-panel__head::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  color: var(--lime);
}
.fold-panel[open] .fold-panel__head::after { content: "–"; }
.fold-panel__body {
  padding: 0 18px 18px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--cream);
}

/* ---------- 15. 工具类与显现 ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px) rotate(.3deg);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease-fold);
}
.has-js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 16. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .site-nav { transition: none; }
}
