/* ==========================================================================
   经典服务 · 中文站经典专区 — 共享样式 /assets/site.css
   基调：暖纸打底 / 暮色紫压阵 / 天山雪青承接交互 / 胡杨金只作细线
   ========================================================================== */

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

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

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

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

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

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

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

a { color: inherit; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 色彩 */
  --ink: #1A1A1F;
  --paper: #F5F0E6;
  --paper-card: #E8E2D6;
  --plum-ink: #241A33;
  --plum: #4A3468;
  --plum-soft: #8B79A8;
  --cyan-deep: #2F6E70;
  --cyan-soft: #D8E6E4;
  --gold-deep: #8A5E14;
  --gold: #D7A445;

  /* 细线 */
  --rule: rgba(36, 26, 51, 0.14);
  --rule-strong: rgba(36, 26, 51, 0.28);
  --rule-paper: rgba(245, 240, 230, 0.16);

  /* 字体 */
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 类型阶 */
  --step-12: 12px;
  --step-14: 14px;
  --step-18: 18px;
  --step-24: 24px;
  --step-36: 36px;
  --step-56: 56px;
  --step-88: 88px;
  --step-128: 128px;

  /* 尺度 */
  --shell: 1320px;
  --shell-wide: 1560px;
  --gutter: clamp(16px, 4vw, 48px);
  --space-block: clamp(48px, 8vw, 96px);
  --radius-organic: 2px 20px 2px 2px;
}

/* ---------- 3. Base ---------- */
body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--plum-ink);
}

h1 { font-size: clamp(44px, 7.4vw, 128px); }
h2 { font-size: clamp(28px, 3.4vw, 56px); }
h3 { font-size: var(--step-24); line-height: 1.35; }
h4 { font-size: var(--step-18); line-height: 1.5; }

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

::selection {
  background: var(--cyan-soft);
  color: var(--plum-ink);
}

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

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

.cs-shell--wide { max-width: var(--shell-wide); }

.cs-section { padding-block: var(--space-block); }
.cs-section + .cs-section { border-top: 1px solid var(--rule); }

.cs-divider {
  height: 0;
  margin-block: clamp(28px, 4vw, 56px);
  border: 0;
  border-top: 1px solid var(--rule);
}

.cs-grid {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}

.cs-grid--split { grid-template-columns: minmax(0, 32fr) minmax(0, 68fr); }
.cs-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- 5. 排版辅助 ---------- */
.cs-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--step-12);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  line-height: 1.6;
}

.cs-mono {
  font-family: var(--font-mono);
  font-size: var(--step-14);
  letter-spacing: 0.06em;
  color: var(--gold-deep);
}

.cs-lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.8;
  color: rgba(26, 26, 31, 0.86);
  max-width: 34em;
}

.cs-prose { max-width: 38em; }
.cs-prose p { margin-bottom: 1.2em; }

.cs-section__mark {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step-12);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 12px;
}

.cs-section__title { margin-bottom: 20px; }

/* ---------- 6. 链接与按钮 ---------- */
.cs-link {
  color: var(--cyan-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.cs-link:hover {
  color: var(--plum);
  text-decoration-color: var(--gold);
}

.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cs-btn--primary {
  background-color: var(--plum);
  border-color: var(--plum);
  color: var(--paper);
}

.cs-btn--primary:hover {
  background-color: var(--plum-ink);
  border-color: var(--plum-ink);
}

.cs-btn--ghost {
  background-color: transparent;
  border-color: var(--gold);
  color: var(--plum-ink);
}

.cs-btn--ghost:hover {
  background-color: var(--paper-card);
  border-color: var(--gold-deep);
}

.cs-btn--quiet {
  min-height: 44px;
  padding-inline: 0;
  background-color: transparent;
  color: var(--plum);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--gold);
}

.cs-btn--quiet:hover { color: var(--plum-ink); }

/* ---------- 7. 面包屑 ---------- */
.cs-crumbs {
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
}

.cs-crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--step-12);
  letter-spacing: 0.12em;
  color: rgba(26, 26, 31, 0.7);
}

.cs-crumbs__item + .cs-crumbs__item::before {
  content: "/";
  margin-right: 8px;
  color: var(--plum-soft);
}

