:root {
  color-scheme: light dark;
  --background: #f4f8f6;
  --surface: #ffffff;
  --surface-soft: #edf6f1;
  --text: #17221d;
  --muted: #526159;
  --primary: #176b4d;
  --primary-strong: #0e5139;
  --border: #cad8d0;
  --notice-background: #fff8e8;
  --notice-border: #d6a640;
  --notice-text: #5b4312;
  --focus: #a14f00;
  --shadow: 0 16px 40px rgb(26 69 50 / 10%);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--primary-strong);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible {
  border-radius: 0.25rem;
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-inner,
.page,
.site-footer {
  width: min(100% - 2rem, 48rem);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  gap: 1rem;
}

.brand {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.legal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  border-radius: 0.65rem;
  font-weight: 600;
  text-decoration: none;
}

.legal-nav a[aria-current="page"] {
  background: var(--surface-soft);
  color: var(--primary-strong);
}

.page {
  margin-block: 2rem 3rem;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--primary-strong);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1,
h2 {
  line-height: 1.35;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3rem);
  letter-spacing: -0.03em;
}

h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
}

p,
ul {
  margin-block: 0.75rem;
}

ul {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.5rem;
}

.meta,
.lede,
.section-note {
  color: var(--muted);
}

.lede {
  max-width: 40rem;
  margin-top: 1rem;
  font-size: 1.1rem;
}

.notice {
  margin-block: 1.5rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--notice-border);
  border-left-width: 0.35rem;
  border-radius: 0.75rem;
  background: var(--notice-background);
  color: var(--notice-text);
}

.notice strong {
  display: block;
  margin-bottom: 0.25rem;
}

.summary {
  margin-block: 1.5rem;
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  background: var(--surface-soft);
}

.summary p {
  margin: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0 2.5rem;
  color: var(--muted);
  font-size: 0.925rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 38rem) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.75rem;
  }

  .legal-nav {
    width: 100%;
  }

  .legal-nav a {
    flex: 1;
    justify-content: center;
  }

  .page {
    margin-top: 1rem;
    border-radius: 1rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #101713;
    --surface: #18221d;
    --surface-soft: #20362b;
    --text: #f0f6f2;
    --muted: #b9c8bf;
    --primary: #74d4a9;
    --primary-strong: #8ae8bd;
    --border: #3a5044;
    --notice-background: #342b17;
    --notice-border: #d9ad4d;
    --notice-text: #f7dfaa;
    --focus: #ffc16b;
    --shadow: 0 16px 40px rgb(0 0 0 / 22%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
