/* =========================================================
   K体育68 · /assets/site.css
   共享外壳：框架式导航、堆叠面板语言、编辑部式页脚
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  /* 色板 */
  --ink-900: #07111F;
  --ink-800: #0D1B2E;
  --glass: #1B3550;
  --lime: #B8FF3D;
  --orange: #FF6A2B;
  --silver: #C9D3DF;
  --ice: #F4F7FB;
  --cyan: #35E0D0;
  --alert: #FF4D5E;
  --moss: #1C3326;

  --line: rgba(201, 211, 223, .16);
  --line-strong: rgba(201, 211, 223, .32);
  --glass-bg: rgba(27, 53, 80, .42);

  /* 度量 */
  --rail-w: 216px;
  --header-h: 64px;
  --shell-max: 1180px;
  --gutter: clamp(18px, 4vw, 56px);

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

  --ease-out: cubic-bezier(.22, .9, .28, 1);
  --skew: -8deg;
  --shadow-panel: 0 26px 64px -38px rgba(0, 0, 0, .95);
}

/* ---------- reset ---------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4,
p, ul, ol, figure, blockquote {
  margin: 0;
}

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

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

button { font: inherit; }

a { color: inherit; }

/* ---------- base ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(900px 520px at 84% -10%, rgba(53, 224, 208, .13), transparent 62%),
    radial-gradient(760px 480px at 4% 14%, rgba(184, 255, 61, .08), transparent 66%),
    linear-gradient(180deg, #07111F 0%, #081624 46%, #07111F 100%);
  background-attachment: fixed;
  color: var(--ice);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -.01em;
}

::selection {
  background: var(--lime);
  color: #06131f;
}

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

#main-content {
  display: block;
  scroll-margin-top: calc(var(--header-h) + 18px);
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--lime);
  color: #06131f;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform .22s var(--ease-out);
}

.skip-link:focus-visible { transform: translateY(0); }

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

.brand__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--lime);
  color: #06131f;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  transform: skewX(var(--skew));
  box-shadow: 6px 6px 0 -3px rgba(255, 106, 43, .6);
}

.brand__text { display: block; }

.brand__name {
  display: block;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .02em;
}

.brand__sub {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(201, 211, 223, .72);
}

/* ---------- header shell ---------- */
.site-header {
  position: relative;
  z-index: 90;
  background: linear-gradient(180deg, rgba(13, 27, 46, .97), rgba(7, 17, 31, .99));
  border-bottom: 1px solid var(--line);
}

.site-header__tagline {
  margin: 0;
  font-size: 11px;
  letter-spacing: .3em;
  color: rgba(201, 211, 223, .45);
}

/* ---------- nav toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: rgba(27, 53, 80, .55);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ice);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}

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

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-toggle__label { line-height: 1; }

/* ---------- frame nav ---------- */
.frame-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.frame-nav__item { display: block; }

.frame-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  color: var(--silver);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s, background .2s, border-color .2s;
}

.frame-nav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: rgba(201, 211, 223, .48);
}

.frame-nav__label { flex: 1 1 auto; }

.frame-nav__link:hover {
  color: var(--ice);
  background: rgba(27, 53, 80, .55);
  border-left-color: var(--cyan);
}

.frame-nav__link[aria-current="page"] {
  color: #06131f;
  background: var(--lime);
  border-left-color: var(--lime);
  font-weight: 900;
}

.frame-nav__link[aria-current="page"] .frame-nav__num { color: rgba(6, 19, 31, .66); }

.frame-nav__foot {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.frame-nav__cta {
  width: 100%;
  padding: 11px 12px;
  font-size: 13px;
}

.frame-nav__quick {
  display: grid;
  gap: 2px;
}

.frame-nav__quick a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(201, 211, 223, .14);
  color: rgba(201, 211, 223, .74);
  font-size: 12px;
  text-decoration: none;
  transition: color .2s;
}

