/* Bauwerk24 Demo: Musterbauwerksbuch. Eigenständige Stile, Schriften vom Hauptauftritt (selbst gehostet). */
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap }
@font-face { font-family: "Manrope"; src: url("fonts/manrope.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap }

:root {
  --bg: #f4f6f9; --fg: #1b2a44; --muted: #5b6577; --line: #c9d2de; --panel: #ffffff; --soft: #eef2f6; --stage: #e9e8e3;
  --accent: #1b2a44; --accent-fg: #ffffff; --befund: #b3261e;
  --katA: #3a8f5a; --katB: #8f9d2f; --katC: #d4861f; --katD: #b3261e; --katN: #8a94a3;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 10px; --shadow: 0 10px 30px rgba(27,42,68,.08);
}
* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h, 60px) + 54px) }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased }
a { color: inherit }
img, svg { max-width: 100%; height: auto }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 0 max(16px, env(safe-area-inset-right, 0px)) }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100 }
.skip:focus { left: 8px }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; line-height: 1.12; margin: 0 }
h1 { font-size: clamp(34px, 5vw, 56px) }
h2 { font-size: clamp(26px, 3.2vw, 36px) }
h3 { font-size: 21px }
p { margin: 0 0 12px }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px }
.lead { font-size: 18px; color: var(--muted); max-width: 70ch; margin: 12px 0 22px }
.note { color: var(--muted); font-size: 13.5px }

/* Kopfzeile */
.dtop { position: sticky; top: 0; z-index: 50; background: rgba(244,246,249,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line) }
.dtop .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; flex-wrap: wrap }
.brand { text-decoration: none; display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 0 }
.brand b { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.01em }
.brand span { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) }
.dnav { display: flex; gap: 2px; flex-wrap: wrap }
.dnav a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 11px; border-radius: 999px; color: var(--fg) }
.dnav a:hover { background: var(--soft) }
.dnav a[aria-current="page"] { background: var(--accent); color: var(--accent-fg) }
.dnav a.ext { color: var(--muted) }
.dnav a.ext::after { content: " ↗"; font-size: 12px }
.dnav-toggle { display: none; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer }
@media (max-width: 480px) { .brand span { display: none } }
@media (max-width: 860px) {
  .dnav-toggle { display: inline-block }
  .dnav { display: none; width: 100%; flex-direction: column; padding: 4px 0 12px }
  .dnav.open { display: flex }
}

/* Schaltflächen und Chips */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 11px 20px; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; line-height: 1.2 }
.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent) }
.btn-primary:hover { background: #142036 }
.btn-line { background: var(--panel); border-color: var(--line); color: var(--fg) }
.btn-line:hover { background: var(--soft) }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; padding-left: 10px; padding-right: 10px }
.btn-ghost:hover { background: var(--soft); color: var(--fg) }
.btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 0 }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 }
.kat { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; color: #fff; background: var(--katN); white-space: nowrap }
.kat-A { background: var(--katA) } .kat-B { background: var(--katB) } .kat-C { background: var(--katC) } .kat-D { background: var(--katD) }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); white-space: nowrap }

/* Startseite */
.hero { padding: 64px 0 40px; background: linear-gradient(180deg, #e9ecf2, var(--bg)) }
.hero h1 { max-width: 16ch }
.hero .lead { font-size: 19px }
.sec { padding: 48px 0 }
.sec + .sec { border-top: 1px solid var(--line) }
.ocards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 10px }
@media (max-width: 960px) { .ocards { grid-template-columns: 1fr } }
.ocard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease }
.ocard:hover { transform: translateY(-2px); box-shadow: var(--shadow) }
.oc-img { background: var(--stage); aspect-ratio: 16 / 10; position: relative; overflow: hidden }
.oc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; padding: 8px 0 0 }
.oc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1 }
.oc-body h3 { font-size: 24px }
.oc-body p { color: var(--muted); font-size: 15px }
.oc-body .more { margin-top: auto; color: var(--fg); font-weight: 700 }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 18px; position: relative; font-size: 15px; color: var(--muted) }
.steps li b { display: block; color: var(--fg); font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 0 0 6px }
.steps li::before { content: counter(s); position: absolute; right: 14px; top: 10px; font-family: var(--serif); font-size: 44px; color: var(--line); line-height: 1 }
.rules { background: var(--panel) }
.rulegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; margin: 10px 0 20px }
.rulegrid h3 { font-size: 19px; margin-bottom: 6px }
.rulegrid p { color: var(--muted); font-size: 15px }

