/* ==========================================================================
   看台中国 · KAIYUN — 共享样式表 /assets/site.css
   深夜体育数据编辑室：山城靛底 + 看台橙 + 信号绿
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: #0E1230;
  background-image:
    radial-gradient(1000px 520px at 8% -6%, rgba(255, 106, 26, 0.10), transparent 62%),
    radial-gradient(880px 480px at 96% 0%, rgba(43, 217, 138, 0.06), transparent 64%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: #D6DAEC;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
hr { border: 0; }

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

::selection { background: #FF6A1A; color: #0A0C1A; }

:focus-visible {
  outline: 2px solid #2BD98A;
  outline-offset: 2px;
  border-radius: 0;
}

/* ---------- 2. 变量 ---------- */
:root {
  --indigo: #0E1230;
  --indigo-2: #171C42;
  --paper: #F4F1E9;
  --ink: #0A0C1A;
  --orange: #FF6A1A;
  --orange-2: #FFA25C;
  --signal: #2BD98A;
  --alert: #FF4D5E;
  --watch: #FFC93C;
  --mute: #8C93B4;
  --edge: #2A3160;
  --text: #D6DAEC;

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

  --shell: 1280px;
  --gut: clamp(16px, 3vw, 40px);
  --masthead-h: 76px;
  --radius: 0px;
}

/* ---------- 3. 中文排版基线 ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.55em;
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.16;
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 5.2vw, 56px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }
h4 { font-size: clamp(17px, 1.6vw, 20px); }
h5, h6 { font-size: 16px; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--orange-2); text-decoration: none; }
a:hover { color: var(--orange); }

strong, b { color: var(--paper); font-weight: 700; }
small { font-size: 12.5px; color: var(--mute); }

/* ---------- 4. 布局工具 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.band {
  background: var(--indigo-2);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  padding-block: clamp(16px, 2.2vw, 26px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 6fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}

.rail {
  position: sticky;
  top: calc(var(--masthead-h) + 22px);
  display: grid;
  gap: 14px;
  align-content: start;
}

.grid-8 {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }

/* ---------- 5. 文本工具 ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--orange);
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--orange);
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.01em;
}

.rule {
  height: 1px;
  margin: 0;
  background: repeating-linear-gradient(90deg, var(--edge) 0 6px, transparent 6px 12px);
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mute);
}
.crumb a { color: var(--mute); }
.crumb a:hover { color: var(--orange-2); }
.crumb__sep { color: var(--edge); }
.crumb [aria-current="page"] { color: var(--paper); }

.prose {
  max-width: 38em;
  font-size: 16px;
  line-height: 1.85;
  color: #C6CCE4;
}
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.15em; margin-bottom: 1.1em; }
.prose li { margin-bottom: 0.45em; }
.prose blockquote {
  margin: 1.4em 0;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--orange);
  color: var(--mute);
}

.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;
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease,
              border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.btn--solid {
  background: var(--orange);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 rgba(10, 12, 26, 0.75);
}
.btn--solid:hover {
  background: var(--orange-2);
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(10, 12, 26, 0.75);
}

.btn--ghost {
  color: var(--paper);
  border-color: var(--edge);
}
.btn--ghost:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.btn--signal {
  color: var(--signal);
  border-color: rgba(43, 217, 138, 0.55);
}
.btn--signal:hover {
  color: var(--ink);
  background: var(--signal);
  border-color: var(--signal);
}

/* ---------- 7. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.tag--ok { color: var(--signal); }
.tag--watch { color: var(--watch); }
.tag--alert { color: var(--alert); }
.tag--mute { color: var(--mute); }

/* ---------- 8. 纸张卡片与图像容器 ---------- */
.paper {
  position: relative;
  background: var(--paper);
  color: #161A33;
  border: 1px solid var(--edge);
  box-shadow: 8px 8px 0 0 rgba(10, 12, 26, 0.55), 8px 8px 0 1px var(--edge);
  padding: clamp(20px, 2.6vw, 34px);
}
.paper h1, .paper h2, .paper h3, .paper h4, .paper h5, .paper h6 { color: #0F1230; }
.paper p, .paper li { color: #3A4066; }
.paper strong { color: #0F1230; }
.paper small, .paper .num { color: #565D85; }
.paper .kicker { color: #C2470A; }
.paper .kicker::before { background: #C2470A; }

.paper--tilt { transform: rotate(-0.6deg); }

.frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--indigo-2);
  border: 1px solid var(--edge);
  aspect-ratio: 16 / 9;
}
.frame img,
.frame picture > img,
.frame svg,
.frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame--tall { aspect-ratio: 3 / 4; }
.frame--square { aspect-ratio: 1 / 1; }
.frame--band { aspect-ratio: 21 / 9; }

.frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 6px 12px;
  background: rgba(10, 12, 26, 0.84);
  border-top: 1px solid var(--edge);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- 9. 头部 ---------- */
.skip-link {
  position: fixed;
  left: 16px;
  top: 0;
  z-index: 200;
  padding: 10px 18px;
  background: var(--orange);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--ink);
  transform: translateY(-130%);
  transition: transform 0.16s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(12px);
  color: var(--ink);
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(14, 18, 48, 0.94);
  border-bottom: 1px solid var(--edge);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}

.masthead__inner {
  position: relative;
  height: var(--masthead-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}

.masthead__meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-2) 58%, var(--signal) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

/* 品牌块 */
.brandlock {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--paper);
}
.brandlock__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 3px 3px 0 rgba(10, 12, 26, 0.8);
}
.brandlock__type {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brandlock__line {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--paper);
  white-space: nowrap;
}
.brandlock__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--mute);
  white-space: nowrap;
}
.brandlock:hover .brandlock__line { color: var(--orange-2); }

