/* ============================================================
   司南 Sinan-Agent-Team · 站点样式
   墨底 · 铜金 · 青玉 / 零外部依赖
   ============================================================ */

:root {
  --bg: #0A0E17;
  --bg-deep: #070A11;
  --surface: #101725;
  --surface-2: #141C2C;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --gold: #C8A24A;
  --gold-bright: #E8C878;
  --gold-dim: rgba(200, 162, 74, .16);
  --jade: #3FA88C;
  --jade-dim: rgba(63, 168, 140, .16);
  --text: #E8ECF3;
  --text-dim: #94A3B8;
  --text-faint: #64748B;

  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;

  --wrap: 1180px;
  --radius: 4px;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: .01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 底纹：极淡的经纬网格与两团光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(200, 162, 74, .10), transparent 62%),
    radial-gradient(760px 460px at 6% 8%, rgba(63, 168, 140, .07), transparent 60%),
    linear-gradient(transparent 0 39px, rgba(255, 255, 255, .022) 39px 40px) 0 0 / 40px 40px,
    linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, .022) 39px 40px) 0 0 / 40px 40px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

a:hover { color: var(--gold-bright); }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.24; letter-spacing: .015em; }

h2 { font-family: var(--serif); font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 500; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

code, pre { font-family: var(--mono); }

::selection { background: rgba(200, 162, 74, .3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 200;
  padding: .5rem .9rem;
  background: var(--gold);
  color: #14100a;
  font-size: .85rem;
  font-weight: 600;
}
.skip-link:focus { left: 12px; }

/* ---------- 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.scroll-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  transition: width .12s linear;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: .85rem clamp(1rem, 4vw, 2.6rem);
  border-bottom: 1px solid transparent;
  transition: background .24s var(--ease), border-color .24s var(--ease), backdrop-filter .24s var(--ease);
}
.site-header.is-stuck {
  background: rgba(10, 14, 23, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  letter-spacing: .08em;
  flex: none;
}
.brand-name { color: var(--text); }
.brand-ver {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .06em;
  color: var(--gold);
  border: 1px solid rgba(200, 162, 74, .35);
  border-radius: 2px;
  padding: .05rem .34rem;
  line-height: 1.5;
}

/* 罗盘小徽记：纯 CSS */
.brand-mark {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(200, 162, 74, .55);
  background: radial-gradient(circle at 50% 50%, rgba(200, 162, 74, .16), transparent 68%);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 16px;
  margin: -8px 0 0 -1px;
  background: linear-gradient(to bottom, var(--gold) 0 50%, rgba(63, 168, 140, .9) 50% 100%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.primary {
  display: flex;
  align-items: center;
  gap: .2rem;
  margin-left: auto;
  font-size: .875rem;
}
.primary a {
  position: relative;
  padding: .45rem .7rem;
  color: var(--text-dim);
  border-radius: 3px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.primary a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.primary a.is-active { color: var(--gold-bright); }
.primary a.is-active::after {
  content: "";
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .1rem;
  height: 1px;
  background: var(--gold);
  opacity: .75;
}

.header-actions { display: flex; align-items: center; gap: .6rem; flex: none; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  overflow: hidden;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: .74rem;
  letter-spacing: .06em;
  padding: .28rem .52rem;
  cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.is-on { background: rgba(200, 162, 74, .16); color: var(--gold-bright); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .62rem 1.1rem;
  border-radius: 3px;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-sm { padding: .4rem .75rem; font-size: .8rem; }

.btn-gold {
  background: linear-gradient(180deg, #D9B461, #B98F35);
  color: #171205;
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset;
}
.btn-gold:hover { color: #171205; transform: translateY(-1px); box-shadow: 0 6px 22px -10px rgba(200, 162, 74, .8); }

.btn-ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .02);
}
.btn-ghost:hover { color: var(--gold-bright); border-color: rgba(200, 162, 74, .5); background: rgba(200, 162, 74, .07); }
.btn-ghost:disabled { opacity: .38; cursor: not-allowed; }
.btn-ghost:disabled:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, .02); }

.nav-toggle {
  display: none;
  width: 34px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span { display: block; width: 15px; height: 1px; background: var(--text-dim); transition: transform .2s var(--ease); }

/* ---------- 通用版心 ---------- */
.section {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3.4rem, 8vw, 6.4rem) clamp(1.1rem, 4vw, 2.4rem);
  background-image: radial-gradient(72% 150px at 50% 0, rgba(200, 162, 74, .04), transparent 72%);
}

/* 分节符：一线渐变，中缀菱花，入视自中而展 */
.section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(200, 162, 74, .12) 10%,
    rgba(200, 162, 74, .55) 26%,
    rgba(255, 255, 255, .16) 50%,
    rgba(63, 168, 140, .5) 74%,
    rgba(63, 168, 140, .12) 90%,
    transparent 100%
  );
  transform-origin: center;
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease);
}
.section::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  transform: rotate(45deg);
  background: var(--bg);
  border: 1px solid rgba(200, 162, 74, .6);
  box-shadow: 0 0 14px rgba(200, 162, 74, .45);
  transition: box-shadow .8s var(--ease), border-color .8s var(--ease);
}
.js .section::before { transform: scaleX(0); opacity: 0; }
.js .section.is-in::before { transform: scaleX(1); opacity: 1; }
.section:hover::after { border-color: var(--gold-bright); }

/* 深浅交替：段落间以极淡底色与渐隐过渡分区 */
.section-tint {
  background-image:
    radial-gradient(72% 170px at 50% 0, rgba(200, 162, 74, .05), transparent 72%),
    linear-gradient(180deg, rgba(16, 23, 37, .66), rgba(10, 14, 23, 0) 340px);
}

.sec-head { max-width: 46rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.sec-idx {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .3em;
  color: var(--gold);
  opacity: .85;
  margin-bottom: .55rem;
}
.sec-idx::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(200, 162, 74, 0));
}
.sec-head h2 { margin-bottom: .7rem; }
.sec-lede { color: var(--text-dim); font-size: .96rem; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(6rem, 14vw, 9.5rem) clamp(1.1rem, 4vw, 2.4rem) clamp(3rem, 7vw, 5.5rem);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(1.6rem, 5vw, 3.6rem);
  align-items: center;
}

