:root {
  color-scheme: light dark;
  --background: #f6f4ee;
  --surface: #fffdf7;
  --text: #252822;
  --muted: #687064;
  --accent: #246b4b;
  --border: #d9ddd3;
  --shadow: 0 18px 50px rgb(41 54 44 / 8%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

* {
  box-sizing: border-box;
}

body {
  max-width: 48rem;
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  color: var(--text);
  background: var(--background);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.site-name {
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero {
  padding: clamp(2rem, 7vw, 4rem) 0;
}

.hero h1 {
  margin-bottom: 0.25rem;
  font-size: clamp(2.1rem, 8vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.eyebrow,
time,
footer {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

article {
  margin: 1.25rem 0;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

article h1,
article h2 {
  margin-top: 0;
}

ul {
  padding-left: 1.25rem;
}

.page-list {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  list-style: none;
}

article > ul[aria-label="标签"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

article > ul[aria-label="标签"] a {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  text-decoration: none;
}

img,
video {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

pre {
  max-width: 100%;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 0.75rem;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.not-found {
  padding: 5rem 0;
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-size: clamp(4rem, 20vw, 9rem);
  font-weight: 800;
  line-height: 1;
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

@media (max-width: 34rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #151a17;
    --surface: #1d2420;
    --text: #edf2eb;
    --accent: #74d8a4;
    --border: #36423b;
    --shadow: none;
  }
}