/* 中部常驻状态区 */
.masthead__state {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.querypin {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 8px 15px;
  background: var(--indigo-2);
  border: 1px solid var(--edge);
  color: var(--paper);
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.querypin__label {
  font-size: 14px;
  font-weight: 700;
  color: inherit;
}
.querypin__meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mute);
}
.querypin:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.querypin:hover .querypin__meta { color: var(--orange-2); }

.livedot {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--mute);
  white-space: nowrap;
}
.livedot__bulb {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(43, 217, 138, 0.16);
  animation: kai-breathe 2.4s ease-in-out infinite;
}
@keyframes kai-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.32; }
}

/* 栏目条 */
.navrail { flex: 0 0 auto; }

.navrail__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.9vw, 12px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.navrail__link {
  position: relative;
  display: inline-block;
  padding: 9px 7px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.16s ease;
}
.navrail__link::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 3px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}
.navrail__link:hover { color: var(--paper); }
.navrail__link:hover::after { transform: scaleX(1); }
.navrail__link[aria-current="page"] { color: var(--orange); }
.navrail__link[aria-current="page"]::after { transform: scaleX(1); }

/* 移动端栏目按钮 */
.navtoggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 13px;
  background: transparent;
  border: 1px solid var(--edge);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.navtoggle:hover { border-color: var(--orange); color: var(--orange); }
.navtoggle__bars {
  display: block;
  width: 17px;
  height: 10px;
  background-image:
    linear-gradient(var(--orange), var(--orange)),
    linear-gradient(var(--orange), var(--orange)),
    linear-gradient(var(--orange), var(--orange));
  background-repeat: no-repeat;
  background-size: 100% 2px;
  background-position: 0 0, 0 4px, 0 8px;
  transition: opacity 0.16s ease;
}
.navtoggle[aria-expanded="true"] .navtoggle__bars { opacity: 0.55; }

/* ---------- 10. 页脚 ---------- */
.colophon {
  margin-top: clamp(64px, 9vw, 130px);
  background: var(--ink);
  border-top: 1px solid var(--edge);
  color: var(--mute);
  font-size: 13.5px;
}

.colophon__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(38px, 5vw, 66px);
}

.colophon__brand { min-width: 0; }
.colophon__mark {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.colophon__tag {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--orange);
}
.colophon__note {
  margin: 0 0 22px;
  max-width: 30em;
  line-height: 1.8;
  color: var(--mute);
}

