/* Nachtzug — Abfahrtstafel, Kohlepapier, nasse Druckfarbe. */
:root {
  --kohle: #0b0b0b;
  --tafel: #f0d000;
  --tinte: #e8e4d8;
  --durchschlag: #d7e4f2;
  --rosa: #f3d4d8;
  --nass: #2a6cff;
  --grau: #8a8678;
  --bad: #ff5a4a;
  --gut: #8fef9a;
}

*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--kohle);
  color: var(--tinte);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

body.nav-lock { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--tafel); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--tafel); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 0.6rem;
  top: -3rem;
  background: var(--tafel);
  color: #111;
  padding: 0.3rem 0.55rem;
  z-index: 80;
}
.skip:focus { top: 0.5rem; }

/* Yellow departure board */
.abfahrt {
  background: var(--tafel);
  color: #111;
  padding: 0.55rem 0.9rem 0.7rem;
}
.tafelkopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
}
.zugmark {
  text-decoration: none;
  color: #111;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2rem;
  line-height: 0.9;
}
.zugmark small {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}
.uhr {
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.klappe {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: #111;
  color: var(--tafel);
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0.45rem;
  cursor: pointer;
}
.klappe span { display: block; height: 2px; background: var(--tafel); }

.gleise {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.gleise a { color: #111; text-decoration: none; border-bottom: 1px solid transparent; }
.gleise a[aria-current="page"] { border-bottom-color: #111; }

@media (max-width: 840px) {
  .klappe { display: flex; position: relative; z-index: 90; }
  .gleise {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: var(--tafel);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
  }
  .gleise.is-open { display: flex; }
}

.zeilen {
  background: #111;
  color: var(--tafel);
  display: grid;
  grid-template-columns: 5rem 1fr 4rem;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  max-width: 72rem;
  margin: 0 auto;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.zeilen span:nth-child(3n) { text-align: right; }

.bahnsteig {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.6rem 0.9rem 3rem;
}

/* Stacked carbon-copy sheets */
.durchschlagstapel {
  position: relative;
  margin: 1.6rem 0 2.4rem;
  min-height: 22rem;
}
.blatt {
  position: relative;
  background: #f4f0e6;
  color: #161616;
  padding: 1.4rem 1.3rem 1.6rem;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.35);
}
.blatt--weiss { z-index: 3; }
.blatt--blau {
  position: absolute;
  inset: 12px -8px auto 12px;
  background: var(--durchschlag);
  z-index: 2;
  min-height: 70%;
  transform: rotate(0.6deg);
}
.blatt--rosa {
  position: absolute;
  inset: 22px -16px auto 22px;
  background: var(--rosa);
  z-index: 1;
  min-height: 62%;
  transform: rotate(1.2deg);
}

.blatt h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
  margin: 0 0 0.7rem;
  color: #111;
}
.formkopf {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid #111;
  padding-bottom: 0.35rem;
}

.druckfoto {
  margin: 1rem 0;
}
.druckfoto img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
  mix-blend-mode: multiply;
}
.druckfoto figcaption {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

.fahrten {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.35rem 1rem;
  margin: 1.2rem 0 0;
}
.fahrten dt {
  color: var(--tafel);
  background: #111;
  padding: 0.2rem 0.35rem;
  font-size: 0.7rem;
}
.fahrten dd { margin: 0; color: #222; padding-top: 0.15rem; }

.tinte-btn {
  display: inline-block;
  margin-top: 1rem;
  background: #111;
  color: var(--tafel);
  text-decoration: none;
  padding: 0.55rem 0.9rem;
  border: 0;
  font: inherit;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  cursor: pointer;
}

.satz {
  max-width: 40rem;
  color: var(--tinte);
}
.satz h1,
.satz h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  color: var(--tafel);
}
.satz h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }

.page-ink img {
  width: 100%;
  max-height: 40vh;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2);
  margin: 0 0 1.3rem;
}

.formularblatt {
  background: #f4f0e6;
  color: #161616;
  padding: 1.2rem 1rem 1.4rem;
  box-shadow: 8px 8px 0 var(--durchschlag);
}
.kasten {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.7rem;
}
.kasten span {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kasten input,
.kasten textarea {
  border: 1px solid #111;
  background: #fff;
  font: inherit;
  padding: 0.45rem 0.5rem;
}
.kasten textarea { min-height: 7rem; resize: vertical; }
.is-bad { outline: 2px solid var(--bad); }

.agree {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0.6rem 0 0.9rem;
  font-size: 0.82rem;
}
.agree.is-bad { outline: 1px solid var(--bad); padding: 0.25rem; }
.agree a { color: #111; }

.ok {
  background: #111;
  color: var(--gut);
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
}

.nachsatz {
  padding: 1.4rem 0.9rem 5.4rem;
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.2rem;
  color: var(--grau);
  font-size: 0.8rem;
}
@media (max-width: 720px) { .nachsatz { grid-template-columns: 1fr; } }
.nachsatz nav { display: flex; flex-direction: column; gap: 0.28rem; }
.nachsatz a { color: var(--tinte); }

.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: var(--tafel);
  color: #111;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
}
.cookie a { color: #111; }
.cookie-actions { display: flex; gap: 0.4rem; }
.cookie-actions button {
  font: inherit;
  cursor: pointer;
  border: 0;
  padding: 0.4rem 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.cookie-actions [data-cookie-accept] { background: #111; color: var(--tafel); }
.cookie-actions [data-cookie-reject] { background: transparent; border: 1px solid #111; }

@media (max-width: 640px) {
  .blatt--blau,
  .blatt--rosa { display: none; }
}
