/* Lunwerk Baubuch: Gestaltung als Zeichnungsblatt in einer Ordnermappe.
   Winkel 0 px, Linien in 0,5 / 1 / 2 px, keine Schatten, keine Verläufe.
   Farben: Konstruktionspapier, Blaumann-Tinte, ein Signalgelb als Markierung. */

@font-face { font-family: "Lunwerk Din"; src: url("/shared/fonts/lunwerk-din-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lunwerk Din"; src: url("/shared/fonts/lunwerk-din-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lunwerk Din Eng"; src: url("/shared/fonts/lunwerk-din-eng-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lunwerk Din Eng"; src: url("/shared/fonts/lunwerk-din-eng-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("/shared/fonts/zilla-slab-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("/shared/fonts/zilla-slab-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("/shared/fonts/zilla-slab-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --pappe: #c5cfda;
  --papier: #e9eef3;
  --feld: #f4f7fa;
  --tinte: #10244a;
  --blaumann: #1d4a9e;
  --text: #1f2f4a;
  --meta: #4a5c78;
  --linie: #7388a6;
  --linie-fein: #b1bfd0;
  --marker: #f5cf0b;
  --auf-marker: #10244a;
  --reiter: #d6dee8;
  --knopf-bg: #1d4a9e;
  --knopf-fg: #f4f7fa;
  --schraffur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M-1 1l2-2M0 7l7-7M6 8l2-2' stroke='%2310244a' stroke-opacity='.32' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  --schraffur-stark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M-1 1l2-2M0 7l7-7M6 8l2-2' stroke='%2310244a' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  --punkt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Ccircle cx='1' cy='1' r='.8' fill='%2310244a'/%3E%3C/svg%3E");
  --din: "Lunwerk Din", sans-serif;
  --din-eng: "Lunwerk Din Eng", sans-serif;
  --slab: "Zilla Slab", Georgia, "Times New Roman", serif;
  --raster: 8px;
}

html[data-thema="nacht"] {
  --pappe: #070e1a;
  --papier: #0e192b;
  --feld: #13233b;
  --tinte: #e6edf6;
  --blaumann: #8fb0e6;
  --text: #cdd8e8;
  --meta: #93a5c0;
  --linie: #4f6584;
  --linie-fein: #283a57;
  --marker: #efc70c;
  --reiter: #15233a;
  --knopf-bg: #8fb0e6;
  --knopf-fg: #0a1424;
  --schraffur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M-1 1l2-2M0 7l7-7M6 8l2-2' stroke='%23e6edf6' stroke-opacity='.3' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  --schraffur-stark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M-1 1l2-2M0 7l7-7M6 8l2-2' stroke='%23e6edf6' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  --punkt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Ccircle cx='1' cy='1' r='.8' fill='%23e6edf6'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--pappe); color: var(--text);
  font-family: var(--slab); font-size: 1rem; line-height: 1.55; font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.sprung { position: absolute; left: -9999px; top: 8px; background: var(--marker); color: var(--auf-marker); padding: 8px 14px; font-family: var(--din); font-weight: 700; z-index: 20; border: 2px solid var(--tinte); }
.sprung:focus { left: 8px; }
.nur-leser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Mappe, Reiter, Blatt ---------- */
.mappe { display: grid; grid-template-columns: minmax(0, 1200px) 48px; justify-content: center; padding: 28px 12px 40px 28px; align-items: start; }
.blatt {
  position: relative; background: var(--papier); border: 3px solid var(--tinte);
  outline: 1px solid var(--tinte); outline-offset: -22px;
  padding: 44px 48px 168px; min-height: calc(100vh - 68px);
}
.reiter { grid-column: 2; grid-row: 1; position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 5px; margin: 86px 0 0 -3px; z-index: 5; }
.reiter a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 40px; padding: 7px 0 10px;
  background: var(--reiter); color: var(--tinte); text-decoration: none; border: 2px solid var(--tinte); border-left: 0;
  font-family: var(--din-eng); font-weight: 700; font-size: 15px; line-height: 1;
  transition: transform .12s linear;
}
.reiter__nr { writing-mode: horizontal-tb; font-family: var(--din); font-size: 15px; border-bottom: 1px solid var(--tinte); padding: 0 6px 4px; }
.reiter__text { writing-mode: vertical-rl; text-orientation: mixed; font-weight: 400; font-size: 16px; letter-spacing: 0; }
.reiter a:hover { transform: translateX(6px); }
.reiter a[aria-current="page"] { background: var(--tinte); color: var(--papier); width: 46px; transform: translateX(0); }
.reiter a[aria-current="page"] .reiter__nr { border-color: var(--papier); }
.reiter a[aria-current="page"] .reiter__text { font-weight: 700; }
.reiter a:focus-visible { outline: 3px solid var(--tinte); outline-offset: 2px; background: var(--marker); color: var(--auf-marker); }

.passkreuz { position: absolute; width: 24px; height: 24px; color: var(--tinte); }
.passkreuz--ol { left: -36px; top: -36px; } .passkreuz--or { right: -36px; top: -36px; }
.passkreuz--ul { left: -36px; bottom: -36px; } .passkreuz--ur { right: -36px; bottom: -36px; }
.zonen { position: absolute; display: flex; font-family: var(--din-eng); font-size: 11px; color: var(--meta); z-index: 1; pointer-events: none; }
.zonen span { flex: 1 1 0; display: flex; align-items: center; justify-content: center; }
.zonen--oben { left: 3px; right: 3px; top: 3px; height: 18px; border-bottom: 1px solid var(--linie-fein); }
.zonen--oben span + span { border-left: .5px solid var(--linie); }
.zonen--links { left: 3px; top: 21px; bottom: 21px; width: 18px; flex-direction: column; border-right: 1px solid var(--linie-fein); }
.zonen--links span + span { border-top: .5px solid var(--linie); }

.kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--tinte); flex-wrap: wrap; }
.marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinte); }
.marke__zeichen { width: 30px; height: 30px; flex: none; }
.marke__name { font-family: var(--din); font-weight: 700; font-size: 28px; line-height: 1; }
.marke__zusatz { font-family: var(--din-eng); font-size: 18px; line-height: 1; padding-left: 10px; border-left: 1px solid var(--tinte); color: var(--meta); }
.kopf__rechts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-family: var(--din); font-size: 15px; }
.kopf__region { color: var(--meta); }
.kopf__region strong { color: var(--tinte); font-weight: 700; }
.thema { font: inherit; font-family: var(--din); font-size: 15px; background: transparent; color: var(--tinte); border: 1px solid var(--tinte); padding: 5px 11px; cursor: pointer; }
.thema:hover { background: var(--tinte); color: var(--papier); }