.colophon__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  min-width: 0;
}
.colophon__col { min-width: 0; }

.colophon__title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--edge);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--paper);
}

.colophon__list {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.65;
}
.colophon__list a {
  color: var(--mute);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.colophon__list a:hover {
  color: var(--orange-2);
  border-bottom-color: var(--orange-2);
}
.colophon__list .num { font-size: 12.5px; color: #A6ADCB; }

.colophon__contact { min-width: 0; }

.colophon__base {
  border-top: 1px solid var(--edge);
  background: rgba(14, 18, 48, 0.55);
}
.colophon__base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  padding-block: 18px;
  font-size: 12.5px;
}
.colophon__legal {
  margin: 0;
  max-width: 52ch;
  line-height: 1.7;
  color: var(--mute);
}
.colophon__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--mute);
}
.colophon__meta a { color: var(--mute); }
.colophon__meta a:hover { color: var(--orange-2); }
.colophon__icp { font-family: var(--mono); font-size: 12px; }

/* ---------- 11. 返回顶部 ---------- */
.totop {
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  bottom: clamp(14px, 3vw, 34px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  background: var(--orange);
  color: var(--ink);
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(10, 12, 26, 0.85);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.2s ease, transform 0.2s ease,
              visibility 0.2s linear, background-color 0.16s ease;
}
.totop[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.totop:hover { background: var(--orange-2); }
.totop__arrow { font-family: var(--mono); font-size: 14px; line-height: 1; }

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1180px) {
  .livedot__text { display: none; }
  .navrail__list { gap: 2px; }
  .navrail__link { font-size: 14px; padding: 9px 6px; }
}

@media (max-width: 1000px) {
  .colophon__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .colophon__brand { grid-column: 1 / -1; }
  .colophon__contact { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  :root { --masthead-h: 68px; }

  .masthead__state { display: none; }
  .navtoggle { display: inline-flex; }

  .navrail {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--indigo-2);
    border-top: 1px solid var(--edge);
    border-bottom: 1px solid var(--edge);
    box-shadow: 0 20px 34px rgba(10, 12, 26, 0.6);
    padding-inline: var(--gut);
  }
  .navrail[data-open] { display: block; }

  .navrail__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 14px 0 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--edge) transparent;
  }
  .navrail__list::-webkit-scrollbar { height: 4px; }
  .navrail__list::-webkit-scrollbar-thumb { background: var(--edge); }

  .navrail__link {
    padding: 9px 15px;
    border: 1px solid var(--edge);
    background: rgba(244, 241, 233, 0.03);
    font-size: 14px;
  }
  .navrail__link::after { display: none; }
  .navrail__link[aria-current="page"] {
    border-color: var(--orange);
    background: rgba(255, 106, 26, 0.1);
  }
}

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; top: auto; }

  .grid-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .span-3, .span-4, .span-5, .span-6, .span-8 { grid-column: span 4; }
  .span-2 { grid-column: span 2; }

  .paper--tilt { transform: none; }
}

@media (max-width: 860px) {
  .frame--band { aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }

  .masthead__inner { gap: 10px; }
  .brandlock__tag { display: none; }
  .brandlock__mark { width: 32px; height: 32px; font-size: 12px; }
  .brandlock__line { font-size: 15px; }
  .navtoggle { padding: 8px 11px; }
  .navtoggle__text { display: none; }

  .colophon__inner { grid-template-columns: minmax(0, 1fr); }
  .colophon__nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .colophon__base-inner { flex-direction: column; align-items: flex-start; }

  .totop { padding: 10px 14px; }
  .totop__text { display: none; }
}

@media (max-width: 420px) {
  .colophon__nav { grid-template-columns: minmax(0, 1fr); }
  .grid-8 { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-3, .span-4, .span-5, .span-6, .span-8 { grid-column: span 1; }
}

/* ---------- 13. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .livedot__bulb { animation: none; opacity: 1; }
  .masthead__meter { transition: none; }
  .totop { transition: none; }
}