.cs-crumbs__link {
  color: var(--cyan-deep);
  text-decoration: none;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

.cs-crumbs__link:hover { text-decoration: underline; text-underline-offset: 4px; }

.cs-crumbs__item--current { color: var(--gold-deep); }

/* ---------- 8. 图片容器基座 ---------- */
.cs-figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  display: block;
  background-color: var(--cyan-soft);
  border-radius: var(--radius-organic);
}

.cs-figure img,
.cs-figure picture,
.cs-figure svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-figure--16x9 { aspect-ratio: 16 / 9; }
.cs-figure--4x3 { aspect-ratio: 4 / 3; }
.cs-figure--1x1 { aspect-ratio: 1 / 1; }

.cs-figure--edge { border: 1px solid var(--rule); }

.cs-figure__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--step-12);
  letter-spacing: 0.12em;
  color: var(--gold-deep);
}

/* ---------- 9. 组件 ---------- */
.cs-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 2.6vw, 32px);
  background-color: var(--paper-card);
  border: 1px solid rgba(36, 26, 51, 0.1);
  border-radius: var(--radius-organic);
}

.cs-card__index {
  font-family: var(--font-mono);
  font-size: var(--step-12);
  letter-spacing: 0.18em;
  color: var(--gold-deep);
}

.cs-card__title {
  font-family: var(--font-display);
  font-size: var(--step-24);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--plum-ink);
}

.cs-card__text {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(26, 26, 31, 0.78);
}

.cs-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 12px 18px;
  background-color: var(--paper-card);
  border: 1px solid var(--gold);
  border-left-width: 4px;
  border-radius: 2px;
}

.cs-notice__label {
  font-family: var(--font-mono);
  font-size: var(--step-12);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  white-space: nowrap;
}

.cs-notice__text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
}

.cs-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.cs-step {
  position: relative;
  padding: 20px 24px 20px 76px;
  background-color: var(--paper-card);
  border-radius: var(--radius-organic);
}

.cs-step__num {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background-color: var(--plum);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--step-14);
  letter-spacing: 0.04em;
  border-radius: 50%;
}

.cs-step__title {
  font-family: var(--font-display);
  font-size: var(--step-18);
  line-height: 1.4;
  color: var(--plum-ink);
  margin-bottom: 4px;
}

.cs-step__text {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(26, 26, 31, 0.78);
}

.cs-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--rule);
}

.cs-tabs__tab {
  min-height: 44px;
  padding: 0 18px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--plum);
  cursor: pointer;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 2px 2px 0 0;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cs-tabs__tab:hover {
  background-color: var(--cyan-soft);
  color: var(--plum-ink);
}

.cs-tabs__tab[aria-selected="true"] {
  background-color: var(--cyan-soft);
  border-bottom-color: var(--gold);
  color: var(--plum-ink);
}

.cs-tabs__panel { padding-top: clamp(20px, 3vw, 32px); }
.cs-tabs__panel[hidden] { display: none; }

/* ---------- 10. 页头 ---------- */
.cs-skip {
  position: fixed;
  top: 0;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background-color: var(--plum-ink);
  color: var(--paper);
  font-size: 15px;
  text-decoration: none;
  border-radius: 0 0 2px 2px;
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

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

.cs-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background-color: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.cs-header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--plum-ink) 0%, var(--plum-ink) 34%,
    var(--plum) 34%, var(--plum) 62%,
    var(--cyan-deep) 62%, var(--cyan-deep) 86%,
    var(--gold) 86%, var(--gold) 100%
  );
}

.cs-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  width: 100%;
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.cs-brand {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  text-decoration: none;
  color: var(--plum-ink);
}

.cs-brand__name {
  font-family: var(--font-display);
  font-size: var(--step-24);
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.cs-brand__note {
  font-family: var(--font-mono);
  font-size: var(--step-12);
  line-height: 1.4;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
}

.cs-header__nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cs-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 30px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-nav__item { display: flex; }

.cs-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--plum-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cs-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background-color: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s ease;
}

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

.cs-nav__link[aria-current="page"] { color: var(--plum); }

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

