:root {
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-muted: #888888;
  --bg-body: #f7f9fc;
  --bg-surface: #ffffff;
  --border-color: #eaebef;
  --primary-color: #3b82f6;
  --border-radius: 12px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 800px;
  margin: 1.5rem auto;
  padding: 1.5rem 2rem;
  background-color: var(--bg-surface);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  /* Safe area insets for notched devices */
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  padding-left: calc(2rem + env(safe-area-inset-left));
  padding-right: calc(2rem + env(safe-area-inset-right));
}

/* App WebView Mode (no outer margin, flat background) */
body.env-app {
  background-color: var(--bg-surface);
}
body.env-app .container {
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 1.5rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #111827;
  text-align: center;
  letter-spacing: -0.025em;
}

/* When embedded in an app, often the app has its own native header, so we might hide the H1 */
body.env-app .page-title.app-hide {
  display: none;
}

.update-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background-color: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.update-info p {
  margin-bottom: 0.5rem;
  text-align: left;
}

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

.content-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border-color);
}

/* 消除每个 section 最后一个元素自带的 bottom margin，防止空白叠加导致虚线上方太空 */
.content-section > :last-child {
  margin-bottom: 0;
}

.content-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--primary-color);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
  text-align: left;
  line-height: 1.6;
}

ul, ol {
  font-size: 0.925rem;
  color: #64748b;
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  margin-left: 0.25rem;
  border-left: 3px solid #e2e8f0;
  list-style-type: none; /* 去除原生的圆点，避免和文字里的 1) 重叠 */
}

li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.clause-num {
  font-weight: 700;
  color: #0f172a;
  margin-right: 0.25rem;
}

strong {
  color: #000000;
  font-weight: 600;
  background-color: rgba(241, 245, 249, 0.5); /* 极淡的底色强调 */
  padding: 0 2px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    /* 在 H5 减小左右两边的 padding，留出更多空间给文字 */
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  }
  
  .page-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
  }

  .update-info {
    margin-bottom: 1.5rem;
    padding: 0.85rem;
  }

  .content-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
  }

  h2 {
    font-size: 1.05rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  /* 缩小 H5 上的列表缩进，避免文字被挤压得很窄 */
  ul, ol {
    padding-left: 0.75rem;
    margin-left: 0;
    margin-bottom: 1rem;
  }
}

