:root {
  color-scheme: light;
  --background: #f7f6f2;
  --surface: rgba(255, 255, 255, 0.86);
  --text: #242621;
  --muted: #70736b;
  --line: rgba(36, 38, 33, 0.1);
  --accent: #5e715c;
  --accent-soft: #e7ece3;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 2%, rgba(204, 218, 193, 0.48), transparent 30rem),
    var(--background);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

.site-header {
  width: min(100% - 40px, 920px);
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: none;
}

nav { display: flex; gap: 22px; }
nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
nav a:hover { color: var(--text); }

main {
  width: min(100% - 40px, 760px);
  margin: 0 auto;
  padding: 64px 0 84px;
}

.document,
.home-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 18px 60px rgba(44, 50, 40, 0.06);
}

.document { padding: clamp(28px, 7vw, 68px); }

h1, h2 {
  line-height: 1.32;
  letter-spacing: -0.025em;
}

h1 { margin: 0 0 18px; font-size: clamp(32px, 7vw, 48px); }
h2 { margin: 48px 0 14px; font-size: 21px; }

p { margin: 0 0 18px; }
ul { margin: 0 0 18px; padding-left: 1.35em; }
li + li { margin-top: 8px; }

code {
  padding: 0.14em 0.4em;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 0.92em;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.home { padding: 34px 0 10px; }
.home-eyebrow { color: var(--accent); font-size: 14px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.home h1 { max-width: 680px; margin-top: 12px; }
.home-lead { max-width: 620px; color: var(--muted); font-size: 18px; }

.document-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 42px;
}

.home-card {
  display: block;
  min-height: 180px;
  padding: 28px;
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.home-card:hover { transform: translateY(-2px); border-color: rgba(94, 113, 92, 0.38); }
.home-card strong { display: block; margin-bottom: 8px; font-size: 22px; }
.home-card span { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  width: min(100% - 40px, 920px);
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
  color: var(--muted);
  font-size: 13px;
}
.footer-inner a { color: inherit; }

@media (max-width: 620px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 10px; padding: 18px 0; }
  nav { width: 100%; justify-content: space-between; }
  main { padding: 38px 0 60px; }
  .document-links { grid-template-columns: 1fr; }
  .home-card { min-height: 0; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #151713;
    --surface: rgba(30, 33, 28, 0.88);
    --text: #eef0e9;
    --muted: #aeb3aa;
    --line: rgba(238, 240, 233, 0.1);
    --accent: #bdcfb7;
    --accent-soft: #303a2e;
  }
  body { background: radial-gradient(circle at 12% 2%, rgba(71, 87, 66, 0.35), transparent 30rem), var(--background); }
  .document, .home-card { box-shadow: none; }
}
