/* Startseite des Archivs (vor der Anmeldung). Gestaltung von der Zwischenseite „Forum im Umbau“. */
:root {
  --text: #2d2620;
  --text-leise: #6b5f55;
  --hg: #fbf7f1;
  --band: #f5eee3;
  --flaeche: #f3ebdf;
  --linie: #e6dccd;
  --akzent: #8c4a2b;
  --akzent-dunkel: #6a3720;
  --salbei: #7d8f5a;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --buchschrift: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --breite: 54rem;
  --textbreite: 42rem;
  --rand: 1.25rem;
}
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--hg);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.spalte {
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: var(--rand);
  width: 100%;
}
.sprunglink { position: absolute; left: -100vw; top: 0; }
.sprunglink:focus { left: 1rem; top: 1rem; z-index: 10; padding: .5rem 1rem; background: var(--hg); }

/* Kopf */
.kopf { background: var(--band); }
.kopf-innen {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.75rem; padding-block: .8rem;
}
.marke {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.marke img { width: auto; height: 2.5rem; flex: none; }
.marke-text { display: flex; flex-direction: column; line-height: 1.15; }
.marke-haupt { font-family: var(--buchschrift); font-size: 1.2rem; }
.marke-neben { font-size: .82rem; font-weight: 400; color: var(--text-leise); }
.status {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .2rem .8rem; border-radius: 999px;
  background: var(--flaeche); color: var(--akzent-dunkel); font-size: .95rem;
}
.status::before {
  content: ""; width: .55rem; height: .55rem; border-radius: 50%;
  background: #d9a03a; box-shadow: 0 0 0 0 rgba(217,160,58,.5);
  animation: puls 2.4s ease-out infinite;
}
@keyframes puls {
  0% { box-shadow: 0 0 0 0 rgba(217,160,58,.55); }
  70% { box-shadow: 0 0 0 .5rem rgba(217,160,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,160,58,0); }
}

/* Inhalt */
main { flex: 1; padding-top: 2.75rem; padding-bottom: 4rem; }
h1, h2, h3 { font-family: var(--buchschrift); line-height: 1.25; font-weight: 600; }
h1 { font-size: 2.2rem; margin: 0; }
h2 { font-size: 1.5rem; margin: 2.75rem 0 .75rem; }
.seitenkopf { margin-bottom: 2.25rem; }
.untertitel { margin: .5rem 0 0; color: var(--text-leise); font-size: 1.125rem; }
p, ul, figure { margin-top: 0; margin-bottom: 1rem; }
main :is(p, ul, h2, .untertitel) { max-width: var(--textbreite); }
.einleitung { font-size: 1.1875rem; line-height: 1.55; }
a { color: var(--akzent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--akzent-dunkel); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
strong { font-weight: 600; }
.nw { white-space: nowrap; }

.titelbild { margin: 0 0 2.25rem; }
.bildrahmen { border-radius: 10px; overflow: hidden; background: var(--flaeche); }
.bildrahmen img { display: block; width: 100%; height: auto; }
figcaption { margin-top: .35rem; color: var(--text-leise); font-size: .9rem; }

hr {
  clear: both;
  height: 1.1rem; margin: 2.5rem 0; border: 0;
  background:
    url("trenner.svg") left center / 1.1rem 1.1rem no-repeat,
    linear-gradient(var(--linie), var(--linie)) 1.8rem center / calc(100% - 1.8rem) 1px no-repeat;
}

/* Werte */
.werte {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem;
  max-width: none !important;
}
.werte li {
  padding: 1rem 1.2rem 1.05rem; background: var(--flaeche); border-radius: 10px;
}
.werte h3 {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 .3rem; font-size: 1.1rem;
}
.werte h3 svg { width: 1.25rem; height: 1.25rem; flex: none; color: var(--akzent); }
.werte p { margin: 0; color: var(--text-leise); font-size: .98rem; }

/* Baufortschritt */
/* ANPASSEN: --wert und aria-valuenow in ../templates/anmelden.html gemeinsam ändern */
.fortschritt { --wert: 60%; max-width: var(--textbreite); margin-bottom: .6rem; }
.balken {
  position: relative; height: 1.1rem; border-radius: 999px;
  background: var(--flaeche); box-shadow: inset 0 0 0 1px var(--linie);
}
.balken-fuellung {
  position: absolute; inset: 0 auto 0 0; width: var(--wert);
  border-radius: 999px;
  background: repeating-linear-gradient(-45deg, #d9a874 0 10px, #e6bf8f 10px 20px);
  background-size: 28.28px 28.28px;
  animation: laufen 1.6s linear infinite;
}
.balken-pfote {
  position: absolute; top: 50%; left: var(--wert);
  width: 1.9rem; height: 1.9rem; transform: translate(-50%, -50%);
  background: var(--hg); border-radius: 50%; box-shadow: 0 0 0 2px #d9a874;
  display: grid; place-items: center;
}
.balken-pfote svg { width: 1.15rem; height: 1.15rem; fill: var(--akzent); }
@keyframes laufen { to { background-position: 28.28px 0; } }
.fortschritt-text { color: var(--text-leise); font-size: .95rem; }

/* Fuß */
.fuss { background: var(--band); color: var(--text-leise); font-size: .9rem; }
.fuss-innen { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; padding-top: 1.25rem; padding-bottom: 2.5rem; }
.fuss p { margin: 0; }
.fuss nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.fuss a { color: inherit; text-decoration: none; }
.fuss a:hover { color: var(--text); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; }
}

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  main { padding-top: 1.75rem; }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.3rem; }
  .einleitung { font-size: 1.0625rem; }
  .titelbild { margin-bottom: 1.5rem; }
  .werte { grid-template-columns: 1fr; }
}

