/* ═══════════════════════════════════════════════════
   365 官网 · 共享站点样式  /assets/site.css
   坐标轨道版式 · 深墨蓝基底 · 信号橙入口
   ═══════════════════════════════════════════════════ */

/* ── 01 · 重置 ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

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

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd, hr { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: transparent; border: 0; padding: 0; cursor: pointer; }
img, svg, video, canvas { display: block; max-width: 100%; }
table { border-collapse: collapse; border-spacing: 0; width: 100%; }
[hidden] { display: none !important; }

/* ── 02 · 设计令牌 ───────────────────────────────── */
:root {
  /* 色彩体系 */
  --ink-900: #0B1B33;
  --ink-700: #16294A;
  --ink-500: #24406E;
  --signal: #FF6A2B;
  --signal-soft: #FFB489;
  --titanium: #F6F7F9;
  --cream: #F3EDE3;
  --mint: #1FB98A;
  --brown: #241C16;
  --slate: #93A3B8;
  --alert: #D9452B;

  --line-soft: rgba(147, 163, 184, 0.18);
  --line-mid: rgba(147, 163, 184, 0.28);
  --line-strong: rgba(147, 163, 184, 0.42);
  --grid-line: rgba(147, 163, 184, 0.05);

  /* 字体角色 */
  --font-display: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-editorial: Georgia, "Songti SC", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;

  /* 尺度 */
  --rail-w: 236px;
  --topbar-h: 62px;
  --wrap-max: 1180px;
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* 动效 */
  --dur-fast: 120ms;
  --dur: 180ms;
  --dur-slow: 260ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 14px 30px rgba(3, 9, 20, 0.44);
}

/* ── 03 · 基底与中文排版 ─────────────────────────── */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px;
  background-position: 0 0, 0 0;
  color: var(--titanium);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (min-width: 1024px) { body { padding-left: var(--rail-w); } }
@media (max-width: 1023px) { body { padding-top: var(--topbar-h); } }

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

h1, h2, h3, h4 { font-weight: 700; line-height: 1.28; letter-spacing: -0.01em; }
strong { font-weight: 700; }
em { font-style: normal; color: var(--signal-soft); }

::selection { background: var(--signal); color: #1B0C02; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 6px;
}

