/* material.css — „Dasselbe Rohr, jedes Mal ein anderer Preis.“ (nur diese Seite).
   Richtung Katalog und Preisschild: Sandpapier als Grund, Kupfer und Tannengrün als Hausfarben,
   Preise in einer Schrift mit gleich breiten Ziffern. Die Seite ist bewusst nur hell (Papier). */

@font-face { font-family: "Bricolage Grotesque"; src: url("../../schrift/muster/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../../schrift/muster/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../../schrift/muster/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../../schrift/muster/schibsted-grotesk-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../../schrift/muster/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../../schrift/muster/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../../schrift/muster/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }

:root, :root[data-theme="light"] {
  color-scheme: light;
  --flaeche-0: #efe6d5;          /* Sand */
  --flaeche-1: #fbf7ee;          /* Papier */
  --flaeche-2: #e7dcc6;
  --linie: #cbbb9d;
  --raster: #e4d9c3;
  --text-1: #1c1912;
  --text-2: #4a4336;
  --text-3: #665d4e;
  --akzent: #1f5c4a;             /* Tannengrün */
  --akzent-text: #184c3d;
  --kupfer: #b5541c;
  --kupfer-text: #93410f;
  --tanne: #1f5c4a;
  --tanne-tief: #163f33;
  /* Reihenfarben: Platz 1 bis 8 gehören immer derselben Warengruppe */
  --s1: #b5541c; --s2: #1f6b56; --s3: #2b6cb0; --s4: #d39a1c;
  --s5: #8d4b86; --s6: #3b9db5; --s7: #6b6257; --s8: #96a03a;
  /* Lieferanten: eigene Reihe, dazu je Lieferant eine eigene Punktform */
  --l1: #2b6cb0; --l2: #c2571a; --l3: #154d3e; --l4: #d39a1c; --l5: #8d4b86; --l6: #6b6257;
  --gut-text: #184c3d; --kritisch-text: #93410f;
  --schatten: 0 1px 0 rgb(60 40 10 / .06), 0 10px 24px -16px rgb(60 40 10 / .35);
  --ziffern: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --kopfschrift: "Bricolage Grotesque", "Schibsted Grotesk", system-ui, sans-serif;
}

html { overflow-x: clip; }
body { overflow-x: clip; font-family: "Schibsted Grotesk", system-ui, sans-serif; font-size: 16px; font-variant-numeric: normal; }

/* Tastatur: sichtbarer Rahmen */
:focus-visible { outline: 2px solid var(--kupfer); outline-offset: 2px; border-radius: 4px; }
a:focus-visible, button:focus-visible, .knopf:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--kupfer); outline-offset: 2px; }
.knopf:has(input:focus-visible), .m-haken:has(input:focus-visible) { outline: 2px solid var(--kupfer); outline-offset: 2px; }

.breite { width: min(100% - 32px, 1600px); }

