@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("../vendor/fonts/inter-latin-wght.woff2") format("woff2"); }
:root {
  --tief: #0B2540; --blau: #004B8D; --blau2: #1B6FC0; --himmel: #E6EFF8; --hellgrau: #F2F4F7; --papier: #fff;
  --linie: #DCE3EC; --text: #14202e; --leise: #5b6b7d; --orange: #F28C28; --gruen: #2FA37A; --rot: #C0392B;
  --radius: 16px; --schatten: 0 1px 2px rgba(11,37,64,.06), 0 8px 24px -12px rgba(11,37,64,.18);
  --schrift: "Inter", Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15.5px/1.5 var(--schrift); font-feature-settings: "tnum" 1, "cv11" 1; color: var(--text); background: var(--hellgrau); padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
a { color: var(--blau); }
h1 { font-size: 1.45rem; margin: 0 0 .25rem; color: var(--tief); letter-spacing: -.02em; line-height: 1.15; }
h2 { font-size: 1.02rem; margin: 0 0 .55rem; color: var(--tief); letter-spacing: -.01em; }
h3 { font-size: .95rem; margin: 0 0 .3rem; }
.leise { color: var(--leise); }
.kopf { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--tief); color: #fff; }
.marke { font-weight: 800; letter-spacing: -.02em; color: #fff; text-decoration: none; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 8px; }
.marke .logo { width: 22px; height: 26px; flex: none; }
.oben { display: flex; gap: 6px; align-items: center; }
.oben a { text-decoration: none; padding: 6px 12px; color: #cfe0f2; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.oben a[aria-current] { background: rgba(255,255,255,.14); color: #fff; }
.textknopf { background: none; border: 0; color: #9fb7d1; font: inherit; font-size: .88rem; padding: 6px 8px; cursor: pointer; }
.inhalt { max-width: 1040px; margin: 0 auto; padding: 14px 14px 20px; }
body.seite-dorf .inhalt { padding: 0 0 20px; max-width: none; }
body.seite-dorf .sektion, body.seite-dorf .buehne > svg { max-width: 1040px; }
.karte { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); padding: 15px 16px; margin: 0 0 12px; box-shadow: var(--schatten); }
.karte.schmal { max-width: 380px; margin: 12vh auto 0; }
.liste, .aufgaben { list-style: none; margin: 0; padding: 0; }
.liste li { padding: 9px 0; border-bottom: 1px solid var(--linie); } .liste li:last-child { border-bottom: 0; }
.liste li > span { display: block; font-size: .85rem; }
.aufgaben li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.aufgaben form { margin: 3px 0 0; }
.haken { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--blau); background: #fff; cursor: pointer; padding: 0; }
.haken:hover { background: var(--himmel); }
details { margin-top: 8px; } summary { cursor: pointer; color: var(--blau); padding: 4px 0; font-weight: 600; }
label { display: block; margin: 0 0 12px; font-size: .88rem; color: var(--leise); }
input { display: block; width: 100%; font: inherit; padding: 11px 12px; margin-top: 4px; border: 1px solid var(--linie); border-radius: 10px; color: var(--text); background: #fff; }
input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(27,111,192,.45); outline-offset: 1px; }
.knopf { font: inherit; font-weight: 700; background: var(--blau); color: #fff; border: 1px solid var(--blau); border-radius: 12px; padding: 10px 16px; cursor: pointer; min-height: 44px; transition: transform .12s, background .12s; }
.knopf:hover { background: var(--blau2); } .knopf:active { transform: translateY(1px); }
.knopf.hell { background: #fff; color: var(--blau); border-color: var(--linie); } .knopf.hell:hover { background: var(--himmel); }
.knopf[aria-pressed="true"] { background: var(--blau); color: #fff; }
.zeile { display: flex; gap: 8px; flex-wrap: wrap; } .zeile form { margin: 0; }
.fehler { color: var(--rot); }
.marke-test { font-size: .7rem; font-weight: 600; color: var(--leise); border: 1px solid var(--linie); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.phasenleiste { list-style: none; display: flex; gap: 4px; padding: 0; margin: 12px 0 0; }
.phasenleiste li { flex: 1; text-align: center; font-size: .74rem; padding: 7px 2px; border-radius: 10px; background: rgba(255,255,255,.1); color: #b7cbe0; border: 1px solid rgba(255,255,255,.14); }
.phasenleiste li.jetzt { background: #fff; border-color: #fff; color: var(--tief); font-weight: 700; }
.phasenleiste li.fertig { color: #fff; background: rgba(47,163,122,.35); border-color: transparent; } .phasenleiste .nr { display: block; font-weight: 800; }
.reiter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.reiter a { text-decoration: none; padding: 8px 14px; border: 1px solid var(--linie); border-radius: 999px; background: #fff; white-space: nowrap; font-size: .9rem; font-weight: 600; }
.reiter a[aria-current] { background: var(--tief); color: #fff; border-color: var(--tief); }
.unten { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; display: flex; gap: 4px; padding: 5px; background: rgba(11,37,64,.96); border-radius: 999px; box-shadow: 0 10px 30px -8px rgba(11,37,64,.6); z-index: 30; }
.unten a { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; padding: 11px 4px; border-radius: 999px; color: #cfe0f2; font-weight: 700; font-size: .88rem; position: relative; }
.unten a[aria-current] { background: #fff; color: var(--tief); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: var(--orange); color: #fff; font-size: .75rem; line-height: 20px; }

/* Kopfband (Startseite, Projekt, Bauleitung) */
.band { position: relative; overflow: hidden; color: #fff; background: radial-gradient(900px 300px at 85% -20%, rgba(27,111,192,.65), transparent 60%), linear-gradient(160deg, #0B2540 0%, #0d3a66 100%); padding: 18px 16px 20px; }
.band h1, .band h2 { color: #fff; }
.band .leise { color: #b7cbe0; }
.band a { color: #fff; }
.band-innen { max-width: 1000px; margin: 0 auto; }
.gruss { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 4px; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 14px 0 0; }
.kz { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 10px 12px; }
.kz b { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kz span { font-size: .8rem; color: #b7cbe0; }
.kz.hell { background: var(--papier); border-color: var(--linie); box-shadow: var(--schatten); } .kz.hell span { color: var(--leise); } .kz.hell b { color: var(--tief); }
.kz.hell.gruen b { color: var(--gruen); } .kz.hell.rot b { color: var(--rot); }

/* Projektkarten mit Fortschrittsring */
.sektion { max-width: 1040px; margin: 0 auto; padding: 14px 14px 0; }
.sektion > h2 { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; margin: 6px 2px 10px; }
.sektion > h2 small { font-weight: 500; color: var(--leise); font-size: .82rem; }
.kacheln { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.kachel { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; text-decoration: none; color: var(--text); background: var(--papier); border: 1px solid var(--linie); border-radius: 18px; padding: 14px 16px; box-shadow: var(--schatten); position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.kachel:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11,37,64,.08), 0 16px 32px -14px rgba(11,37,64,.35); }
.kachel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--blau); }
.kachel.p3::before { background: var(--orange); } .kachel.p4::before { background: var(--gruen); } .kachel.p1::before { background: #9db6d1; }
.kachel h3 { font-size: 1.05rem; color: var(--tief); letter-spacing: -.01em; margin: 0; }
.kachel .adr { color: var(--leise); font-size: .85rem; }
.kachel .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-block; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--himmel); color: var(--blau); white-space: nowrap; }
.chip.orange { background: #fdeed9; color: #a85a05; } .chip.gruen { background: #dcf3ea; color: #1b7a59; } .chip.rot { background: #f9e0dd; color: var(--rot); } .chip.grau { background: #eceff3; color: var(--leise); }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--farbe, var(--blau)) calc(var(--p) * 1%), #e5ebf2 0); position: relative; }
.ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--papier); }
.ring b { position: relative; z-index: 1; font-size: .98rem; letter-spacing: -.02em; color: var(--tief); }
.ring.gross { width: 92px; height: 92px; } .ring.gross::after { inset: 9px; background: #0c3052; } .ring.gross b { font-size: 1.35rem; color: #fff; }
.band .ring::after { background: #0c3052; } .band .ring b { color: #fff; }

/* Büro: Projektliste mit Grössenbalken */
.zeilenliste { background: var(--papier); border: 1px solid var(--linie); border-radius: 18px; overflow: hidden; box-shadow: var(--schatten); }
.zl { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 11px 16px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--linie); position: relative; }
.zl:last-child { border-bottom: 0; } .zl:hover { background: var(--himmel); }
.zl strong { color: var(--tief); } .zl .wert { font-weight: 700; text-align: right; color: var(--tief); }
.zl .balken { grid-column: 1 / -1; height: 4px; background: #e8edf3; border-radius: 4px; margin-top: 5px; overflow: hidden; }
.zl .balken i { display: block; height: 100%; background: linear-gradient(90deg, var(--blau), var(--blau2)); border-radius: 4px; }

/* Kosten */
.kostenzeile { padding: 10px 0; border-bottom: 1px solid var(--linie); } .kostenzeile:last-child { border-bottom: 0; }
.kostenzeile .kopfzeile { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.kostenzeile .zahlen { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .84rem; color: var(--leise); margin-top: 2px; }
.stapel { position: relative; height: 10px; border-radius: 6px; background: #e8edf3; margin-top: 7px; overflow: hidden; }
.stapel i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.stapel .v { background: #9db6d1; } .stapel .b { background: var(--gruen); height: 50%; top: 25%; }
.legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--leise); margin: 4px 0 8px; } .legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.schritt { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--linie); } .schritt:last-child { border-bottom: 0; }
.punkt-s { width: 12px; height: 12px; border-radius: 50%; background: var(--leise); } .punkt-s.laufend { background: var(--orange); box-shadow: 0 0 0 4px #fdeed9; } .punkt-s.fertig { background: var(--gruen); }
.gantt { overflow-x: auto; margin: 10px -4px; padding: 0 4px; }
.gitter { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }

/* Dorf als 3D-Modell (isometrisch) */
body.seite-dorf { background: var(--hellgrau); }
.buehne { padding: 4px 4px 0; background: linear-gradient(180deg, #e5f1f6, #f2f4f7); border-bottom: 1px solid var(--linie); }
.dorf { display: block; width: 100%; height: auto; max-height: 52dvh; margin: 0 auto; }
.dorf .haus { cursor: pointer; }
.dorf .haus:hover .dach, .dorf .haus:focus-visible .dach { stroke-width: 2.6; }
.dorf .haus:focus-visible { outline: none; }
.dorf .punkt { fill: var(--orange); stroke: #fff; stroke-width: 2; }
.dorf .beschriftung { font: 700 12px Inter, Arial, Helvetica, sans-serif; fill: var(--blau); paint-order: stroke; stroke: rgba(255,255,255,.92); stroke-width: 3.5px; stroke-linejoin: round; }
.dorfliste { margin: 10px 14px 12px; }
@media (prefers-reduced-motion: no-preference) { .dorf .punkt { animation: puls 2.4s ease-in-out infinite; } .band .kz { animation: hoch .5s ease-out both; } .band .kz:nth-child(2) { animation-delay: .06s; } .band .kz:nth-child(3) { animation-delay: .12s; } .band .kz:nth-child(4) { animation-delay: .18s; } }
@keyframes puls { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (min-width: 820px) { .band { padding: 24px 24px 26px; } .gruss { font-size: 2.2rem; } .startgitter { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; } .inhalt { padding: 18px 20px 24px; } }

.hinweis { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--linie); }
.hinweis.success { border-color: #3d9a5b; } .hinweis.error { border-color: #a3261c; color: #a3261c; }
.zeile-form { display: flex; gap: 8px; align-items: flex-end; } .zeile-form label { flex: 1; margin: 0; }
.vorschlag-tag { display: inline-block; font-size: .72rem; color: #9a6200; background: #fff3da; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
textarea { display: block; width: 100%; font: inherit; padding: 11px 12px; margin-top: 4px; border: 1px solid var(--linie); border-radius: 10px; color: var(--text); resize: vertical; }
select { display: block; width: 100%; font: inherit; padding: 11px 12px; margin-top: 4px; border: 1px solid var(--linie); border-radius: 10px; background: #fff; }
input[type=file] { padding: 9px 10px; }
.haken.an { background: var(--blau); }

.gantt { overflow-x: auto; margin: 10px 0; }
.offerte { border-top: 1px solid var(--linie); padding-top: 8px; margin-top: 8px; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.galerie figure { margin: 0; }
.galerie img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--linie); }
.galerie figcaption { font-size: 13px; color: var(--leise, #5B6B7D); padding-top: 4px; }
.pdfkachel { display: flex; align-items: center; justify-content: center; height: 120px; border-radius: 10px; border: 1px dashed var(--linie); text-decoration: none; font-weight: 600; }

/* 3D-Modell */
body.seite-modell .inhalt { max-width: 1280px; }
.modell { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .modell { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); } .modell-rechts { position: sticky; top: 70px; max-height: calc(100dvh - 90px); overflow: auto; } }
.werkzeuge { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; } .werkzeuge .knopf { min-height: 38px; padding: 6px 12px; }
.werkzeuge b { background: var(--orange); color: #fff; border-radius: 9px; padding: 0 6px; font-size: .78rem; } .werkzeuge b:empty { display: none; }
.bildflaeche { position: relative; border: 1px solid var(--linie); border-radius: 18px; overflow: hidden; box-shadow: var(--schatten); background: #EEF2F6; }
#ansicht { width: 100%; height: clamp(340px, 66dvh, 780px); cursor: grab; }
.tipp { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); background: rgba(11,37,64,.92); color: #fff; padding: 6px 11px; border-radius: 10px; font-size: .85rem; pointer-events: none; }
.optionen { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 4px 0 8px; } .optionen label { margin: 0; }
.optionen .schnitt { flex: 1 1 260px; } .optionen .check { display: flex; gap: 6px; align-items: center; color: var(--text); } .optionen .check input { width: auto; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chipknopf { font: inherit; font-size: .84rem; font-weight: 600; border: 1px solid var(--linie); background: #fff; color: var(--leise); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.chipknopf.an { background: var(--tief); color: #fff; border-color: var(--tief); } .chipknopf span { opacity: .65; margin-left: 3px; }
.chipknopf.art.an { background: var(--blau); border-color: var(--blau); }

/* Start, Navigation, Erfassen */
.band-start .band-innen { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.band-start .gruss { margin: 0; } .band-start .leise { margin: 2px 0 0; }
.band .knopf-weiss, .knopf-weiss { background: #fff; color: var(--tief); border-color: #fff; text-decoration: none; display: inline-flex; align-items: center; }
.knopf-weiss:hover { background: var(--himmel); }
.unten a.erfassen-knopf { gap: 6px; background: var(--orange); color: #fff; flex: 1.2; }
.unten a.erfassen-knopf[aria-current] { background: #fff; color: var(--tief); }
.erfassen textarea { font-size: 1.05rem; min-height: 9rem; }
.mikro { background: var(--tief); border-color: var(--tief); display: inline-flex; gap: 8px; align-items: center; }
.mikro-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.mikro[aria-pressed="true"] { background: var(--rot); border-color: var(--rot); }
.mikro[aria-pressed="true"] .mikro-punkt { background: #fff; }
@media (prefers-reduced-motion: no-preference) { .mikro[aria-pressed="true"] .mikro-punkt { animation: puls 1s ease-in-out infinite; } }
.klein { font-size: .84rem; } .ohne-abstand { margin: 0 0 4px; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dorf { max-height: 64dvh; }
.dorf .beschriftung { font-size: 12.5px; }

/* Projektseite */
.projektkopf { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.notiz { padding: 8px 0; border-bottom: 1px solid var(--linie); } .notiz:last-of-type { border-bottom: 0; } .notiz p { margin: 0 0 2px; }
.sektion-flach { margin: 4px 0 12px; } .sektion-flach > h2 { margin: 6px 2px 10px; }
.werkzeuge-gitter { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.werkzeug { display: block; text-decoration: none; background: var(--papier); border: 1px solid var(--linie); border-radius: 14px; padding: 11px 13px; color: var(--leise); }
.werkzeug b { display: block; color: var(--tief); font-size: .95rem; } .werkzeug span { font-size: .8rem; }
.werkzeug:hover { border-color: var(--blau2); background: var(--himmel); }
.werkzeug.jetzt { background: var(--tief); border-color: var(--tief); color: #b7cbe0; } .werkzeug.jetzt b { color: #fff; }
details.karte > summary { font-weight: 700; color: var(--tief); }
