/* ==========================================================================
   Coffin-Siris 综合征病友之家 · 全站样式
   设计原则：信任优先、温暖克制；深绿主色 + 暖橙点缀；系统字体栈（大陆可直连）
   圆角体系：卡片/图片 16px，按钮胶囊形，输入框 12px（全站一致）
   ========================================================================== */

:root {
  --bg: #F8F9FD;
  --surface: #FFFFFF;
  --band: #EFF1F9;
  --ink: #23263E;
  --ink-2: #5D6178;
  --line: #E3E5F0;
  --accent: #5E1E90;
  --deep: #1F3A8A;
  --soft: #F0EAF8;
  --teal: #2F7E8B;
  --teal-soft: #E7F1F3;
  --btn-bg: var(--deep);
  --btn-fg: #FFFFFF;
  --danger: #B4432E;
  --shadow: 0 10px 30px rgba(31, 58, 138, 0.10);
  --radius: 16px;
  --radius-sm: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12131E;
    --surface: #191C2B;
    --band: #171A28;
    --ink: #E8EAF3;
    --ink-2: #9CA1B6;
    --line: #2B3047;
    --accent: #C092E8;
    --deep: #8FA8EE;
    --soft: #231F33;
    --teal: #6FB3C2;
    --teal-soft: #1E2A33;
    --btn-bg: #8FA8EE;
    --btn-fg: #10121D;
    --danger: #E0907C;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--deep); text-decoration: underline; text-underline-offset: 3px; }

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 24px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px; margin-inline: auto; padding-inline: 24px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  box-shadow: 0 1px 4px rgba(31, 58, 138, 0.18);
}
.brand-text { line-height: 1.25; }
.brand-text .zh { display: block; font-size: 15.5px; }
.brand-text .en {
  display: block;
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 11px; color: var(--ink-2); letter-spacing: .02em;
}
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink-2); font-size: 14.5px; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-cta { margin-left: 4px; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 10px; width: 40px; height: 40px; cursor: pointer;
  color: var(--ink); font-size: 18px; line-height: 1;
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 15.5px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: none; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 11px 26px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { text-decoration: none; filter: brightness(1.08); color: var(--btn-fg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- 页头 ---------- */
.page-head { padding: 64px 0 20px; }
.page-head .crumb { font-size: 13px; color: var(--ink-2); margin-bottom: 14px; letter-spacing: .06em; }
.page-head h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); line-height: 1.3; letter-spacing: .01em; }
.page-head .lede { margin-top: 16px; max-width: 62ch; color: var(--ink-2); font-size: 1.05rem; }

/* ---------- 通用分节 ---------- */
.section { padding: 72px 0; }
.section--band { background: var(--band); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.4; margin-bottom: 14px; }
.section h3 { font-size: 1.12rem; margin: 26px 0 10px; }
.section p + p { margin-top: 12px; }
.muted { color: var(--ink-2); }
.small { font-size: .86rem; }
.src-note { margin-top: 22px; font-size: .82rem; color: var(--ink-2); }
.src-note a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

.eyebrow {
  font-size: 13px; font-weight: 600; color: var(--deep);
  letter-spacing: .14em; margin-bottom: 10px;
}

/* ---------- 首页 Hero ---------- */
.hero { padding: 56px 0 80px; }
.hero-grid {
  display: grid; grid-template-columns: 1.04fr .96fr; gap: 52px; align-items: center;
}
.hero h1 { font-size: clamp(2.15rem, 4.6vw, 3.15rem); line-height: 1.28; letter-spacing: .01em; }
.hero .lede { margin-top: 18px; max-width: 34em; color: var(--ink-2); font-size: 1.06rem; }
.hero-cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-img { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (max-width: 860px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- 数据条 ---------- */
.stats { padding: 56px 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.stat .num {
  font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; color: var(--deep);
  line-height: 1.2; font-variant-numeric: tabular-nums;
}
.stat .num em { font-style: normal; color: var(--teal); }
.stat .label { margin-top: 6px; font-size: .9rem; color: var(--ink-2); }
@media (max-width: 860px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Bento 板块 ---------- */
.bento {
  display: grid; grid-template-columns: 1.18fr 1fr; grid-template-rows: auto auto; gap: 18px;
}
.bento-cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.bento-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bento-tall { grid-row: span 2; background: var(--soft); border-color: transparent; justify-content: flex-start; }
.bento-tall h3 { font-size: 1.35rem; margin-top: 14px; }
.bento-cell h3 { margin-top: 14px; font-size: 1.18rem; }
.bento-cell p { margin-top: 8px; color: var(--ink-2); font-size: .95rem; }
.bento-go { margin-top: auto; padding-top: 18px; font-weight: 600; }
.bento-img { border-radius: var(--radius-sm); margin-bottom: 4px; }
@media (max-width: 860px) { .bento { grid-template-columns: 1fr; grid-template-rows: none; } .bento-tall { grid-row: auto; } }

/* ---------- 行动清单 ---------- */
.action-split { display: grid; grid-template-columns: .92fr 1.08fr; gap: 56px; align-items: start; }
.action-list { list-style: none; counter-reset: act; }
.action-list li {
  counter-increment: act; display: flex; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.action-list li:last-child { border-bottom: none; }
.action-list li::before {
  content: counter(act, decimal-leading-zero);
  font-family: Georgia, serif; font-size: 1.05rem; font-weight: 700;
  color: var(--accent); flex: none; padding-top: 2px;
}
.action-list .t { display: block; font-weight: 600; }
.action-list .d { display: block; color: var(--ink-2); font-size: .92rem; margin-top: 2px; }
@media (max-width: 860px) { .action-split { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 深色 CTA 条 ---------- */
.cta-band { background: var(--deep); color: #E4EAF9; border-radius: 24px; padding: 52px 48px; }
.cta-band h2 { color: #FFFFFF; }
.cta-band p { color: #C5CFEE; max-width: 40em; margin-top: 10px; }
.cta-band .btn-primary { background: #FFFFFF; color: #1F3A8A; }
.cta-band .btn-primary:hover { color: #1F3A8A; }
.cta-band .btn-ghost { border-color: rgba(255,255,255,.35); color: #FFFFFF; }
.cta-band .btn-ghost:hover { border-color: #FFFFFF; color: #FFFFFF; }
.cta-band .hero-cta { margin-top: 26px; }

/* ---------- 内容组件 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-rev { direction: rtl; }
.split-rev > * { direction: ltr; }
.split-img { border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 26px; } }

.callout {
  background: var(--soft); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 20px 24px; margin-top: 22px;
}
.callout p { color: var(--ink); }
.callout p + p { margin-top: 8px; }
.callout .callout-title { font-weight: 700; margin-bottom: 6px; color: var(--deep); }
.callout--amber { background: var(--teal-soft); border-left-color: var(--teal); }
.callout--amber .callout-title { color: var(--teal); }

.fact-clusters { margin-top: 26px; }
.fact-cluster { padding: 22px 0; border-top: 1px solid var(--line); }
.fact-cluster h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--deep); }
.fact-cluster .lead-in { color: var(--ink-2); font-size: .92rem; margin-bottom: 12px; }
.fact-row {
  display: flex; align-items: baseline; gap: 14px; padding: 9px 0;
}
.fact-row .name { font-weight: 500; min-width: 0; }
.fact-row .dot { flex: none; color: var(--accent); font-weight: 700; }
.fact-row .freq {
  margin-left: auto; flex: none; font-size: .9rem; color: var(--deep);
  font-variant-numeric: tabular-nums; font-weight: 600;
}

table.genes { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: .95rem; }
table.genes th {
  text-align: left; font-size: .8rem; color: var(--ink-2); font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--line); letter-spacing: .04em;
}
table.genes td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.genes tr:last-child td { border-bottom: none; }
table.genes td:first-child { font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.steps { list-style: none; margin-top: 26px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 26px 52px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--deep); color: #FFF;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}
.steps .t { font-weight: 700; display: block; padding-top: 4px; }
.steps .d { color: var(--ink-2); font-size: .95rem; margin-top: 4px; }

/* ---------- 时间线 ---------- */
.timeline { margin-top: 34px; border-left: 2px solid var(--line); padding-left: 26px; display: grid; gap: 26px; }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -33px; top: 10px;
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent); border: 2px solid var(--bg);
}
.tl-year {
  display: inline-block; font-weight: 700; color: var(--deep);
  font-variant-numeric: tabular-nums; font-size: .95rem; margin-bottom: 4px;
}
.tl-item .d { color: var(--ink-2); font-size: .95rem; max-width: 62ch; }
.tl-item .t { font-weight: 600; }

/* ---------- 登记项目 Bento ---------- */
.registry { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.registry-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px;
}
.registry-card--wide { grid-column: span 2; background: var(--soft); border-color: transparent; }
.registry-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.registry-card .who { font-size: .82rem; color: var(--ink-2); margin-bottom: 10px; }
.registry-card p { font-size: .93rem; color: var(--ink-2); }
.registry-card .go { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .92rem; }
@media (max-width: 860px) { .registry { grid-template-columns: 1fr; } .registry-card--wide { grid-column: auto; } }

/* ---------- 群组/渠道卡片 ---------- */
.channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.channel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px;
}
.channel--img { display: grid; grid-template-columns: 1fr; }
.channel h3 { font-size: 1.15rem; margin-bottom: 10px; }
.channel p { color: var(--ink-2); font-size: .95rem; }
.channel .go { margin-top: 18px; }
@media (max-width: 860px) { .channel-grid { grid-template-columns: 1fr; } }

/* ---------- 信件 ---------- */
.letter {
  font-family: "Kaiti SC", "STKaiti", KaiTi, "Kaiti TC", cursive, serif;
  font-size: 1.16rem; line-height: 2.15; color: var(--ink);
  background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 40px 44px; max-width: 680px;
}
.letter p + p { margin-top: 14px; }
.letter .sign { margin-top: 20px; color: var(--ink-2); font-size: .95rem; }
.letter-wrap { padding: 64px 0; background: var(--band); border-block: 1px solid var(--line); }

/* ---------- 地区资源卡 ---------- */
.region-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.region {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px;
}
.region .tag {
  display: inline-block; font-size: .78rem; font-weight: 600; color: var(--deep);
  background: var(--soft); border-radius: 999px; padding: 3px 12px; margin-bottom: 12px;
}
.region h3 { font-size: 1.05rem; margin-bottom: 6px; }
.region p { font-size: .92rem; color: var(--ink-2); }
.region .go { display: inline-block; margin-top: 12px; font-size: .9rem; font-weight: 600; }
@media (max-width: 860px) { .region-grid { grid-template-columns: 1fr; } }

/* ---------- 国际资源分组 ---------- */
.res-groups { margin-top: 28px; display: grid; gap: 26px; }
.res-group { border-top: 1px solid var(--line); padding-top: 18px; }
.res-group h3 { margin: 0 0 10px; font-size: 1rem; color: var(--deep); }
.res-group ul { list-style: none; display: grid; gap: 8px; }
.res-group li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.res-group .desc { color: var(--ink-2); font-size: .92rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: 10px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 36px 20px 0;
  font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--accent); font-weight: 400; transition: transform .25s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 0 22px; color: var(--ink-2); max-width: 62ch; }
.faq .answer p + p { margin-top: 8px; }

/* ---------- 表单 ---------- */
.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; max-width: 640px; margin-top: 28px;
}
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f-row { display: grid; gap: 16px; margin-top: 16px; }
.f-row--full { grid-column: span 2; }
.f-grid + .f-row { margin-top: 0; }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; font-weight: 600; }
.field label .opt { color: var(--ink-2); font-weight: 400; font-size: .8rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; width: 100%; transition: border-color .2s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft);
}
.field .helper { font-size: .8rem; color: var(--ink-2); }
.field .err { font-size: .82rem; color: var(--danger); display: none; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.field.invalid .err { display: block; }
.form-actions { margin-top: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { font-size: .92rem; }
.form-status.ok { color: var(--deep); }
.form-status.bad { color: var(--danger); }
.form-note { margin-top: 16px; font-size: .82rem; color: var(--ink-2); }
.form-fallback { margin-top: 10px; font-size: .85rem; display: none; }
.form-fallback.show { display: block; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
@media (max-width: 640px) { .f-grid { grid-template-columns: 1fr; } .f-row--full { grid-column: auto; } }

/* ---------- 页脚 ---------- */
.footer { background: var(--deep); color: #D6DDF2; margin-top: 72px; }
.footer a { color: #D6DDF2; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(214,221,242,.4); }
.footer a:hover { color: #FFFFFF; }
.footer-grid {
  max-width: 1080px; margin-inline: auto; padding: 52px 24px 32px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px;
}
.footer .brand-text .zh { color: #FFFFFF; }
.footer .brand-text .en { color: #A6B3DC; }
.footer .f-desc { margin-top: 14px; font-size: .9rem; color: #B7C2E6; max-width: 34em; }
.footer h4 { color: #FFFFFF; font-size: .92rem; margin-bottom: 12px; font-weight: 600; }
.footer ul { list-style: none; display: grid; gap: 8px; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.16); }
.footer-bottom-inner {
  max-width: 1080px; margin-inline: auto; padding: 18px 24px;
  font-size: .8rem; color: #A3B1DC; display: flex; gap: 18px; flex-wrap: wrap;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 滚动显现（尊重 reduced-motion；无 JS 时默认可见） ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
  html.js .reveal.in { opacity: 1; transform: none; }
}
