/* 徳学志愿宝 · 协议/隐私高版阅读页 */
:root {
  --brand: #1e6fff;
  --brand2: #3B7BFF;
  --text: #2B2F36;
  --sub: #8A8F99;
  --muted: #5B6270;
  --line: #EDEFF2;
  --title: #1A1D22;
  --bg: #F7F9FC;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font: 15px/1.67 -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.legal-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  transition: background .25s ease, box-shadow .25s ease;
}

.legal-nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.08), 0 8px 24px rgba(20, 40, 90, 0.04);
}

.legal-nav h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--title);
}

.legal-nav .back {
  position: absolute;
  left: 8px;
  top: env(safe-area-inset-top, 0px);
  height: 52px;
  padding: 0 12px;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--brand);
  cursor: pointer;
}

.legal-nav .home {
  position: absolute;
  right: 12px;
  top: env(safe-area-inset-top, 0px);
  height: 52px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.anchors {
  position: sticky;
  top: calc(52px + env(safe-area-inset-top, 0px));
  z-index: 35;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px max(20px, calc(50vw - 380px)) 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.anchors::-webkit-scrollbar {
  display: none;
}

.anchors a {
  font-size: 13px;
  color: var(--sub);
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  flex: 0 0 auto;
}

.anchors a.on,
.anchors a:hover {
  color: var(--brand);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

.hero {
  position: relative;
  height: min(42vw, 280px);
  min-height: 180px;
  max-height: 320px;
  overflow: hidden;
  background: linear-gradient(160deg, #EEF3FF, #F7F9FC 60%, #fff);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(247, 249, 252, 0) 40%, rgba(247, 249, 252, 0.75) 78%, var(--bg) 100%);
}

.doc {
  width: min(760px, 100% - 40px);
  margin: -36px auto 0;
  position: relative;
  z-index: 2;
  padding: 0 0 calc(48px + env(safe-area-inset-bottom, 0px));
}

.doc-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 28px 36px;
  box-shadow: 0 12px 40px rgba(20, 40, 90, 0.06);
  border: 1px solid rgba(237, 239, 242, 0.9);
}

.doc-title {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  color: var(--title);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.meta {
  font-size: 12px;
  color: var(--sub);
  margin: 10px 0 18px;
}

.doc-card>p.lead {
  margin: 0 0 8px;
  color: var(--muted);
}

.doc-card h2 {
  font-size: 16px;
  font-weight: 650;
  color: var(--title);
  margin: 28px 0 10px;
  scroll-margin-top: 120px;
}

.doc-card p {
  margin: 0 0 14px;
}

.doc-card ul {
  margin: 0 0 14px;
  padding-left: 1.1em;
}

.doc-card li {
  margin: 0 0 8px;
}

.doc-card .updated {
  font-size: 12px;
  color: var(--sub);
  margin: 0 0 4px;
}

.doc-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 13px;
}

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

.doc-card th {
  background: #F7F9FC;
  color: var(--title);
  font-weight: 600;
}

.doc-card a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 640px) {
  .doc {
    width: min(100%, 100% - 24px);
    margin-top: -24px;
  }

  .doc-card {
    padding: 22px 18px 28px;
    border-radius: 16px;
  }

  .doc-title {
    font-size: 22px;
  }

  .hero {
    min-height: 160px;
  }

  .anchors {
    padding-left: 16px;
    padding-right: 16px;
    gap: 14px;
  }
}