/* KOVA Abbruch · Ihr Begehungsauftrag (Abbruch-Runde 3, Stufe 5; Teil _teile/auftrag-abbruch.html, Logik begehung.js). Ein Blatt wie der
   Baustellenplan im Check: Papier mit feinem Raster, Kopf mit Nummer, Maßband als Fortschritt, das Grundstück von oben mit den Objekten als
   Knöpfe (gewählt: rot schraffiert mit Positionsnummer), darunter das Leistungsverzeichnis und die Angaben. Beim Senden der Stempel
   „Begehung angefragt“, dann fliegt das Blatt ins System. Charakter „Kraft“: Beton, Basalt, Signalrot, gefaste Ecken. Am Telefon steht das
   Blatt kompakt über den Fragen. Farben fest, damit es auf /anfrage/ gleich aussieht. */

.be-auftrag{position:relative;color:#1F2020;perspective:1600px}
.be-auftrag[hidden]{display:none}
.be-blatt{position:relative;padding:18px 20px 16px;transform-origin:50% 50%;
  background:linear-gradient(rgba(31,32,32,.05) 1px,transparent 1px) 0 0 / 20px 20px,linear-gradient(90deg,rgba(31,32,32,.05) 1px,transparent 1px) 0 0 / 20px 20px,#F6F3EE;
  clip-path:polygon(16px 0,100% 0,100% calc(100% - 16px),calc(100% - 16px) 100%,0 100%,0 16px);filter:drop-shadow(0 40px 50px rgba(0,0,0,.4))}
.be-kopf{display:flex;align-items:baseline;gap:12px;padding-bottom:10px;border-bottom:2px solid #1F2020;font-size:16px}
.be-kopf b{font-weight:600;letter-spacing:-.01em}
.be-kopf .mono{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:rgba(31,32,32,.55)}
.be-kopf .be-nr{margin-left:auto;text-align:right}
.be-auftrag.gestempelt .be-nr{color:#BF3B2D}
/* Maßband */
.be-band{display:flex;align-items:center;gap:12px;margin-top:10px}
.be-skala{position:relative;flex:1;height:12px;background:repeating-linear-gradient(90deg,rgba(31,32,32,.35) 0 1px,transparent 1px 10%) 0 100% / 100% 6px no-repeat,
  repeating-linear-gradient(90deg,rgba(31,32,32,.2) 0 1px,transparent 1px 2.5%) 0 100% / 100% 3px no-repeat}
.be-skala i{position:absolute;left:0;right:0;bottom:0;height:2px;transform-origin:0 50%;transform:scaleX(0);background:#BF3B2D}
html:not(.ruhig) .be-skala i{transition:transform .6s cubic-bezier(.22,1,.36,1)}
.be-stand{flex:none;font-size:11px;color:rgba(31,32,32,.62)}

/* ── das Grundstück ───────────────────────────────────────────────────────────────────────────────────────────────────────── */
.be-grund{position:relative;margin-top:10px}
.be-plan{display:block;width:100%;height:auto;overflow:visible}
.be-plan path,.be-plan rect{vector-effect:non-scaling-stroke}
.be-strasse{fill:rgba(31,32,32,.07)}
.be-mitte{fill:none;stroke:rgba(31,32,32,.3);stroke-width:1.5;stroke-dasharray:14 10}
.be-nb{fill:url(#be-nach);stroke:rgba(31,32,32,.22);stroke-width:1}
.be-na{stroke:rgba(31,32,32,.16);stroke-width:1}
.be-gst{fill:rgba(255,255,255,.55);stroke:rgba(31,32,32,.4);stroke-width:1.2;stroke-dasharray:6 4}
.be-t{font:500 10px/1 "Geist Mono",ui-monospace,monospace;fill:rgba(31,32,32,.6);letter-spacing:.02em}
.be-ts{text-anchor:end}
.be-f{fill:rgba(31,32,32,.09);stroke:#1F2020;stroke-width:1.8;transition:fill .25s ease,stroke .25s ease}
.be-pf{fill:url(#be-pfl);stroke:rgba(31,32,32,.45);stroke-width:1.2}
.be-pl{fill:none;stroke:rgba(31,32,32,.22);stroke-width:1}
.be-d{fill:none;stroke:rgba(31,32,32,.45);stroke-width:1.2;stroke-linecap:round}
.be-tor{fill:none;stroke:#1F2020;stroke-width:4}
.be-wl{stroke:rgba(191,59,45,.55);stroke-width:2}
.be-obj.an .be-f{fill:url(#be-weg);stroke:#BF3B2D;stroke-width:2.6}
.be-obj.an .be-d{stroke:rgba(191,59,45,.6)}
.be-innen{fill:none;stroke:#BF3B2D;stroke-width:2;stroke-dasharray:7 5;opacity:0;transition:opacity .25s ease}
.be-plan.mit-entkernung .be-innen{opacity:1}
.be-mk rect{fill:#1F2020}
.be-mk text{font:600 12px/1 "Geist Mono",ui-monospace,monospace;fill:#FFF8F6;text-anchor:middle}
html.js .be-mk:not(.an){opacity:0}
html.js:not(.ruhig) .be-mk{transition:opacity .3s ease .15s}
/* die Knöpfe */
.be-knoepfe{position:absolute;inset:0}
.be-k{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);margin:0;padding:0;border:0;font:inherit;color:inherit;background:transparent;cursor:pointer;
  -webkit-tap-highlight-color:transparent;transition:box-shadow .25s ease}
.be-k:hover{box-shadow:inset 0 0 0 2px rgba(191,59,45,.5)}
.be-k:focus-visible{outline:2px solid #BF3B2D;outline-offset:2px}
.be-l{position:absolute;left:var(--lx);top:var(--ly);display:inline-flex;align-items:center;gap:7px;padding:5px 9px 5px 6px;text-align:left;white-space:nowrap;
  background:rgba(255,255,255,.95);box-shadow:inset 0 0 0 1px rgba(31,32,32,.2),0 8px 16px -10px rgba(0,0,0,.45);
  clip-path:polygon(5px 0,100% 0,100% calc(100% - 5px),calc(100% - 5px) 100%,0 100%,0 5px);transition:background-color .25s ease,color .25s ease}
.be-l>span{display:flex;flex-direction:column;gap:1px}
.be-l b{font-weight:600;font-size:13px;line-height:1.1}
.be-l small{font:500 9.5px/1.15 "Geist Mono",ui-monospace,monospace;color:rgba(31,32,32,.5)}
.be-l i{position:relative;flex:none;width:16px;height:16px;box-shadow:inset 0 0 0 1.5px rgba(31,32,32,.45);transition:background-color .2s ease,box-shadow .2s ease}
.be-l i::before,.be-l i::after{content:"";position:absolute;left:50%;top:50%;width:8px;height:1.5px;margin:-.75px 0 0 -4px;background:rgba(31,32,32,.6)}
.be-l i::after{transform:rotate(90deg)}
.be-k.an .be-l{color:#FFF8F6;background:#BF3B2D}
.be-k.an .be-l small{color:rgba(255,248,246,.78)}
.be-k.an .be-l i{background:#FFF8F6;box-shadow:none}
.be-k.an .be-l i::before{width:5px;height:2px;margin:0;left:3px;top:8px;background:#BF3B2D;transform:rotate(45deg)}
.be-k.an .be-l i::after{width:9px;height:2px;margin:0;left:5px;top:6.5px;background:#BF3B2D;transform:rotate(-50deg)}
html:not(.ruhig) .be-auftrag.waehlen:not(.hat) .be-k .be-l i{animation:be-tipp 2.4s ease-in-out infinite}
html:not(.ruhig) .be-auftrag.waehlen:not(.hat) .be-k:nth-child(2) .be-l i{animation-delay:.25s}
html:not(.ruhig) .be-auftrag.waehlen:not(.hat) .be-k:nth-child(3) .be-l i{animation-delay:.5s}
html:not(.ruhig) .be-auftrag.waehlen:not(.hat) .be-k:nth-child(4) .be-l i{animation-delay:.75s}
html:not(.ruhig) .be-auftrag.waehlen:not(.hat) .be-k:nth-child(5) .be-l i{animation-delay:1s}
@keyframes be-tipp{0%,60%,100%{box-shadow:inset 0 0 0 1.5px rgba(31,32,32,.45)}30%{box-shadow:inset 0 0 0 1.5px #BF3B2D,0 0 0 4px rgba(191,59,45,.18)}}

/* ── Leistungsverzeichnis ─────────────────────────────────────────────────────────────────────────────────────────────────── */
.be-liste{margin-top:12px}
.be-l-kopf,.be-zeile{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:baseline}
.be-l-kopf{margin:0;padding-bottom:5px;border-bottom:1px solid rgba(31,32,32,.4);font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;color:rgba(31,32,32,.5)}
.be-pos{margin:0;padding:0;list-style:none}
.be-zeile{padding:7px 0;border-bottom:1px dashed rgba(31,32,32,.16)}
.be-p-nr{font-size:11px;color:#BF3B2D}
.be-p-teil{display:flex;align-items:baseline;gap:8px;min-width:0}
.be-p-teil b{font-weight:600;font-size:14px}
.be-p-teil small{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap;color:rgba(31,32,32,.55)}
.be-p-menge{font-size:11.5px}
.be-leer{padding:9px 0;border-bottom:1px dashed rgba(31,32,32,.16);font-size:12.5px;color:rgba(31,32,32,.5)}
.be-leer[hidden]{display:none}
html:not(.ruhig) .be-zeile.neu{animation:be-schreibt .55s cubic-bezier(.22,1,.36,1) both}
@keyframes be-schreibt{from{opacity:0;clip-path:inset(0 100% 0 0)}to{opacity:1;clip-path:inset(0 0 0 0)}}
.be-check{display:flex;align-items:center;gap:10px;margin:8px 0 0;font-size:10.5px;color:#BF3B2D}
.be-check[hidden]{display:none}
.be-aendern{padding:4px 9px;border:0;font:500 11px/1 "Geist Mono",ui-monospace,monospace;color:#1F2020;background:rgba(191,59,45,.12);cursor:pointer}
.be-aendern:hover{background:rgba(191,59,45,.22)}
/* Angaben */
.be-angaben{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 0}
.be-angaben>div{min-width:0;padding:8px 10px;background:#EDE9E3;box-shadow:inset 0 0 0 1px rgba(31,32,32,.1);transition:box-shadow .25s ease,background-color .25s ease;
  clip-path:polygon(6px 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%,0 6px)}
.be-angaben>div[hidden]{display:none}
.be-angaben dt{font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;color:rgba(31,32,32,.5)}
.be-angaben dd{min-height:17px;margin:3px 0 0;overflow:hidden;font-size:13px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.be-angaben>div:not(.an) dd::after{content:"";display:block;width:62%;height:6px;margin-top:5px;background:rgba(31,32,32,.08)}
.be-angaben>div.jetzt{background:#FFFFFF;box-shadow:inset 0 0 0 1.5px #BF3B2D}
.be-angaben>div.jetzt dt{color:#BF3B2D}
.be-fuss{margin:12px 0 0;font-size:10.5px;color:rgba(31,32,32,.55)}

/* ── Abschluss ────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
.be-stempel{position:absolute;right:5%;top:6%;z-index:2;padding:9px 13px 8px;font:600 13px/1 "Geist Mono",ui-monospace,monospace;letter-spacing:.08em;
  text-transform:uppercase;color:#BF3B2D;background:rgba(246,243,238,.75);box-shadow:inset 0 0 0 2.5px currentColor;transform:rotate(-8deg) scale(1.7);opacity:0;pointer-events:none}
.be-auftrag.gestempelt .be-stempel{opacity:1;transform:rotate(-8deg) scale(1);transition:opacity .15s ease,transform .45s cubic-bezier(.2,1.7,.4,1)}
.be-auftrag.gestempelt .be-k{pointer-events:none}
.be-auftrag.weg .be-blatt{transform:translate3d(14%,-30%,0) rotate(6deg) scale(.34);opacity:0;transition:transform .65s cubic-bezier(.5,0,.75,0),opacity .45s ease .2s}
html.ruhig .be-auftrag .be-stempel{transition:none}

/* ── die Karten der ersten Frage ──────────────────────────────────────────────────────────────────────────────────────────── */
html:not(.js) .be-mit-plan,.schritte:not(.mit-begehung) .be-mit-plan{display:none}
body:is([data-fach],:not([data-fach])) .be-wahl{grid-template-columns:repeat(3,minmax(0,1fr))}
body:is([data-fach],:not([data-fach])) .be-wahl .wk svg{width:44px;height:44px;stroke:#1F2020;stroke-width:2;--zi-a:#BF3B2D}
body:is([data-fach],:not([data-fach])) .be-wahl input:checked+.wk svg{stroke:#EEEBE5;--zi-a:#F08A76}

@media (min-width:901px){
  /* im Schluss bekommt das Blatt mehr Breite als die Akte bei Solar */
  body[data-fach="abbruch"] .schluss .platte-d.mit-akte{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}
}
@media (max-width:900px){
  .mit-akte .be-auftrag{margin:0 -12px}
  .be-blatt{padding:10px 10px 10px}
  .be-kopf{font-size:14px;padding-bottom:7px}.be-kopf .be-fach{display:none}
  .be-band{margin-top:6px}
  .be-l{gap:5px;padding:3px 7px 3px 4px}
  .be-l b{font-size:11px}.be-l small{display:none}
  .be-l i{width:12px;height:12px}
  .be-l i::before,.be-l i::after{width:6px;margin-left:-3px}
  .be-k.an .be-l i::before{left:2px;top:6px;width:4px}.be-k.an .be-l i::after{left:3.5px;top:5px;width:7px}
  .be-mk,.be-t{display:none}
  .be-liste{margin-top:8px}
  .be-l-kopf{display:none}
  .be-zeile{padding:5px 0;grid-template-columns:24px minmax(0,1fr) auto;gap:8px}
  .be-p-teil b{font-size:13px}.be-p-teil small{display:none}
  .be-leer{padding:6px 0;font-size:12px}
  .be-angaben,.be-fuss{display:none}
  .be-stempel{font-size:11px;padding:7px 10px 6px}
}
