/* ============================================================
   版本彩票 · 168 数据驾驶舱
   全站共享样式 /assets/site.css
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body { margin: 0; }

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

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; padding: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  --space: #0A1024;
  --panel: #121C3D;
  --cyan: #34E5FF;
  --violet: #8B5CF6;
  --violet-soft: #B79CFF;
  --gold: #FFC857;
  --cream: #F3E9D2;
  --ink: #2B1D14;
  --ember: #FF5A36;
  --ember-soft: #FF8A6B;
  --muted: #9AA6C4;
  --text: #C7D0E6;
  --white: #FFFFFF;

  --hairline: rgba(154, 166, 196, 0.18);
  --hairline-cyan: rgba(52, 229, 255, 0.28);

  --font-title: "HarmonyOS Sans SC", "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1280px;
  --gutter: 20px;
  --mast-h: 66px;
}

@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 44px; } }

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--space);
  background-image:
    repeating-linear-gradient(0deg, rgba(154, 166, 196, 0.045) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(154, 166, 196, 0.045) 0 1px, transparent 1px 64px),
    radial-gradient(1200px 620px at 10% -10%, rgba(139, 92, 246, 0.22), transparent 62%),
    radial-gradient(900px 520px at 94% 2%, rgba(52, 229, 255, 0.14), transparent 60%);
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  color: var(--text);
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--white); font-weight: 300; letter-spacing: -0.015em; line-height: 1.2; }

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

::selection { background: rgba(52, 229, 255, 0.32); color: var(--white); }

/* ---------- 4. 布局骨架 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 7vw, 96px); }

.section__head { display: grid; gap: 14px; margin-bottom: clamp(26px, 3.6vw, 44px); }

.section__index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.section__title {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

.section__lede {
  max-width: 62ch;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--muted);
}

.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); grid-template-columns: minmax(0, 1fr); }

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

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

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

/* ---------- 5. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  font-family: var(--font-title);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.4;
  white-space: nowrap;
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.btn--neon {
  background-image: linear-gradient(118deg, var(--cyan) 0%, var(--violet) 100%);
  color: #051024;
  font-weight: 700;
}

.btn--neon:hover {
  box-shadow: 0 0 0 1px rgba(52, 229, 255, 0.6), 0 14px 34px -16px rgba(52, 229, 255, 0.85);
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: rgba(154, 166, 196, 0.42);
  color: #D6DEF2;
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(52, 229, 255, 0.18);
}

.btn--gold {
  background-color: var(--gold);
  color: #1A1206;
  font-weight: 700;
}

.btn--gold:hover { box-shadow: 0 14px 34px -18px rgba(255, 200, 87, 0.95); }

/* ---------- 6. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  top: -72px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  background-color: var(--cyan);
  color: #051024;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: top 0.18s ease;
}

.skip-link:focus { top: 12px; }

/* ---------- 7. 头部 / Masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  background-color: transparent;
  border-bottom: 1px solid rgba(52, 229, 255, 0.10);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.masthead[data-pinned="true"] {
  background-color: rgba(18, 28, 61, 0.95);
  border-bottom-color: var(--hairline-cyan);
  box-shadow: 0 22px 48px -38px rgba(52, 229, 255, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}

.masthead__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background-image: linear-gradient(90deg, var(--cyan), var(--violet) 55%, var(--gold));
  transition: width 0.12s linear;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--mast-h);
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.masthead__mark {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-auto-rows: 5px;
  gap: 3px;
  flex: 0 0 auto;
}

.masthead__mark i { display: block; background-color: rgba(52, 229, 255, 0.26); }
.masthead__mark i:nth-child(2),
.masthead__mark i:nth-child(6),
.masthead__mark i:nth-child(8) { background-color: var(--cyan); }
.masthead__mark i:nth-child(5) { background-color: var(--gold); }

.masthead__wordmark { display: flex; flex-direction: column; line-height: 1.1; }

.masthead__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
}

.masthead__tagline {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

/* 导航：移动端为下拉目录面板 */
.masthead__nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  padding: 4px var(--gutter) 24px;
  background-color: rgba(10, 16, 36, 0.985);
  border-bottom: 1px solid var(--hairline-cyan);
  box-shadow: 0 34px 64px -42px rgba(0, 0, 0, 0.95);
}

.masthead__nav[data-open="true"] { display: block; }

.masthead__list { display: grid; }

