/* Projekt-Tool Spectramed: Hallenboden, Aluprofil, Messeschild. Eine Schrift (Archivo) mit
   Breitenachse: schmal und kräftig für Nummern und Status, normal für Text. */
@font-face { font-family: "Archivo"; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; src: url(/fonts/archivo-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; src: url(/fonts/archivo-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --boden: #eef0ec;
  --flaeche: #ffffff;
  --tinte: #1c2621;
  --leise: #5f6863;
  --profil: #8a938d;
  --linie: #d5dad5;
  --gruen: #5e9630;
  --gruen-hell: #e3efd6;
  --bernstein: #c97a12;
  --bernstein-hell: #fbefd9;
  --rot: #b8402c;
  --rot-hell: #f8e3de;
  --blau: #2f6f9e;
  --schmal: 72%;
  --radius: 3px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--boden); color: var(--tinte); font: 400 15px/1.5 "Archivo", system-ui, sans-serif; font-stretch: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }

/* Kopf: Projektname groß und breit wie ein Hallenschild, Navigation darunter */
.kopf { background: var(--tinte); color: #fff; }
.kopf-innen { max-width: 1240px; margin: 0 auto; padding: 18px 24px 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 32px; }
.projekt { display: flex; flex-direction: column; gap: 2px; padding-bottom: 16px; }
.projekt strong { font-size: 24px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; margin-top: 10px; }
.logos { display: flex; align-items: center; gap: 14px; }
.logos .logo-sm { height: 26px; width: auto; }
.logos .logo-vmf { height: 26px; width: auto; }
.logos .trenner { width: 1px; height: 24px; background: currentColor; opacity: .3; }
.anmelden .logos { color: var(--tinte); margin-bottom: 6px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 12px 14px 14px; text-decoration: none; font-weight: 600; font-stretch: var(--schmal); font-size: 16px; color: #c8d0ca; border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: #8bc34a; }
.nav .zahl { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: var(--bernstein); color: #fff; font-size: 12px; text-align: center; line-height: 20px; }
.ich { padding-bottom: 16px; font-size: 13px; color: #b9c2bc; display: flex; gap: 12px; align-items: center; }
.ich button { background: none; border: 1px solid #4a554f; color: #dfe5e1; border-radius: var(--radius); padding: 4px 10px; cursor: pointer; }

main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.seitenkopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.seitenkopf h1 { font-size: 28px; font-weight: 750; font-stretch: 105%; }
.seitenkopf p { color: var(--leise); max-width: 70ch; margin-top: 6px; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--tinte); background: var(--tinte); color: #fff; border-radius: var(--radius); padding: 8px 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.knopf:hover { background: #2e3a34; }
.knopf.zweit { background: var(--flaeche); color: var(--tinte); border-color: var(--linie); }
.knopf.zweit:hover { border-color: var(--profil); }
.knopf.gruen { background: var(--gruen); border-color: var(--gruen); }
.knopf.klein { padding: 4px 10px; font-size: 14px; }
.knopf:disabled { opacity: .45; cursor: default; }

/* Nummer wie ein Standschild: schmal, fett, mit Rahmen */
.nr { display: inline-block; font-weight: 750; font-stretch: var(--schmal); font-size: 13px; letter-spacing: .02em; border: 1.5px solid currentColor; border-radius: 2px; padding: 0 5px; line-height: 18px; color: var(--leise); white-space: nowrap; }
.bereich { font-size: 13px; color: var(--leise); }
.status { display: inline-block; font-weight: 700; font-stretch: var(--schmal); font-size: 14px; padding: 1px 8px; border-radius: 2px; white-space: nowrap; }
.s-offen { background: #e6e9e5; color: #3d4741; }
.s-in_arbeit { background: #dde9f3; color: #234f72; }
.s-gebaut { background: #e8e3f3; color: #4b3f78; }
.s-geprueft { background: var(--bernstein-hell); color: #7a4a08; }
.s-abgenommen, .s-erledigt { background: var(--gruen-hell); color: #3c6a17; }
.s-beantwortet { background: #dde9f3; color: #234f72; }
.s-zurueckgestellt { background: transparent; color: var(--leise); border: 1px dashed var(--profil); }
.typ-fehler .nr { color: var(--rot); }

/* Stationen-Leiste: das Aluprofil mit vier Stationen und Datum darunter */
.stationen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.stationen::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 4px; background: repeating-linear-gradient(90deg, #c9cfca 0 10px, #b8bfba 10px 11px); border-radius: 2px; }
.stationen .fuellung { position: absolute; left: 6px; top: 6px; height: 4px; background: var(--gruen); border-radius: 2px; }
.stationen li { position: relative; padding-top: 22px; font-size: 13px; line-height: 1.3; }
.stationen li::before { content: ""; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 2px; background: var(--flaeche); border: 2px solid #b8bfba; }
.stationen li.ja::before { background: var(--gruen); border-color: var(--gruen); }
.stationen li.jetzt::before { background: var(--bernstein); border-color: var(--bernstein); }
.stationen b { display: block; font-weight: 700; font-stretch: var(--schmal); font-size: 14px; }
.stationen span { color: var(--leise); }
.stationen.mini li { padding-top: 0; height: 12px; }
.stationen.mini li::before { width: 10px; height: 10px; top: 1px; border-width: 1.5px; }
.stationen.mini::before, .stationen.mini .fuellung { top: 4px; height: 3px; }

/* Übersicht */
.zweispaltig { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.block > header { padding: 16px 20px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--linie); }
.block > header h2 { font-size: 19px; font-weight: 700; }
.block > header p { color: var(--leise); font-size: 14px; }
.warten > header { border-top: 4px solid var(--bernstein); }
.zeile { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: start; padding: 14px 20px; border-bottom: 1px solid var(--linie); text-decoration: none; }
.zeile:last-child { border-bottom: 0; }
.zeile:hover { background: #f7f8f6; }
.zeile .titel { font-weight: 600; }
.zeile .unter { grid-column: 2; color: var(--leise); font-size: 13px; }
.mehr { display: block; padding: 12px 20px; font-weight: 600; text-decoration: none; color: var(--blau); border-top: 1px solid var(--linie); }
.unterkopf { padding: 12px 20px 4px; font-size: 14px; font-weight: 700; font-stretch: var(--schmal); color: var(--leise); }
.leer { padding: 20px; color: var(--leise); }

.fortschritt { padding: 8px 20px 18px; }
.fortschritt .reihe { display: grid; grid-template-columns: 150px 1fr 64px; gap: 12px; align-items: center; padding: 8px 0; }
.balken { display: flex; height: 14px; background: #e6e9e5; border-radius: 2px; overflow: hidden; }
.balken i { display: block; height: 100%; }
.balken .b-abgenommen { background: var(--gruen); }
.balken .b-geprueft { background: var(--bernstein); }
.balken .b-gebaut { background: #8a7cc0; }
.balken .b-in_arbeit { background: #6f9cc2; }
.fortschritt .zahlen { font-size: 13px; color: var(--leise); text-align: right; font-variant-numeric: tabular-nums; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 20px 16px; font-size: 13px; color: var(--leise); }
.legende i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }

/* Fragen */
.frage { padding: 18px 20px; border-bottom: 1px solid var(--linie); display: grid; gap: 10px; }
.frage:last-child { border-bottom: 0; }
.frage .kopfzeile { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.frage h3 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.frage .text { color: #3d4741; }
.antworten { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.janein { display: inline-flex; border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.janein button { border: 0; background: var(--flaeche); padding: 8px 22px; font-weight: 700; font-stretch: var(--schmal); font-size: 16px; cursor: pointer; }
.janein button + button { border-left: 1px solid var(--linie); }
.janein button:hover { background: #f1f3f0; }
.janein button[aria-pressed="true"].ja { background: var(--gruen); color: #fff; }
.janein button[aria-pressed="true"].nein { background: var(--rot); color: #fff; }
textarea, input[type="text"], input[type="email"], input[type="date"], select { width: 100%; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); padding: 8px 10px; }
textarea { min-height: 80px; resize: vertical; }
.antwort { background: #f4f6f3; border-left: 3px solid var(--gruen); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; }
.antwort small { display: block; color: var(--leise); font-size: 13px; margin-top: 4px; }
.gruppe-titel { padding: 22px 0 8px; font-size: 15px; font-weight: 700; font-stretch: var(--schmal); color: var(--leise); }

/* Board */
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter button { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 14px; padding: 4px 12px; font-size: 14px; cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--tinte); color: #fff; border-color: var(--tinte); }
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.umschalter { display: none; }
.spalte { background: #e4e7e3; border-radius: var(--radius); padding: 10px; min-height: 120px; }
.spalte h2 { font-size: 15px; font-weight: 700; font-stretch: var(--schmal); padding: 2px 4px 10px; display: flex; justify-content: space-between; }
.spalte h2 span { color: var(--leise); font-weight: 600; }
.kachel { display: grid; gap: 8px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; text-decoration: none; }
.kachel:hover { border-color: var(--profil); }
.kachel .titel { font-weight: 600; line-height: 1.35; font-size: 14.5px; }
.kachel .fuss { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--leise); }

/* Detail */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.detail h1 { font-size: 26px; font-weight: 700; line-height: 1.25; margin: 10px 0 6px; }
.detail .meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--leise); font-size: 14px; }
.detail .stationen { margin: 26px 0 30px; }
.inhalt { line-height: 1.6; max-width: 72ch; }
.inhalt p, .inhalt ul { margin: 0 0 12px; }
.inhalt ul { padding-left: 20px; }
.inhalt code { font-size: 13px; background: #eef0ec; padding: 1px 4px; border-radius: 2px; }
.seite .block { padding: 16px 18px; margin-bottom: 16px; }
.seite h2 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.kommentar { padding: 12px 0; border-top: 1px solid var(--linie); }
.kommentar small { color: var(--leise); font-size: 13px; }
.kommentar.kunde { border-left: 3px solid var(--bernstein); padding-left: 12px; }
.verlauf { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--leise); }
.verlauf li { padding: 4px 0; }
.felder { display: grid; gap: 10px; }
.felder label { display: grid; gap: 4px; font-size: 13px; color: var(--leise); }
.zurueck { display: inline-block; margin-bottom: 10px; color: var(--leise); text-decoration: none; font-size: 14px; }
.hinweis { padding: 10px 14px; border-radius: var(--radius); background: var(--bernstein-hell); color: #6a4007; font-size: 14px; }
.meldung { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--tinte); color: #fff; padding: 10px 18px; border-radius: var(--radius); font-size: 14px; z-index: 10; }
.meldung.fehler { background: var(--rot); }

/* Dialog für neue Einträge */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(28, 38, 33, .45); }
dialog form { padding: 22px; display: grid; gap: 12px; }
dialog h2 { font-size: 20px; }

/* Anmeldung */
.anmelden { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.anmelden .karte { width: min(420px, 100%); background: var(--flaeche); border: 1px solid var(--linie); border-top: 6px solid var(--tinte); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; }
.anmelden h1 { font-size: 24px; font-weight: 800; font-stretch: 110%; }
.anmelden p { color: var(--leise); }
.anmelden .code { font-size: 26px; letter-spacing: .3em; text-align: center; font-weight: 700; font-stretch: var(--schmal); }

@media (max-width: 900px) {
  .zweispaltig, .detail { grid-template-columns: 1fr; }
  /* Mobil und Tablet: eine Spalte auf einmal, Wechsel über die Umschaltleiste */
  .umschalter { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; background: var(--linie); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
  .umschalter button { border: 0; background: var(--flaeche); padding: 8px 4px; font-weight: 700; font-stretch: var(--schmal); font-size: 14px; line-height: 1.2; cursor: pointer; display: grid; gap: 2px; }
  .umschalter button span { font-weight: 600; color: var(--leise); font-size: 13px; }
  .umschalter button[aria-selected="true"] { background: var(--tinte); color: #fff; }
  .umschalter button[aria-selected="true"] span { color: #c8d0ca; }
  .board, .board[style] { display: block; overflow: visible; }
  .spalte { display: none; }
  .spalte.aktiv { display: block; }
  .fortschritt .reihe { grid-template-columns: 110px 1fr 52px; }
}
@media (max-width: 600px) {
  .kopf-innen, main { padding-left: 16px; padding-right: 16px; }
  .nav { order: 3; flex: 1 1 100%; overflow-x: auto; margin: 0 -16px; padding: 0 6px; }
  .nav a { padding: 10px 10px 12px; }
  .ich { display: none; }
  .projekt strong { font-size: 20px; }
  .logos .logo-sm { height: 22px; }
  .logos .logo-vmf { height: 22px; }
  .zeile { grid-template-columns: 1fr; justify-items: start; }
  .zeile .unter { grid-column: 1; }
  .stationen li { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
