/* 竞彩主站 — 全站共享样式 /assets/site.css */

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

:root {
  --bg: #F5EEDC;
  --ink: #2B1D14;
  --accent: #E8590C;
  --navy: #163A5F;
  --lime: #C6FF00;
  --muted: #8C7A6B;
  --card: #FFFFFF;
  --panel: #D8E2EC;
  --line: #4A2E20;
  --nav-w: 280px;
  --border-w: 3px;
  --header-h: 64px;
  --shadow-hard: 4px 4px 0 var(--line);
  --shadow-lift: 6px 8px 0 var(--line);
  --shadow-soft: 4px 4px 0 rgba(43, 29, 20, 0.15);
  --font-head: 'Noto Serif SC', 'Songti SC', SimSun, Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}

body.nav-lock { overflow: hidden; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); line-height: 1.2; }
p { overflow-wrap: break-word; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img, video, svg { display: block; max-width: 100%; height: auto; }
::selection { background: var(--navy); color: var(--lime); }

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

#main-content { outline: none; scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- 2. Skip link ---------- */
.skip-link {
  position: fixed;
  top: -64px;
  left: 12px;
  z-index: 500;
  background: var(--navy);
  color: var(--lime);
  border: 3px solid var(--lime);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: var(--border-w) solid var(--line);
}
.site-header__bar { padding: 0 16px; }
.site-header__bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  max-width: 1440px;
  margin: 0 auto;
}

/* 3.1 Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--ink);
}
.brand__box {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--lime);
  color: var(--ink);
  border: 3px solid var(--line);
  box-shadow: 3px 3px 0 var(--line);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  transform: skewX(-8deg);
}
.brand__text {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* 3.2 Ticker */
.ticker {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  background: var(--card);
  border: 2px solid var(--line);
  box-shadow: 2px 2px 0 var(--line);
}
.ticker__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: -2px;
  padding: 0 10px;
  background: var(--accent);
  color: #fff;
  border-right: 2px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  transform: skewX(-10deg);
}
.ticker__label::after {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  animation: blink 1.4s steps(2, start) infinite;
}
.ticker__viewport { flex: 1; min-width: 0; overflow: hidden; align-self: center; }
.ticker__track { display: flex; width: max-content; animation: ticker-move 36s linear infinite; }
.ticker__list { display: flex; align-items: center; }
.ticker__item {
  padding: 0 26px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
}
.ticker__item::before { content: '◆'; color: var(--accent); margin-right: 10px; font-size: 9px; }
@keyframes ticker-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: 0; } }

