/* ==========================================================================
   云开体育 · 共享站点层 /assets/site.css
   山雾索引体系：山雾青灰底 · 纸白阅读面 · 深墨标题 · 信号橙与荧光青双标记
   ========================================================================== */

/* 1. 设计令牌 ------------------------------------------------------------ */
:root {
  --mist: #DCE3E1;
  --mist-deep: #AEBDBB;
  --paper: #F6F3EA;
  --ink-black: #111918;
  --ink: #1F2B2A;
  --cursor: #6B7775;
  --orange: #FF5A1F;
  --cyan: #18F0C8;
  --line: #C1CBC8;
  --peach: #FFE4D6;

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1280px;
  --gutter: clamp(18px, 4vw, 48px);
  --header-h: 74px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --space-section: clamp(56px, 7vw, 104px);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* 2. Reset 与中文排版基底 ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, .3vw + 15px, 17px);
  line-height: 1.82;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) { margin: 0; }
:where(ul, ol) { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.18;
  color: var(--ink-black);
}

h1 { font-size: clamp(2rem, 1.05rem + 3.2vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.15rem); }
h3 { font-size: clamp(1.125rem, 1rem + .5vw, 1.35rem); }

a { color: inherit; }
img, svg { max-width: 100%; }
strong { font-weight: 700; color: var(--ink-black); }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

::selection { background: var(--peach); color: var(--ink-black); }