.kicker {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .26em;
  color: var(--jade);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 500;
  line-height: 1.06;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .9rem;
}
.zh-serif {
  font-family: var(--serif);
  letter-spacing: .12em;
  background: linear-gradient(96deg, #F3E1B6 8%, var(--gold) 52%, #8E6F2C 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-latin {
  font-size: clamp(.82rem, 1.9vw, 1.15rem);
  font-family: var(--mono);
  letter-spacing: .18em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.lede {
  margin-top: 1.15rem;
  max-width: 34rem;
  color: #C7D0DE;
  font-size: clamp(.95rem, 1.5vw, 1.04rem);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.5rem;
}
.badges li {
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .26rem .58rem;
  background: rgba(255, 255, 255, .015);
}
.badges li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: .42rem;
  border-radius: 50%;
  background: var(--jade);
  vertical-align: middle;
}

.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }

.facts {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--text-faint);
}

.hero-visual { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.compass-stage {
  width: min(430px, 100%);
  aspect-ratio: 1;
  position: relative;
  filter: drop-shadow(0 18px 60px rgba(200, 162, 74, .12));
}
.compass-stage svg { width: 100%; height: 100%; overflow: visible; }
.compass-caption {
  font-size: .74rem;
  letter-spacing: .12em;
  color: var(--text-faint);
}

/* 罗盘动画 */
.cp-ring-outer { transform-origin: 50% 50%; animation: cpSpin 120s linear infinite; }
.cp-ring-mid { transform-origin: 50% 50%; animation: cpSpin 80s linear infinite reverse; }
.cp-needle { transform-origin: 50% 50%; animation: cpSway 40s ease-in-out infinite; }
@keyframes cpSpin { to { transform: rotate(360deg); } }
@keyframes cpSway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

.cp-node circle.cp-halo {
  transition: opacity .35s var(--ease), r .35s var(--ease);
  opacity: 0;
}
.cp-node text {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .06em;
  fill: var(--text-faint);
  transition: fill .35s var(--ease);
}
.cp-node.is-lit circle.cp-halo { opacity: 1; }
.cp-node.is-lit text { fill: var(--gold-bright); }
.cp-node.is-lit circle.cp-core { fill: var(--gold-bright); }

/* ---------- 01 · 对照 ---------- */
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.compare-col { padding: clamp(1.2rem, 2.6vw, 1.9rem); background: var(--bg); }
.compare-bad h3 { color: var(--text-dim); }
.compare-good { background: linear-gradient(180deg, rgba(63, 168, 140, .07), rgba(16, 23, 37, .5)); }
.compare-good h3 { color: var(--jade); }
.compare-col h3 {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding-bottom: .8rem;
  margin-bottom: .4rem;
  border-bottom: 1px solid var(--line);
}

.rows li {
  display: grid;
  gap: .1rem;
  padding: .85rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .055);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}