/* 3.3 Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 3px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
  box-shadow: var(--shadow-hard);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--line); }
.btn--navy { background: var(--navy); color: #fff; }
.site-header__cta { display: none; white-space: nowrap; }

/* 3.4 Nav toggle */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 3px solid var(--line);
  background: var(--navy);
  color: var(--lime);
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.nav-toggle:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--line); }
.nav-toggle__bars { display: flex; flex-direction: column; gap: 4px; }
.nav-toggle__bar { display: block; width: 20px; height: 3px; background: var(--lime); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle__label { font-size: 10px; font-weight: 800; letter-spacing: 0.18em; }

/* ---------- 4. Side navigation ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  width: min(var(--nav-w), 84vw);
  height: 100vh;
  height: 100dvh;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
  border-right: var(--border-w) solid var(--line);
  transform: translateX(calc(-100% - 4px));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
.site-nav[data-open] {
  transform: translateX(0);
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.32);
}
.site-nav__head { padding: 24px 22px 18px; border-bottom: 2px solid rgba(255, 255, 255, 0.16); }
.site-nav__eyebrow { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.32em; color: var(--lime); }
.site-nav__title { display: block; margin-top: 4px; font-family: var(--font-head); font-size: 28px; font-weight: 900; letter-spacing: 0.06em; color: #fff; }
.site-nav__list { flex: 1; overflow-y: auto; padding: 12px 14px; }
.site-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}
.site-nav__link::before {
  content: '';
  flex: 0 0 auto;
  width: 26px;
  height: 4px;
  background: rgba(255, 255, 255, 0.28);
  transition: background 0.18s ease, width 0.18s ease;
}
.site-nav__link:hover { background: var(--lime); color: var(--ink); padding-left: 18px; }
.site-nav__link:hover::before { background: var(--accent); width: 34px; }
.site-nav__link[aria-current="page"] { background: var(--lime); color: var(--ink); font-weight: 800; box-shadow: inset 4px 0 0 var(--accent); }
.site-nav__link[aria-current="page"]::before { background: var(--accent); width: 34px; }
.site-nav__foot { padding: 16px 22px 20px; border-top: 2px solid rgba(255, 255, 255, 0.16); }
.site-nav__cta { display: flex; width: 100%; margin-bottom: 14px; }
.site-nav__note { font-size: 12px; line-height: 1.65; color: rgba(255, 255, 255, 0.62); }
.site-nav__code { display: inline-block; margin-top: 10px; padding: 2px 8px; border: 1px solid rgba(198, 255, 0, 0.45); color: var(--lime); font-size: 11px; letter-spacing: 0.08em; }
.site-nav::after {
  content: '';
  display: block;
  height: 10px;
  background: repeating-linear-gradient(135deg, var(--lime) 0 12px, var(--navy) 12px 24px);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

/* ---------- 5. Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 300;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 54px;
  height: 54px;
  background: var(--navy);
  color: var(--lime);
  border: 3px solid var(--line);
  box-shadow: var(--shadow-hard);
  font-size: 20px;
  line-height: 1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, background 0.18s ease;
}
.back-to-top.is-visible { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); color: #fff; }
.back-to-top__label { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; }

/* ---------- 6. Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.86);
  border-top: var(--border-w) solid var(--line);
}
.site-footer__top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 20px 32px;
  display: grid;
  gap: 32px;
}
.brand--footer .brand__box { background: var(--lime); color: var(--ink); }
.brand--footer .brand__text { color: #fff; }
.site-footer__tagline { margin-top: 12px; max-width: 34em; font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, 0.62); }
.site-footer__trust { margin-top: 10px; max-width: 36em; font-size: 12px; line-height: 1.7; color: rgba(255, 255, 255, 0.48); }
.site-footer__heading {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 16px;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.1em;
}
.site-footer__nav a,
.site-footer__info li {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}
.site-footer__nav a { transition: color 0.15s ease, padding-left 0.15s ease; }
.site-footer__nav a:hover,
.site-footer__info a:hover { color: var(--lime); padding-left: 4px; }
.site-footer__info a { color: var(--lime); }
.site-footer__bar { border-top: 2px solid rgba(255, 255, 255, 0.16); }
.site-footer__bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- 7. Layout primitives ---------- */
.container,
.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.page-pad { padding: 28px 0 56px; }
.section-pad { padding: 40px 0; }

/* ---------- 8. Section head & breadcrumb ---------- */
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.section-head { margin-bottom: 24px; padding-bottom: 12px; border-bottom: var(--border-w) solid var(--line); }
.section-title { display: block; margin-top: 6px; font-family: var(--font-head); font-size: clamp(26px, 4vw, 42px); font-weight: 900; line-height: 1.15; }
.section-sub { margin-top: 8px; color: var(--muted); font-size: 15px; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0; font-size: 14px; }
.breadcrumb a { color: var(--ink); font-weight: 500; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--muted); }
.breadcrumb__current { color: var(--muted); font-weight: 600; }

/* ---------- 9. Grid ---------- */
.grid { display: grid; gap: 20px; }
.grid--2,
.grid--3 { grid-template-columns: 1fr; }

/* ---------- 10. Cards ---------- */
.card {
  background: var(--card);
  border: var(--border-w) solid var(--line);
  box-shadow: var(--shadow-hard);
  padding: 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card--navy { background: var(--navy); color: #fff; }
.card--lime { background: var(--lime); color: var(--ink); }
.card__label { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }
.card--navy .card__label { color: rgba(255, 255, 255, 0.66); }
.card__value { display: block; margin-top: 6px; font-family: var(--font-head); font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; line-height: 1.05; color: var(--navy); }
.card--navy .card__value { color: var(--lime); }
.card__desc { margin-top: 8px; font-size: 14px; color: var(--muted); }
.card--navy .card__desc { color: rgba(255, 255, 255, 0.66); }

/* ---------- 11. Figure ---------- */
.figure {
  position: relative;
  overflow: hidden;
  border: var(--border-w) solid var(--line);
  background: repeating-linear-gradient(-45deg, var(--panel) 0 12px, var(--card) 12px 24px);
  box-shadow: var(--shadow-hard);
}
.figure--ratio-16x9 { aspect-ratio: 16 / 9; }
.figure--ratio-4x3 { aspect-ratio: 4 / 3; }
.figure--ratio-1x1 { aspect-ratio: 1 / 1; }
.figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.figure__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 7px 12px;
  background: var(--navy);
  color: var(--lime);
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- 12. Tabs ---------- */
.tabs { border: var(--border-w) solid var(--line); background: var(--card); box-shadow: var(--shadow-hard); }
.tabs__bar { display: flex; flex-wrap: wrap; border-bottom: var(--border-w) solid var(--line); background: var(--panel); }
.tabs__btn {
  flex: 1 1 140px;
  padding: 12px 16px;
  border-right: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tabs__btn:last-child { border-right: 0; }
.tabs__btn:hover { background: var(--bg); color: var(--accent); }
.tabs__btn.is-active { background: var(--navy); color: var(--lime); box-shadow: inset 0 -4px 0 var(--lime); }
.tabs__panel { padding: 22px; }
.tabs__panel[hidden] { display: none; }

/* ---------- 13. Anchor index ---------- */
.anchor-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
  padding: 16px;
  list-style: none;
  background: var(--card);
  border: var(--border-w) solid var(--line);
  box-shadow: var(--shadow-hard);
}
.anchor-index a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--panel);
  border: 2px solid var(--panel);
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.16s, border-color 0.16s;
}
.anchor-index a:hover { background: var(--lime); border-color: var(--line); }
.anchor-index__num { color: var(--accent); font-weight: 900; margin-right: 3px; }