/* 3. 容器、网格与节奏 ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow { max-width: 820px; }

.section { padding-block: var(--space-section); }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink-black); color: var(--paper); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--paper); }

.section-head {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin-bottom: clamp(24px, 3.4vw, 44px);
}

.section-title { margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--cursor);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.lede {
  max-width: 60ch;
  font-size: clamp(1rem, .95rem + .25vw, 1.0625rem);
  line-height: 1.85;
  color: color-mix(in srgb, var(--ink) 78%, var(--mist) 22%);
}

.prose { max-width: 72ch; }
.prose p { margin: 0 0 1.05em; }
.prose h2 { margin: 1.7em 0 .6em; font-size: clamp(1.35rem, 1rem + 1vw, 1.75rem); }
.prose h3 { margin: 1.4em 0 .5em; }
.prose ul, .prose ol { list-style: disc; padding-left: 1.25em; margin: 0 0 1.05em; }
.prose li { margin-bottom: .35em; }

.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  color: var(--ink-black);
}

/* 4. 按钮 ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--orange);
  color: var(--paper);
  border-color: var(--orange);
}
.btn-primary:hover { background: #e84c12; border-color: #e84c12; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(31, 43, 42, .05); }

/* 5. 标签、卡片、图像占位、面包屑、对照表 -------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.4;
  white-space: nowrap;
}

.tag--orange {
  background: var(--peach);
  border-color: transparent;
  color: var(--ink-black);
}

.tag--cyan {
  background: var(--ink-black);
  border-color: transparent;
  color: var(--cyan);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.4vw, 32px);
}

.figure {
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 18% 8%, rgba(255, 255, 255, .55), transparent 60%),
    linear-gradient(158deg, var(--mist) 0%, var(--mist-deep) 100%);
}

.figure::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background:
    repeating-linear-gradient(115deg, rgba(24, 240, 200, .22) 0 1px, transparent 1px 16px);
  opacity: .55;
  pointer-events: none;
}

.figure img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x5 { aspect-ratio: 4 / 5; }
.figure--wide { aspect-ratio: 21 / 9; }

.figure-caption {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: .8125rem;
  letter-spacing: .04em;
  color: var(--cursor);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  font-size: .8125rem;
  color: var(--cursor);
}

.breadcrumb a { color: var(--cursor); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink-black); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb li + li::before { content: "/"; margin-right: 10px; color: var(--line); }

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
  line-height: 1.6;
}

.compare th,
.compare td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.compare thead th {
  font-family: var(--font-serif);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--cursor);
  text-transform: uppercase;
}

.compare td.num { font-size: 1.05rem; }

/* 6. 筛选组与锚点索引 ---------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.filter-btn {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}

.filter-btn:hover { border-color: var(--ink); }

.filter-btn[aria-pressed="true"] {
  background: var(--ink-black);
  border-color: var(--ink-black);
  color: var(--paper);
}

.filter-empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--cursor);
  font-size: .9375rem;
}

.anchor-index {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 2px;
}

.anchor-index-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: .75rem;
  letter-spacing: .16em;
  color: var(--cursor);
}

.anchor-index a {
  display: block;
  padding: 8px 0 8px 14px;
  border-left: 1px solid var(--line);
  color: var(--cursor);
  font-size: .875rem;
  line-height: 1.5;
  text-decoration: none;
  transition: color .2s var(--ease), box-shadow .2s var(--ease);
}

.anchor-index a:hover { color: var(--ink-black); }

.anchor-index a[data-active] {
  color: var(--ink-black);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--cyan);
}

/* 7. 页头 ---------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.site-header[data-scrolled] {
  background: rgba(246, 243, 234, .94);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  backdrop-filter: blur(12px) saturate(1.05);
  border-bottom-color: var(--line);
  box-shadow: 0 20px 44px -36px rgba(17, 25, 24, .95);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: var(--max);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 200;
  transform: translateY(-180%);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--ink-black);
  color: var(--paper);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  text-decoration: none;
  color: var(--ink-black);
}

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: var(--ink-black);
  flex: none;
}

.brand-mark::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid var(--cyan);
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-32deg);
}

.brand-text { display: grid; gap: 1px; line-height: 1.12; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink-black);
}

.brand-descriptor {
  font-family: var(--font-serif);
  font-size: .6875rem;
  letter-spacing: .14em;
  color: var(--cursor);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(246, 243, 234, .8);
  color: var(--ink-black);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}

.nav-toggle:hover { background: var(--paper); border-color: var(--ink); }

.nav-toggle-box { display: grid; gap: 5px; width: 20px; }

.nav-toggle-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s var(--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); }

.site-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

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

.nav-link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s var(--ease);
}

.nav-link:hover { color: var(--ink-black); }
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--ink-black);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--orange);
}

.nav-meta {
  display: none;
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--cursor);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: clamp(10px, 1.6vw, 22px);
}

.header-hint {
  display: none;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .02em;
  color: var(--cursor);
  white-space: nowrap;
}

.header-cta { padding: 11px 20px; font-size: .875rem; }

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.header-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--orange), var(--cyan));
  transform: scaleX(0);
  transform-origin: left center;
}

/* 8. 页脚 ---------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(64px, 9vw, 120px);
  background: var(--ink-black);
  color: var(--paper);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.25fr);
  gap: clamp(24px, 3vw, 48px);
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(28px, 4vw, 44px);
}

.footer-brand { display: grid; align-content: start; gap: 16px; }

.footer-brandline {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--paper);
}

.footer-summary {
  max-width: 34ch;
  font-size: .9375rem;
  line-height: 1.85;
  color: rgba(246, 243, 234, .7);
}

.footer-cta {
  justify-self: start;
  padding: 11px 22px;
  border-color: rgba(246, 243, 234, .34);
  color: var(--paper);
  font-size: .875rem;
}

.footer-cta:hover {
  border-color: var(--cyan);
  background: rgba(24, 240, 200, .1);
}

.footer-col { display: grid; align-content: start; gap: 14px; }

.footer-col-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--cyan);
  text-transform: uppercase;
}

.footer-links { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }

.footer-link {
  display: inline-block;
  padding: 5px 0;
  color: rgba(246, 243, 234, .82);
  font-size: .9375rem;
  line-height: 1.6;
  text-decoration: none;
  transition: color .2s var(--ease), box-shadow .2s var(--ease);
}

.footer-link:hover {
  color: var(--paper);
  box-shadow: inset 0 -1px 0 var(--cyan);
}

.footer-contact { display: grid; align-content: start; gap: 14px; }

.footer-contact-item { display: grid; gap: 2px; }

.footer-contact-label {
  font-family: var(--font-serif);
  font-size: .75rem;
  letter-spacing: .14em;
  color: rgba(246, 243, 234, .52);
}

.footer-contact-value {
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--paper);
  word-break: break-word;
}

.footer-contact-value--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.footer-note {
  font-size: .8125rem;
  line-height: 1.75;
  color: rgba(246, 243, 234, .52);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 18px var(--gutter) 30px;
  border-top: 1px solid rgba(193, 203, 200, .2);
  font-size: .8125rem;
  color: rgba(246, 243, 234, .6);
}

.footer-copy { margin: 0; }

.footer-legal {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .02em;
  color: rgba(246, 243, 234, .55);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal-links .footer-link {
  padding: 0;
  font-size: .8125rem;
  color: rgba(246, 243, 234, .7);
}

/* 9. 响应式 -------------------------------------------------------------- */
@media (min-width: 1280px) {
  .header-hint { display: inline-block; }
}

@media (max-width: 1240px) {
  .nav-link { font-size: .875rem; }
  .nav-list { gap: 14px; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-grid; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    margin-left: 0;
    padding: 12px var(--gutter) 22px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 44px -34px rgba(17, 25, 24, .7);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s var(--ease);
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list { display: grid; gap: 0; }
  .nav-list > li + li { border-top: 1px solid rgba(193, 203, 200, .55); }

  .nav-link {
    display: block;
    padding: 14px 4px;
    font-size: 1.0625rem;
    font-weight: 600;
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] {
    padding-left: 14px;
    box-shadow: inset 3px 0 0 var(--orange);
  }

  .nav-meta { display: block; }

  .header-actions { margin-left: 0; }
}

@media (max-width: 980px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: minmax(0, 1fr); }
  .anchor-index { position: static; }
}

@media (max-width: 680px) {
  :root { --header-h: 66px; }
  .header-cta { display: none; }
  .brand-descriptor { display: none; }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { justify-content: flex-start; }
  .compare th, .compare td { padding: 12px 10px; font-size: .875rem; }
  .figure { border-radius: var(--radius-md); }
}

/* 10. 减弱动效 ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover { transform: none; }
}
