:root{
  /* DIT-Farben an die Konfigurator-UI angepasst */
  --bg:#f6f8fb;
  --text:#0f1b2d;
  --muted:#6b7280;
  --shadow:var(--shadow-md); /* kommt aus dit-styles-v2.css */
  --accent:var(--accent);    /* übernimmt das Gelb aus der Hauptseite */
  --danger:#e53935;
  --danger-bg:#fff3f3;
  --danger-border:#f5b2b2;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font:16px/1.65 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:var(--soft); /* weicher Hintergrund wie auf der Hauptseite */
}

a{
  color:inherit;
  text-decoration:none;
  transition:.15s ease;
}


.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 22px;
  background:#ffffff;
  border-bottom:1px solid #e5e7eb;
  box-shadow:var(--shadow-sm);
}

.brand{
  font-weight:700;
  letter-spacing:.02em;
  color:var(--ink);
}

.topnav a{
  margin-left:16px;
  font-weight:500;
  color:var(--muted);
}

.topnav a:hover{
  color:#000;
}

.topnav a.active{
  color:#000;
  border-bottom:2px solid var(--accent);
  padding-bottom:2px;
}


.container{max-width:1400px;margin:24px auto;padding:0 18px}
.three-col{display:grid;grid-template-columns:380px 1fr 380px;gap:18px}
@media (max-width:1250px){.three-col{grid-template-columns:1fr}}

.panel{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow-md);
}


.section-title{font-size:22px;font-weight:800;margin:0 0 8px}
.divider{border:none;border-top:1px solid #eef2f7;margin:14px 0}
.muted{color:var(--muted)}

.primary,
.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:.75rem 1.1rem;
  border-radius:var(--pill);
  font-weight:600;
  border:1px solid transparent;
  cursor:pointer;
  transition:
    transform .15s ease,
    background-color .15s ease,
    border-color .15s ease,
    color .15s ease;
}

/* „Haupt“-Button */
.primary{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
  box-shadow:var(--shadow-sm);
}

.primary:hover{
  transform:translateY(-1px);
  background:var(--accent);
  border-color:var(--accent);
  color:#0b1324;
}

/* Sekundär-Button / Chip */
.chip{
  background:#fff;
  border-color:var(--soft-2);
  color:var(--ink);
}

.chip:hover{
  border-color:var(--accent);
}

.btn-row{display:flex;gap:10px;flex-wrap:wrap}
.btn-row.mt{margin-top:12px}

.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.form-grid .form-row{min-width:0}
@media (max-width:640px){.form-grid{grid-template-columns:1fr}}
.form-row{display:flex;flex-direction:column}
label{font-weight:700;margin-bottom:6px;color:#102338;line-height:1.1}
input:not([type="checkbox"]),select{
  min-height:44px;padding:10px 12px;border:1px solid #d8dee9;border-radius:12px;background:#fff;font-size:15px;width:100%;
}
input:focus:not([type="checkbox"]),select:focus{outline:3px solid #e7f0ff;border-color:#c8d6f0}
.checkbox-row{display:flex;gap:22px;align-items:center;margin:8px 0}
input[type="checkbox"]{appearance:auto;width:18px;height:18px;margin-right:8px;vertical-align:middle}

.status{margin:10px 0;padding:10px;border-radius:12px;font-weight:700}
.status.ok{background:#f0fff4;border:1px solid #b8f1c2;color:#196c2e}
.status.err{background:var(--danger-bg);border:1px solid var(--danger-border);color:var(--danger)}

.canvas-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.svg-wrap{position:relative;width:100%;height:520px;border:1px dashed #c9d3e6;border-radius:16px;background:#fff;overflow:hidden}
.hint{position:absolute;left:12px;bottom:10px;font-size:12px;color:#7f8aa3;background:rgba(255,255,255,.85);padding:6px 10px;border-radius:10px;pointer-events:none}
svg .plate{fill:#cfcfcf;stroke:#777;stroke-width:2}
svg .dim{stroke:var(--accent);stroke-width:2}
svg .dimtext{fill:var(--accent);font-size:14px;font-family:Segoe UI,Arial,sans-serif}
svg .cut{fill:#dde2ea;stroke:#2e3a49;stroke-width:2}

.cutout-list{margin-top:12px;display:flex;flex-direction:column;gap:12px}

/* Akkordeon für Ausschnitte */
.card{border:1px solid #e2e8f0;border-radius:12px;background:linear-gradient(180deg,#fff,#fefefe)}
.card-hdr{
  display:flex;align-items:center;justify-content:space-between;padding:10px 12px;cursor:pointer;user-select:none
}
.card-hdr h4{margin:0;font-size:15px}
.chev{transition:transform .15s ease;display:inline-block}
.card.collapsed .chev{transform:rotate(-90deg)}
.card-body{padding:12px;border-top:1px solid #eef2f7}
.card.collapsed .card-body{display:none}

.row2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media (max-width:640px){.row2{grid-template-columns:1fr}}

.footer{
  max-width:var(--container);
  margin:32px auto 40px;
  padding:12px 18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-top:3px solid var(--accent);
  color:#fff;
  background:#808080; /* wie Footer der Hauptseite */
}

.footer a{
  color:#fff;
  font-weight:500;
}

.footer a:hover{
  text-decoration:underline;
}

/* --- Meta-Zeile (Maßstab / Zeichenfläche) im Vorschau-Header ausblenden --- */
#topScale,
#sideScale,
#scaleInfo,
.canvas-header .muted,
.canvas-header .meta,
.canvas-header .right {
  display: none !important;
}

/* Topbar an Website-Look anlehnen */
.topbar{
  background:#ffffff;
  border-bottom:3px solid var(--accent);
  box-shadow:0 4px 12px rgba(15,23,42,.06);
  position:sticky;
  top:0;
  z-index:20;
}

.topbar-inner{
  max-width:1100px;
  margin:0 auto;
  padding:10px 16px;
  display:flex;
  align-items:center;
  gap:16px;
}

.topbar-logo img{
  display:block;
  height:34px;
}

.brand{
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:12px;
  color:var(--muted);
}

.topnav{
  margin-left:auto;
  display:flex;
  gap:10px;
}

.topnav a{
  padding:6px 10px;
  border-radius:999px;
  font-weight:600;
  color:var(--text);
  text-decoration:none;
}

.topnav a:hover{
  background:var(--soft);
}

.topnav a.active{
  background:var(--accent);
  color:#fff;
}

/* Footer */
footer{background:#808080;color:#fff;border-top:3px solid var(--accent)}
footer .inner{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:16px 0;flex-wrap:wrap}
footer .links ul{list-style:none;margin:0;padding:0;display:flex;gap:.8rem;flex-wrap:wrap}
footer a,footer button{color:#fff;background:transparent;border:0;padding:.4rem .6rem;border-radius:8px;font-weight:800}
footer a:hover,footer button:hover{background:rgba(255,255,255,.13)}

html, body { height: 100%; }

body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main{
  flex: 1 0 auto; /* schiebt den Footer nach unten */
}

footer{
  margin-top: auto;
}

/* Modernere Topbar / Navigation */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.topbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

.brand{
  font-weight: 900;
  letter-spacing: .2px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}

.topnav{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap; /* bricht sauber um, falls zu wenig Platz */
}

.topnav a{
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.topnav a:hover{
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.08);
  transform: translateY(-1px);
}

.topnav a.active,
.topnav a[aria-current="page"]{
  background: rgba(21,51,87,.10);
  border-color: rgba(21,51,87,.18);
}
