:root {
  --bg: #fbfaf7;
  --text: #1f2328;
  --muted: #5d636b;
  --line: #e4e1da;
  --accent: #a15c00;
  --code-bg: #f1eee7;
  --code-text: #2b2f35;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --text: #e6e3dd;
    --muted: #9aa0a6;
    --line: #2c3036;
    --accent: #f2b33d;
    --code-bg: #1e2125;
    --code-text: #e6e3dd;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.site-header, main, .site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  hyphens: none;
}
.brand {
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
}
.site-header nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem 1.1rem; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav a:hover { color: var(--text); }
.site-header nav a.lang {
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}
@media (max-width: 420px) {
  .site-header nav { gap: .25rem .8rem; font-size: .95rem; }
  .site-header nav a.lang { padding-left: .8rem; }
}

main { padding-bottom: 3rem; }

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 1.5rem 0 1rem;
  hyphens: manual;
}
h2 {
  font-size: 1.2rem;
  margin: 2.2rem 0 .6rem;
}

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

.intro p, .lead { color: var(--muted); font-size: 1.08rem; }

.notes { list-style: none; padding: 0; margin: 2rem 0 0; }
.notes li { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.notes li:last-child { border-bottom: 1px solid var(--line); }
.notes a { font-weight: 600; font-size: 1.1rem; text-decoration: none; hyphens: manual; }
.notes a:hover { text-decoration: underline; }
.notes p { margin: .3rem 0 0; color: var(--muted); }

code {
  font: .88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: var(--code-bg);
  color: var(--code-text);
  padding: .1em .3em;
  border-radius: 4px;
  hyphens: none;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .9rem 1rem;
  overflow-x: auto;
}
pre code { padding: 0; background: none; font-size: .85rem; }

ul { padding-left: 1.3rem; }
li { margin: .2rem 0; }

.back { margin-top: 2.5rem; }
.back a { text-decoration: none; }

.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}
.site-footer p { margin: 0; }
