:root {
  --ink: #1B1B18;
  --ink-70: #4B4A44;
  --ink-45: #7A786F;
  --paper: #FBF7F0;
  --stand: #E8E3DA;
  --stone: #C9C3B8;
  --green-deep: #123A32;
  --green-700: #1C4C42;
  --apricot: #E85D1F;
  --apricot-deep: #9C3B0F;
  --amber: #F4A93B;
  --grass: #6E8B6A;
  --sky-tint: #DDE9E4;
  --alert: #B5432F;

  --rail-w: 236px;
  --topbar-h: 64px;
  --content-max: 1360px;
  --gutter: clamp(18px, 4vw, 56px);

  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --pill: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font-display: "Barlow Condensed", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --font-index: "Barlow Condensed", "Noto Sans SC", "PingFang SC", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  padding-block-start: var(--topbar-h);
  background: var(--stand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg { max-width: 100%; }
img { display: block; }

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }

a { color: inherit; }

button { font: inherit; color: inherit; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--apricot);
  outline-offset: 3px;
  border-radius: 6px;
}

#main-content {
  scroll-margin-block-start: calc(var(--topbar-h) + 16px);
}

/* ---------- 文本与基础件 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--green-deep);
}

.display--sm {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: var(--green-deep);
}

.eyebrow {
  font-family: var(--font-index);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--apricot-deep);
}

.lede {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.75;
  color: var(--ink-70);
  max-width: 62ch;
}

.note {
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--ink-45);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero" 1;
}

/* ---------- 容器与章节 ---------- */
.shell {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(46px, 6.5vw, 100px);
}

.section--tint { background: var(--paper); }

.section--deep {
  background: var(--green-deep);
  color: var(--paper);
}

.section--deep .display,
.section--deep .display--sm { color: var(--paper); }

.section__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-block-end: clamp(24px, 3vw, 44px);
}

.section__title { margin: 0; }

.section__lede {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-70);
  max-width: 58ch;
}

.section--deep .section__lede { color: rgba(251, 247, 240, 0.72); }

/* ---------- 按钮与胶囊 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.btn--primary { background: var(--apricot); color: #FFF6EE; }
.btn--primary:hover { background: var(--apricot-deep); }

.btn--ghost {
  background: transparent;
  border-color: var(--stone);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--green-deep); color: var(--green-deep); }

.btn--on-deep {
  background: transparent;
  border-color: rgba(251, 247, 240, 0.34);
  color: var(--paper);
}
.btn--on-deep:hover { border-color: var(--amber); color: var(--amber); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--stone);
  border-radius: var(--pill);
  background: var(--paper);
  color: var(--ink-70);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.pill--signal {
  background: var(--amber);
  border-color: var(--amber);
  color: #3B2408;
  font-weight: 700;
}

.pill--done {
  background: rgba(110, 139, 106, 0.12);
  border-color: rgba(110, 139, 106, 0.5);
  color: var(--green-700);
}

/* ---------- 卡片与媒体容器 ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--stone);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.4vw, 30px);
}

.card--deep {
  background: var(--green-deep);
  border-color: rgba(251, 247, 240, 0.12);
  color: var(--paper);
}

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--stone);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--sky-tint), var(--stand));
}

.media-frame > img,
.media-frame > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* ---------- 面包屑 ---------- */
.crumbs { font-size: 12px; letter-spacing: 0.12em; }

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumbs__item { display: inline-flex; align-items: center; gap: 8px; }

.crumbs__link {
  color: var(--apricot-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.crumbs__link:hover { border-bottom-color: var(--apricot); }

.crumbs__sep { color: var(--stone); }

.crumbs__current { color: var(--ink-45); }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--green-deep);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

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

/* ---------- 头部：侧边轨道（移动态为顶部条） ---------- */
.rail-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--green-deep);
  background-image: repeating-linear-gradient(0deg, rgba(251, 247, 240, 0.035) 0 1px, transparent 1px 4px);
  color: var(--paper);
}