#main-content { display: block; scroll-margin-top: calc(var(--topbar-h) + 18px); }
@media (min-width: 1024px) { #main-content { scroll-margin-top: 28px; } }

/* ── 04 · 版心与分区 ─────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 56px);
}

.section { padding: clamp(56px, 8vw, 108px) 0; }
.section--tight { padding: clamp(36px, 5vw, 64px) 0; }

.section--cream { background: var(--cream); color: var(--brown); }
.section--cream .note { color: rgba(36, 28, 22, 0.68); border-left-color: var(--signal-soft); }
.section--cream .chip { border-color: rgba(36, 28, 22, 0.24); color: rgba(36, 28, 22, 0.72); }
.section--cream .card { background: #FFFFFF; border-color: rgba(36, 28, 22, 0.12); color: var(--brown); }
.section--cream .sec-head__title { color: var(--brown); }

.section--titanium { background: var(--titanium); color: var(--ink-900); }
.section--titanium .note { color: rgba(11, 27, 51, 0.66); border-left-color: var(--signal); }
.section--titanium .chip { border-color: rgba(11, 27, 51, 0.22); color: rgba(11, 27, 51, 0.7); }
.section--titanium .card { background: #FFFFFF; border-color: rgba(11, 27, 51, 0.12); color: var(--ink-900); }

/* ── 05 · 网格 ───────────────────────────────────── */
.grid { display: grid; gap: clamp(20px, 3vw, 34px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--split,
.grid--split-alt { display: grid; grid-template-columns: 1fr; gap: clamp(26px, 4vw, 56px); }

@media (min-width: 900px) {
  .grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .grid--split-alt { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}

/* ── 06 · 排版组件 ───────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 120px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--titanium);
}
.display--sm { font-size: clamp(36px, 6vw, 72px); line-height: 1.02; }

.editorial {
  font-family: var(--font-editorial);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--signal);
  text-transform: uppercase;
}

.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.8;
  color: rgba(246, 247, 249, 0.8);
  max-width: 46ch;
}
.section--cream .lede,
.section--titanium .lede { color: rgba(36, 28, 22, 0.76); }
.section--titanium .lede { color: rgba(11, 27, 51, 0.76); }

.note {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--slate);
  border-left: 2px solid var(--ink-500);
  padding-left: 14px;
}

.sec-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.sec-head__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--signal);
}
.sec-head__title {
  font-family: var(--font-editorial);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.28;
  color: var(--titanium);
}

.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.25em; }
.prose h2, .prose h3 {
  font-family: var(--font-editorial);
  font-weight: 600;
  line-height: 1.32;
  margin-top: 2em;
}
.prose h2 { font-size: clamp(22px, 2.4vw, 28px); }
.prose h3 { font-size: 20px; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: none; }
.prose ul li { position: relative; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.05em;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
}
.prose ol { list-style: decimal; }
.prose ol li::marker { font-family: var(--font-mono); color: var(--signal); }

/* ── 07 · 按钮 / 标签 / 状态 ─────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.btn--signal { background: var(--signal); color: #1B0C02; }
.btn--signal:hover { background: var(--signal-soft); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255, 106, 43, 0.26); }
.btn--ghost { border-color: var(--line-strong); color: var(--titanium); }
.btn--ghost:hover { border-color: var(--signal); color: var(--signal); background: rgba(255, 106, 43, 0.08); }
.btn--mint { background: var(--mint); color: #04241A; }
.btn--mint:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(31, 185, 138, 0.24); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border: 1px solid var(--line-mid);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate);
}
.chip--signal { border-color: rgba(255, 106, 43, 0.5); color: var(--signal-soft); background: rgba(255, 106, 43, 0.1); }
.chip--mint { border-color: rgba(31, 185, 138, 0.46); color: var(--mint); background: rgba(31, 185, 138, 0.1); }

.status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(31, 185, 138, 0.16);
}

/* ── 08 · 卡片与图片容器 ─────────────────────────── */
.card {
  background: var(--ink-700);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: clamp(20px, 2.4vw, 28px);
  transition: transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: rgba(255, 106, 43, 0.5); box-shadow: var(--shadow-card); }
.card__title { font-family: var(--font-editorial); font-size: 20px; font-weight: 600; line-height: 1.35; }
.card__meta { margin-top: 10px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--slate); }

.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--ink-700);
  aspect-ratio: 16 / 9;
}
.media > img,
.media > svg,
.media > picture > img,
.media > video { width: 100%; height: 100%; object-fit: cover; }
.media--wide { aspect-ratio: 21 / 9; }
.media--rail { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

.section--cream .media,
.section--titanium .media { background: rgba(11, 27, 51, 0.08); border-color: rgba(36, 28, 22, 0.14); }

/* ── 09 · 面包屑 ─────────────────────────────────── */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: clamp(20px, 3vw, 34px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--slate);
}
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before {
  content: "/";
  margin: 0 9px;
  color: rgba(147, 163, 184, 0.45);
}
.crumbs a { color: var(--slate); transition: color var(--dur) var(--ease); }
.crumbs a:hover { color: var(--signal); }
.crumbs [aria-current="page"] { color: var(--titanium); }

/* ═══════════════════════════════════════════════════
   10 · 头部 · 坐标轨道导航
   ═══════════════════════════════════════════════════ */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  background: var(--signal);
  color: #1B0C02;
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.site-rail {
  position: fixed;
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  z-index: 120;
  display: flex;
  flex-direction: column;
  background: var(--ink-900);
  border-right: 1px solid var(--line-soft);
}

.rail__inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100%;
  padding: 28px 20px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rail__top { display: flex; flex-direction: column; gap: 16px; }

.rail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 4px 2px;
  border-radius: var(--r-sm);
}

.rail__mark {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 2px solid var(--signal);
  border-radius: 9px;
}
.rail__mark::before,
.rail__mark::after { content: ""; position: absolute; background: var(--signal); }
.rail__mark::before { left: 50%; top: 5px; bottom: 5px; width: 1.5px; transform: translateX(-50%); }
.rail__mark::after { top: 50%; left: 5px; right: 5px; height: 1.5px; transform: translateY(-50%); }

.rail__brandtext { display: block; min-width: 0; }
.rail__brandline {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--titanium);
}
.rail__brandsub {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.24em;
  color: var(--slate);
}

.rail__toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--titanium);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.rail__toggle:hover { border-color: var(--signal); color: var(--signal); }
.rail__bars { display: inline-flex; flex-direction: column; gap: 3px; width: 16px; }
.rail__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.rail__bars i:nth-child(2) { width: 11px; }
.site-rail[data-open] .rail__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-rail[data-open] .rail__bars i:nth-child(2) { opacity: 0; }
.site-rail[data-open] .rail__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.rail__support {
  max-width: 22ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate);
}

