:root {
  color-scheme: light dark;
  --paper: #f7f3ed;
  --surface: rgba(255, 255, 255, 0.72);
  --ink: #2a2420;
  --muted: #6f655e;
  --accent: #755344;
  --accent-soft: #e8d8cd;
  --line: rgba(80, 61, 51, 0.18);
  --shadow: 0 24px 80px rgba(67, 49, 39, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(196, 155, 133, 0.22), transparent 34rem),
    radial-gradient(circle at 96% 24%, rgba(226, 198, 174, 0.23), transparent 30rem),
    var(--paper);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", "Noto Serif SC", serif;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

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

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

a:focus-visible {
  border-radius: 0.2rem;
  outline: 3px solid #b96137;
  outline-offset: 4px;
}

.site-header,
main,
.site-footer {
  width: min(100% - 2rem, 920px);
  margin-inline: auto;
}

.site-header {
  display: grid;
  gap: 0.85rem;
  padding-block: 1.25rem;
}

.brand {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: center;
}

.nav-row a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  background: var(--surface);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-row a[aria-current="page"] {
  border-color: var(--accent);
  color: var(--paper);
  background: var(--accent);
}

.language {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 0.82rem;
}

main {
  padding: clamp(1.6rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow,
.updated {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 16ch;
  margin: 0.15rem 0 0.5rem;
  font-size: clamp(2.15rem, 7vw, 4.5rem);
  font-weight: 540;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.lede {
  max-width: 64ch;
  margin-block: 1.25rem 2.5rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 2.5vw, 1.18rem);
}

h2 {
  margin-block: 2.4rem 0.65rem;
  padding-top: 0.35rem;
  font-size: clamp(1.22rem, 3vw, 1.55rem);
  line-height: 1.25;
}

h3 {
  margin-block: 1.55rem 0.45rem;
  font-size: 1.03rem;
}

p,
li {
  max-width: 72ch;
}

ul,
ol {
  padding-inline-start: 1.35rem;
}

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

.callout {
  margin-block: 1.4rem;
  padding: 1rem 1.1rem;
  border-inline-start: 4px solid var(--accent);
  border-radius: 0.3rem 0.8rem 0.8rem 0.3rem;
  background: var(--accent-soft);
  color: #352923;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem 1.5rem;
  padding-block: 1.8rem 2.5rem;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
}

@media (max-width: 620px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 1rem, 920px);
  }

  main {
    padding: 1.35rem 1rem 1.8rem;
    border-radius: 1rem;
  }

  .nav-row {
    gap: 0.4rem;
  }

  .nav-row a {
    padding: 0.32rem 0.57rem;
    font-size: 0.73rem;
  }

  .lede {
    margin-bottom: 1.8rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171310;
    --surface: rgba(38, 31, 27, 0.8);
    --ink: #f5eee8;
    --muted: #c6b8ae;
    --accent: #e4bca5;
    --accent-soft: #49372e;
    --line: rgba(233, 211, 196, 0.2);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  }

  .nav-row a[aria-current="page"] {
    color: #261c17;
  }

  .callout {
    color: #f6eee7;
  }
}

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