.masthead__item { border-bottom: 1px solid rgba(154, 166, 196, 0.14); }

.masthead__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 2px;
  font-size: 1rem;
  color: #D6DEF2;
  transition: color 0.2s ease;
}

.masthead__num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--violet-soft);
}

.masthead__link[aria-current="page"] { color: var(--cyan); }
.masthead__link[aria-current="page"] .masthead__num { color: var(--gold); }

.masthead__navcta {
  display: inline-flex;
  width: 100%;
  margin-top: 20px;
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.masthead__cta { display: none; }

.masthead__toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(52, 229, 255, 0.42);
  color: var(--cyan);
}

.masthead__toggle:hover { background-color: rgba(52, 229, 255, 0.10); }

.masthead__bars { display: grid; gap: 4px; width: 16px; }

.masthead__bars i {
  display: block;
  height: 1px;
  background-color: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.masthead__toggle[aria-expanded="true"] .masthead__bars i:first-child { transform: translateY(2.5px) rotate(45deg); }
.masthead__toggle[aria-expanded="true"] .masthead__bars i:last-child { transform: translateY(-2.5px) rotate(-45deg); }

.masthead__toggletext {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
}

@media (min-width: 520px) {
  .masthead__cta { display: inline-flex; }
}

@media (min-width: 1080px) {
  .masthead__inner { gap: 28px; }

  .masthead__nav,
  .masthead__nav[data-open="true"] {
    position: static;
    display: block;
    flex: 1 1 auto;
    padding: 0;
    background-color: transparent;
    border: 0;
    box-shadow: none;
  }

  .masthead__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }

  .masthead__item { border-bottom: 0; }

  .masthead__link {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 10px 11px;
    font-size: 0.875rem;
    color: var(--muted);
  }

  .masthead__link::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 3px;
    height: 1px;
    background-color: var(--cyan);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.24s ease;
  }

  .masthead__link:hover,
  .masthead__link:focus-visible { color: var(--white); }

  .masthead__link:hover::after,
  .masthead__link:focus-visible::after { transform: scaleX(1); }

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

  .masthead__link[aria-current="page"]::after {
    transform: scaleX(1);
    background-color: var(--gold);
  }

  .masthead__num { font-size: 0.625rem; color: rgba(183, 156, 255, 0.72); }

  .masthead__navcta { display: none; }

  .masthead__toggle { display: none; }
}

/* ---------- 8. 页脚 / Colophon ---------- */
.colophon {
  position: relative;
  margin-top: clamp(64px, 10vw, 128px);
  background-color: var(--panel);
  background-image:
    radial-gradient(720px 320px at 6% 0%, rgba(139, 92, 246, 0.24), transparent 66%),
    radial-gradient(620px 320px at 96% 100%, rgba(52, 229, 255, 0.16), transparent 66%);
  background-repeat: no-repeat, no-repeat;
  color: var(--muted);
  overflow: hidden;
}

.colophon__seam {
  display: block;
  height: 1px;
  background-image: linear-gradient(90deg, transparent, rgba(52, 229, 255, 0.7) 22%, rgba(139, 92, 246, 0.7) 52%, rgba(255, 200, 87, 0.6) 78%, transparent);
}

.colophon__inner { padding-top: clamp(44px, 6vw, 76px); }

.colophon__grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }

.colophon__wordmark {
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--white);
}

.colophon__tagline {
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.colophon__desc {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--muted);
}

.colophon__stamp {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 7px 13px;
  border: 1px solid rgba(52, 229, 255, 0.34);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.colophon__dot {
  width: 6px;
  height: 6px;
  background-color: var(--cyan);
  animation: colophonPulse 2.4s ease-in-out infinite;
}

@keyframes colophonPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.22; }
}

.colophon__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
}

.colophon__list { display: grid; gap: 11px; }

.colophon__link {
  position: relative;
  display: inline-block;
  padding-left: 14px;
  font-size: 0.9375rem;
  color: #B9C4DD;
  transition: color 0.2s ease;
}

.colophon__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background-color: currentColor;
  opacity: 0.4;
  transition: width 0.2s ease, opacity 0.2s ease;
}

.colophon__link:hover,
.colophon__link:focus-visible { color: var(--cyan); }

.colophon__link:hover::before,
.colophon__link:focus-visible::before { width: 10px; opacity: 1; }

.colophon__kv {
  display: grid;
  grid-template-columns: 3.5em minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: 0.9375rem;
}

