:root {
  --bg: #ffffff;
  --text: #262626;
  --muted: #6b6b6b;
  --line: #dedede;
  --accent: #7c2d2d;
  --max: 980px;
  --reading: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.header-inner {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 16px 0;
}

.site-nav { margin-top: 0; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-nav a { color: var(--text); font-family: Arial, Helvetica, sans-serif; font-size: 0.9rem; text-decoration: none; }
.site-nav a:hover,
.site-nav a[aria-current='page'] { color: var(--accent); text-decoration: underline; }

.hero {
  width: min(calc(100% - 40px), var(--max));
  margin: 32px auto 0;
}
.hero img { width: 100%; }

main {
  width: min(calc(100% - 40px), var(--reading));
  margin: 54px auto 70px;
}
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 28px; }
h2 { margin-top: 2.2em; }
p { margin: 0 0 1.25em; }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }

.figure { margin: 0 0 34px; }
/* Billeder fylder højst 75 % af skærmhøjden; høje billeder vises centreret på en lys baggrund i stedet for at skubbe teksten langt ned. */
.figure img { width: 100%; max-height: max(75vh, 520px); object-fit: contain; background: #eceae6; }
.figure figcaption { margin-top: 8px; color: var(--muted); font-size: 0.85rem; font-family: Arial, Helvetica, sans-serif; }

.chapter-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.chapter-list li { border-bottom: 1px solid var(--line); }
.chapter-list a { display: block; padding: 13px 4px; color: var(--text); text-decoration: none; }
.chapter-list a:hover { color: var(--accent); }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0; }
.button {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--text);
  color: var(--text);
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
}
.button:hover { background: var(--text); color: #fff; }

.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
}
.chapter-nav span { color: #aaa; }

.end-rule { border: 0; border-top: 1px solid #bbb; margin: 64px 0 0; }


@media (max-width: 600px) {
  body { font-size: 17px; }
  .header-inner, main { width: min(calc(100% - 28px), var(--reading)); }
  .hero { width: 100%; margin-top: 0; }
  main { margin-top: 36px; }
  .chapter-nav { flex-direction: column; }
}