/* Archiv mit Login-Box */
.status { margin: 0; }
.archiv {
  --feldrand: #cdbba5;
  --fehler: #a3160e;
  margin-bottom: 2.25rem; padding: 1.4rem 1.5rem; scroll-margin-top: 1rem;
  background: var(--flaeche); border-radius: 10px;
}
.archiv-spalten { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.5rem 2rem; align-items: start; }
.archiv h2 { margin: 0 0 .75rem; }
.archiv ul { margin: 0; padding-left: 1.2rem; }
.archiv li { margin-bottom: .35rem; }
.login { padding: 1.1rem 1.2rem 1.25rem; background: var(--hg); border: 1px solid var(--linie); border-radius: 10px; }
.login label { display: block; margin: .7rem 0 .2rem; font-weight: 600; }
.login input:not([type="hidden"]) {
  width: 100%; padding: .5rem .6rem; font: inherit; color: inherit;
  background: #fff; border: 1px solid var(--feldrand); border-radius: 6px;
}
.login button {
  width: 100%; margin-top: 1rem; padding: .55rem 1.1rem; font: inherit; color: #fff; cursor: pointer;
  background: var(--akzent); border: 1px solid var(--akzent); border-radius: 6px;
}
.login button:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }
.archiv-hilfe { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.archiv-hilfe h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.archiv-hilfe p { margin: 0; font-size: .98rem; }
.archiv-hilfe .archiv-hinweis { margin: .8rem 0 0; max-width: none; color: var(--text-leise); font-size: .8rem; }
.archiv .meldung { max-width: none; padding: .55rem .8rem; background: var(--hg); border-left: 4px solid var(--fehler); color: var(--fehler); }
/* Nach einem Fehlversuch stehen Meldung und Login ohne Scrollen oben. */
main:has(.meldung) .titelbild { display: none; }

@media (max-width: 46rem) {
  .archiv { padding: 1.1rem 1rem; }
  .archiv-spalten { grid-template-columns: minmax(0, 1fr); }
}