.rail-head__shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  min-height: var(--topbar-h);
  padding: 9px 16px;
}

.rail-head__brand {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
}

.brand-lockup__mark {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--apricot);
  color: #FFF6EE;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.brand-lockup__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-lockup__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-lockup__line {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  line-height: 1.2;
  color: rgba(251, 247, 240, 0.55);
}

.rail-head__eyebrow {
  display: none;
  margin: 0;
  font-family: var(--font-index);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: rgba(251, 247, 240, 0.42);
}

.nav-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid rgba(251, 247, 240, 0.28);
  border-radius: var(--pill);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-toggle:hover { background: rgba(251, 247, 240, 0.1); border-color: rgba(251, 247, 240, 0.44); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease);
}

.rail-head[data-open="true"] .nav-toggle__bar:first-child { transform: translateY(3px) rotate(45deg); }
.rail-head[data-open="true"] .nav-toggle__bar:last-child { transform: translateY(-3px) rotate(-45deg); }

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

.rail-head__drawer {
  flex: 0 0 100%;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.26s var(--ease);
}

.rail-head[data-open="true"] .rail-head__drawer {
  max-height: calc(100dvh - var(--topbar-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 10px;
}

.site-nav__caption {
  margin: 0 0 6px;
  padding-inline-start: 12px;
  font-family: var(--font-index);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(251, 247, 240, 0.4);
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__item { display: block; }

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: rgba(251, 247, 240, 0.72);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.site-nav__link:hover {
  color: var(--paper);
  background: rgba(251, 247, 240, 0.07);
}

.site-nav__link[aria-current="page"] {
  color: var(--paper);
  background: rgba(251, 247, 240, 0.1);
  box-shadow: inset 2px 0 0 var(--apricot);
}

.site-nav__index {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: rgba(251, 247, 240, 0.35);
}

.site-nav__link[aria-current="page"] .site-nav__index { color: var(--amber); }

.site-nav__label { min-width: 0; }

.rail-head__tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0 18px;
}

.rail-head__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--pill);
  background: var(--apricot);
  color: #FFF6EE;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}

.rail-head__cta::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.85;
}

.rail-head__cta:hover { background: var(--apricot-deep); }

.rail-head__links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-head__link {
  display: block;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(251, 247, 240, 0.1);
  color: rgba(251, 247, 240, 0.58);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.rail-head__link:hover { color: var(--paper); }

.rail-top {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px dashed rgba(251, 247, 240, 0.26);
  border-radius: var(--pill);
  background: transparent;
  color: rgba(251, 247, 240, 0.62);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.rail-top:hover { color: var(--paper); border-color: rgba(251, 247, 240, 0.52); }

.rail-top__arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
}

.rail-top__text { line-height: 1; }

/* 阅读进度：移动端为顶部横向细线 */
.rail-progress {
  --progress: 0;
  position: fixed;
  top: calc(var(--topbar-h) - 3px);
  inset-inline: 0;
  z-index: 61;
  height: 3px;
  background: rgba(251, 247, 240, 0.12);
}

.rail-progress__bar {
  display: block;
  height: 100%;
  width: calc(var(--progress) * 100%);
  background: var(--amber);
}

/* ---------- 页脚 ---------- */
.site-foot {
  margin-block-start: clamp(44px, 7vw, 92px);
  padding-block-start: clamp(38px, 5.5vw, 68px);
  border-block-start: 1px solid rgba(251, 247, 240, 0.1);
  background-color: var(--green-deep);
  background-image: repeating-linear-gradient(0deg, rgba(251, 247, 240, 0.035) 0 1px, transparent 1px 4px);
  color: var(--paper);
}

.site-foot__shell {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  gap: clamp(28px, 4vw, 52px);
}

.site-foot__brand { display: flex; flex-direction: column; gap: 10px; }

.site-foot__name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--paper);
}

.site-foot__tagline {
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(251, 247, 240, 0.66);
}