.frame-nav__quick a::after {
  content: "↗";
  font-family: var(--font-mono);
  color: rgba(184, 255, 61, .7);
}

.frame-nav__quick a:hover { color: var(--lime); }

/* ---------- scroll meter ---------- */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  background: rgba(201, 211, 223, .12);
}

.scroll-meter__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  transition: transform .12s linear;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s var(--ease-out), box-shadow .16s var(--ease-out), background .2s, color .2s, border-color .2s;
}

.btn--lime {
  background: var(--lime);
  color: #06131f;
  box-shadow: 4px 4px 0 rgba(53, 224, 208, .3);
}

.btn--lime:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(53, 224, 208, .34);
}

.btn--orange {
  background: var(--orange);
  color: #1b0700;
  box-shadow: 4px 4px 0 rgba(184, 255, 61, .24);
}

.btn--orange:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(184, 255, 61, .28);
}

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

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

.btn--block { width: 100%; }

/* ---------- copy button ---------- */
.copy-btn {
  appearance: none;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(27, 53, 80, .4);
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.copy-btn:hover { color: var(--lime); border-color: var(--lime); }

.copy-btn[data-copied="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: #06131f;
}

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  gap: clamp(14px, 2vw, 26px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--tight { gap: 12px; }

/* ---------- crumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(201, 211, 223, .7);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.crumbs li + li::before {
  content: "／";
  color: rgba(201, 211, 223, .32);
}

.crumbs a {
  color: var(--silver);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}

.crumbs a:hover { color: var(--lime); border-bottom-color: var(--lime); }

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

/* ---------- panels ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 38px);
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow-panel);
}

.panel--glass {
  background: var(--glass-bg);
  border-color: var(--line-strong);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.panel__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  line-height: 1;
  color: var(--lime);
  letter-spacing: -.02em;
}

/* ---------- eyebrow / tag ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lime);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--lime);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--silver);
}

.tag--live {
  color: var(--alert);
  border-color: rgba(255, 77, 94, .5);
}

.tag--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--alert);
}

/* ---------- prose ---------- */
.prose {
  max-width: 64ch;
  font-size: 16.5px;
  line-height: 1.78;
  color: rgba(244, 247, 251, .86);
}

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

.prose h2,
.prose h3 {
  margin-top: 1.6em;
  color: var(--ice);
}

.prose ul,
.prose ol {
  margin-top: 1em;
  padding-left: 1.3em;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li + li { margin-top: .4em; }

.prose li::marker { color: var(--lime); }

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 224, 208, .5);
}

.prose a:hover { color: var(--lime); border-bottom-color: var(--lime); }

/* ---------- media frame ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(27, 53, 80, .68), rgba(7, 17, 31, .92)),
    repeating-linear-gradient(115deg, rgba(201, 211, 223, .08) 0 1px, transparent 1px 14px);
}

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

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

.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 7px 12px;
  background: rgba(7, 17, 31, .8);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--silver);
}

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

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

/* ---------- to top ---------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(27, 53, 80, .78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .24s var(--ease-out), transform .24s var(--ease-out), border-color .2s, color .2s;
}

.to-top.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover { border-color: var(--lime); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 110px);
  background: linear-gradient(180deg, rgba(13, 27, 46, .96), #050e19);
  border-top: 1px solid var(--line);
  color: var(--silver);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), var(--cyan) 42%, rgba(255, 106, 43, .7) 72%, transparent 100%);
}

.footer-edge {
  height: clamp(26px, 4vw, 52px);
  background: linear-gradient(100deg, var(--lime), var(--cyan) 44%, var(--orange));
  clip-path: polygon(0 100%, 0 62%, 100% 0, 100% 100%);
  opacity: .92;
}

.footer__inner {
  position: relative;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(30px, 5vw, 62px) var(--gutter) 0;
  overflow: hidden;
}

.footer__stamp {
  position: absolute;
  right: clamp(6px, 3vw, 34px);
  bottom: -12px;
  font-family: var(--font-mono);
  font-size: clamp(84px, 16vw, 190px);
  font-weight: 900;
  line-height: .8;
  letter-spacing: -.04em;
  color: rgba(201, 211, 223, .05);
  pointer-events: none;
  user-select: none;
}

.footer__grid {
  position: relative;
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: 1fr;
}

.footer__brandcol { max-width: 34ch; }

.footer__note {
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(201, 211, 223, .78);
}

.footer__contact {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.footer__contact li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(201, 211, 223, .12);
  font-size: 13px;
}

.footer__k {
  flex: 0 0 auto;
  min-width: 34px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(201, 211, 223, .52);
}

.footer__v {
  color: var(--ice);
  word-break: break-word;
}

.footer__col-title {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ice);
}

.footer__col-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35em;
  width: 3px;
  height: 1em;
  background: var(--lime);
}

.footer__links {
  display: grid;
  gap: 1px;
  margin-top: 14px;
}

.footer__links a {
  display: block;
  padding: 6px 0;
  color: rgba(201, 211, 223, .8);
  font-size: 13.5px;
  text-decoration: none;
  transition: color .2s, transform .2s var(--ease-out);
}

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

.footer__base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: clamp(28px, 4vw, 52px);
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: rgba(201, 211, 223, .66);
}

.footer__copy { font-family: var(--font-mono); letter-spacing: .04em; }

.footer__icp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footer__meta { font-size: 12px; color: rgba(201, 211, 223, .5); }

/* =========================================================
   响应式
   ========================================================= */

@media (min-width: 900px) {
  body { padding-left: var(--rail-w); }

  #main-content { scroll-margin-top: 24px; }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    padding: 24px 16px 18px 30px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    box-shadow: 34px 0 70px -58px rgba(0, 0, 0, .95);
  }

  .site-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 150px;
    background: linear-gradient(180deg, var(--lime), transparent);
  }

  .site-header__tagline {
    position: absolute;
    left: 9px;
    top: 50%;
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
    margin: 0;
    pointer-events: none;
  }

  .frame-nav {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 28px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .frame-nav__foot { margin-top: auto; }

  .scroll-meter {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    background: rgba(201, 211, 223, .1);
  }

  .scroll-meter__bar {
    background: linear-gradient(180deg, var(--cyan), var(--lime));
    transform: scaleY(var(--p, 0));
    transform-origin: center top;
  }

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

  .span-4 { grid-column: span 4; }
  .span-6 { grid-column: span 6; }
  .span-8 { grid-column: span 8; }
  .span-10 { grid-column: span 10; }
  .span-12 { grid-column: span 12; }

  .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

@media (max-width: 899px) {
  .site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    height: var(--header-h);
    padding: 0 16px;
    background: rgba(7, 17, 31, .92);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
  }

  .site-header__tagline { display: none; }

  .brand { flex: 0 1 auto; min-width: 0; }

  .brand__mark { width: 32px; height: 32px; font-size: 17px; box-shadow: 4px 4px 0 -2px rgba(255, 106, 43, .6); }

  .brand__name { font-size: 15px; }

  .brand__sub { font-size: 9px; letter-spacing: .12em; }

  .nav-toggle { display: inline-flex; margin-left: auto; flex: 0 0 auto; }

  .frame-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 16px 16px 24px;
    background: rgba(9, 20, 34, .985);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .28s var(--ease-out), transform .28s var(--ease-out), visibility .28s;
  }

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

  .frame-nav__link { padding: 13px 12px; font-size: 16px; }

  .frame-nav__num { font-size: 11px; }

  .frame-nav__foot { margin-top: 20px; }

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

  .footer__brandcol { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }

  .footer__base { flex-direction: column; align-items: flex-start; }

  .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
}

@media (min-width: 1280px) {
  :root { --rail-w: 236px; }
}

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

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

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

  .scroll-meter__bar { transition: none; }
}
