/* Layout + Branding der Eingabeseite. Farben/Schrift: HdS (Public Sans, Grün #7d9b38) – Feinabgleich folgt per DevTools. */
:root {
  --accent: #7d9b38; --accent-dark: #6d8731; --accent-soft: rgba(125, 155, 56, .12);
  --bg: #f5f7fa; --surface: #fff; --ink: #1e2226; --muted: #5c6670; --line: #d9dfe3;
  --warn: #9a4a06; --warn-bg: #fdeedc; --ok: #4a7a1f;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Public Sans", system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 5; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.top-in { display: flex; align-items: center; gap: 20px; padding: 10px 24px; max-width: 1500px; margin: 0 auto; }
.logo-main { height: 40px; object-fit: contain; }
.brand { font-weight: 700; font-size: 20px; line-height: 1.1; }
.brand small { display: block; font-weight: 400; font-size: 12px; opacity: .85; }
.progress { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.bar { width: 160px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.bar i { display: block; height: 100%; background: #fff; width: 0; transition: width .3s; }
.progress span { font-size: 13px; white-space: nowrap; }

.btn { border: 0; border-radius: 6px; padding: 10px 16px; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--accent-soft); }

.wrap { max-width: 1500px; margin: 0 auto; }
.form { max-width: 760px; margin: 0 auto; padding: 24px 32px 120px; background: var(--surface); min-height: calc(100vh - 60px); }
body.mode-pv .form, body:not(.mode-pv) .pv { display: none; }

/* Umschalter Eingabe / Vorschau in der Kopfzeile */
.seg.modes { margin-left: 24px; background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); }
.seg.modes button { color: #fff; font-size: 14px; padding: 6px 16px; }
.seg.modes button[aria-selected=true] { background: #fff; color: var(--accent-dark); }
.demo { display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }

/* SurveyJS-Feinschliff */
#surveyElement .sd-root-modern { --sd-base-padding: 0; background: transparent; }
#surveyElement .sd-title.sd-container-modern__title { padding-left: 0; }
#surveyElement .sd-description { color: var(--muted); }
#surveyElement .sd-panel__title { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; margin-top: 0; }
#surveyElement .sd-element--with-frame { box-shadow: none; }
/* Kompakt: kleinere Hinweistexte, weniger Luft zwischen Titel, Hinweis und Feld */
#surveyElement .sd-question__description { font-size: 12.5px; line-height: 1.4; margin-top: 1px; }
/* Hinweistexte nur beim Bearbeiten (Fokus im Feld) oder bei einem Fehler zeigen */
#surveyElement .sd-question:not(:focus-within):not(.sd-question--error) > .sd-question__header .sd-question__description { display: none; }
#surveyElement .sd-question__header--location-top { padding-bottom: 4px; }
#surveyElement .sd-question__title { font-size: 14px; font-weight: 600; }
#surveyElement .sd-title.sd-container-modern__title .sd-description { font-size: 14px; }
#surveyElement .sd-title.sd-container-modern__title h3 { font-size: 26px; }
#surveyElement .sd-paneldynamic__panel-wrapper { padding-top: 6px; padding-bottom: 6px; }
#surveyElement .sd-item { padding-top: 2px; padding-bottom: 2px; }
/* Upload-Flächen flacher */
#surveyElement .sd-file { height: 130px; min-height: 0; }
#surveyElement .sd-file__drag-area, #surveyElement .sd-file__decorator, #surveyElement .sd-file__list { height: 100%; min-height: 0; }
#surveyElement .sd-question__erbox { font-size: 12.5px; padding: 6px 10px; }
.vw-cnt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }
.vw-cnt.ok { color: var(--ok); }
.vw-cnt.bad { color: var(--warn); }

/* Vorschau-Spalte */
.pv { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.pv-bar { position: sticky; top: 60px; z-index: 4; background: var(--bg); }
.screen [data-p] { cursor: pointer; }
.pv-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.pv-bar .t { font-weight: 600; margin-right: auto; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 5px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--ink); color: #fff; }
.stage { flex: 1; padding: 28px 24px 60px; display: flex; justify-content: center; align-items: flex-start; }

/* Bestätigung */
.done { display: none; max-width: 600px; margin: 80px auto; padding: 0 24px; }
.done h2 { font-size: 30px; line-height: 1.1; margin: 0 0 14px; }
.done p { color: var(--muted); }
.done .note { font-size: 13px; }
.done .actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
body.sent .wrap { display: none; }
body.sent .done { display: block; }

/* Mobil */
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
  .seg.modes { margin-left: 0; order: 3; }
  .form { padding: 20px 16px 110px; }
  .progress .bar { width: 90px; }
  .brand small { display: none; }
  .pv-bar { top: 104px; padding: 12px 16px; }
  .stage { padding: 16px 8px 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
