:root {
  color-scheme: light dark;
  --ink: #1b1b1b;
  --muted: #5d5d5d;
  --ground: #fdfdfc;
  --edge: #e2e0da;
  --accent: #7a5c3e;
  --code: #f3f1ec;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e6e1;
    --muted: #a6a29a;
    --ground: #16161a;
    --edge: #2e2e34;
    --accent: #cbab86;
    --code: #1f1f25;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--ground);
  color: var(--ink);
  font: 1rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

header.site {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--edge);
  font-weight: 600;
}

header.site a { color: inherit; text-decoration: none; }

header.site:has(.site-tags) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
}

.site-tags { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-weight: 400; }
.site-tags a { color: var(--muted); }
.site-tags a:hover, .site-tags a[aria-current="page"] { color: var(--accent); }

.tag-title { margin-bottom: 1rem; }

main { max-width: 42rem; margin: 0 auto; }

footer.site {
  max-width: 42rem;
  margin: 3rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--edge);
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site a { color: inherit; }
footer.site > :last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 { line-height: 1.25; margin: 2rem 0 0.75rem; }
h1 { font-size: 1.9rem; margin-top: 2.5rem; }

p, ul, ol, dl, table, blockquote, pre, figure { margin: 0 0 1.1rem; }

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

.meta { color: var(--muted); font-size: 0.875rem; margin-top: -0.35rem; }
.summary { color: var(--muted); margin: 0.2rem 0 0; }

ul.index { list-style: none; padding: 0; }
ul.index li { padding: 1.1rem 0; border-bottom: 1px solid var(--edge); }
ul.index .entry { font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.empty { color: var(--muted); }

img, video { max-width: 100%; height: auto; border-radius: 4px; }

pre {
  background: var(--code);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  border-radius: 4px;
}

code { background: var(--code); padding: 0.1rem 0.3rem; border-radius: 3px; font-size: 0.9em; }
pre code { background: none; padding: 0; }

blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--edge);
  color: var(--muted);
}

table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--edge); padding: 0.4rem 0.6rem; text-align: left; }

.callout, details.callout {
  border: 1px solid var(--edge);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  color: inherit;
  margin: 0 0 1.1rem;
}

.callout-title, details.callout summary { font-weight: 600; margin: 0 0 0.4rem; cursor: default; }
details.callout summary { cursor: pointer; }
.callout > :last-child, details.callout > :last-child { margin-bottom: 0; }

.callout-warning, details.callout-warning { border-left-color: #c08a2e; }
.callout-danger, details.callout-danger { border-left-color: #b4534a; }
.callout-tip, details.callout-tip { border-left-color: #4f8a6b; }

.footnotes { border-top: 1px solid var(--edge); font-size: 0.9rem; color: var(--muted); }

.schreibstube-index { color: var(--muted); margin: 0 0 1.1rem; }
.schreibstube-index summary { cursor: pointer; }
.schreibstube-index strong { color: var(--ink); }
.schreibstube-index ul { list-style: none; margin: 0.25rem 0 0; padding-left: 1.25rem; }
.schreibstube-index > ul { padding-left: 0; }
.schreibstube-index li { margin: 0.15rem 0; }

pre.mermaid { background: none; padding: 0; text-align: center; }