/* ---------- Kopfleiste und Titel ---------- */
.a-kopf { background: var(--tanne-tief); border-bottom: 0; }
.a-kopf .a-zurueck { color: #e9dfcb; }
.a-kopf .a-zurueck:hover { color: #fff; }
.a-kopf .a-name { color: #fbf7ee; font-family: var(--kopfschrift); font-weight: 600; letter-spacing: .01em; }
.a-kopf :focus-visible { outline-color: #f0b98f; }

.m-kopf { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr); gap: 32px 56px; align-items: end; padding: 44px 0 28px; }
.m-katalog { margin: 0 0 14px; font: 500 13px/1.2 var(--ziffern); color: var(--kupfer-text); }
.a-titel h1 { font-family: var(--kopfschrift); font-weight: 700; font-stretch: normal; font-size: clamp(34px, 5vw, 68px); line-height: .98; letter-spacing: -.025em; max-width: 13ch; margin-bottom: 18px; }
.a-titel p { font-size: 18px; max-width: 54ch; }
.a-schild { border-radius: 4px; background: var(--flaeche-1); border: 1px solid var(--linie); }
.a-schild i { background: var(--kupfer); }
.a-schild.eigen i { background: var(--tanne); }

/* Kennzahlen als Beleg: Zeile, Punktlinie, Zahl */
.m-beleg { background: var(--flaeche-1); border: 1px solid var(--linie); border-top: 6px solid var(--kupfer); padding: 18px 22px 16px; box-shadow: var(--schatten); min-width: 0; }
.m-beleg-titel { margin: 0 0 8px; font: 600 15px/1.2 var(--kopfschrift); color: var(--text-1); max-width: none; }
.m-beleg dl { margin: 0; }
.m-bz { display: grid; grid-template-columns: minmax(0, auto) minmax(12px, 1fr) auto; align-items: baseline; gap: 0 8px; padding: 7px 0; border-top: 1px dashed var(--linie); }
.m-bz:first-child { border-top: 0; }
.m-bz dt { font-size: 14px; color: var(--text-1); font-weight: 500; }
.m-bz .m-punkte { border-bottom: 2px dotted var(--linie); transform: translateY(-4px); }
.m-bz dd { margin: 0; font: 500 17px/1.2 var(--ziffern); color: var(--text-1); text-align: right; white-space: nowrap; }
.m-bz dd.gross { font-size: 22px; }
.m-bz .m-neben { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-3); margin: 1px 0 0; }
.m-beleg-fuss { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--linie); font-size: 12.5px; line-height: 1.45; color: var(--text-2); max-width: none; }
.a-titel p.m-beleg-fuss { font-size: 12.5px; }
.a-titel p.m-beleg-titel { font-size: 15px; }
.a-titel p.m-katalog { font-size: 13px; color: var(--kupfer-text); }
.a-titel p.m-beleg-titel { color: var(--text-1); }
.wort { font-family: "Schibsted Grotesk", system-ui, sans-serif; font-weight: 600; font-size: .8em; }
.rauf { color: var(--kupfer-text); }
.runter { color: var(--tanne); }
@media (max-width: 980px) { .m-kopf { grid-template-columns: 1fr; padding-top: 32px; } }

/* ---------- Ablage, Hinweis, Filter ---------- */
.ablage { border-radius: 4px; border-color: var(--tanne); }
.ablage svg { color: var(--kupfer); }
.knopf { border-radius: 4px; font-weight: 600; }
.knopf.leise { background: var(--flaeche-1); }
.ablage .vorlage-satz { display: block; margin-top: 6px; color: var(--text-1); }
.ablage .knoepfe { max-width: 330px; }
.ablage .vorlage-knopf { flex: 1 1 100%; border-style: dashed; border-color: var(--tanne); }
@media (max-width: 720px) { .ablage .knoepfe { max-width: none; } .ablage .vorlage-knopf { flex: 0 1 auto; } }
.m-hinweis { margin: -16px 0 20px; font-size: 14px; color: var(--text-2); max-width: 110ch; }
.m-haken { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: -12px 0 16px; font-size: 14px; }
.m-haken input { width: 18px; height: 18px; accent-color: var(--tanne); }
.m-wahl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 100%; }
select.feld { border-radius: 4px; max-width: 100%; }
.m-suche { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 12px; }
.m-suche label { display: inline-flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 100%; }
.m-suche select { max-width: min(100%, 420px); }
.m-eingabe { min-height: 42px; width: min(100%, 260px); padding: 0 12px; border-radius: 4px; border: 1px solid var(--linie); background: var(--flaeche-1); color: var(--text-1); font: inherit; font-size: 14px; }

