/* ==========================================================================
  溯学 - 全站共用样式
   说明：零外部依赖，不引用任何 CDN、外部字体或外链资源；图标均为内联 SVG。
   ========================================================================== */

:root {
  --brand: #12626b;
  --brand-dark: #0c4a51;
  --brand-soft: #e8f3f3;
  --accent: #c2762a;
  --accent-soft: #fbf1e5;
  --ink: #16232b;
  --ink-2: #33474f;
  --muted: #5d7079;
  --line: #e2e9ec;
  --bg: #f5f8f8;
  --surface: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 46, .05), 0 8px 24px rgba(16, 40, 46, .05);
  --wrap: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  vertical-align: middle;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 .5em;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -.01em;
}

h1 {
  font-size: 2.1rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.12rem;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

li + li {
  margin-top: .35em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(6px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: .01em;
}

.brand:hover {
  text-decoration: none;
  color: var(--brand);
}

.brand .logo {
  width: 34px;
  height: 34px;
  flex: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: .94rem;
}

.nav a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--ink-2);
}

.nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

/* ---------- 通用区块 ---------- */

main {
  display: block;
}

.section {
  padding: 56px 0;
}

.section.tight {
  padding: 36px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.lead {
  font-size: 1.06rem;
  color: var(--ink-2);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: .88rem;
}

/* ---------- 首页首屏 ---------- */

.hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(900px 380px at 12% 0%, #e9f4f4 0%, rgba(233, 244, 244, 0) 70%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin-bottom: .4em;
}

.hero .lead {
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.2;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.hero-figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.hero-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: .84rem;
  text-align: center;
}

/* ---------- 卡片网格 ---------- */

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 14px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.card.warm .card-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- 列表 / 步骤 ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 16px;
}

.steps li {
  position: relative;
  margin: 0;
  padding: 18px 20px 18px 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps strong {
  display: block;
  margin-bottom: .2em;
}

.steps span {
  color: var(--muted);
  font-size: .95rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  position: relative;
  margin: 0;
  padding-left: 30px;
  color: var(--ink-2);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--brand-soft);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(.45em + 4px);
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

.cross-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.cross-list li {
  position: relative;
  margin: 0;
  padding-left: 30px;
  color: var(--ink-2);
}

.cross-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #f4e7e7;
}

.cross-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: calc(.45em + 5px);
  width: 6px;
  height: 6px;
  background:
    linear-gradient(45deg, transparent 43%, #a33a3a 43%, #a33a3a 57%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, #a33a3a 43%, #a33a3a 57%, transparent 57%);
}

/* ---------- 信息条 ---------- */

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--brand-soft);
  border: 1px solid #cfe4e4;
  border-radius: var(--radius);
  color: var(--brand-dark);
}

.notice p {
  margin: 0;
}

.notice svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 3px;
}

.notice.warm {
  background: var(--accent-soft);
  border-color: #efdcc2;
  color: #7a4a15;
}

/* ---------- 信息表 ---------- */

.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .96rem;
}

.info-table th,
.info-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.info-table th {
  width: 160px;
  background: #f9fbfb;
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 法律条款页 ---------- */

.page-head {
  padding: 44px 0 30px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  margin-bottom: .3em;
}

.page-head .meta {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
}

.doc {
  padding: 40px 0 64px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 88px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .92rem;
}

.toc h2 {
  font-size: .82rem;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .8em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding-left: 1.1em;
  color: var(--ink-2);
}

.toc a {
  color: var(--ink-2);
}

.doc-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 34px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.doc-body h2 {
  margin-top: 2em;
  padding-top: .2em;
  font-size: 1.2rem;
  scroll-margin-top: 88px;
}

.doc-body h2:first-of-type {
  margin-top: 0;
}

.doc-body h3 {
  margin-top: 1.5em;
  font-size: 1.02rem;
  scroll-margin-top: 88px;
}

.doc-body li {
  color: var(--ink-2);
}

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  margin: 0 0 1.2em;
}

.doc-body th,
.doc-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.doc-body th {
  background: #f9fbfb;
  font-weight: 600;
  white-space: nowrap;
}

.doc-note {
  margin: 1.2em 0;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: #7a4a15;
  font-size: .94rem;
  border-radius: 0 8px 8px 0;
}

.doc-note p:last-child {
  margin-bottom: 0;
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: 0;
  padding: 48px 0 28px;
  background: #102a2e;
  color: #c7d6d8;
  font-size: .92rem;
}

.site-footer a {
  color: #dce9ea;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.footer-brand {
  margin-bottom: .5em;
  color: #fff;
  font-weight: 700;
  font-size: 1.04rem;
}

.footer-title {
  margin-bottom: .7em;
  color: #fff;
  font-weight: 600;
  font-size: .92rem;
}

.site-footer p {
  margin: 0 0 .5em;
}

.footer-nav {
  display: grid;
  gap: 6px;
}

.footer-bottom {
  padding-top: 22px;
  color: #a9bec1;
  font-size: .86rem;
}

.footer-bottom p {
  margin: 0 0 .35em;
}

.footer-bottom a {
  color: #a9bec1;
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 44px 0 40px;
  }

  .hero-grid {
    gap: 32px;
  }

  .doc-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .toc {
    position: static;
  }

  .toc ol {
    columns: 2;
    column-gap: 24px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .wrap {
    padding: 0 16px;
  }

  .section {
    padding: 40px 0;
  }

  .header-inner {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav {
    font-size: .88rem;
  }

  .nav a {
    padding: 5px 8px;
  }

  .doc-body {
    padding: 22px 18px;
  }

  .toc ol {
    columns: 1;
  }

  .info-table th {
    width: 104px;
    white-space: normal;
  }

  .info-table th,
  .info-table td {
    padding: 11px 12px;
  }

  .steps li {
    padding: 16px 16px 16px 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