.js .rows li { opacity: 0; transform: translateY(8px); }
.rows li:last-child { border-bottom: 0; padding-bottom: 0; }
.rows li.is-in { opacity: 1; transform: none; }
.rows b { font-size: .95rem; font-weight: 600; }
.rows span { color: var(--text-dim); font-size: .87rem; }
.compare-bad .rows b { color: #B6C0CF; }
.compare-good .rows b { color: var(--gold-bright); }

/* ---------- 02 · 流水线 ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  counter-reset: flow;
}
.flow-step {
  position: relative;
  background: var(--bg);
  padding: 1.5rem 1.2rem 1.4rem;
  transition: opacity .5s var(--ease), background .5s var(--ease);
}
.js .flow-step { opacity: .45; }
.flow-step.is-in { opacity: 1; background: linear-gradient(180deg, rgba(200, 162, 74, .05), var(--bg) 62%); }
.flow-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  margin-bottom: 1rem;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.flow-step.is-in .flow-dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(200, 162, 74, .14); }
.flow-step h3 { font-size: 1rem; display: flex; flex-direction: column; gap: .18rem; }
.flow-step h3 em {
  font-family: var(--mono);
  font-style: normal;
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--gold);
}
.flow-step h3 span { font-weight: 600; font-size: .98rem; }
.flow-step p { margin-top: .55rem; color: var(--text-dim); font-size: .86rem; }

/* ---------- 03 · 智能体 ---------- */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.agent-card {
  background: var(--bg);
  padding: 1.35rem 1.2rem;
  transition: background .24s var(--ease), box-shadow .24s var(--ease);
  position: relative;
}
.agent-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 0;
  background: var(--gold);
  transition: height .3s var(--ease);
}
.agent-card:hover, .agent-card:focus-visible {
  background: var(--surface);
  outline: none;
}
.agent-card:hover::before, .agent-card:focus-visible::before { height: 100%; }
.agent-card:focus-visible { box-shadow: inset 0 0 0 1px rgba(200, 162, 74, .5); }

