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

:root {
  --bg: #f5f5f0;
  --text: #111;
  --muted: #666;
}

html {
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, 'Courier New', Courier, monospace;
  line-height: 1.65;
  padding: 2.5rem 2rem 5rem;
  min-height: 100vh;
}

/* Linksbündig, max. 55vw auf Desktop */
.wrap {
  max-width: 65ch;
  margin: 0;
}

@media (min-width: 900px) {
  .wrap {
    max-width: 55vw;
  }
}

/* Navigation */
header {
  margin-bottom: 4rem;
}

header::after {
  content: "· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·";
  display: block;
  color: var(--muted);
  opacity: 0.45;
  font-size: 0.75rem;
  margin-top: 0.6rem;
  overflow: hidden;
  white-space: nowrap;
}

nav {
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

a {
  color: #0000EE;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:visited,
a:hover {
  color: #0000EE;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

nav a[aria-current="page"] {
  font-weight: 600;
}

nav .sep {
  margin: 0 0.5em;
  color: var(--muted);
  user-select: none;
}

.status {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
  opacity: 0.7;
}

/* Main */
main {
  margin-bottom: 5rem;
}

/* Manifest — 1/3 gutter (§-Nummern), 2/3 Text */
.manifest {
  counter-reset: manifest;
  padding-left: 5ch;
  font-size: 1rem;
  line-height: 2;
  margin-bottom: 3rem;
}

.manifest p {
  counter-increment: manifest;
  position: relative;
}

.manifest p::before {
  content: "§" counter(manifest);
  position: absolute;
  left: -5ch;
  top: 0.18em;
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.4;
}

.manifest .break {
  margin-top: 1.25rem;
}

/* Drucklink */
.print-link-wrap {
  margin-bottom: 3rem;
  font-size: 0.875rem;
}

.print-link,
.print-link:visited {
  color: #0000EE;
  text-decoration: none;
  cursor: pointer;
}

.print-link-label {
  border-bottom: 1px solid var(--text);
  padding-bottom: 1px;
}

.print-link:hover .print-link-label {
  color: var(--muted);
  border-color: var(--muted);
}

.print-link::after {
  content: " — Ausdrucken, Verteilen und Aufhängen ;)";
  color: var(--muted);
  visibility: hidden;
}

.print-link:hover::after {
  visibility: visible;
}

.print-hint {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.6;
}

/* Context / SEO-Text */
.context {
  font-size: 0.9375rem;
  color: var(--muted);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  line-height: 1.75;
}

.context::before {
  content: "· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·";
  display: block;
  color: var(--muted);
  opacity: 0.4;
  font-size: 0.75rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  white-space: nowrap;
}

/* Nächste Aktion — nur im Print */
.naechste-aktion {
  display: none;
}

/* Stamp — immer versteckt */
.stamp {
  display: none;
}

.print-title {
  display: none;
}

/* Aktionen */
.aktion {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}

.aktion::after {
  content: "· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·";
  position: absolute;
  bottom: 0;
  left: 0;
  color: var(--muted);
  opacity: 0.4;
  font-size: 0.75rem;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.aktion h2 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.aktion p {
  font-size: 1rem;
  margin-top: 0.5rem;
}

.aktion img {
  display: block;
  width: 100%;
  margin-top: 1rem;
  border: 1px solid #ddd;
}

.empty-state {
  color: var(--muted);
  font-size: 0.9375rem;
  font-style: italic;
}

/* Mitmachen */
.mitmachen-text {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.mitmachen-text p + p {
  margin-top: 1rem;
}

.contact-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--text);
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--text);
  text-decoration: none;
  padding-bottom: 1px;
}

.contact-link:hover {
  color: var(--muted);
  border-color: var(--muted);
}

/* Footer */
footer {
  font-size: 0.8125rem;
  color: var(--muted);
  padding-top: 1rem;
}

footer::before {
  content: "· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·";
  display: block;
  color: var(--muted);
  opacity: 0.4;
  font-size: 0.75rem;
  margin-bottom: 1rem;
  overflow: hidden;
  white-space: nowrap;
}

footer p + p {
  margin-top: 0.25rem;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

footer a:hover {
  border-bottom-color: var(--muted);
}

footer .sep {
  margin: 0 0.4em;
  user-select: none;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --text: #f5f5f0;
    --muted: #999;
  }

  .aktion img { border-color: #333; }
}

/* Print */
@media print {
  body {
    background: #fff;
    color: #000;
    padding: 0;
    font-size: 11pt;
  }

  /* Alles ausblenden außer Manifest + Nächste Aktion */
  header, footer, .context, nav, .status, .print-link-wrap { display: none; }

  .print-title {
    display: block;
    text-align: right;
    font-size: 13pt;
    font-weight: bold;
    margin-bottom: 0.8cm;
    color: #000;
  }

  .wrap {
    max-width: 100% !important;
    padding: 0;
  }

  /* Manifest */
  .manifest {
    font-size: 11pt;
    line-height: 1.8;
    padding-left: 4ch;
  }

  .manifest p::before {
    font-size: 8pt;
    left: -4ch;
    opacity: 0.5;
  }

  /* Nächste Aktion */
  .naechste-aktion {
    display: block;
    margin-top: 2cm;
    font-size: 8pt;
    color: #555;
    border-top: 0.5pt solid #bbb;
    padding-top: 0.3cm;
  }

  a { text-decoration: none; color: #000; }
}
