/* ============================================================
   Base / design tokens
   ============================================================ */

:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --text: #1a1d1b;
  --text-secondary: #5a5f5a;
  --rule: #e2dfd3;
  --accent: #2f6f4e;
  --accent-hover: #255a3e;
  --amber: #c9822e;
  --success: #2f6f4e;
  --danger: #b3261e;

  --font-heading: "Inter", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-pill: 999px;

  --dur: 150ms;
  --ease: ease;
}

:root[data-theme="dark"] {
  --bg: #15181a;
  --surface: #1d2124;
  --text: #edebe3;
  --text-secondary: #9ca39c;
  --rule: #2b302e;
  --accent: #4c9a72;
  --accent-hover: #5fae85;
  --amber: #d9a24b;
  --success: #4c9a72;
  --danger: #e2574b;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

img {
  max-width: 100%;
  display: block;
}

main {
  padding-bottom: 48px;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 12px;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 22px;
  margin-top: 48px;
}

h3 {
  font-size: 17px;
}

p {
  margin: 0 0 16px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 var(--r-xs) 0;
}

.skip-link:focus {
  left: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--reading {
  max-width: 960px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
