/* Fahrspur — Fahrbahnmarkierung, Theorietafel, Ampelknopf. */
:root {
  --asphalt: #1c1f24;
  --marke: #f2e04a;
  --kreide: #e8e4d4;
  --tafel: #2c4a38;
  --signalrot: #c0392b;
  --signalgruen: #2e7d4f;
  --nacht: #0e1218;
  --rand: #f4f1e8;
  --fehl: #e24a3a;
}

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

html { scroll-behavior: smooth; }

.asphalt {
  margin: 0;
  min-height: 100vh;
  color: var(--kreide);
  background:
    linear-gradient(90deg, #16181c 0 12%, transparent 12% 88%, #16181c 88%),
    repeating-linear-gradient(180deg, #22262c 0 3px, #1c1f24 3px 18px);
  font-family: Sora, "Helvetica Neue", sans-serif;
  font-size: 1.02rem;
  line-height: 1.6;
}

.asphalt.asphalt-halt { overflow: hidden; }

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

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

.spursprung {
  position: absolute;
  left: 1rem;
  top: -3.2rem;
  background: var(--marke);
  color: var(--nacht);
  padding: 0.4rem 0.7rem;
  z-index: 90;
}
.spursprung:focus { top: 0.7rem; }

/* Dashed road center line running the page */
.mittellinie {
  pointer-events: none;
  position: fixed;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 10px;
  margin-left: -5px;
  z-index: 0;
  background: repeating-linear-gradient(
    180deg,
    var(--marke) 0 28px,
    transparent 28px 52px
  );
  opacity: 0.22;
}

.schildbalken {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 5vw 0;
  padding: 0.85rem 1.1rem;
  background: var(--marke);
  color: var(--nacht);
  border: 4px solid var(--nacht);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.35);
}

.spurzeichen {
  text-decoration: none;
  color: var(--nacht);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.spurzeichen em {
  display: block;
  font-style: normal;
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.ampelknopf {
  width: 2.2rem;
  height: 3.4rem;
  border: 2px solid var(--nacht);
  background: #111;
  border-radius: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 0.3rem 0;
}
.linse {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #333;
}
.linse--rot { background: #5a1c18; }
.linse--gelb { background: #5a4a10; }
.linse--gruen { background: #1a3d28; }
.ampelknopf[aria-expanded="true"] .linse--gruen { background: #3dcc72; box-shadow: 0 0 8px #3dcc72; }
.ampelknopf[aria-expanded="false"] .linse--rot { background: #e24a3a; }

.fahrstreifen {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.fahrstreifen a {
  text-decoration: none;
  color: var(--nacht);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.fahrstreifen a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.fahrstreifen .leitplanke {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.78rem;
}

@media (max-width: 860px) {
  .fahrstreifen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--nacht);
    margin: 0;
  }
  .fahrstreifen a { color: var(--marke); font-size: 1.1rem; }
  .fahrstreifen.spur-offen { display: flex; }
  .ampelknopf { position: relative; z-index: 90; }
}

@media (min-width: 861px) {
  .ampelknopf { display: none; }
}

.theoriehaus {
  position: relative;
  z-index: 1;
  padding: 1.6rem 5vw 3rem;
}

/* Classroom chalkboard + road photo, not a drop-cloth */
.tafelwand {
  display: grid;
  gap: 1.2rem;
}

.kreideblock {
  background: var(--tafel);
  color: #eef3e8;
  padding: 1.6rem 1.4rem 1.7rem;
  box-shadow: inset 0 0 0 10px rgba(18, 28, 22, 0.35);
}

.abendtafel {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--marke);
  margin: 0 0 0.7rem;
}

.kreideblock h1,
.pultblatt h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.12;
  margin: 0 0 0.8rem;
  letter-spacing: -0.03em;
}

.spurfoto {
  margin: 0;
  background: var(--nacht);
  border-top: 8px solid var(--marke);
}
.spurfoto img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background:
    repeating-linear-gradient(90deg, #2a2e34 0 40px, #f2e04a 40px 48px, #2a2e34 48px 88px);
}
.spurfoto figcaption {
  padding: 0.5rem 0.7rem 0.6rem;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--marke);
}
.spurfoto--seite { max-width: 38rem; }

@media (min-width: 900px) {
  .tafelwand {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: stretch;
  }
  .kreideblock { padding: 2.2rem 2rem; }
}

.klassenreihe {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.4rem;
}
.fahrkarte {
  background: var(--rand);
  color: var(--nacht);
  padding: 1.1rem 1.1rem 1.15rem;
  border-left: 6px solid var(--marke);
}
.fahrkarte h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fahrkarte p { margin: 0; }
.fahrkarte a { color: var(--tafel); }

@media (min-width: 860px) {
  .klassenreihe { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pultblatt {
  max-width: 42rem;
  background: var(--rand);
  color: var(--nacht);
  padding: 1.5rem 1.3rem 1.8rem;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.25);
}
.pultblatt h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pultblatt a { color: #1f4d36; }

.klassenheft {
  margin: 1.2rem 0 0;
}
.klassenheft > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.8rem;
  padding: 0.85rem 0;
  border-top: 2px dashed #c8c2aa;
}
.klassenheft dt {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #1f4d36;
}
.klassenheft dd { margin: 0; }

@media (max-width: 640px) {
  .klassenheft > div { grid-template-columns: 1fr; }
}

.startsignal {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.7rem 1.1rem;
  background: var(--marke);
  color: var(--nacht);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.linienheft {
  background:
    repeating-linear-gradient(180deg, transparent 0 1.7rem, rgba(44, 74, 56, 0.12) 1.7rem 1.75rem);
  padding: 0.4rem 0.2rem 0.2rem;
}

.heftzeile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}
.heftzeile span {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.heftzeile input,
.heftzeile textarea {
  border: 0;
  border-bottom: 2px solid var(--nacht);
  background: transparent;
  padding: 0.45rem 0;
  font: inherit;
  color: inherit;
}
.heftzeile textarea { min-height: 7.5rem; resize: vertical; }
.rotlicht { box-shadow: inset 0 -2px 0 var(--fehl); }

.theoriekreuz {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0.7rem 0 1rem;
  font-size: 0.92rem;
}
.theoriekreuz.rotlicht { outline: 1px solid var(--fehl); padding: 0.3rem; }

.gruenphase {
  padding: 0.9rem 0;
  color: var(--signalgruen);
  font-size: 1.15rem;
  font-weight: 600;
}

.randstreifen {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding: 2rem 5vw 5.8rem;
  background: var(--nacht);
  color: var(--kreide);
  display: grid;
  gap: 1.3rem;
  border-top: 10px solid var(--marke);
}
.randstreifen a { color: var(--marke); }
.randstreifen nav { display: flex; flex-direction: column; gap: 0.35rem; }
.kleinprint { opacity: 0.7; font-size: 0.78rem; font-family: "DM Mono", ui-monospace, monospace; }

@media (min-width: 760px) {
  .randstreifen {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
  .kleinprint { grid-column: 1 / -1; }
}

.ampelhinweis {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: var(--marke);
  color: var(--nacht);
  padding: 1rem 5vw;
  border-top: 4px solid var(--nacht);
}
.ampelhinweis a { color: var(--nacht); }
.ampelwahl { display: flex; gap: 0.55rem; margin-top: 0.65rem; }
.ampelwahl button {
  font: inherit;
  border: 2px solid var(--nacht);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.ampelwahl [data-cookie-accept] { background: var(--nacht); color: var(--marke); }
.ampelwahl [data-cookie-reject] { background: transparent; color: var(--nacht); }
