/* ============================================================
   page-content.css — 法律内容页（隐私政策 / 服务条款）
   ============================================================ */

/* —— 页面基底 —— */
html:has(.content-body) body {
  background-color: #fafafa;
}

/* —— Hero —— */
.content-hero {
  position: relative;
  padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 48px);
  overflow: hidden;
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 40%, #ffffff 100%);
}

.content-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.content-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #dc2626;
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
}

.content-hero__title {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #1d1d1f;
}

.content-hero__lead {
  margin: 0;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.7;
  color: #6b7280;
  font-weight: 500;
  text-wrap: balance;
  max-width: 42rem;
  margin-inline: auto;
}

.content-hero__lead a {
  color: #dc2626;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Meta card —— */
.content-meta-card {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 20px;
  padding: 14px 22px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  font-size: 13px;
  color: #6b7280;
}

.content-meta-card__row {
  display: flex;
  gap: 6px;
}

.content-meta-card__k {
  font-weight: 700;
  color: #1d1d1f;
  white-space: nowrap;
}

.content-meta-card__v {
  font-weight: 500;
}

.content-meta-card__v a {
  color: #dc2626;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Body shell —— */
.content-body {
  padding: clamp(24px, 4vw, 48px) 0 clamp(72px, 10vw, 100px);
}

.content-body__inner {
  max-width: 44rem;
  margin: 0 auto;
}

/* —— Chapters —— */
.content-chapter {
  scroll-margin-top: calc(var(--nav-height) + 24px);
  padding: clamp(22px, 3.5vw, 32px) 0;
  border-bottom: 1px solid #f1f5f9;
}

.content-chapter:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.content-chapter__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: clamp(14px, 2vw, 18px);
}

.content-chapter__step {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: #dc2626;
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
}

.content-chapter h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.35;
  color: #1d1d1f;
  letter-spacing: -0.02em;
}

.content-chapter p,
.content-chapter li {
  font-size: 15px;
  line-height: 1.78;
  color: #4b5563;
  margin: 0 0 12px;
}

.content-chapter p:last-child,
.content-chapter ul:last-child,
.content-chapter ol:last-child {
  margin-bottom: 0;
}

.content-chapter ul,
.content-chapter ol {
  margin: 0 0 12px;
  padding-left: 1.4em;
}

.content-chapter li {
  margin-bottom: 8px;
}

.content-chapter a {
  color: #dc2626;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Chapter link (sticky index pills) —— */
.content-index {
  position: sticky;
  top: var(--nav-height);
  z-index: 30;
  margin-bottom: clamp(10px, 2vw, 16px);
  padding: 14px 0 18px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.content-index__track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  align-items: stretch;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.content-index a {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-index a:hover {
  color: #dc2626;
  border-color: #dc2626;
  background: #fff5f5;
}

/* —— Responsive —— */
@media (max-width: 640px) {
  .content-hero__inner {
    padding-inline: 4px;
  }
}