/* Objektseite */
.obj-head { padding: 28px 0 24px; background: linear-gradient(180deg, #e9ecf2, var(--bg)) }
.crumb { font-size: 13px; color: var(--muted); margin: 0 0 18px }
.crumb a { text-decoration: none }
.obj-title { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px 40px; align-items: start }
@media (max-width: 900px) { .obj-title { grid-template-columns: 1fr } }
.addr { font-size: 17px; color: var(--muted); margin: 10px 0 4px }
.story { font-size: 17px; max-width: 64ch; margin-top: 12px }
.summary { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow) }
.summary h2 { font-size: 22px; margin-bottom: 10px }
.summary p { font-size: 14.5px; color: var(--muted); margin: 8px 0 0 }
.summary p b { color: var(--fg) }
.summary .next { font-size: 15px }
.bars { display: grid; gap: 6px }
.bar { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 8px }
.bar .kat { padding: 2px 0; text-align: center; font-size: 12px }
.bar i { display: block; height: 10px; border-radius: 5px; background: var(--soft); position: relative; overflow: hidden }
.bar i::after { content: ""; position: absolute; inset: 0; width: calc(var(--n) / var(--max) * 100%); background: var(--fg); opacity: .55; border-radius: 5px }
.bar b { font-size: 14px; text-align: right }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 24px; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line) }
.facts div { display: grid; gap: 1px }
.facts dt { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.facts dd { margin: 0; font-size: 15px }
.subnav { position: sticky; top: var(--top-h, 60px); z-index: 40; background: rgba(244,246,249,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line) }
.subnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-top: 6px; padding-bottom: 6px }
.subnav .wrap::-webkit-scrollbar { display: none }
.subnav a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 999px; white-space: nowrap; color: var(--muted) }
.subnav a:hover { background: var(--soft); color: var(--fg) }
.subnav a.on { background: var(--accent); color: var(--accent-fg) }


/* Tabellen */
.tblwrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius) }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top }
.tbl thead th { border-top: 0; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--soft) }
.tbl tr.grp th { background: #f8f9fb; font-family: var(--serif); font-weight: 500; font-size: 17px; color: var(--fg); letter-spacing: 0; text-transform: none; padding-top: 14px }
.tbl td.bt b { display: block }
.tbl td.bt small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; max-width: 46ch }
.tbl tbody tr[data-first] { cursor: pointer }
.tbl tbody tr[data-first]:hover { background: #f8f9fb }
.lage { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; margin: 0 4px 4px 0; color: var(--fg) }
.lage:hover { background: var(--accent); color: #fff; border-color: var(--accent) }
.frist { white-space: nowrap; font-variant-numeric: tabular-nums }
.frist.due, dd.due { color: var(--befund); font-weight: 700 }
.tbl-p { min-width: 640px }
.pst { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap }
.pst-ok { background: #e4f1e8; color: #2b6e45 } .pst-faellig { background: #fbeedb; color: #9a5b0c } .pst-ueberfaellig { background: #f8e1df; color: var(--befund) } .pst-offen { background: var(--soft); color: var(--fg) }

/* Maßnahmen */
.masslist { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 8px }
.mass { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px }
.mass.st-erledigt { opacity: .72 }
.mass .mh { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.mass h3 { font-size: 21px }
.mass .bt { font-size: 14px; color: var(--muted); margin: 0 }
.mass .bt a { font-weight: 700; color: var(--fg); text-decoration: none }
.mass p { font-size: 15px; margin: 0 }
.mass dl { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--line); overflow-wrap: anywhere }
.mass dt { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.mass dd { margin: 0; font-size: 14px }
.mass .btns { margin-top: 4px }
.prio { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted) }
.p-sofort { background: var(--befund); color: #fff } .p-hoch { background: #fbeedb; color: #9a5b0c }
.st { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em }
.st-beauftragt .st { color: #2b6e45 }

/* Dokumente und Historie */
.docs { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden }
.docs li { display: grid; grid-template-columns: 100px 1fr auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 15px }
.docs li:first-child { border-top: 0 }
.dtyp { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.ddat { color: var(--muted); font-size: 13.5px; white-space: nowrap }
@media (max-width: 640px) { .docs li { grid-template-columns: 1fr auto; } .dtyp { grid-column: 1 / -1 } .ddat { display: none } }
.timeline { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; max-width: 820px }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line) }
.timeline li:first-child { border-top: 0 }
.timeline time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); padding-top: 2px }
.timeline b { font-family: var(--serif); font-weight: 500; font-size: 19px; display: block; margin-bottom: 3px }
.timeline p { color: var(--muted); font-size: 15px; margin: 0 }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr } }
.cta { background: var(--accent); color: #fff }
.cta .lead { color: rgba(255,255,255,.8) }
.cta .btn-primary { background: #fff; color: var(--accent); border-color: #fff }
.cta .btn-line { background: transparent; color: #fff; border-color: rgba(255,255,255,.5) }

/* Fußzeile und Demo-Hinweis */
.dfoot { padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px }
.dfoot p { max-width: 90ch }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 10px; max-width: min(560px, calc(100vw - 32px)); font-size: 14.5px; line-height: 1.45; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 90 }
.toast.show { opacity: 1; transform: translate(-50%, 0) }
.toast b { display: block; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 3px }