/* ---------- Abschnitte und Karten ---------- */
.abschnitt { margin-top: 56px; }
.abschnitt.m-erst { margin-top: 20px; }
.abschnitt > h2 { font-family: var(--kopfschrift); font-size: clamp(24px, 2.4vw, 32px); font-weight: 650; letter-spacing: -.015em; line-height: 1.1; margin-bottom: 8px; }
.abschnitt > p.unter { max-width: 72ch; }
.gitter { gap: 14px; }
.karte { border-radius: 4px; padding: 20px 20px 16px; box-shadow: var(--schatten); }
.karte-kopf h2 { font-family: var(--kopfschrift); font-size: 18px; font-weight: 620; }
.karte-kopf .tabelle-knopf { border-radius: 4px; min-height: 36px; }
.gitter > .allein { grid-column: 1 / -1; }
.einsicht b { font-weight: 650; }
.tipp { border-radius: 4px; font-variant-numeric: tabular-nums; }
.tipp .t-zeile b { font-family: var(--ziffern); font-weight: 500; }
.tabelle-huelle { border-radius: 4px; }
table.daten td.z { font-family: var(--ziffern); }
.legende i { border-radius: 2px; }
.dia svg text { font-family: "Schibsted Grotesk", system-ui, sans-serif; }

/* ---------- Preisschilder ---------- */
.m-schilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 12px; margin: 0 0 14px; }
.m-schild {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 4px; text-align: left;
  padding: 14px 16px 12px; min-width: 0; cursor: pointer; font: inherit; color: var(--text-1);
  background: var(--flaeche-1); border: 1px solid var(--linie); border-radius: 4px 14px 4px 4px; box-shadow: var(--schatten);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.m-schild:hover { transform: translateY(-2px); border-color: var(--kupfer); }
.m-schild[aria-pressed="true"] { border-color: var(--tanne); box-shadow: inset 0 0 0 1.5px var(--tanne), var(--schatten); }
.m-loch { position: absolute; top: 12px; right: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--flaeche-0); border: 1.5px solid var(--linie); }
.m-schild[aria-pressed="true"] .m-loch { background: var(--kupfer); border-color: var(--kupfer); }
.m-s-gruppe { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); padding-right: 22px; }
.m-s-gruppe i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.m-s-name { font-family: var(--kopfschrift); font-weight: 600; font-size: 15.5px; line-height: 1.2; min-height: 2.4em; overflow-wrap: anywhere; }
.m-s-preis { font: 500 27px/1.1 var(--ziffern); letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; }
.m-s-preis small { font: 400 12px/1 "Schibsted Grotesk", system-ui, sans-serif; letter-spacing: 0; color: var(--text-3); margin-left: 6px; }
.m-s-aend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; padding-top: 7px; margin-top: 4px; border-top: 1px dashed var(--linie); font: 500 14px/1.2 var(--ziffern); }
.m-s-aend small { font: 400 12px/1.2 "Schibsted Grotesk", system-ui, sans-serif; color: var(--text-3); }
.m-s-aend.gleich { color: var(--text-2); }
.m-funke { display: block; width: 100%; height: 30px; margin-top: 4px; overflow: visible; }
.m-funke path { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 720px) {
  .m-schilder { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 12px; margin-inline: -2px; overscroll-behavior-x: contain; }
  .m-schild { flex: 0 0 216px; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { .m-schild { transition: none; } .m-schild:hover { transform: none; } }
.m-gross { border-top: 4px solid var(--tanne); }
.m-gross .karte-kopf h2 { font-size: 22px; }

/* ---------- eigene Diagramme ---------- */
.m-svg .m-achse { fill: var(--text-3); font-size: 11px; }
.m-svg .m-raster { stroke: var(--raster); stroke-width: 1; }
.m-svg .m-marke-text { fill: var(--text-1); font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--flaeche-1); stroke-width: 4px; stroke-linejoin: round; }
.m-svg .m-ring { fill: none; stroke: var(--text-1); stroke-width: 1.6; }
.m-svg .m-fuehr { stroke: var(--text-2); stroke-width: 1; }
.m-svg .m-faden { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.m-svg .m-treffer { fill: transparent; cursor: crosshair; }
.m-svg .m-bezug { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 5 4; }
.m-leg svg { width: 13px; height: 13px; flex: none; }

/* ---------- Balkenlisten ---------- */
.m-liste { display: grid; }
.m-zeile {
  display: grid; grid-template-columns: minmax(0, var(--nb, 230px)) minmax(40px, 1fr) minmax(var(--wb, 92px), auto);
  gap: 2px 12px; align-items: center; padding: 7px 0; border: 0; border-top: 1px solid var(--raster);
  background: none; font: inherit; color: inherit; text-align: left; width: 100%;
}
.m-zeile:first-child { border-top: 0; }
button.m-zeile { cursor: pointer; min-height: 44px; }
button.m-zeile:hover .m-name { color: var(--kupfer-text); }
button.m-zeile[aria-pressed="true"] { background: color-mix(in srgb, var(--tanne) 9%, transparent); box-shadow: inset 3px 0 0 var(--tanne); padding-left: 8px; }
.m-name { font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.m-name small { display: block; font-size: 12px; color: var(--text-3); }
.m-spur { position: relative; height: 16px; min-width: 0; border-left: 1px solid var(--linie); }
.m-spur i { position: absolute; top: 0; left: 0; height: 100%; min-width: 2px; border-radius: 0 2px 2px 0; transform-origin: 0 50%; animation: m-wachsen .7s cubic-bezier(.2,.7,.2,1) both; }
.m-spur.mitte { border-left: 0; }
.m-spur.mitte::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--text-3); }
.m-spur.mitte i.pos { left: 50%; }
.m-spur.mitte i.neg { left: auto; right: 50%; border-radius: 2px 0 0 2px; transform-origin: 100% 50%; }
.m-spur .m-strich { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--text-1); border-radius: 1px; }
.m-wert { font: 500 13px/1.3 var(--ziffern); text-align: right; white-space: nowrap; }
.m-wert small { display: block; font: 400 12px/1.3 "Schibsted Grotesk", system-ui, sans-serif; color: var(--text-3); white-space: normal; }
.m-leer { margin: 6px 0; font-size: 14px; color: var(--text-3); }
@keyframes m-wachsen { from { transform: scaleX(0); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .m-spur i { animation: none; } }
@media (max-width: 620px) {
  .m-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .m-name { grid-column: 1 / -1; }
  .m-wert { max-width: 48vw; }
}

/* Spanne: Punkte je Lieferant auf einer Linie */
.m-spur.punkte { border-left: 0; height: 22px; }
.m-spur.punkte::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--linie); }
.m-spur.punkte .m-band { position: absolute; top: 50%; height: 5px; margin-top: -2.5px; background: color-mix(in srgb, var(--kupfer) 35%, transparent); border-radius: 3px; }
.m-spur.punkte svg { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; overflow: visible; }
.m-zeile.punkte { grid-template-columns: minmax(0, var(--nb, 230px)) minmax(40px, 1fr) minmax(104px, auto); }
.m-zeile.punkte .m-spur { margin-inline: 8px; }
@media (max-width: 620px) { .m-zeile.punkte { grid-template-columns: minmax(0, 1fr) auto; } }

