:root {
  color-scheme: dark;
  --background: #0b0c10;
  --panel: #13141a;
  --text: #f5f7ff;
  --secondary: #b7bfd6;
  --brand: #ffb347;
  --border: #2a2c38;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at top left, #261b14, var(--background) 30rem);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

a {
  color: var(--brand);
  text-underline-offset: 0.2em;
}

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

.container {
  width: min(48rem, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem 1rem;
  min-height: 4rem;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand::before {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a00, var(--brand));
  content: "";
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
}

.document {
  margin-block: clamp(1.25rem, 5vw, 3rem);
  padding: clamp(1.25rem, 5vw, 2.5rem);
  scroll-margin-top: 5.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  overflow-wrap: anywhere;
}

.document[lang="en"] {
  display: none;
}

.document[lang="en"]:target {
  display: block;
}

.document[lang="en"]:target ~ .document[lang="zh-CN"] {
  display: none;
}

.document h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.875rem, 5vw, 2.625rem);
  line-height: 1.2;
}

.document h2 {
  margin: 1.875rem 0 0.625rem;
  font-size: 1.375rem;
  line-height: 1.35;
}

.document h3 {
  margin: 1.25rem 0 0.375rem;
  font-size: 1.075rem;
  line-height: 1.45;
}

.document p,
.document ul {
  margin: 0.5rem 0;
  color: var(--secondary);
}

.document ul {
  padding-inline-start: 1.25rem;
}

.document li + li {
  margin-top: 0.25rem;
}

.document-footer {
  margin-top: 1.875rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
