/* App 协议独立静态页，支持明暗主题和打印。 */
:root {
  color-scheme: light;
  --app-bg: #f7f8fa;
  --app-surface: #ffffff;
  --app-text: #262626;
  --app-text-regular: #525252;
  --app-text-muted: #737373;
  --app-border-soft: #ebebeb;
  --el-color-primary: #00893f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--app-bg);
  color: var(--app-text-regular);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 820px;
  margin: 24px auto;
  padding: 24px 32px 32px;
  border: 1px solid var(--app-border-soft);
  border-radius: 6px;
  background: var(--app-surface);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--app-border-soft);
  font-size: 14px;
}

a {
  color: var(--el-color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

nav a {
  color: var(--app-text-muted);
  text-decoration: none;
}

nav a[aria-current='page'] {
  color: var(--el-color-primary);
  font-weight: 600;
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--el-color-primary);
  outline-offset: 4px;
}

h1,
h2,
strong {
  color: var(--app-text);
  font-weight: 600;
}

h1 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.4;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.5;
}

p {
  margin: 0 0 12px;
}

.dates {
  margin-bottom: 20px;
  color: var(--app-text-muted);
  font-size: 13px;
}

section {
  margin-top: 24px;
}

section:last-child p:last-child {
  margin-bottom: 0;
}

.legal-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--app-border-soft);
  color: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.legal-footer p {
  margin: 0;
}

.legal-footer p + p {
  margin-top: 4px;
}

.legal-footer a {
  color: inherit;
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
}

.legal-registration {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}

.legal-registration a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.legal-registration img {
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  body {
    background: var(--app-surface);
  }

  main {
    margin: 0;
    padding: 20px;
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
  }

  h1 {
    font-size: 22px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --app-bg: #141414;
    --app-surface: #1f1f1f;
    --app-text: #f5f5f5;
    --app-text-regular: #d4d4d4;
    --app-text-muted: #a3a3a3;
    --app-border-soft: #333333;
    --el-color-primary: #45b97c;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #262626;
  }

  main {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #ffffff;
  }

  nav {
    display: none;
  }

  h1,
  h2,
  strong,
  a,
  .dates {
    color: #262626;
  }

  h2 {
    break-after: avoid;
  }
}
