/* Catamorph – gemeinsames Stylesheet
   Keine externen Fonts/Skripte (datenschutzfreundlich, keine Drittanbieter). */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --text: #1f2330;
  --muted: #5a5f6e;
  --border: #e3e1dc;
  --accent: #5b3fa6;
  --accent-strong: #442e80;
  --accent-soft: #eeeaf7;
  --highlight: #f08a24;
  --todo-bg: #fff3c4;
  --todo-text: #6b4e00;
  --radius: 12px;
  --max: 68rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15141a;
    --surface: #1e1c25;
    --text: #e8e6ee;
    --muted: #a7a3b5;
    --border: #322f3c;
    --accent: #b49cf0;
    --accent-strong: #cfbff7;
    --accent-soft: #2a2440;
    --todo-bg: #4a3b10;
    --todo-text: #ffe29a;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}
main { display: block; flex: 1; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin-top: 0.2em; }
h3 { font-size: 1.15rem; }
p, ul, ol, dl { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header / Navigation */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none;
  letter-spacing: 0.01em;
}
.brand img { width: 2rem; height: 2rem; flex: none; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 0.25rem 0; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom: 2px solid var(--accent); }

/* Strip */
.strip { padding-top: 2rem; padding-bottom: 1rem; }
.strip-head { text-align: center; margin-bottom: 1.25rem; }
.strip-head h1, .strip-head h2 { margin: 0; }
.strip-meta {
  margin: 0 0 0.3rem; color: var(--muted); font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.strip-figure { margin: 0; text-align: center; }
.strip-figure img {
  display: block; margin: 0 auto; max-width: 100%; height: auto;
  border-radius: 4px; background: #fff;
}
.strip-figure a { display: inline-block; max-width: 100%; }

.strip-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem;
  margin: 1.5rem 0;
}
.strip-nav a,
.strip-nav span[aria-disabled] {
  display: inline-block; padding: 0.45rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.strip-nav a:hover { border-color: var(--accent); background: var(--accent-soft); }
.strip-nav span[aria-disabled] { color: var(--muted); opacity: 0.5; }
.strip-nav .nav-archiv { color: var(--muted); }
@media (max-width: 560px) {
  .strip-nav { gap: 0.4rem; }
  .strip-nav a, .strip-nav span[aria-disabled] { padding: 0.4rem 0.7rem; font-size: 0.95rem; }
  .strip-nav .nav-archiv { order: 5; flex-basis: 100%; text-align: center; border: 0; background: none; }
}

.strip-note {
  max-width: 42rem; margin: 0 auto 1.5rem; padding: 1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.strip-note > :last-child { margin-bottom: 0; }

/* Normale Seiten (Archiv, Über, Rechtstexte) */
.page { max-width: 46rem; padding-top: 2.5rem; padding-bottom: 2rem; }
.page h2 { font-size: 1.3rem; margin-top: 2rem; }
.page h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.page address { font-style: normal; margin-bottom: 1em; }
.page .updated, .page-intro { color: var(--muted); }
.page-intro { font-size: 1.1rem; }

/* Archiv */
.archiv-jahr h2 { border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.archiv-liste { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.archiv-liste li {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 0.45rem 0; border-bottom: 1px dashed var(--border);
}
.archiv-liste a { flex: 1; text-decoration: none; display: flex; gap: 0.75rem; align-items: baseline; }
.archiv-liste a:hover .archiv-titel { text-decoration: underline; }
.archiv-nr {
  min-width: 2.5rem; text-align: right; color: var(--muted);
  font-variant-numeric: tabular-nums; font-size: 0.95rem;
}
.archiv-titel { font-weight: 600; }
.archiv-liste time { color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

/* Platzhalter – vor Veröffentlichung ersetzen! */
.todo {
  background: var(--todo-bg); color: var(--todo-text);
  border-radius: 4px; padding: 0 0.3em; font-weight: 600;
}

/* Footer */
.site-footer {
  margin-top: 2rem; border-top: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  padding-top: 1.5rem; padding-bottom: 1.5rem;
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer p { margin: 0; }

@media print {
  .site-header, .site-footer, .skip-link, .strip-nav { display: none; }
  body { background: #fff; color: #000; }
}