/* ABC: zwei gestapelte Balken */
.m-abc { display: grid; gap: 14px; margin-bottom: 14px; }
.m-abc p { margin: 0 0 4px; font-size: 13px; color: var(--text-2); }
.m-stapel { display: flex; height: 38px; gap: 2px; }
.m-stapel span { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; font: 500 12.5px/1 var(--ziffern); color: #fff; border-radius: 2px; }
.m-stapel .a { background: var(--tanne-tief); }
.m-stapel .b { background: var(--kupfer); }
.m-stapel .c { background: #cdbd9e; color: var(--text-1); }
.m-abc-leg { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--text-2); }
.m-abc-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.m-zwischen { margin: 16px 0 4px; font-size: 13px; font-weight: 600; color: var(--text-2); }

/* ---------- Tabellen dieser Seite ---------- */
.m-tabelle { overflow: auto; max-height: 440px; border: 1px solid var(--raster); border-radius: 4px; }
.m-tabelle table.daten td { white-space: nowrap; }
.m-tabelle table.daten td.breit { white-space: normal; min-width: 260px; max-width: 460px; }
.m-tabelle table.daten tfoot td { font-weight: 650; border-top: 2px solid var(--linie); border-bottom: 0; background: var(--flaeche-2); position: sticky; bottom: 0; }
.m-wisch { display: none; margin: 0 0 6px; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 900px) { .m-wisch { display: block; } }
#d-angebot { max-height: none; }
.m-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.m-tabelle select, .m-tabelle input[type="text"] { min-height: 40px; border-radius: 4px; border: 1px solid var(--linie); background: var(--flaeche-1); color: var(--text-1); font: inherit; font-size: 13.5px; padding: 0 10px; }
.m-tabelle select { max-width: 320px; }
.m-tabelle input[type="text"] { width: 84px; text-align: right; font-family: var(--ziffern); }
.m-weg { min-height: 40px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--linie); background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.m-weg:hover { color: var(--kupfer-text); border-color: var(--kupfer); }
.status.pruefen { color: var(--kupfer-text); }
.status.info { color: var(--text-2); }

/* Summen des Angebots als drei Schilder */
.m-summen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 2px 0 16px; }
.m-summe { padding: 12px 16px 14px; background: var(--flaeche-0); border: 1px solid var(--linie); border-radius: 4px 14px 4px 4px; min-width: 0; }
.m-summe p { margin: 0; font-size: 13px; color: var(--text-2); }
.m-summe b { display: block; margin-top: 4px; font: 500 clamp(22px, 2.4vw, 32px)/1.1 var(--ziffern); letter-spacing: -.02em; white-space: nowrap; }
.m-summe.haupt { background: var(--tanne-tief); border-color: var(--tanne-tief); }
.m-summe.haupt p, .m-summe.haupt b, .m-summe.haupt span { color: #fbf7ee; }
.m-summe span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
@media (max-width: 720px) { .m-summen { grid-template-columns: 1fr; } }

/* Budgets je Baustelle */
.m-budgets { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.m-budgets:empty { display: none; }
.m-budgets > p { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--text-2); }
.m-feld { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); max-width: 100%; }
.m-feld span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.m-feld input { width: 92px; min-height: 42px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--linie); background: var(--flaeche-1); color: var(--text-1); font: 500 14px var(--ziffern); text-align: right; }

