:root {
  --bg: #fbfaf7;
  --fg: #1c1b18;
  --muted: #6b665c;
  --rule: #ddd8cc;
  --accent: #7a5c2e;
  --card: #ffffff;
  --maxw: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --fg: #e8e4d9;
    --muted: #9b9484;
    --rule: #33322a;
    --accent: #c9a25e;
    --card: #1b1b15;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  padding: 0 1.25rem;
}

.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ---------- Kopf ---------- */
header.site {
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 0 1.25rem;
  margin-bottom: 2.5rem;
}

.brand {
  display: block;
  font-size: 1.65rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
}

.tagline {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.35rem;
  font-style: italic;
}

nav.site {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: 0.02em;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

nav.site a:hover { color: var(--fg); border-bottom-color: var(--accent); }
nav.site a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* ---------- Text ---------- */
h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 1.2rem;
  font-weight: 600;
}

h2 {
  font-size: 1.2rem;
  margin: 2.6rem 0 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h3 {
  font-size: 1rem;
  margin: 1.8rem 0 0.4rem;
  font-weight: 600;
}

p { margin: 0 0 1.05rem; }

a { color: var(--accent); text-underline-offset: 3px; }

ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 0.4rem; }

.lead { font-size: 1.1rem; color: var(--fg); }

.meta {
  font-family: ui-sans-serif, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

blockquote {
  margin: 1.6rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* ---------- Eintraege ---------- */
.entry {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  margin-top: 2.2rem;
}

.entry:first-of-type { border-top: 0; padding-top: 0; }

.entry h2 { margin-top: 0.35rem; }

.datazeile {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.55rem 0.75rem;
  margin: 1rem 0 1.2rem;
  overflow-x: auto;
  white-space: pre;
}

/* ---------- Tabelle ---------- */
.tabellenrahmen { overflow-x: auto; margin: 1.4rem 0; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
}

th, td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th { color: var(--muted); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- Fuss ---------- */
footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 1.5rem 0 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
}

footer.site a { color: var(--muted); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.8rem; }

img, svg { max-width: 100%; height: auto; }

@media (max-width: 34rem) {
  body { font-size: 16px; }
  h1 { font-size: 1.55rem; }
}