.site-foot__cols {
  display: grid;
  gap: clamp(20px, 3vw, 34px);
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.foot-col { display: block; }

.foot-col__title {
  margin: 0 0 12px;
  font-family: var(--font-index);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(251, 247, 240, 0.45);
}

.foot-col__list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-col__link {
  display: inline-block;
  padding-block-end: 2px;
  border-bottom: 1px solid transparent;
  color: rgba(251, 247, 240, 0.82);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.foot-col__link:hover { color: var(--paper); border-bottom-color: var(--apricot); }

.site-foot__contact { display: flex; flex-direction: column; gap: 10px; }

.site-foot__contact-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-foot__contact-item {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(251, 247, 240, 0.76);
  word-break: break-word;
}

.site-foot__contact-label {
  display: inline-block;
  min-width: 40px;
  margin-inline-end: 8px;
  font-family: var(--font-index);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--amber);
}

.site-foot__note {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(221, 233, 228, 0.1);
  color: rgba(251, 247, 240, 0.6);
  font-size: 12px;
  line-height: 1.6;
}

.site-foot__base {
  margin-block-start: clamp(30px, 4.5vw, 54px);
  border-block-start: 1px solid rgba(251, 247, 240, 0.12);
  background: rgba(0, 0, 0, 0.16);
  padding-block: 16px 20px;
}

.site-foot__base-inner {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-foot__legal {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(251, 247, 240, 0.58);
}

.site-foot__icp {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(251, 247, 240, 0.44);
}

/* ---------- 平板以下：抽屉细节 ---------- */
@media (max-width: 1023.98px) {
  body { padding-inline-start: 0; }

  .rail-head[data-open="true"] { overflow-y: auto; overscroll-behavior: contain; }

  .rail-head__drawer { border-block-start: 1px solid rgba(251, 247, 240, 0.1); }
}

@media (max-width: 379.98px) {
  .brand-lockup__line { display: none; }
  .brand-lockup__name { font-size: 15px; }
  .nav-toggle { padding: 9px 11px; }
  .nav-toggle__text { display: none; }
}

/* ---------- 桌面：侧边轨道 ---------- */
@media (min-width: 1024px) {
  body {
    padding-block-start: 0;
    padding-inline-start: var(--rail-w);
  }

  #main-content { scroll-margin-block-start: 24px; }

  .rail-head {
    inset: 0 auto 0 0;
    width: var(--rail-w);
    max-height: none;
    overflow: visible;
    border-inline-end: 1px solid rgba(251, 247, 240, 0.08);
  }

  .rail-head__shell {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    height: 100%;
    min-height: 0;
    padding: 26px 16px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .rail-head__brand { flex: none; }

  .rail-head__eyebrow { display: block; margin-block-start: 12px; padding-inline-start: 2px; }

  .brand-lockup { gap: 11px; }

  .brand-lockup__mark { width: 38px; height: 38px; border-radius: 13px; font-size: 21px; }

  .brand-lockup__name { font-size: 17px; }

  .brand-lockup__line { font-size: 10.5px; }

  .nav-toggle { display: none; }

  .rail-head__drawer {
    display: contents;
    max-height: none;
    overflow: visible;
    border-block-start: 0;
  }

  .site-nav { margin-block-start: 26px; padding: 0; }

  .site-nav__link { font-size: 14px; padding: 10px 12px; }

  .rail-head__tools { margin-block-start: auto; padding: 20px 0 0; }

  .rail-progress {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: 3px;
    height: auto;
  }

  .rail-progress__bar {
    width: 100%;
    height: calc(var(--progress) * 100%);
  }

  .site-foot__shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.05fr); }
}

@media (min-width: 1440px) {
  :root { --rail-w: 248px; }
}

/* ---------- 动效降级与打印 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .rail-head__drawer { transition: none; }
  .rail-progress__bar { transition: none; }
}

@media print {
  .rail-head,
  .rail-progress,
  .skip-link { display: none !important; }

  body { padding: 0 !important; background: #fff; }

  .site-foot { background: #fff; color: #000; border-block-start: 1px solid #999; }
}