.pfad { margin: 18px 0 0; font-family: var(--din-eng); font-size: 15px; color: var(--meta); }
.blatttitel { font-family: var(--din); font-weight: 700; font-size: 2.55rem; line-height: 1.08; margin: 6px 0 22px; color: var(--tinte); max-width: 30ch; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.inhalt { counter-reset: h2 h3 h4; }
.inhalt > .einleitung { font-size: 1.22rem; line-height: 1.5; max-width: 62ch; color: var(--tinte); margin: 0 0 28px; }

/* ---------- Überschriften nach DIN 1421 ---------- */
.inhalt h2, .inhalt h3, .inhalt h4 { font-family: var(--din); font-weight: 700; color: var(--tinte); line-height: 1.3; }
.inhalt h2 { counter-increment: h2; counter-reset: h3; font-size: 1.62rem; margin: 2.4rem 0 .8rem; padding-top: .55rem; border-top: 2px solid var(--tinte); }
.inhalt h3 { counter-increment: h3; counter-reset: h4; font-size: 1.28rem; margin: 1.8rem 0 .5rem; }
.inhalt h4 { counter-increment: h4; font-size: 1.08rem; margin: 1.4rem 0 .4rem; }
.inhalt h2::before { content: counter(h2); display: inline-block; min-width: 2.2rem; padding-right: .7rem; font-family: var(--din-eng); color: var(--blaumann); }
.inhalt h3::before { content: counter(h2) "." counter(h3); display: inline-block; min-width: 3.1rem; padding-right: .7rem; font-family: var(--din-eng); color: var(--blaumann); }
.inhalt h4::before { content: counter(h2) "." counter(h3) "." counter(h4); display: inline-block; min-width: 4rem; padding-right: .7rem; font-family: var(--din-eng); color: var(--blaumann); }
.inhalt h2.ohne-nr::before, .inhalt h3.ohne-nr::before, .inhalt h4.ohne-nr::before { content: none; }
.inhalt h2.ohne-nr { counter-increment: none; }

.inhalt p { margin: 0 0 1rem; max-width: 58ch; }
.inhalt ul, .inhalt ol { max-width: 58ch; padding-left: 1.4rem; margin: 0 0 1.1rem; }
.inhalt li { margin: .25rem 0; }
.liste { list-style: none; padding-left: 0 !important; }
.liste li { position: relative; padding-left: 1.3rem; }
.liste li::before { content: ""; position: absolute; left: .1rem; top: .62em; width: .45rem; height: .45rem; background: var(--tinte); }
.normliste { list-style: none; counter-reset: pos; padding-left: 0 !important; }
.normliste > li { counter-increment: pos; position: relative; padding-left: 2.6rem; margin: .7rem 0; }
.normliste > li::before { content: counter(pos); position: absolute; left: 0; top: 0; width: 1.9rem; text-align: right; font-family: var(--din); font-weight: 700; color: var(--blaumann); }
.inhalt a { color: var(--blaumann); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.inhalt a:hover { text-decoration-thickness: 2px; color: var(--tinte); }
a:focus-visible { outline: 3px solid var(--marker); outline-offset: 0; background: var(--marker); color: var(--auf-marker) !important; text-decoration: none; }
.inhalt strong { font-weight: 600; }
.inhalt code, .inhalt pre { font-family: var(--din); font-size: .94em; }
.inhalt code { background: var(--feld); border: 1px solid var(--linie-fein); padding: 0 .3em; }
.inhalt pre { background: var(--feld); border: 1px solid var(--tinte); padding: 12px 14px; overflow-x: auto; margin: 0 0 1.2rem; line-height: 1.45; tab-size: 2; }
.inhalt pre code { background: none; border: 0; padding: 0; font-size: 1em; }
.fussnote { font-family: var(--din-eng); font-size: 15px; color: var(--meta); }
.inhalt hr { border: 0; border-top: 2px solid var(--tinte); border-bottom: 1px solid var(--tinte); height: 4px; margin: 2.4rem 0; }
html[data-thema="nacht"] .mk { text-decoration-thickness: .14em; text-underline-offset: .14em; }
.mk { text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: .42em; text-underline-offset: -.2em; text-decoration-skip-ink: none; color: inherit; }

/* ---------- Stückliste ---------- */
.tabellenrahmen { position: relative; overflow-x: auto; margin: 0 0 1.4rem; max-width: 100%; }
.tabellenrahmen:focus-visible { outline: 3px solid var(--tinte); outline-offset: 2px; }
table.stueckliste { width: 100%; border-collapse: collapse; font-family: var(--din); font-size: 16px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.stueckliste caption { text-align: left; font-weight: 700; padding: 0 0 8px; color: var(--tinte); }
.stueckliste thead th { font-family: var(--din-eng); font-weight: 700; text-align: left; padding: 8px 12px 8px 0; border-top: 2px solid var(--tinte); border-bottom: 1px solid var(--tinte); vertical-align: bottom; color: var(--tinte); white-space: nowrap; }
.stueckliste tbody th, .stueckliste tbody td { text-align: left; padding: 8px 12px 8px 0; border-bottom: .5px dashed var(--linie); vertical-align: top; }
.stueckliste tbody th { font-weight: 700; color: var(--tinte); }
.stueckliste tbody tr:last-child td, .stueckliste tbody tr:last-child th { border-bottom: 2px solid var(--tinte); }
.stueckliste .num, .stueckliste th.num { text-align: right; white-space: nowrap; padding-right: 16px; }
.stueckliste td.num { position: relative; }
.stueckliste td.num::before { content: ""; position: absolute; left: 4px; right: 12px; bottom: 3px; height: 7px; border-left: 1px solid var(--blaumann); border-right: 1px solid var(--blaumann); border-bottom: 1px solid var(--blaumann); opacity: 0; }
.stueckliste td.num::after { content: attr(data-mass); position: absolute; left: 50%; bottom: -1px; transform: translateX(-60%); padding: 0 5px; background: var(--papier); color: var(--blaumann); font-family: var(--din-eng); font-size: 11px; line-height: 1; opacity: 0; white-space: nowrap; }
.stueckliste td.num:hover::before, .stueckliste td.num:hover::after { opacity: 1; }
.stueckliste .verstoss td, .stueckliste .verstoss th { background-image: var(--schraffur); }
.stueckliste tfoot th { text-align: left; }
.stueckliste tfoot td, .stueckliste tfoot th { font-weight: 700; border-top: 1px solid var(--tinte); padding: 8px 12px 8px 0; }

.zusammenfassung { margin: 0 0 1.4rem; font-family: var(--din); font-size: 16px; max-width: 760px; }
.zusammenfassung > div { display: grid; grid-template-columns: minmax(8rem, 30%) 1fr auto; gap: 4px 20px; padding: 9px 0; border-bottom: .5px solid var(--linie); }
.zusammenfassung > div:first-child { border-top: 2px solid var(--tinte); }
.zusammenfassung dt { font-weight: 700; color: var(--tinte); }
.zusammenfassung dd { margin: 0; overflow-wrap: anywhere; }
.zusammenfassung dd.aktion { text-align: right; }

.aufklapp { border-top: 1px solid var(--tinte); max-width: 760px; }
.aufklapp:last-of-type { border-bottom: 1px solid var(--tinte); }
.aufklapp summary { font-family: var(--din); font-weight: 700; font-size: 1.05rem; padding: 12px 36px 12px 0; cursor: pointer; list-style: none; position: relative; color: var(--tinte); }
.aufklapp summary::-webkit-details-marker { display: none; }
.aufklapp summary::after { content: "+"; position: absolute; right: 4px; top: 8px; width: 22px; height: 22px; line-height: 19px; text-align: center; border: 1.5px solid var(--tinte); font-size: 18px; }
.aufklapp[open] summary::after { content: "−"; background: var(--tinte); color: var(--papier); }
.aufklapp summary:focus-visible { outline: 3px solid var(--tinte); outline-offset: 2px; background: var(--marker); color: var(--auf-marker); }
.aufklapp > :not(summary) { padding-bottom: .2rem; }
.aufklapp > p:last-child { margin-bottom: 1rem; }

.hinweis, .meldung, .demo-leiste { position: relative; max-width: 760px; border: 1px solid var(--tinte); padding: 24px 16px 12px; margin: 0 0 1.4rem; font-family: var(--din); font-size: 16px; background: var(--feld); }
.hinweis::before, .meldung::before, .demo-leiste::before { content: "Hinweis"; position: absolute; top: -1px; left: -1px; padding: 1px 9px 2px; font-family: var(--din-eng); font-weight: 700; font-size: 12px; line-height: 1.3; background: var(--marker); color: #10244a; border: 1px solid var(--tinte); }
.hinweis p { max-width: 62ch; margin: 0 0 .5rem; }
.hinweis p:last-child { margin-bottom: 0; }
.hinweis--achtung { border-width: 2px; }
.hinweis--achtung::before { content: "Achtung"; top: -2px; left: -2px; background-color: var(--papier); background-image: var(--schraffur); color: var(--tinte); }
.demo-leiste { max-width: 46rem; padding-top: 24px; }
.demo-leiste::before { content: "Demo"; }
.demo-leiste a { font-weight: 700; }

/* ---------- Marken (Tags) ---------- */
.tag { display: inline-block; font-family: var(--din); font-weight: 700; font-size: 13px; line-height: 1.3; padding: 2px 10px; border: 1.5px solid var(--tinte); color: var(--tinte); background: transparent; white-space: nowrap; vertical-align: .08em; }
.tag--fest, .tag--abgenommen { background: var(--tinte); color: var(--papier); }
.tag--entwurf, .tag--offen, .tag--verstoss { background-image: var(--schraffur); background-color: var(--papier); }
.tag--in_arbeit { background: transparent; }
.tag--behoben { background: var(--blaumann); border-color: var(--blaumann); color: var(--knopf-fg); }
.tag--hinweis, .tag--wartung, .tag--ueberfaellig { background: var(--marker); color: var(--auf-marker); border-color: var(--auf-marker); }

/* ---------- Knöpfe und Formulare ---------- */
.knopf { display: inline-block; font-family: var(--din); font-weight: 700; font-size: 17px; line-height: 1.3; padding: 11px 20px; border: 2px solid var(--knopf-bg); background: var(--knopf-bg); color: var(--knopf-fg); text-decoration: none; cursor: pointer; border-radius: 0; }
.knopf:hover { background: var(--tinte); border-color: var(--tinte); color: var(--papier); }
.knopf:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; background: var(--marker); border-color: var(--tinte); color: var(--auf-marker); }
.knopf--zweit { background: transparent; color: var(--tinte); border-color: var(--tinte); }
.knopf--klein { font-size: 15px; padding: 6px 12px; }
.knopf--loeschen { background-color: var(--papier); background-image: var(--schraffur); color: var(--tinte); border-color: var(--tinte); }
.knopf--loeschen:hover { background-image: none; }
.knopf[disabled], .knopf[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.inhalt a.knopf { text-decoration: none; color: var(--knopf-fg); }
.inhalt a.knopf--zweit { color: var(--tinte); }
.inhalt a.knopf:hover { color: var(--papier); }
.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 1.2rem; }
.leiste--rechts { justify-content: flex-end; }

.lw-feld { margin: 0 0 1.5rem; max-width: 40rem; }
.lw-label { display: block; font-family: var(--din); font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; color: var(--tinte); }
.lw-hinweis { display: block; font-family: var(--din); font-size: 15px; color: var(--meta); margin-bottom: 6px; }
.lw-fehlertext { display: block; font-family: var(--din); font-weight: 700; font-size: 15px; color: var(--tinte); margin-bottom: 6px; }
.lw-fehlertext::before { content: "Fehler: "; }
.lw-eingabe, .lw-auswahl, .lw-textfeld {
  display: block; width: 100%; font-family: var(--din); font-size: 18px; color: var(--tinte); background: var(--feld);
  border: 2px solid var(--tinte); border-radius: 0; padding: 8px 10px; min-height: 46px; font-variant-numeric: tabular-nums; appearance: none;
}
.lw-auswahl { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2310244a' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
html[data-thema="nacht"] .lw-auswahl { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23e6edf6' stroke-width='2' fill='none'/%3E%3C/svg%3E"); }
.lw-textfeld { min-height: 120px; resize: vertical; line-height: 1.4; font-family: var(--slab); font-size: 18px; }
::placeholder { color: var(--meta); opacity: 1; }
.lw-eingabe:focus, .lw-auswahl:focus, .lw-textfeld:focus { outline: 3px solid var(--tinte); outline-offset: 2px; border-color: var(--tinte); background: var(--papier); }
.lw-eingabe--kurz { max-width: 9rem; } .lw-eingabe--mittel { max-width: 16rem; }
.lw-feld--fehler { position: relative; padding-left: 22px; }
.lw-feld--fehler::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background-image: var(--schraffur-stark); border: 1.5px solid var(--tinte); }
.lw-feld--fehler .lw-eingabe, .lw-feld--fehler .lw-auswahl, .lw-feld--fehler .lw-textfeld { border-width: 4px; }
.lw-zaehler { font-family: var(--din); font-size: 14px; color: var(--meta); margin-top: 4px; }
.lw-zaehler--ueber { color: var(--tinte); font-weight: 700; }
.lw-gruppe { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.lw-gruppe > legend { font-family: var(--din); font-weight: 700; font-size: 1.12rem; padding: 0; margin-bottom: 6px; color: var(--tinte); }
.lw-datum { display: flex; gap: 14px; flex-wrap: wrap; }
.lw-datum__teil label { display: block; font-family: var(--din); font-size: 15px; margin-bottom: 3px; }
.lw-datum__teil .lw-eingabe { width: 4.4rem; text-align: center; }
.lw-datum__teil--jahr .lw-eingabe { width: 6rem; }
.lw-zeile { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.lw-zeile > .lw-feld { flex: 1 1 14rem; margin-bottom: 1rem; max-width: 24rem; }
.lw-auswahlfeld { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0; font-family: var(--din); font-size: 17px; }
.lw-auswahlfeld input { flex: none; margin-top: 2px !important; }
.lw-auswahlfeld input { width: 22px; height: 22px; accent-color: var(--blaumann); margin: 0; }
.lw-fehlerliste { border: 4px solid var(--tinte); padding: 0 0 14px; margin: 0 0 2rem; max-width: 40rem; background: var(--feld); }
.lw-fehlerliste:focus { outline: 3px solid var(--marker); outline-offset: 3px; }
.lw-fehlerliste__titel { margin: 0 0 12px; padding: 10px 18px; font-family: var(--din); font-weight: 700; font-size: 1.2rem; background-image: var(--schraffur-stark); background-color: var(--papier); border-bottom: 2px solid var(--tinte); }
.lw-fehlerliste__titel span { background: var(--papier); padding: 0 8px; }
.lw-fehlerliste ul { margin: 0; padding: 0 18px; list-style: none; font-family: var(--din); font-weight: 700; }
.lw-fehlerliste li { margin: 6px 0; }
.lw-fehlerliste a { color: var(--tinte) !important; }
.meldung strong { display: block; font-size: 1.1rem; }
.meldung--ok::before { content: "Erledigt"; background: var(--tinte); color: var(--papier); }

/* ---------- Reiter-Register im Inhalt (Tabs) ---------- */
.lw-tabs { margin: 0 0 1.6rem; }
.lw-tabs__liste { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; border-bottom: 2px solid var(--tinte); }
.lw-tabs__tab { font-family: var(--din); font-weight: 700; font-size: 16px; background: var(--reiter); color: var(--tinte); border: 2px solid var(--tinte); border-bottom: 0; padding: 7px 16px; cursor: pointer; margin-bottom: -2px; position: relative; top: 4px; }
.lw-tabs__tab[aria-selected="true"] { background: var(--papier); top: 0; padding-top: 11px; margin-bottom: -2px; border-bottom: 2px solid var(--papier); }
.lw-tabs__tab:focus-visible { outline: 3px solid var(--tinte); outline-offset: 2px; background: var(--marker); color: var(--auf-marker); }
.lw-tabs__feld { border: 2px solid var(--tinte); border-top: 0; padding: 14px 16px; }
.lw-tabs__feld > pre:last-child { margin-bottom: 0; }

/* ---------- Aufgabenliste ---------- */
.aufgaben { list-style: none; padding: 0 !important; margin: 0 0 1.6rem; max-width: 46rem; border-top: 2px solid var(--tinte); font-family: var(--din); }
.aufgaben li { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; padding: 10px 0; border-bottom: .5px dashed var(--linie); margin: 0; }
.aufgaben__name { font-size: 1.08rem; }
.aufgaben__name small { display: block; font-size: 15px; color: var(--meta); }

/* ---------- Anlagen, Schriftfeld ---------- */
.anlagen { margin-top: 3rem; padding-top: 12px; border-top: 1px solid var(--tinte); font-family: var(--din); font-size: 15px; }
.anlagen__titel { margin: 0 0 4px; font-weight: 700; color: var(--tinte); }
.anlagen ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0; margin: 0 0 10px; }
.anlagen a { color: var(--blaumann); }
.anlagen__zeile { margin: 0; color: var(--meta); max-width: 60ch; font-family: var(--din-eng); }

.schriftfeld-box { position: absolute; right: 30px; bottom: 30px; width: min(500px, calc(100% - 60px)); z-index: 2; }
.schriftfeld { width: 100%; border-collapse: collapse; border: 2px solid var(--tinte); font-family: var(--din-eng); background: var(--papier); }
.schriftfeld th, .schriftfeld td { border: 1px solid var(--tinte); text-align: left; padding: 3px 9px 4px; font-size: 14px; line-height: 1.3; vertical-align: bottom; height: 34px; }
.schriftfeld th { font-weight: 400; font-size: 11px; color: var(--meta); vertical-align: top; width: 1%; white-space: nowrap; padding-bottom: 0; }
.schriftfeld td { font-family: var(--din); font-weight: 700; color: var(--tinte); }
.schriftfeld__titel { font-size: 15px !important; }
.schriftfeld__blatt { font-size: 22px !important; width: 4.5rem; }

/* ---------- Deckblatt ---------- */
.deckblatt > section:last-child { position: sticky; top: 20px; }
.deckblatt { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.deckblatt__titel { font-family: var(--din); font-weight: 700; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.02; margin: .3rem 0 .6rem; color: var(--tinte); }
.deckblatt__unter { font-family: var(--din-eng); font-size: 1.35rem; line-height: 1.3; color: var(--tinte); max-width: 30ch; margin: 0 0 1.2rem; }
.verzeichnis { list-style: none; padding: 0 !important; margin: 0; font-family: var(--din); max-width: none !important; }
.verzeichnis > li { margin: 0; padding: 0; }
.verzeichnis a { display: flex; align-items: baseline; gap: 8px; color: var(--tinte); text-decoration: none; padding: 3px 0; }
.verzeichnis a:hover .v-text { text-decoration: underline; text-decoration-thickness: 1px; }
.v-nr { flex: none; width: 2.2rem; font-family: var(--din-eng); font-weight: 700; color: var(--blaumann); }
.v-text { flex: 0 1 auto; }
.v-leader { flex: 1 1 24px; min-width: 24px; height: 1px; border-bottom: 2px dotted var(--linie); transform: translateY(-4px); }
.v-blatt { flex: none; font-family: var(--din); font-variant-numeric: tabular-nums; color: var(--meta); }
.verzeichnis .v-haupt > a { font-weight: 700; font-size: 1.1rem; padding-top: 9px; }
.verzeichnis .v-haupt > a .v-blatt { color: var(--tinte); }
.verzeichnis ul { list-style: none; margin: 0 0 4px; padding: 0 0 0 2.2rem !important; max-width: none; }
.verzeichnis ul a { font-size: 15px; padding: 1px 0; }
.verzeichnis ul .v-nr { width: auto; font-weight: 400; color: var(--meta); display: none; }
.tagesblatt { border: 2px solid var(--tinte); padding: 0; font-family: var(--din); background: var(--feld); }
.tagesblatt__kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 14px; border-bottom: 2px solid var(--tinte); }
.tagesblatt__kopf strong { font-size: 1.15rem; }
.tagesblatt__kopf span { font-family: var(--din-eng); color: var(--meta); }
.tagesblatt table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.35; }
.tagesblatt th { width: 6.2rem; text-align: left; font-family: var(--din-eng); font-weight: 400; color: var(--meta); padding: 7px 8px 7px 14px; vertical-align: top; border-bottom: .5px dashed var(--linie); }
.tagesblatt td { padding: 7px 14px 7px 0; border-bottom: .5px dashed var(--linie); vertical-align: top; }
.tagesblatt tr:last-child th, .tagesblatt tr:last-child td { border-bottom: 0; }
.tagesblatt__fuss { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; align-items: center; padding: 9px 14px; border-top: 2px solid var(--tinte); font-size: 15px; }
.tagesblatt__sig { display: block; width: 150px; height: 50px; background: var(--papier); border: 1px solid var(--linie); }
.tagesblatt__hash { font-family: var(--din); font-size: 13px; color: var(--meta); letter-spacing: 0; overflow-wrap: anywhere; }
.pruefstand { font-family: var(--din); font-size: 15px; }
.ansicht { margin: 38px 0 0; border-top: 2px solid var(--tinte); padding-top: 12px; }
.ansicht { overflow-x: auto; }
.ansicht svg { display: block; width: 100%; min-width: 640px; height: auto; color: var(--tinte); }
.ansicht text { font-family: var(--din-eng); }
.ansicht figcaption { font-family: var(--din-eng); font-size: 14px; color: var(--meta); margin-top: 6px; }

/* ---------- Werkzeuge und App ---------- */
.werkzeug { margin: 0 0 2rem; }
.werkzeug__raster { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 36px; align-items: start; }
.wochenraster { width: 100%; border-collapse: collapse; font-family: var(--din); }
.wochenraster th { font-family: var(--din-eng); font-weight: 700; text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--tinte); border-top: 2px solid var(--tinte); white-space: nowrap; }
.wochenraster th small { display: block; font-weight: 400; color: var(--meta); font-size: 12px; }
.wochenraster td { padding: 3px; border-bottom: .5px dashed var(--linie); }
.wochenraster td:first-child { white-space: nowrap; padding-right: 8px; font-weight: 700; }
.wochenraster .lw-eingabe { min-height: 38px; padding: 4px 6px; font-size: 15px; min-width: 6.4rem; }
.wochenraster .ft { background-image: var(--punkt); }
.wochenraster .so { background-image: var(--schraffur); }
.wochenraster .summe { text-align: right; font-weight: 700; padding-right: 8px; white-space: nowrap; }
.kennzahlen { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 1.6rem; border-top: 2px solid var(--tinte); border-bottom: 1px solid var(--tinte); font-family: var(--din); }
.kennzahlen > div { flex: 1 1 9rem; padding: 10px 14px 10px 0; }
.kennzahlen > div + div { padding-left: 14px; border-left: .5px solid var(--linie); }
.kennzahlen dt { font-family: var(--din-eng); font-size: 14px; color: var(--meta); }
.kennzahlen dd { margin: 0; font-size: 1.55rem; font-weight: 700; line-height: 1.1; color: var(--tinte); }
.kennzahlen dd small { font-size: 1rem; font-weight: 400; }
.filterleiste { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 0 0 1.2rem; padding: 12px 0; border-top: 1px solid var(--tinte); border-bottom: .5px solid var(--linie); }
.filterleiste .lw-feld { margin: 0; flex: 0 1 12rem; }
.filterleiste .lw-eingabe, .filterleiste .lw-auswahl { min-height: 40px; font-size: 16px; padding: 5px 8px; }
.unterschrift { border: 2px dashed var(--tinte); background: var(--feld); position: relative; max-width: 420px; }
.unterschrift canvas { display: block; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }
.unterschrift__linie { position: absolute; left: 14px; right: 14px; bottom: 34px; border-top: 1px solid var(--linie); pointer-events: none; }
.unterschrift__hinweis { position: absolute; left: 14px; bottom: 8px; font-family: var(--din-eng); font-size: 13px; color: var(--meta); pointer-events: none; }
.unterschrift--bild { display: block; width: 100%; height: 150px; object-fit: contain; margin-bottom: 8px; }
.kette { font-family: var(--din); font-size: 15px; border: 1px solid var(--tinte); padding: 10px 14px; max-width: 46rem; margin: 0 0 1.4rem; background: var(--feld); }
.kette code { background: none; border: 0; padding: 0; overflow-wrap: anywhere; }
.diagramm { width: 100%; height: auto; display: block; font-family: var(--din-eng); }
.dg-achse { stroke: var(--linie); stroke-width: .5; fill: none; }
.dg-achse-stark { stroke: var(--tinte); stroke-width: 1; fill: none; }
.dg-text { fill: var(--meta); font-size: 12px; }
.dg-temp { stroke: var(--tinte); stroke-width: 1.5; fill: none; }
.dg-temp2 { stroke: var(--tinte); stroke-width: 1; fill: none; stroke-dasharray: 6 3; }
.dg-regen { fill: var(--blaumann); }
.dg-frost { fill: var(--marker); }
.status-90 { display: flex; gap: 2px; height: 34px; margin: 8px 0 4px; }
.status-90 span { flex: 1 1 0; min-width: 2px; border: .5px solid var(--linie); background: var(--feld); }
.status-90 .s-eingeschraenkt { background-image: var(--schraffur); }
.status-90 .s-ausfall { background: var(--tinte); }
.status-90 .s-wartung { background-image: var(--punkt); }
.statuszeile { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--din); }
.massband { font-family: var(--din); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0 0 1.4rem; padding: 10px 0; border-top: 1px solid var(--tinte); border-bottom: 1px solid var(--tinte); }
.massband b { font-weight: 700; color: var(--tinte); }
.zeitleiste { list-style: none; padding: 0 !important; margin: 0 0 1.6rem; max-width: 60rem !important; border-left: 2px solid var(--tinte); }
.zeitleiste li { position: relative; padding: 0 0 18px 24px; margin: 0; }
.zeitleiste li::before { content: ""; position: absolute; left: -7px; top: .5em; width: 12px; height: 12px; background: var(--papier); border: 2px solid var(--tinte); }
.zeitleiste .jahr { font-family: var(--din); font-weight: 700; font-size: 1.3rem; color: var(--tinte); display: block; line-height: 1.3; }
.zeitleiste .jahr small { font-family: var(--din-eng); font-weight: 400; font-size: 14px; color: var(--meta); margin-left: 8px; }
.eintraege { list-style: none; padding: 0 !important; margin: 0 0 1.6rem; max-width: none !important; }
.eintraege li { display: grid; grid-template-columns: 6.4rem 6.2rem 1fr; gap: 4px 14px; padding: 7px 0; margin: 0; border-bottom: .5px dashed var(--linie); font-family: var(--din); font-size: 16px; align-items: baseline; }
.eintraege .e-datum { color: var(--meta); font-family: var(--din-eng); }
.eintraege .e-text small { color: var(--meta); }
.lesespalte { max-width: 60ch; }
.beitrag { max-width: 40rem; }
.beitrag p { max-width: none; }
.beitragsliste { list-style: none; padding: 0 !important; max-width: 60rem !important; margin: 0 0 2rem; }
.beitragsliste li { display: grid; grid-template-columns: 7.4rem 1fr; gap: 4px 20px; padding: 14px 0; margin: 0; border-bottom: .5px dashed var(--linie); }
.beitragsliste .b-datum { font-family: var(--din-eng); color: var(--meta); font-size: 15px; padding-top: .25rem; }
.beitragsliste h2 { margin: 0 0 4px; padding: 0; border: 0; font-size: 1.2rem; counter-increment: none; }
.beitragsliste h2::before { content: none; }
.beitragsliste h2 a { color: var(--tinte) !important; text-decoration: none !important; }
.beitragsliste h2 a:hover { text-decoration: underline !important; }
.beitragsliste p { margin: 0; font-size: 1rem; }
.jahre { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.6rem; padding: 0 !important; list-style: none; max-width: none !important; }
.jahre a { display: inline-block; font-family: var(--din); font-weight: 700; padding: 4px 11px; border: 1.5px solid var(--tinte); text-decoration: none !important; color: var(--tinte) !important; }
.jahre a[aria-current="page"], .jahre a:hover { background: var(--tinte); color: var(--papier) !important; }
.ansichtsliste { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Jahreskalender (Feiertage) ---------- */
.jahreskalender { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; margin: 0 0 1.6rem; }
.monat { border-collapse: collapse; font-family: var(--din); font-size: 14px; width: 100%; }
.monat caption { text-align: left; font-weight: 700; color: var(--tinte); padding: 0 0 4px; border-bottom: 2px solid var(--tinte); }
.monat th { font-family: var(--din-eng); font-weight: 400; font-size: 12px; color: var(--meta); padding: 3px 0; text-align: center; border-bottom: .5px solid var(--linie); }
.monat td { text-align: center; padding: 3px 0; height: 24px; border-bottom: .5px dashed var(--linie-fein); }
.monat td.we { background-image: var(--punkt); color: var(--meta); }
.monat td.ft { background: var(--marker); color: #10244a; font-weight: 700; }
.monat td.tft { outline: 1.5px solid var(--tinte); outline-offset: -2px; font-weight: 700; }
.dg-feld-a { fill: var(--tinte); }
.dg-feld-b { fill: var(--papier); stroke: var(--tinte); stroke-width: 1.5; }
@media (max-width: 1000px) { .jahreskalender { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .jahreskalender { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; } }

@media (max-width: 1000px) {
  .deckblatt, .werkzeug__raster { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .blatt { padding: 40px 28px 176px; }
}
@media (max-width: 760px) {
  html { font-size: 100%; }
  .mappe { display: block; padding: 8px 40px 14px 8px; }
  .reiter { position: fixed; right: 0; top: 70px; margin: 0; gap: 3px; z-index: 30; }
  .reiter a { width: 32px; padding: 5px 0 6px; }
  .reiter a:hover { transform: none; }
  .reiter a[aria-current="page"] { width: 38px; }
  .reiter__text { display: none; }
  .reiter__nr { border: 0; padding: 0; }
  .blatt { padding: 34px 16px 190px; outline-offset: -14px; min-height: 100vh; }
  .zonen--links { display: none; }
  .zonen--oben { height: 14px; font-size: 11px; }
  .passkreuz { display: none; }
  .blatttitel { font-size: 2rem; }
  .schriftfeld-box { right: 16px; bottom: 16px; width: calc(100% - 32px); }
  .schriftfeld th, .schriftfeld td { padding: 3px 4px 4px; font-size: 13px; }
  .schriftfeld th { white-space: normal; font-size: 11px; }
  .schriftfeld__blatt { width: 3rem; font-size: 20px !important; }
  .zusammenfassung > div { grid-template-columns: 1fr; }
  .zusammenfassung dd.aktion { text-align: left; }
  .eintraege li { grid-template-columns: 1fr; }
  .beitragsliste li { grid-template-columns: 1fr; }
  .marke__name { font-size: 24px; }
  .kopf__region { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reiter a { transition: none; }
  .reiter a:hover { transform: none; }
}

/* ---------- Druck: A4, Rahmen und Schriftfeld bleiben ---------- */
@page { size: A4; margin: 8mm; }
@media print {
  :root, html[data-thema="nacht"] {
    --pappe: #fbfcfd; --papier: #fbfcfd; --feld: #fbfcfd; --tinte: #0b1a38; --blaumann: #0b1a38; --text: #0b1a38; --meta: #3c4a63;
    --linie: #5b6b85; --linie-fein: #8896ad; --marker: #f5cf0b; --reiter: #fbfcfd; --knopf-bg: #0b1a38; --knopf-fg: #fbfcfd;
    --schraffur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M-1 1l2-2M0 7l7-7M6 8l2-2' stroke='%230b1a38' stroke-opacity='.4' stroke-width='1' fill='none'/%3E%3C/svg%3E");
    --schraffur-stark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Cpath d='M-1 1l2-2M0 7l7-7M6 8l2-2' stroke='%230b1a38' stroke-width='1' fill='none'/%3E%3C/svg%3E");
    --punkt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Ccircle cx='1' cy='1' r='.8' fill='%230b1a38'/%3E%3C/svg%3E");
  }
  html { font-size: 84%; }
  body { background: var(--papier); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mappe { display: block; padding: 0; }
  .reiter, .sprung, .kopf__rechts, .knopf, .leiste, .filterleiste, .nicht-drucken, .thema, .anlagen, .zonen--links, .demo-leiste, .tabs-nicht-drucken { display: none !important; }
  .blatt { display: table; width: 100%; height: 279mm; border: 2px solid var(--tinte); outline: 1px solid var(--tinte); outline-offset: -5px; padding: 6mm 8mm 5mm; min-height: 0; box-decoration-break: slice; }
  .zonen--oben { top: 2px; left: 2px; right: 2px; height: 11px; font-size: 8px; }
  .passkreuz { display: block; position: fixed; width: 16px; height: 16px; }
  .passkreuz--ol { left: -4px; top: -4px; } .passkreuz--or { right: -4px; top: -4px; }
  .passkreuz--ul { left: -4px; bottom: -4px; } .passkreuz--ur { right: -4px; bottom: -4px; }
  .schriftfeld-box { position: static; display: table-footer-group; width: auto; }
  .schriftfeld { width: 120mm; margin: 8mm 0 0 auto; break-inside: avoid; }
  .blatttitel { font-size: 1.7rem; max-width: none; }
  .unterschrift--bild { height: 80px; margin-bottom: 0; }
  .inhalt h2, .inhalt h3, .inhalt h4 { break-after: avoid; }
  .stueckliste, .tagesblatt, .kette, .hinweis, .aufklapp { break-inside: avoid; }
  .aufklapp:not([open]) > *:not(summary) { display: none; }
  .inhalt a { color: var(--tinte); text-decoration: none; }
  .lw-eingabe, .lw-auswahl, .lw-textfeld { border-width: 1px; background: transparent; min-height: 0; }
  .inhalt { line-height: 1.4; }
  .inhalt h2 { margin: 1.1rem 0 .5rem; font-size: 1.3rem; padding-top: .35rem; }
  .inhalt h3 { margin: 1rem 0 .4rem; }
  .inhalt p { margin-bottom: .6rem; }
  .zusammenfassung > div { padding: 4px 0; }
  .zusammenfassung code { font-size: 10px; word-break: break-all; }
  .stueckliste tbody th, .stueckliste tbody td, .stueckliste thead th { padding-top: 4px; padding-bottom: 4px; }
  .blatttitel { margin: 4px 0 12px; }
  .pfad { margin-top: 8px; }
  .druck-nur { display: block !important; }
  .unterschrift { border-style: solid; }
}
.druck-nur { display: none; }