.agent-card header { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.agent-code { font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; color: var(--gold); }
.agent-role { font-size: .74rem; color: var(--text-faint); letter-spacing: .1em; }
.agent-desc { margin-top: .55rem; font-size: .9rem; color: #C7D0DE; }
.agent-card dl {
  margin: .95rem 0 0;
  padding-top: .85rem;
  border-top: 1px dashed rgba(255, 255, 255, .07);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .3rem .7rem;
  font-size: .8rem;
}
.agent-card dt { font-family: var(--mono); color: var(--text-faint); font-size: .7rem; letter-spacing: .08em; padding-top: .12rem; }
.agent-card dd { margin: 0; color: var(--text-dim); }
.agent-card-judge { background: linear-gradient(180deg, rgba(63, 168, 140, .07), var(--bg) 70%); }
.agent-card-judge .agent-code { color: var(--jade); }

/* ---------- 04 · 演示 ---------- */
.demo { border: 1px solid var(--line); background: rgba(16, 23, 37, .45); }

.tabs { display: flex; gap: .1rem; border-bottom: 1px solid var(--line); padding: 0 .6rem; }
.tabs button {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: .86rem;
  padding: .8rem .85rem;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--gold-bright); border-bottom-color: var(--gold); }

.panel { padding: clamp(1rem, 2.4vw, 1.6rem); }

.mini-flow {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.1rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
}
.mini-flow span {
  padding: .24rem .55rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text-faint);
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.mini-flow span.is-on {
  color: var(--gold-bright);
  border-color: rgba(200, 162, 74, .55);
  background: rgba(200, 162, 74, .1);
}
.mini-flow span.is-done { color: var(--jade); border-color: rgba(63, 168, 140, .4); }

.feed {
  min-height: 13.5rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  font-size: .87rem;
}
.feed li {
  display: grid;
  grid-template-columns: 6.6rem 1fr;
  gap: .8rem;
  padding: .6rem .75rem;
  background: rgba(255, 255, 255, .022);
  border-left: 2px solid var(--line-strong);
  animation: feedIn .38s var(--ease) both;
}
.feed li[data-side="A"] { border-left-color: rgba(200, 162, 74, .7); }
.feed li[data-side="B"] { border-left-color: rgba(63, 168, 140, .7); }
.feed li[data-side="J"] { border-left-color: #7C8FA8; background: rgba(124, 143, 168, .09); }
.feed .who { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; color: var(--text-faint); align-self: start; padding-top: .18rem; }
.feed .say { color: #C7D0DE; }
@keyframes feedIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.scores {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  display: grid;
  gap: .55rem;
}
.score {
  display: grid;
  grid-template-columns: 5.4rem 1fr 4.2rem;
  align-items: center;
  gap: .7rem;
  font-size: .74rem;
}
.score-name { font-family: var(--mono); letter-spacing: .1em; color: var(--text-faint); }
.score b { font-family: var(--mono); font-size: .78rem; text-align: right; color: var(--gold-bright); font-weight: 500; }
.bar { height: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8E6F2C, var(--gold-bright));
  transition: width .8s var(--ease);
}
.bar-jade i { background: linear-gradient(90deg, #24614F, var(--jade)); }

.term {
  border: 1px solid var(--line);
  background: #070A11;
  border-radius: 3px;
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: .32rem;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}
.term-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: #2C3648; }
.term-bar .dot:first-child { background: #4A2A2A; }
.term-bar .dot:nth-child(2) { background: #4A432A; }
.term-bar .dot:nth-child(3) { background: #26493D; }
.term-bar span { margin-left: .5rem; font-family: var(--mono); font-size: .68rem; color: var(--text-faint); letter-spacing: .06em; }
.term-body {
  margin: 0;
  padding: .9rem 1rem;
  min-height: 15rem;
  font-size: .8rem;
  line-height: 1.85;
  color: #B8C4D4;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body .p { color: var(--jade); }
.term-body .g { color: var(--gold-bright); }
.term-body .d { color: var(--text-faint); }
.term-body .ok { color: var(--jade); }
.term-body .caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--gold);
  vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .8rem clamp(1rem, 2.4vw, 1.6rem);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .012);
}

/* ---------- 05 · 代码产物 ---------- */
.code-wrap { border: 1px solid var(--line); background: rgba(16, 23, 37, .4); }
.tabs-code { border-bottom: 1px solid var(--line); }
.tabs-code button { font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; }
.sample-note {
  padding: .6rem clamp(1rem, 2.4vw, 1.4rem) 0;
  font-size: .72rem;
  color: var(--text-faint);
  letter-spacing: .04em;
}
.code-panel { padding: 0 0 .4rem; }
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem clamp(1rem, 2.4vw, 1.4rem);
}
.code-file { font-family: var(--mono); font-size: .72rem; color: var(--text-faint); letter-spacing: .02em; word-break: break-all; }
.copy {
  appearance: none;
  flex: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: .7rem;
  padding: .22rem .55rem;
  border-radius: 2px;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.copy:hover { color: var(--gold-bright); border-color: rgba(200, 162, 74, .5); }
.copy.is-done { color: var(--jade); border-color: rgba(63, 168, 140, .5); }

.code-panel pre {
  margin: 0;
  padding: 0 clamp(1rem, 2.4vw, 1.4rem) 1rem;
  overflow-x: auto;
  font-size: .78rem;
  line-height: 1.85;
  color: #AEBBCB;
  counter-reset: none;
}
.code-panel code { white-space: pre; }

/* ---------- 06 · 工程内核 ---------- */
.intern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.intern-card { background: var(--bg); padding: 1.3rem 1.15rem; }
.intern-card h3 {
  font-size: .92rem;
  letter-spacing: .02em;
  color: var(--gold-bright);
  padding-bottom: .6rem;
  margin-bottom: .6rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-weight: 600;
}
.intern-card p { color: var(--text-dim); font-size: .86rem; }

.archi {
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .012);
}
.archi summary {
  cursor: pointer;
  padding: .85rem 1.1rem;
  font-size: .86rem;
  color: var(--text-dim);
  list-style: none;
  position: relative;
  transition: color .2s var(--ease);
}
.archi summary::-webkit-details-marker { display: none; }
.archi summary::after {
  content: "＋";
  position: absolute;
  right: 1.1rem;
  font-size: .8rem;
  color: var(--gold);
}
.archi[open] summary::after { content: "－"; }
.archi summary:hover { color: var(--gold-bright); }
.archi img { width: 100%; border-top: 1px solid var(--line); }

/* ---------- 07 · 上手 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  counter-reset: st;
}
.steps li { background: var(--bg); padding: 1.3rem 1.15rem; position: relative; }
.step-num {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--gold);
  border: 1px solid rgba(200, 162, 74, .35);
  border-radius: 50%;
  width: 1.55rem;
  height: 1.55rem;
  display: inline-grid;
  place-items: center;
  margin-bottom: .7rem;
}
.steps h3 { font-size: .98rem; margin-bottom: .35rem; }
.steps p { color: var(--text-dim); font-size: .86rem; }
.steps code {
  font-size: .78rem;
  color: var(--gold-bright);
  background: rgba(200, 162, 74, .08);
  padding: .05rem .25rem;
  border-radius: 2px;
}

.providers { margin-top: 2rem; }
.providers h3, .chips-block h3 {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .8rem;
  font-weight: 500;
}
.table-scroll { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 34rem; }
th, td { text-align: left; padding: .62rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; color: var(--text-faint); font-weight: 500; background: rgba(255, 255, 255, .022); }
td { color: var(--text-dim); }
td code { color: var(--gold-bright); font-size: .76rem; }
tbody tr:last-child td { border-bottom: 0; }

.chips-block { margin-top: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.6rem; }
.chips li {
  font-size: .8rem;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .3rem .6rem;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.chips li:hover { color: var(--gold-bright); border-color: rgba(200, 162, 74, .45); background: rgba(200, 162, 74, .07); }
.chips-mono li { font-family: var(--mono); font-size: .74rem; }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg-deep);
  padding: clamp(2.2rem, 5vw, 3.4rem) clamp(1.1rem, 4vw, 2.4rem) 1.6rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(200, 162, 74, .12) 10%,
    rgba(200, 162, 74, .55) 26%,
    rgba(255, 255, 255, .16) 50%,
    rgba(63, 168, 140, .5) 74%,
    rgba(63, 168, 140, .12) 90%,
    transparent 100%
  );
}
.foot-main {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-brand { display: flex; gap: .8rem; align-items: flex-start; }
.foot-brand .brand-mark { width: 28px; height: 28px; margin-top: .2rem; }
.foot-name { font-family: var(--serif); letter-spacing: .06em; font-size: 1.02rem; }
.foot-desc { color: var(--text-faint); font-size: .82rem; margin-top: .15rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: .82rem; color: var(--text-dim); }
.foot-links a { border-bottom: 1px solid transparent; transition: border-color .2s var(--ease), color .2s var(--ease); }
.foot-links a:hover { border-bottom-color: rgba(200, 162, 74, .5); }
.foot-fine {
  max-width: var(--wrap);
  margin: 1.8rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  justify-content: space-between;
  font-size: .74rem;
  color: var(--text-faint);
}
.foot-date { font-family: var(--mono); }

/* ---------- 入场（无 JS 时保持可见） ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { order: -1; }
  .compass-stage { width: min(320px, 72%); }
}

@media (max-width: 860px) {
  .primary {
    position: fixed;
    inset: 56px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem clamp(1rem, 4vw, 2rem) 1rem;
    background: rgba(10, 14, 23, .97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
  }
  .primary.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .primary a { padding: .7rem .4rem; border-bottom: 1px solid var(--line); }
  .primary a.is-active::after { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-ghost span { display: none; }
  .feed li { grid-template-columns: 1fr; gap: .2rem; }
  .feed .who { padding-top: 0; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 70px; }
  body { font-size: 15px; }
  .hero { padding-top: 5.4rem; }
  .badges li, .chips li { font-size: .74rem; }
  .score { grid-template-columns: 4.2rem 1fr 3.6rem; }
  .foot-main { flex-direction: column; }
  .facts { font-size: .68rem; }
}

/* ---------- 尊重静默偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .cp-ring-outer, .cp-ring-mid, .cp-needle { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .rows li { opacity: 1; transform: none; }
  .flow-step { opacity: 1; }
}
