:root {
  --paper: #f6f1e7;
  --ink: #2a2420;
  --ink-soft: #5c5148;
  --rule: #ddd2c0;
  --earth: #8a5a2b;
  --sprout: #4f7a3a;
  --night: #0d1024;
  --night-2: #1b1840;
  --star: #f3e6c4;
  --dawn: #e7a95b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15130f;
    --ink: #ece4d6;
    --ink-soft: #b3a796;
    --rule: #3a332b;
    --earth: #d39a5e;
    --sprout: #8fbf72;
  }
}
:root[data-theme="dark"] {
  --paper: #15130f; --ink: #ece4d6; --ink-soft: #b3a796;
  --rule: #3a332b; --earth: #d39a5e; --sprout: #8fbf72;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
}
a { color: var(--earth); text-underline-offset: 0.2em; }
a:hover { color: var(--sprout); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 2; background: var(--paper); padding: .5rem 1rem; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--earth); border-color: var(--earth); }
.theme-toggle:focus-visible { outline: 2px solid var(--earth); outline-offset: 2px; }
.theme-toggle svg { width: 1rem; height: 1rem; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-reduced-motion: reduce) { .theme-toggle { transition: none; } }

/* ---------- Container pages ---------- */
.container {
  max-width: 42rem;
  margin: 0 auto;
  padding: 6rem 16px 4rem;
}
.back {
  display: inline-block;
  margin-bottom: 3rem;
  font-size: .9rem;
  color: var(--ink-soft);
}
.back:hover { color: var(--earth); }
h1 {
  font: 400 clamp(1.7rem, 5vw, 2.2rem)/1.15 var(--serif);
  margin: 0 0 1.25rem;
}
p { margin: 0 0 1.1rem; }
.muted { color: var(--ink-soft); }

footer {
  max-width: 42rem;
  margin: 5rem auto 0;
  padding: 2rem 16px 3rem;
  border-top: 1px solid var(--rule);
  font-size: .9rem;
  color: var(--ink-soft);
}