.cs-nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  background-color: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  color: var(--plum-ink);
  font-family: var(--font-mono);
  font-size: var(--step-12);
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.cs-nav-toggle:hover { border-color: var(--gold-deep); background-color: var(--paper-card); }

.cs-nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background-color: currentColor;
}

.cs-nav-toggle__bars::before,
.cs-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background-color: currentColor;
}

.cs-nav-toggle__bars::before { top: -6px; }
.cs-nav-toggle__bars::after { top: 6px; }

.cs-nav-toggle__text { line-height: 1; }

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

.cs-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--plum) 0%, var(--cyan-deep) 58%, var(--gold) 100%);
}

/* ---------- 11. 页脚 ---------- */
.cs-footer {
  background-color: var(--plum-ink);
  color: rgba(245, 240, 230, 0.82);
  margin-top: clamp(48px, 8vw, 96px);
}

.cs-footer::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 22%, var(--gold) 78%, transparent 100%);
}

.cs-footer__inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gutter) 32px;
}

.cs-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--rule-paper);
}

.cs-footer__brand { display: block; }

.cs-footer__mark {
  display: inline-block;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--paper);
  text-decoration: none;
}

.cs-footer__mark:hover { color: var(--gold); }

.cs-footer__sub {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--step-12);
  letter-spacing: 0.18em;
  color: var(--gold);
}

.cs-footer__paths ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-footer__paths a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.cs-footer__paths a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.cs-footer__contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px 40px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule-paper);
}

.cs-footer__item { display: block; }

.cs-footer__label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: var(--step-12);
  letter-spacing: 0.18em;
  color: var(--gold);
}

.cs-footer__value {
  display: block;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(245, 240, 230, 0.92);
  word-break: break-word;
}

.cs-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  padding-top: 22px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245, 240, 230, 0.62);
}

.cs-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-footer__legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: rgba(245, 240, 230, 0.82);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 240, 230, 0.28);
}

.cs-footer__legal-links a:hover {
  color: var(--paper);
  border-bottom-color: var(--gold);
}

.cs-footer__icp {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.cs-footer__copy { margin: 0; }

/* ---------- 12. 显现动效 ---------- */
.cs-js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.48s ease, transform 0.48s ease;
  will-change: opacity, transform;
}

.cs-js [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* ---------- 13. 平板 ---------- */
@media (max-width: 1024px) {
  .cs-grid--split { grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); }
}

/* ---------- 14. 移动端 ---------- */
@media (max-width: 900px) {
  .cs-header__inner { min-height: 64px; gap: 12px; }

  .cs-brand__name { font-size: 20px; }

  .cs-nav-toggle { display: inline-flex; }

  .cs-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background-color: var(--plum-ink);
    border-bottom: 1px solid var(--gold);
    transition: max-height 0.32s ease, visibility 0.32s ease;
  }

  .cs-nav[data-open] {
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    visibility: visible;
  }

  .cs-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
  }

  .cs-nav__link {
    width: 100%;
    min-height: 64px;
    padding: 0;
    font-size: var(--step-18);
    color: var(--paper);
    border-bottom: 1px solid var(--rule-paper);
  }

  .cs-nav__link::after { display: none; }

  .cs-nav__link[aria-current="page"] { color: var(--gold); }

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

  .cs-footer__top { align-items: flex-start; }
}

/* ---------- 15. 手机 ---------- */
@media (max-width: 600px) {
  body { font-size: 15px; line-height: 1.8; }

  h1 { font-size: clamp(34px, 10vw, 44px); }
  h2 { font-size: clamp(24px, 6.4vw, 32px); }

  .cs-lead { font-size: 16px; }

  .cs-btn { width: 100%; }

  .cs-step { padding: 18px 18px 18px 68px; }
  .cs-step__num { left: 16px; top: 18px; width: 32px; height: 32px; }

  .cs-tabs__tab { padding-inline: 14px; font-size: 14px; }

  .cs-footer__paths ul { gap: 0 24px; }
  .cs-footer__legal { gap: 8px 18px; }
}

/* ---------- 16. 减少动态 ---------- */
@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;
  }

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

  .cs-skip { transition: none; }
}