.site-nav { display: block; }

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.site-nav__item { display: block; }

.site-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 14px 11px 13px;
  border-radius: var(--r-sm);
  color: var(--titanium);
  font-size: 15px;
  font-weight: 600;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: var(--r-pill);
  background: var(--signal);
  transform: translateY(-50%);
  transition: height var(--dur) var(--ease);
}
.site-nav__link:hover { background: var(--ink-700); }
.site-nav__link:hover::after { height: 56%; }

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--slate);
  transition: color var(--dur) var(--ease);
}
.site-nav__label { display: inline-block; }

.site-nav__link[aria-current="page"] { background: var(--ink-700); color: #FFFFFF; }
.site-nav__link[aria-current="page"]::after { height: 72%; }
.site-nav__link[aria-current="page"] .site-nav__num { color: var(--signal); }

.rail__foot {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding-top: 24px;
}
.rail__cta { width: 100%; }
.rail__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--slate);
}

/* ── 11 · 头部 · 移动端横条与抽屉 ────────────────── */
@media (max-width: 1023px) {
  .site-rail {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    max-height: 100vh;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(11, 27, 51, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .rail__inner {
    height: auto;
    gap: 0;
    padding: 0 18px;
    overflow: visible;
  }
  .site-rail[data-open] .rail__inner { padding-bottom: 24px; }

  .rail__top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--topbar-h);
  }
  .rail__toggle { display: inline-flex; }

  .rail__support { display: none; }
  .site-nav { display: none; }
  .rail__foot { display: none; }

  .site-rail[data-open] .rail__support {
    display: block;
    max-width: 34ch;
    margin: 0;
    padding: 20px 2px 0;
    animation: rail-in var(--dur) var(--ease) both;
  }
  .site-rail[data-open] .site-nav {
    display: block;
    animation: rail-in var(--dur) var(--ease) both;
  }
  .site-rail[data-open] .site-nav__list {
    margin-top: 16px;
    padding-top: 12px;
  }
  .site-rail[data-open] .rail__foot {
    display: flex;
    flex-direction: column;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
    animation: rail-in var(--dur) var(--ease) both;
  }
}

@keyframes rail-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   12 · 页脚
   ═══════════════════════════════════════════════════ */
.site-foot {
  position: relative;
  background-color: #08152A;
  background-image: linear-gradient(180deg, rgba(255, 106, 43, 0.07), rgba(255, 106, 43, 0) 200px);
  border-top: 1px solid var(--line-soft);
  color: var(--titanium);
}

.foot__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px);
}
@media (min-width: 880px) {
  .foot__top {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.75fr);
    gap: clamp(48px, 7vw, 104px);
  }
}

.foot__brand { align-self: start; }
.foot__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--titanium);
}
.foot__line {
  margin: 8px 0 0;
  font-family: var(--font-editorial);
  font-size: 17px;
  line-height: 1.6;
  color: var(--slate);
}
.foot__brand::after {
  content: "";
  display: block;
  width: 118px;
  height: 2px;
  margin-top: 24px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--signal) 0 34px, var(--line-mid) 34px 100%);
}

.foot__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
}
@media (min-width: 640px) { .foot__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.foot__coltitle {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.22em;
  color: var(--signal-soft);
}

.foot__list { display: flex; flex-direction: column; gap: 11px; }
.foot__list a {
  position: relative;
  display: inline-block;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(246, 247, 249, 0.78);
  transition: color var(--dur) var(--ease);
}
.foot__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
.foot__list a:hover { color: #FFFFFF; }
.foot__list a:hover::after { transform: scaleX(1); }

.foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  padding: 24px 0 clamp(30px, 4.5vw, 48px);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--slate);
}
.foot__contact { flex: 1 1 340px; margin: 0; }
.foot__addr { margin: 0; }
.foot__icp {
  margin: 0;
  padding: 3px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
}
.foot__copy { margin: 0 0 0 auto; color: rgba(147, 163, 184, 0.82); }

/* ── 13 · 滚动进度刻度 ───────────────────────────── */
.scroll-meter {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 130;
  height: 2px;
  background: rgba(147, 163, 184, 0.14);
  pointer-events: none;
}
.scroll-meter__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--signal), var(--signal-soft));
  transform: scaleX(0);
  transform-origin: left center;
}
@media (min-width: 1024px) { .scroll-meter { left: var(--rail-w); } }

/* ── 14 · 工具与无障碍 ───────────────────────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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