/* ZK Torservice
   Grundidee: Die Seite beginnt hinter einem echten Tor in RAL 7016.
   Dahinter ruhiges Zink, Logo-Blau nur für Handlungen und die LED-Kante. */

@font-face {
  font-family: "Big Shoulders Stencil";
  src: url("fonts/big-shoulders-stencil.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-display: swap;
}

:root {
  --tor: #383e42;        /* RAL 7016 */
  --tor-hell: #4a5258;
  --schacht: #1c2125;
  --zink: #dce0e2;
  --blech: #f1f3f4;
  --tinte: #16191c;
  --grau: #485157;
  --grau-auf-dunkel: #b4bdc3;
  --blau: #1681d2;       /* aus dem Logo */
  --blau-tief: #0f6dba;  /* Knöpfe mit weißer Schrift */
  --blau-text: #0b5a9e;  /* Text auf Zink */
  --led: #62bdff;
  --rot: #b3122a;

  --rand: clamp(16px, 4.4vw, 56px);
  --seite: max(var(--rand), calc((100vw - 1240px) / 2));
  --kopf: 72px;
  --leiste: 0px;
  --schrift: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --stencil: "Big Shoulders Stencil", "Arial Narrow", Impact, sans-serif;
  --raus: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--kopf);
  scroll-padding-bottom: calc(var(--leiste) + 16px);
  background: var(--zink);
}
body {
  margin: 0;
  font: 400 1.0625rem/1.55 var(--schrift);
  color: var(--tinte);
  background: var(--zink);
  padding-bottom: var(--leiste);
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, label, summary, input, select { touch-action: manipulation; -webkit-tap-highlight-color: rgba(98, 189, 255, .18); }
p, li { text-wrap: pretty; }
.knopf, .kopf-tel, .grosse-nummer { white-space: nowrap; }
::placeholder { color: #6a747a; }
address { font-style: normal; }
[hidden] { display: none !important; }

h2 {
  font: 800 clamp(2.7rem, 6.4vw, 5.2rem)/.96 var(--stencil);
  letter-spacing: .004em;
  text-wrap: balance;
  max-width: 17ch;
}
h3 {
  font-weight: 700;
  font-stretch: 112%;
  font-size: 1.28rem;
  line-height: 1.2;
}

:focus-visible { outline: 3px solid var(--led); outline-offset: 3px; border-radius: 2px; }
.abschnitt:not(.abschnitt-tor):not(.abschnitt-schacht) :focus-visible { outline-color: var(--blau-tief); }

.sprung {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 16px; background: var(--blech); color: var(--tinte); font-weight: 600;
  transform: translateY(-200%);
}
.sprung:focus { transform: none; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Knöpfe */
.knopf {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start;
  min-height: 56px; padding: 10px 24px;
  border: 2px solid transparent; border-radius: 4px;
  font-weight: 700; font-stretch: 108%; font-size: 1.06rem; line-height: 1.15;
  text-decoration: none; text-align: left;
  transition: background-color 160ms ease, border-color 160ms ease, transform 140ms var(--raus);
}
.knopf:active { transform: scale(.975); }
.knopf-haupt { background: var(--blau-tief); color: #fff; }
.knopf-rand { background: transparent; border-color: currentColor; }
.knopf-klein { font-size: .78rem; font-weight: 500; font-stretch: 100%; opacity: .9; }
.knopf-breit { width: 100%; align-items: center; text-align: center; }
@media (hover: hover) and (pointer: fine) {
  .knopf-haupt:hover { background: #0b5a9e; }
  .knopf-rand:hover { background: rgba(255, 255, 255, .1); }
}
.textlink { font-weight: 700; color: var(--blau-text); text-underline-offset: 4px; }

/* Kopfzeile */
.kopf {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  height: var(--kopf);
  padding-inline: var(--seite);
  color: #f1f4f5;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.kopf[data-ton="hell"] {
  background: rgba(241, 243, 244, .94);
  color: var(--tinte);
  box-shadow: 0 1px 0 rgba(22, 25, 28, .14);
}
@supports (backdrop-filter: blur(10px)) {
  .kopf[data-ton="hell"] { background: rgba(241, 243, 244, .82); backdrop-filter: blur(14px) saturate(1.3); }
}
.kopf-logo { flex: none; display: block; }
.kopf-logo img { width: auto; height: 58px; }
.kopf.kopf-fest[data-ton="dunkel"] { background: rgba(28, 33, 37, .94); }
.logo-auf-hell { display: none !important; }
.kopf[data-ton="hell"] .logo-auf-hell { display: block !important; }
.kopf[data-ton="hell"] .logo-auf-dunkel { display: none !important; }
.kopf-nav { display: flex; gap: 24px; margin-left: auto; }
.kopf-nav a {
  text-decoration: none; font-weight: 500; font-size: .98rem; padding: 8px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 180ms var(--raus);
}
.kopf-nav a:hover { background-size: 100% 2px; }
.kopf-tel {
  font-weight: 700; font-stretch: 108%; text-decoration: none; white-space: nowrap;
  padding: 10px 14px; border-radius: 4px; background: var(--blau-tief); color: #fff;
  transition: background-color 160ms ease;
}
.kopf-tel:hover { background: #0b5a9e; }
.kopf-menue { display: none; position: relative; margin-left: auto; }
.kopf-menue summary {
  list-style: none; cursor: pointer; width: 48px; height: 48px; margin-right: -8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.kopf-menue summary::-webkit-details-marker { display: none; }
.kopf-menue summary span {
  display: block; width: 24px; height: 2px; background: currentColor;
  transition: transform 180ms var(--raus);
}
.kopf-menue[open] summary span:first-child { transform: translateY(4.5px) rotate(45deg); }
.kopf-menue[open] summary span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.kopf-menue nav {
  position: absolute; right: -8px; top: calc(100% + 6px); width: 220px; padding: 8px;
  background: var(--blech); color: var(--tinte); border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  transform-origin: top right;
  animation: menue-auf 160ms var(--raus);
}
.kopf-menue nav a { display: block; padding: 12px; text-decoration: none; font-weight: 600; }
@keyframes menue-auf { from { opacity: 0; transform: scale(.96) translateY(-4px); } }

/* Hero: das Tor */
.hero { background: var(--schacht); }
.buehne { position: relative; }

.tor {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  color: #eef1f2;
  background: var(--tor);
  will-change: transform;
  --fuge: 168px;
}
.tor-lamellen, .tor-rillen, .tor-glanz { position: absolute; inset: 0; pointer-events: none; }
.tor-lamellen {
  background:
    repeating-linear-gradient(180deg,
      rgba(8, 11, 13, .62) 0 2px, rgba(255, 255, 255, .12) 2px 4px, transparent 4px var(--fuge)),
    repeating-linear-gradient(180deg,
      rgba(0, 0, 0, .2) 0 1px, rgba(255, 255, 255, .055) 1px 2px, transparent 2px 28px),
    url("img/maserung.webp"),
    linear-gradient(180deg, #2f3539 0%, #414950 34%, #3a4146 66%, #2a2f33 100%);
}
.tor-glanz {
  --gx: 26%; --gy: 34%;
  background: radial-gradient(760px 460px at var(--gx) var(--gy), rgba(190, 222, 246, .17), transparent 72%);
}
/* Fugen laufen über die aufgemalte Schrift, damit sie wie auf dem Blech wirkt */
.tor-rillen {
  z-index: 2;
  background: repeating-linear-gradient(180deg,
    rgba(8, 11, 13, .62) 0 2px, rgba(255, 255, 255, .1) 2px 4px, transparent 4px var(--fuge));
}
.tor-inhalt {
  min-height: inherit;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: calc(var(--kopf) + 20px) var(--seite) calc(var(--leiste) + 96px);
}
.tor h1 {
  position: relative; z-index: 1;
  margin: 0;
  font: 800 min(11.8vw, 18vh)/.9 var(--stencil);
  text-transform: uppercase;
  letter-spacing: .008em;
  color: #eef1f2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.tor h1 > span { display: block; }
.tor h1 > span:first-child { color: var(--led); }
.umbruch { font-style: normal; }
.tor-text {
  position: relative; z-index: 3;
  max-width: 44ch; margin-top: 22px;
  font-size: clamp(1.03rem, 1.5vw, 1.24rem); line-height: 1.42;
  color: #d9dfe2;
}
.tor-aktionen { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.tor-aktionen .knopf-haupt { font-size: 1.32rem; padding-inline: 26px; box-shadow: 0 10px 34px rgba(15, 109, 186, .38); }
.tor-aktionen .knopf-rand { border-color: rgba(238, 241, 242, .6); }
.tor-plakette {
  position: absolute; z-index: 3; right: var(--seite); bottom: 58px;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px 7px 8px;
  background: linear-gradient(145deg, #eceff0, #c9ced1);
  border-radius: 2px;
  color: #2a3034; font-size: .78rem; font-weight: 600; font-stretch: 110%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.tor-plakette img { width: 58px; }
.tor-unterkante {
  position: absolute; inset: auto 0 0; height: 12px; z-index: 4;
  background: linear-gradient(#22272a, #0f1214);
}
.tor-led {
  position: absolute; inset: auto 0 -3px; height: 3px;
  background: var(--led);
  box-shadow: 0 0 16px 2px rgba(98, 189, 255, .9), 0 0 54px 8px rgba(98, 189, 255, .4);
}
/* Lichtkegel unter der Kante */
.tor-led::after {
  content: ""; position: absolute; inset: 100% 0 auto; height: 36vh;
  background: linear-gradient(rgba(98, 189, 255, .24), rgba(98, 189, 255, 0));
  pointer-events: none;
}

.kasten { display: none; }

.innen {
  position: relative;
  color: #f1f4f5;
  background:
    linear-gradient(180deg, rgba(98, 189, 255, .13) 0, transparent 34%),
    linear-gradient(180deg, #252b30 0%, #1c2125 54%, #15191c 100%);
  padding: 72px var(--seite);
  overflow: hidden;
}
.innen-decke { display: none; }
.innen-raster { display: grid; gap: 28px; align-items: end; }
.innen-liste a {
  display: block;
  font: 800 min(14vw, 11.4vh)/1.02 var(--stencil);
  text-decoration: none;
  padding-block: .03em;
  transition: color 140ms ease, transform 200ms var(--raus);
}
.innen-seite img { width: min(100%, 360px); }
.innen-seite p { max-width: 30ch; margin-top: 18px; font-size: 1.12rem; color: var(--grau-auf-dunkel); }
@media (hover: hover) and (pointer: fine) {
  .innen-liste a:hover { color: var(--led); transform: translateX(10px); }
}

/* Scrollgesteuertes Tor */
.tor-aktiv .hero { height: 250vh; height: 250svh; }
.tor-aktiv .buehne { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.tor-aktiv .tor { position: absolute; inset: 0; z-index: 2; min-height: 0; }
/* Das Tor steht beim Laden um --hub angehoben. Der Inhalt rechnet das ein,
   damit nichts unter dem Kasten verschwindet. */
.tor-aktiv .tor { --hub: calc(var(--leiste) + 34px); }
.tor-aktiv .tor-inhalt {
  height: 100%; min-height: 0;
  padding-top: calc(var(--kopf) + 20px + var(--hub));
  padding-bottom: 72px;
}
.tor-aktiv .kasten {
  display: block; position: absolute; inset: 0 0 auto; height: calc(var(--kopf) + 8px); z-index: 3;
  background: linear-gradient(180deg, #262b2f 0%, #33393e 62%, #1a1e21 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .55);
}
.tor-aktiv .innen { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; padding: calc(var(--kopf) + 28px) var(--seite) calc(var(--leiste) + 28px); }
.tor-aktiv .innen-raster { width: 100%; }
.tor-aktiv .innen-decke {
  display: block; position: absolute; inset: calc(var(--kopf) + 8px) 0 auto; height: 2px;
  background: linear-gradient(90deg, transparent 4%, rgba(226, 243, 255, .85) 20%, rgba(226, 243, 255, .85) 80%, transparent 96%);
  box-shadow: 0 0 40px 10px rgba(150, 212, 255, .28);
}
.tor-knopf {
  position: absolute; z-index: 5; left: 50%; bottom: calc(var(--leiste) + 54px);
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 8px 18px 8px 14px;
  transform: translateX(-50%);
  background: rgba(20, 24, 27, .72); color: #eef1f2;
  border: 1px solid rgba(98, 189, 255, .55); border-radius: 4px;
  font-weight: 600; font-stretch: 106%; font-size: .98rem;
  transition: opacity 160ms ease, background-color 160ms ease, scale 140ms var(--raus);
}
.tor-knopf:hover { background: rgba(20, 24, 27, .92); }
.tor-knopf:active { scale: .97; }

/* Abschnitte */
.abschnitt { padding-block: clamp(64px, 9vw, 128px); }
.huelle { padding-inline: var(--seite); }
.kopfzeile { display: grid; gap: 16px; margin-bottom: clamp(26px, 4vw, 44px); }
.kopfzeile p { max-width: 50ch; font-size: 1.12rem; color: var(--grau); }
.gross { max-width: 50ch; font-size: clamp(1.12rem, 1.6vw, 1.28rem); line-height: 1.45; margin-top: 18px; }
.klein { font-size: .9rem; line-height: 1.45; color: var(--grau); margin-top: 16px; max-width: 58ch; }
.punkte { display: grid; gap: 8px; margin-top: 18px; }
.punkte li { position: relative; padding-left: 26px; }
.punkte li::before {
  content: ""; position: absolute; left: 0; top: .72em; width: 16px; height: 3px;
  background: var(--blau);
}

/* Torarten */
.reiter {
  display: flex; gap: 6px; margin-bottom: 18px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px; margin-inline: -4px;
}
.reiter::-webkit-scrollbar { display: none; }
.reiter button {
  flex: none; min-height: 48px; padding: 8px 18px;
  background: transparent; border: 2px solid rgba(22, 25, 28, .28); border-radius: 4px;
  font-weight: 650; font-stretch: 106%;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.reiter button[aria-selected="true"] { background: var(--tinte); border-color: var(--tinte); color: #fff; }
html:not(.js) .reiter, html:not(.js) .melder { display: none; }

.tore-raster { display: grid; gap: clamp(20px, 3vw, 40px); grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: start; }
.sim { background: var(--blech); padding: clamp(14px, 2.2vw, 26px); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(22, 25, 28, .1); }
.sim svg { width: 100%; height: auto; }
.sim figcaption { margin-top: 14px; font-weight: 500; max-width: 46ch; min-height: 3.1em; }
.sim-regler { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: .86rem; color: var(--grau); }
.sim-regler input {
  flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; cursor: grab;
  -webkit-appearance: none; appearance: none;
}
.sim-regler input::-webkit-slider-runnable-track { height: 4px; background: var(--tinte); border-radius: 2px; }
.sim-regler input::-moz-range-track { height: 4px; background: var(--tinte); border-radius: 2px; }
.sim-regler input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -13px;
  background: var(--blau-tief); border: 3px solid var(--blech); border-radius: 4px;
  box-shadow: 0 0 0 1px var(--blau-tief), 0 3px 10px rgba(15, 109, 186, .45);
}
.sim-regler input::-moz-range-thumb {
  width: 24px; height: 24px; background: var(--blau-tief); border: 3px solid var(--blech); border-radius: 4px;
  box-shadow: 0 0 0 1px var(--blau-tief);
}
.sim-regler input:active { cursor: grabbing; }

.s-wand { fill: url(#s-schraffur); stroke: var(--tinte); stroke-width: 1.5; }
.s-boden { stroke: var(--tinte); stroke-width: 3; }
.s-decke { stroke: var(--tinte); stroke-width: 1.5; stroke-dasharray: 2 6; }
.s-schiene { fill: none; stroke: #8f989e; stroke-width: 3; }
.s-tor { fill: none; stroke: var(--blau); stroke-width: 9; stroke-linecap: butt; }
.s-gelenk { fill: var(--blech); stroke: var(--tinte); stroke-width: 1.5; }
.s-spur { fill: none; stroke: var(--rot); stroke-width: 2; stroke-dasharray: 5 5; }
.s-text { font: 500 15px var(--schrift); fill: var(--grau); }
.s-kasten { fill: none; stroke: #8f989e; stroke-width: 2; stroke-dasharray: 6 4; }
.s-wickel { fill: none; stroke: var(--blau); stroke-width: 4; }

.arten { min-width: 0; }
.art { display: grid; gap: 18px; }
html.js .art[aria-hidden="true"] { display: none; }
html:not(.js) .art + .art { margin-top: 40px; }
.art img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: #c6cbce; }
.art p { margin-top: 8px; max-width: 52ch; }

/* Referenzen */
.abschnitt-tor { background: var(--tor); color: #f1f4f5; }
.abschnitt-tor .kopfzeile p { color: #d3dade; }
.filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.filter button {
  min-height: 44px; padding: 8px 16px;
  background: transparent; color: inherit;
  border: 2px solid rgba(241, 244, 245, .32); border-radius: 4px;
  font-weight: 600; font-stretch: 104%;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.filter button[aria-pressed="true"] { background: #f1f4f5; border-color: #f1f4f5; color: var(--tinte); }
.wand { --h: clamp(150px, 23vw, 310px); display: flex; flex-wrap: wrap; gap: clamp(6px, .9vw, 12px); }
/* Zeilen füllen sich anhand des echten Seitenverhältnisses, die letzte bleibt ungestreckt */
.wand::after { content: ""; flex: 40 1 0; }
/* Seitenverhältnis der Referenzkacheln (statt Inline-Styles, damit die CSP ohne unsafe-inline auskommt) */
.kachel[data-r="0.762"] { --r: 0.762; }
.kachel[data-r="0.804"] { --r: 0.804; }
.kachel[data-r="0.814"] { --r: 0.814; }
.kachel[data-r="0.852"] { --r: 0.852; }
.kachel[data-r="1.222"] { --r: 1.222; }
.kachel[data-r="1.409"] { --r: 1.409; }
.kachel[data-r="1.436"] { --r: 1.436; }
.kachel[data-r="1.465"] { --r: 1.465; }
.kachel[data-r="1.507"] { --r: 1.507; }
.kachel[data-r="1.778"] { --r: 1.778; }
.kachel { flex: var(--r) 1 calc(var(--r) * var(--h)); min-width: 0; max-width: 100%; }
.kachel button {
  position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden;
  background: #2a2f33; border-radius: 3px; text-align: left; color: #fff;
}
.kachel img {
  width: 100%; height: auto; aspect-ratio: var(--r);
  object-fit: cover;
  transition: transform 420ms var(--raus);
}
.kachel span {
  position: absolute; inset: auto 0 0; padding: 30px 12px 10px;
  font-size: .88rem; font-weight: 500; line-height: 1.25;
  background: linear-gradient(transparent, rgba(10, 13, 15, .82));
}
@media (hover: hover) and (pointer: fine) {
  .kachel button:hover img { transform: scale(1.025); }
}

@media (hover: hover) and (pointer: fine) {
  .reiter button:not([aria-selected="true"]):hover { border-color: var(--tinte); }
  .filter button:not([aria-pressed="true"]):hover { border-color: #f1f4f5; }
  .chips label:hover input:not(:checked) + span { border-color: var(--tinte); }
  .fragen summary:hover { color: var(--blau-text); }
  .fuss-zeile a:hover, .textlink:hover { text-decoration-thickness: 2px; }
}

/* Lupe */
.lupe {
  width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(14, 17, 19, .985); color: #f1f4f5;
}
.lupe[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; animation: lupe-auf 200ms var(--raus); }
.lupe::backdrop { background: transparent; }
html:has(.lupe[open]) { overflow: hidden; }
.lupe { overscroll-behavior: contain; }
@keyframes lupe-auf { from { opacity: 0; } }
.lupe figure { display: grid; justify-items: center; gap: 12px; padding: 60px 8px 24px; height: 100%; align-content: center; min-height: 0; }
.lupe img { max-height: calc(100dvh - 140px); width: auto; border-radius: 2px; }
.lupe figcaption { padding-inline: 12px; text-align: center; color: #d3dade; }
.lupe-zu, .lupe-pfeil {
  display: grid; place-items: center; width: 52px; height: 52px; padding: 0;
  background: rgba(241, 244, 245, .1); border: 0; border-radius: 4px; color: inherit;
  transition: background-color 160ms ease;
}
.lupe-zu:hover, .lupe-pfeil:hover { background: rgba(241, 244, 245, .22); }
.lupe-zu { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 2; }
.lupe-pfeil { margin-inline: 12px; }

/* UVV */
.pruef-raster { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.wartung { margin-top: 36px; padding-top: 26px; border-top: 2px solid var(--tinte); max-width: 56ch; }
.wartung p { margin-block: 8px 12px; }
.plakette-box { background: var(--blech); padding: clamp(18px, 2.6vw, 30px); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(22, 25, 28, .1); }
.plakette-felder { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin-top: 14px; }
.plakette-felder label { display: grid; align-content: end; gap: 4px; font-size: .88rem; font-weight: 500; color: var(--grau); }
#plakette { width: min(100%, 300px); margin: 22px auto 14px; }
.pl-status { text-align: center; font-weight: 600; min-height: 3em; margin-bottom: 14px; text-wrap: balance; }
.pl-status[data-ton="faellig"] { color: var(--rot); }
.pl-ring { fill: var(--blau-tief); transition: fill 200ms ease; }
.pl-ring[data-ton="faellig"] { fill: var(--rot); }
.pl-ring[data-ton="leer"] { fill: #8f989e; }
.pl-scheibe { fill: var(--blech); }
.pl-monat { font: 700 15px var(--schrift); fill: #fff; text-anchor: middle; dominant-baseline: central; }
.pl-mark { fill: #fff; }
.pl-monat[data-an] { fill: var(--tinte); }
.pl-jahr { font: 800 92px var(--stencil); fill: var(--tinte); text-anchor: middle; dominant-baseline: central; }
.pl-klein { font: 500 14px var(--schrift); fill: var(--grau); text-anchor: middle; }

select, input:not([type="radio"]):not([type="range"]), textarea {
  width: 100%; min-height: 50px; padding: 10px 12px;
  background: #fff; color: var(--tinte);
  border: 2px solid #8f989e; border-radius: 4px;
  font-size: 1rem; /* verhindert Zoom auf dem iPhone */
  transition: border-color 140ms ease;
}
select:focus, input:focus, textarea:focus { border-color: var(--blau-tief); outline: 2px solid var(--blau-tief); outline-offset: 0; }
textarea { resize: vertical; display: block; }

/* Schaden */
.abschnitt-schacht { position: relative; background: var(--schacht); color: #f1f4f5; }
.led-linie {
  position: absolute; inset: 0 0 auto; height: 3px; background: var(--led);
  box-shadow: 0 0 16px 2px rgba(98, 189, 255, .8), 0 0 60px 10px rgba(98, 189, 255, .22);
}
.schaden-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.schritte { margin-top: 30px; counter-reset: s; display: grid; gap: 0; }
.schritte li {
  counter-increment: s; position: relative; padding: 18px 0 18px 64px;
  border-top: 1px solid rgba(241, 244, 245, .18);
}
.schritte li::before {
  content: counter(s);
  position: absolute; left: 0; top: 10px;
  font: 800 3.1rem/1 var(--stencil); color: var(--led);
}
.schritte p { margin-top: 4px; color: #ccd4d9; max-width: 44ch; }
.grosse-nummer {
  display: inline-block; margin-top: 18px;
  font: 800 clamp(2.9rem, 6.6vw, 5rem)/1 var(--stencil);
  text-decoration: none; color: #f1f4f5;
  transition: color 140ms ease;
}
.grosse-nummer:hover { color: var(--led); }

.melder { background: var(--blech); color: var(--tinte); border-radius: 4px; padding: clamp(18px, 2.6vw, 30px); display: grid; gap: 20px; }
.melder fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.melder legend { padding: 0; font-weight: 700; font-stretch: 106%; margin-bottom: 8px; }
.melder :focus-visible { outline-color: var(--blau-tief); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.chips span {
  display: flex; align-items: center; min-height: 44px; padding: 6px 13px;
  background: #fff; border: 2px solid #8f989e; border-radius: 4px; font-weight: 500; font-size: .97rem;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.chips input:checked + span { background: var(--blau-tief); border-color: var(--blau-tief); color: #fff; font-weight: 600; }
.chips input:focus-visible + span { outline: 3px solid var(--blau-tief); outline-offset: 2px; }
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.felder label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; align-content: start; }
.felder input, .felder textarea { font-weight: 400; }
.felder .ganz { grid-column: 1 / -1; }
.optional { font-weight: 400; color: var(--grau); }
.fehler { color: var(--rot); font-weight: 500; font-size: .9rem; min-height: 0; }
.fehler:empty { display: none; }
[aria-invalid="true"] { border-color: var(--rot) !important; }
.melder-aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.melder-aktionen .knopf { align-items: center; text-align: center; }
.melder .knopf-rand { color: var(--tinte); }
.melder .knopf-rand:hover { background: rgba(22, 25, 28, .06); }
.melder .klein { margin-top: -8px; }

/* Person + Fragen */
.person-raster { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.person-logo { width: min(100%, 440px); justify-self: end; }
.fragen.ganz { grid-column: 1 / -1; margin-top: clamp(20px, 4vw, 44px); }
.fragen h2 { margin-bottom: 20px; max-width: none; font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.fragen details { border-top: 2px solid var(--tinte); }
.fragen details:last-child { border-bottom: 2px solid var(--tinte); }
.fragen summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 16px 44px 16px 0; font-weight: 650; font-size: 1.12rem;
}
.fragen summary::-webkit-details-marker { display: none; }
.fragen summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 11px; height: 11px; margin-top: -8px;
  border: solid currentColor; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg);
  transition: transform 180ms var(--raus);
}
.fragen details[open] summary::after { transform: translateY(4px) rotate(-135deg); }
.fragen details p { padding: 0 44px 20px 0; max-width: 66ch; }

/* Fußzeile */
.fuss { background: var(--tor); color: #f1f4f5; padding-block: clamp(44px, 7vw, 84px) clamp(28px, 4vw, 44px); }
.fuss-nummer {
  display: block; text-decoration: none;
  font: 800 min(14.6vw, 12.3rem)/.98 var(--stencil);
  white-space: nowrap;
  transition: color 140ms ease;
}
.fuss-nummer:hover { color: var(--led); }
.fuss-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(241, 244, 245, .28); }
.fuss-zeile nav { display: flex; gap: 22px; align-items: flex-end; }
.fuss-zeile a { text-underline-offset: 4px; }
.fuss-macher { margin-top: 26px; font-size: .86rem; line-height: 1.5; color: rgba(241, 244, 245, .62); }
.fuss-macher a { color: inherit; text-underline-offset: 4px; }
.fuss-macher a:hover { color: #f1f4f5; }

/* Schnellkontakt am Handy */
.leiste { display: none; }

/* Rechtsseiten */
.recht { max-width: 70ch; padding: 40px var(--rand) 72px; margin-inline: auto; }
.recht h1 { font: 800 clamp(2.7rem, 8vw, 4.4rem)/1 var(--stencil); margin-block: 22px 28px; }
.recht h2 { font: 700 1.24rem/1.25 var(--schrift); font-stretch: 112%; max-width: none; margin-block: 30px 8px; }
.recht p + p { margin-top: 10px; }
.recht ul { list-style: disc; padding-left: 22px; margin-top: 8px; }
.recht-zurueck { font-weight: 600; color: var(--blau-text); text-underline-offset: 4px; }
.recht-logo { width: 140px; margin-bottom: 26px; }

/* Tablet und Handy */
@media (max-width: 960px) {
  :root { --kopf: 64px; }
  .kopf-nav, .kopf-tel { display: none; }
  .kopf-menue { display: block; }
  .kopf-logo img { height: 48px; }
  .tore-raster, .pruef-raster, .schaden-raster { grid-template-columns: minmax(0, 1fr); }
  .plakette-box { max-width: 520px; }
  .tor-plakette { display: none; }
}
@media (min-width: 761px) {
  .tor-aktiv .innen-raster { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); }
  .tor-aktiv .innen-liste a { font-size: min(9vw, 12.2vh); }
  .innen-raster { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .innen-liste a { font-size: min(9vw, 12.2vh); }
}
@media (max-width: 760px) {
  :root { --leiste: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body { font-size: 1.03rem; }
  .tor { --fuge: 112px; }
  .tor h1 { font-size: min(18.6vw, 10.4vh); line-height: .92; }
  .umbruch { display: block; }
  .tor-inhalt { padding-top: calc(var(--kopf) + 22px); padding-bottom: calc(var(--leiste) + 92px); }
  .tor-text { margin-top: 16px; }
  .tor-aktionen { margin-top: 18px; gap: 10px; }
  .tor-aktionen { width: 100%; }
  .tor-aktionen .knopf { width: 100%; }
  .tor-knopf { bottom: calc(var(--leiste) + 48px); }
  .innen-seite { display: flex; gap: 14px; align-items: center; }
  .innen-seite img { width: 104px; flex: none; }
  .innen-seite p { margin: 0; font-size: 1rem; }
  .person-raster { grid-template-columns: minmax(0, 1fr); }
  .person-logo { justify-self: start; width: min(78%, 300px); }
  .melder-aktionen { grid-template-columns: minmax(0, 1fr); }
  .felder { grid-template-columns: minmax(0, 1fr); }
  .lupe[open] { grid-template-columns: minmax(0, 1fr); }
  .lupe-pfeil { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); margin: 0; }
  .lupe-zurueck { left: 14px; }
  .lupe-weiter { right: 14px; }
  .lupe figure { padding: 66px 6px 84px; }
  .lupe img { max-height: calc(100dvh - 210px); }
  .lupe figcaption { padding-inline: 8px; }
  .wand { --h: 44vw; }
  .reiter button { flex: 1 1 auto; padding-inline: 8px; font-size: .94rem; font-stretch: 100%; }
  .tor-aktionen .knopf-rand { min-height: 50px; }

  .leiste {
    position: fixed; inset: auto 0 0; z-index: 30;
    display: grid; grid-template-columns: 1.25fr 1fr 1fr;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #14181b; color: #f1f4f5;
    box-shadow: 0 -1px 0 rgba(98, 189, 255, .55);
  }
  .leiste a {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    height: 64px; text-decoration: none; font-weight: 600; font-size: .95rem;
    transition: background-color 120ms ease;
  }
  .leiste a:active { background: rgba(241, 244, 245, .12); }
  .leiste-haupt { background: var(--blau-tief); color: #fff; }
  .leiste .leiste-haupt:active { background: #0b5a9e; }
}

@media (max-height: 720px) and (max-width: 760px) {
  .tor-text { display: none; }
}
@media (max-height: 600px) and (max-width: 760px) {
  .tor-aktionen .knopf-rand { display: none; }
}
@media (min-width: 761px) and (max-aspect-ratio: 1 / 1) {
  .tor h1 { font-size: min(17.6vw, 14vh); }
}
@media (max-height: 760px) and (min-width: 761px) {
  .tor-text { margin-top: 14px; }
  .tor-aktionen { margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