/* ---------- 14. Table ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: var(--border-w) solid var(--line); box-shadow: var(--shadow-hard); }
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.data-table th { padding: 10px 14px; background: var(--navy); color: #fff; text-align: left; font-weight: 700; white-space: nowrap; }
.data-table td { padding: 10px 14px; border-top: 1px solid var(--line); }
.data-table tbody tr:nth-child(even) { background: var(--panel); }
.data-table tbody tr:hover { background: var(--lime); color: var(--ink); }

/* ---------- 15. Tag & callout ---------- */
.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--lime);
  color: var(--ink);
  border: 2px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}
.tag--accent { background: var(--accent); color: #fff; }
.tag--navy { background: var(--navy); color: var(--lime); }
.callout {
  padding: 16px 18px;
  background: var(--lime);
  color: var(--ink);
  border: var(--border-w) solid var(--line);
  box-shadow: var(--shadow-hard);
  font-weight: 600;
  line-height: 1.7;
}
.callout--accent { background: var(--accent); color: #fff; }
.callout--navy { background: var(--navy); color: #fff; }

/* ---------- 16. Prose ---------- */
.prose { max-width: 72ch; font-size: 16px; line-height: 1.9; }
.prose > p + p { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; margin-bottom: 0.6em; font-size: 24px; font-weight: 900; }
.prose h3 { margin-top: 1.5em; margin-bottom: 0.4em; font-size: 18px; font-weight: 700; }
.prose ul { margin-top: 1em; }
.prose ul li { position: relative; padding-left: 1.5em; margin-bottom: 0.55em; }
.prose ul li::before { content: '◆'; position: absolute; left: 0; top: 0; color: var(--accent); font-size: 12px; }
.prose a { color: var(--navy); border-bottom: 2px solid var(--accent); font-weight: 600; }
.prose a:hover { background: var(--lime); }
.prose blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 6px solid var(--accent);
  background: var(--card);
  border: var(--border-w) solid var(--line);
  box-shadow: var(--shadow-hard);
  font-family: var(--font-head);
}

/* ---------- 17. Hero scene ---------- */
.hero-scene { position: relative; overflow: hidden; box-shadow: var(--shadow-hard); }
.hero-scene__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.1);
  transform: scale(1.04);
}
.hero-scene__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(22, 58, 95, 0.92) 0%, rgba(22, 58, 95, 0.62) 60%, rgba(43, 29, 20, 0.4) 100%);
}
.hero-scene__content { position: relative; z-index: 1; padding: 48px 24px; color: #fff; }

/* ---------- 18. Responsive ---------- */
@media (min-width: 48em) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
  .hero-scene__content { padding: 60px 32px; }
}

@media (min-width: 64em) {
  .site-header,
  #main-content,
  .site-footer { margin-left: var(--nav-w); }

  .site-header__bar { padding: 0 24px; }
  .site-header__bar-inner { min-height: 76px; gap: 18px; }
  .site-header__cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .brand__text { font-size: 24px; }

  .site-nav { transform: none; transition: none; }

  .site-footer__top { grid-template-columns: 1.6fr 1fr 1.2fr; gap: 48px; padding-top: 56px; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-scene__content { padding: 72px 40px; }
}

/* ---------- 19. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .ticker__list[aria-hidden="true"] { display: none; }
}