/* ---------- Fuß ---------- */
.a-fuss { background: var(--tanne-tief); border-top: 0; color: #dcd2bd; margin-top: 72px; }
.a-fuss a { color: #fbf7ee; }
.a-fuss .zeichen-link { color: #dcd2bd; border-radius: 4px; }
.a-fuss .zeichen-link:hover { color: #fff; background: rgb(255 255 255 / .1); }
.a-fuss :focus-visible { outline-color: #f0b98f; }

/* Handy: Befunde als Kärtchen statt als breite Tabelle, schmalere Artikelwahl in der Stückliste */
.m-nur-handy { display: none; }
@media (max-width: 720px) {
  #d-qual { max-height: none; border: 0; }
  #d-qual table.daten, #d-qual tbody, #d-qual tr, #d-qual td { display: block; }
  #d-qual thead { display: none; }
  #d-qual tr { padding: 10px 0; border-top: 1px solid var(--linie); }
  #d-qual td, #d-qual td.breit, #d-qual td.z { border: 0; padding: 2px 0; white-space: normal; min-width: 0; max-width: none; text-align: left; font-family: inherit; }
  #k-qual .m-wisch { display: none; }
  .m-nur-handy { display: inline; }
  .m-tabelle select { max-width: 178px; }
}

/* Feinschliff: ausgewogene Überschriften, Knöpfe ohne Umbruch, gedrückter Zustand */
.a-titel h1, .abschnitt > h2, .karte-kopf h2 { text-wrap: balance; }
.knopf, .m-weg, .tabelle-knopf { white-space: nowrap; }
.knopf:active, .m-weg:active, .m-schild:active { transform: translateY(1px); }

/* Druck: Knopf zum Entfernen einer Stücklisten-Zeile nicht drucken */
html.druckt .m-weg { display: none !important; }

/* Verweis auf „Datei erkennen lassen“ */
.erkennen-satz { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); }
.erkennen-satz a { color: var(--akzent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