.colophon__key {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: rgba(154, 166, 196, 0.72);
}

.colophon__val { color: #D6DEF2; word-break: break-word; }

.colophon__note {
  margin-top: 18px;
  padding-left: 13px;
  border-left: 1px solid rgba(52, 229, 255, 0.4);
  font-size: 0.8125rem;
  line-height: 1.8;
  color: rgba(154, 166, 196, 0.88);
}

.colophon__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: clamp(40px, 5vw, 64px);
  padding: 22px 0 36px;
  border-top: 1px solid rgba(154, 166, 196, 0.16);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.colophon__icp { color: var(--gold); }
.colophon__copy { color: rgba(154, 166, 196, 0.82); }
.colophon__disclaimer { margin-left: auto; color: rgba(154, 166, 196, 0.6); }

@media (min-width: 720px) {
  .colophon__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 32px; }
}

@media (min-width: 1080px) {
  .colophon__grid { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 32px; }
}

@media (max-width: 719px) {
  .colophon__disclaimer { margin-left: 0; flex-basis: 100%; }
}

/* ---------- 9. 内容组件 ---------- */
.panel {
  position: relative;
  padding: 22px;
  background-image: linear-gradient(158deg, rgba(18, 28, 61, 0.96) 0%, rgba(10, 16, 36, 0.96) 100%);
  border: 1px solid rgba(154, 166, 196, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 36px;
  height: 2px;
  background-image: linear-gradient(90deg, var(--cyan), var(--violet));
}

.panel:hover {
  transform: translateY(-3px);
  border-color: rgba(52, 229, 255, 0.55);
  box-shadow: 0 26px 50px -36px rgba(52, 229, 255, 0.95);
}

.panel__index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  color: var(--violet-soft);
}

.panel__title {
  margin-top: 10px;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--white);
}

.panel__text {
  margin-top: 9px;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--muted);
}

.paper {
  position: relative;
  padding: 26px;
  background-color: var(--cream);
  background-image: repeating-linear-gradient(0deg, rgba(43, 29, 20, 0.05) 0 1px, transparent 1px 44px);
  border: 1px solid rgba(43, 29, 20, 0.2);
  color: var(--ink);
}

.paper::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--ember);
  border-right: 1px solid var(--ember);
}

.paper__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--ember);
}

.paper__title {
  margin-top: 10px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.paper__text {
  margin-top: 10px;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: #4A3A2C;
}

.metric { display: grid; gap: 6px; }

.metric__value {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--gold);
}

.metric__label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.tag--cyan { color: var(--cyan); }
.tag--violet { color: var(--violet-soft); }
.tag--gold { color: var(--gold); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.crumbs__link { color: var(--muted); transition: color 0.2s ease; }
.crumbs__link:hover, .crumbs__link:focus-visible { color: var(--cyan); }
.crumbs__sep { color: rgba(154, 166, 196, 0.45); }
.crumbs__current { color: var(--white); }

.prose {
  max-width: 72ch;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}

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

.prose h2 {
  margin-top: 1.8em;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 300;
  color: var(--white);
}

.prose h3 {
  margin-top: 1.5em;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--white);
}

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul li { list-style: none; position: relative; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.75em;
  width: 6px;
  height: 1px;
  background-color: var(--cyan);
}
.prose ol { list-style: decimal; }
.prose ol li::marker { color: var(--gold); font-family: var(--font-mono); }

.figure { margin: 0; }

.figure__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--hairline-cyan);
  background-color: #0C1430;
  background-image:
    radial-gradient(120% 120% at 14% 0%, rgba(52, 229, 255, 0.18), transparent 62%),
    radial-gradient(100% 120% at 88% 100%, rgba(139, 92, 246, 0.22), transparent 62%),
    linear-gradient(160deg, #101A3A 0%, #0A1024 72%);
}

.figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(154, 166, 196, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 166, 196, 0.10) 1px, transparent 1px);
  background-size: 40px 40px;
}

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

.figure__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  margin-top: 12px;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 10. 滚动显现协议 ---------- */
[data-reveal].is-armed {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

/* ---------- 11. 无障碍与动效偏好 ---------- */
@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;
  }

  [data-reveal].is-armed { opacity: 1; transform: none; }
  .colophon__dot { animation: none; opacity: 1; }
  .masthead__progress { transition: none; }
}
