:root {
  --orange:       #ef7300;
  --orange-dark:  #c45f00;
  --orange-light: #fdf3e7;
  --green:        #27a047;
  --black:        #1a1a1a;
  --dark:         #4b4948;
  --gray:         #7a7877;
  --light:        #f4f4f4;
  --rule:         #e0e0e0;
  --white:        #ffffff;
  --shadow:       0 2px 16px rgba(0,0,0,0.07);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--light);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  color: var(--black);
  font-size: 16px;
  line-height: 1.5;
}

.progress-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress-wrap[hidden] { display: none; }
.progress-track {
  flex: 1;
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.35s ease;
  width: 0%;
}
.progress-label { font-size: 12px; color: var(--gray); white-space: nowrap; }

.wizard {
  min-height: calc(100vh - 45px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 16px 72px;
}
.is-embedded .wizard { min-height: 0; }
.is-embedded body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.is-embedded .wizard { flex: 1 0 auto; }
.is-embedded .page-footer { flex: 0 0 auto; }

.step { display: none; width: 100%; max-width: 680px; }
.step.step-wide { max-width: 920px; }
.step.active { display: block; }

.step-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow);
}
.step-card.center { text-align: center; padding: 56px 40px; }

.intro-card .tag {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  margin-bottom: 20px;
}
.intro-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--black);
}
.intro-card .lead {
  color: var(--dark);
  font-size: 17px;
  max-width: 520px;
  margin: 0 0 28px;
}
.feature-list {
  list-style: none;
  padding: 0; margin: 0 0 32px;
  display: flex; flex-direction: column; gap: 10px;
}
.feature-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--dark);
}
.tick {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.contact-line { margin: 16px 0 0; font-size: 14px; color: var(--gray); }
.contact-line a { color: var(--orange); font-weight: 700; text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }

.step-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: var(--black); }
.step-hint    { margin: 0 0 22px; color: var(--gray); font-size: 14px; }

.addr-grid {
  display: grid;
  grid-template-columns: 2fr 0.8fr 0.8fr 1.6fr;
  gap: 12px;
  margin-bottom: 8px;
}
.addr-hint { margin: 0 0 24px; font-size: 12px; color: var(--gray); }
.field { display: block; position: relative; }

.ac-dropdown {
  position: absolute;
  top: calc(100% + 2px); left: 0; right: 0;
  z-index: 50;
  background: var(--white);
  border: 1px solid var(--rule);
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.ac-dropdown[hidden] { display: none; }
.ac-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.active {
  background: var(--orange-light);
}
.ac-main { font-size: 14px; font-weight: 600; color: var(--black); line-height: 1.3; }
.ac-sub  { font-size: 12px; color: var(--gray); margin-top: 2px; }
.ac-empty { padding: 12px 14px; font-size: 13px; color: var(--gray); }
.ac-attrib {
  padding: 5px 14px 7px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--gray);
  text-align: right;
  white-space: nowrap;
  border-top: 1px solid var(--rule, #e6e6e6);
  background: #fafafa;
}
.field > span {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--dark); margin-bottom: 6px;
}
/* Ein Feld-Look fuer alle Eingaben (Text, E-Mail, Telefon, Kommentar):
   gleiche Kante, gleicher Rahmen, gleicher Platzhalter. */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--white);
  color: var(--black);
  font: inherit; font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
  height: 48px;
  padding: 0 14px;
}
textarea {
  /* block statt inline-block: sonst bleibt unter dem Feld eine
     Baseline-Luecke, an der sich absolut positionierte Kinder verrechnen. */
  display: block;
  padding: 12px 14px;
}
input::placeholder,
textarea::placeholder {
  /* opacity: 1 — Firefox dimmt den Platzhalter sonst zusaetzlich ab. */
  color: var(--gray);
  opacity: 1;
}
input:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(239,115,0,0.13);
}

.choice-grid { display: grid; gap: 12px; margin-bottom: 24px; }
.choice-grid.four { grid-template-columns: repeat(4, 1fr); }
.choice-grid.two  { grid-template-columns: 1fr 1fr; }

.choice {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 20px 12px;
  border: 1.5px solid var(--rule);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center; font: inherit;
}
.choice:hover, .choice.selected {
  border-color: var(--orange);
  background: var(--orange-light);
}
.choice-wide {
  align-items: flex-start; text-align: left; padding: 20px;
}
.choice strong { font-size: 14px; color: var(--black); display: block; line-height: 1.3; }
.choice-sub    { font-size: 12px; color: var(--gray); display: block; margin-top: 4px; line-height: 1.4; }

.choice-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--orange-light);
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  font-size: 11px; font-weight: 800; color: var(--orange);
  letter-spacing: 0.03em;
  transition: background 0.15s, border-color 0.15s;
}
.choice:hover .choice-badge,
.choice.selected .choice-badge {
  background: var(--orange); color: var(--white); border-color: var(--orange);
}

.roof-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--light);
  border: 1px solid var(--rule);
  margin: 18px 0 18px;
  overflow: hidden;
}
.roof-preview img,
.confirm-map {
  width: 100%;
  height: 100%;
  display: block;
}
.roof-preview img {
  object-fit: cover;
}
.confirm-actions {
  margin-top: 0;
}

/* Die Demo verwendet dieselbe Dachansicht zur Bestätigung und Modulkorrektur. */
.roof-preview[hidden],
.roof-scene[hidden],
.address-analysis-progress[hidden],
#step-roof[hidden],
#roof-image-status[hidden],
#roof-selection-error[hidden],
.result-tick[hidden],
.contact-section[hidden] { display: none; }
.address-analysis-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 14px;
  color: var(--dark);
  background: var(--orange-light);
  font-size: 13px;
}
.analysis-spinner {
  flex: 0 0 24px;
  height: 24px;
  border: 2px solid var(--rule);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.roof-optional { margin: 0 0 8px; font-size: 12px; color: var(--orange-dark); font-weight: 700; }
.roof-scene { position: relative; margin: 18px 0; border: 1px solid var(--rule); background: #e6e9e6; }
.roof-viewport { width: 100%; aspect-ratio: 16 / 10; overflow: auto; overscroll-behavior: contain; }
.roof-canvas { width: 100%; height: 100%; position: relative; }
#roof-image, #roof-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#roof-image { object-fit: contain; user-select: none; -webkit-user-drag: none; }
#roof-svg { overflow: visible; }
.roof-viewport.is-zoomed { cursor: grab; }
.roof-viewport.is-zoomed:active { cursor: grabbing; }
.roof-image-credit { position: absolute; right: 0; bottom: 0; padding: 2px 5px; font-size: 9px; color: #303630; background: rgba(255,255,255,.9); pointer-events: none; }
.roof-image-status { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; padding: 22px; text-align: center; color: var(--dark); background: var(--light); font-size: 14px; }
#roof-panels.is-hidden { visibility: hidden; }
.roof-scene:not(.image-ready) #roof-panels { visibility: hidden; }
.roof-panel { cursor: pointer; outline: none; }
.roof-panel polygon { fill: rgba(23, 95, 162, .20); stroke: #d9eeff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; transition: fill .15s; }
.roof-panel:hover polygon { fill: rgba(63, 147, 220, .45); stroke: white; }
.roof-panel:focus-visible polygon { stroke: #ffdc55; stroke-width: 3px; }
.roof-panel line { display: none; pointer-events: none; stroke: #ff7373; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.roof-panel.is-excluded polygon { fill: rgba(158, 19, 28, .18); stroke: #ff7373; stroke-width: 2px; }
.roof-panel.is-excluded line { display: block; }
.roof-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.roof-zoom-controls { display: flex; align-items: center; gap: 8px; }
#roof-zoom-level { min-width: 48px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--dark); }
.roof-tool { min-height: 44px; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--dark); background: white; border: 1px solid var(--rule); cursor: pointer; }
.roof-tool:hover { border-color: var(--orange); }
.roof-tool[aria-pressed="true"] { color: var(--orange-dark); border-color: var(--orange); background: var(--orange-light); }
.roof-tool:disabled, .roof-reset:disabled { opacity: .45; cursor: default; }
.roof-tool.roof-zoom { width: 44px; padding: 0; font-size: 22px; }
.roof-tool:focus-visible, .roof-reset:focus-visible, .roof-skip:focus-visible, .roof-viewport:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.roof-pan-hint { margin: 8px 0 16px; color: var(--gray); font-size: 12px; }
.roof-selection-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; background: var(--orange-light); }
#roof-remaining { display: block; color: var(--black); font-size: 17px; }
#roof-excluded-count { display: block; color: var(--dark); font-size: 12px; margin-top: 2px; }
.roof-reset { min-height: 44px; padding: 6px 0 6px 8px; border: 0; background: none; font: inherit; font-size: 12px; color: var(--dark); text-decoration: underline; cursor: pointer; }
.roof-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--gray); font-size: 11px; margin: 12px 0 0; }
.roof-legend-panel { display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 16px; border: 1.5px solid #397cb6; background: #dce8f2; }
.roof-legend-panel.excluded { margin-left: 10px; background: #fff2f2; border-color: #c23737; color: #c23737; line-height: 1; font-size: 15px; }
.roof-nav { justify-content: space-between; }
.roof-skip { display: block; width: 100%; padding: 14px 0 0; min-height: 44px; margin-top: 8px; border: 0; background: none; color: var(--gray); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: 12px; cursor: pointer; }
.roof-skip:hover { color: var(--dark); }
#btn-confirm-yes:disabled { cursor: wait; opacity: .55; }
@media (max-width: 620px) {
  .roof-viewport { aspect-ratio: 1; }
  .roof-nav { gap: 8px; }
  .roof-nav .btn-primary { padding: 0 16px; flex: 1; }
  .roof-nav .btn-ghost { padding: 0 14px; }
  .roof-selection-summary { padding: 12px; }
  #roof-remaining { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .roof-panel polygon { transition: none; }
}

.persons-label { font-size: 14px; color: var(--dark); margin: 0 0 12px; }
.persons-grid  {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 24px;
}
.persons-btn {
  padding: 14px 8px; border: 1.5px solid var(--rule);
  background: var(--white); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700;
  text-align: center; line-height: 1.4;
  transition: border-color 0.15s, background 0.15s;
}
.persons-btn span { font-weight: 400; color: var(--gray); font-size: 11px; }
.persons-btn:hover, .persons-btn.selected {
  border-color: var(--orange); background: var(--orange-light);
}

.mode-tabs {
  display: inline-flex; margin-bottom: 20px;
  border: 1px solid var(--rule); overflow: hidden;
}
.mode-tab {
  padding: 8px 16px; border: 0; border-right: 1px solid var(--rule);
  background: var(--white); font: inherit; font-size: 13px;
  cursor: pointer; color: var(--gray);
}
.mode-tab:last-child { border-right: 0; }
.mode-tab.active { background: var(--orange); color: var(--white); font-weight: 700; }

.kwh-row { display: flex; align-items: center; gap: 10px; }
.kwh-unit { font-size: 14px; color: var(--gray); }

.info-banner {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 24px; background: var(--orange-light);
  border-left: 4px solid var(--orange);
}
.info-icon-wrap {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange); flex-shrink: 0; position: relative;
}
.info-icon-wrap::after {
  content: 'i';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 15px;
}
.info-banner h3 { margin: 0 0 8px; font-size: 18px; color: var(--black); }
.info-banner p  { margin: 0; color: var(--dark); font-size: 14px; line-height: 1.5; }

.nav-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 24px; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 28px;
  background: var(--orange); color: var(--white);
  font: inherit; font-size: 15px; font-weight: 700;
  border: 0; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-primary:hover    { background: var(--orange-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-primary.loading  { cursor: wait; }
.btn-lg { height: 52px; font-size: 16px; }

.btn-ghost {
  display: inline-flex; align-items: center;
  height: 48px; padding: 0 20px;
  background: transparent; border: 1px solid var(--rule);
  color: var(--gray); font: inherit; font-size: 14px;
  cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--dark); color: var(--dark); }

.spinner {
  width: 48px; height: 48px; margin: 0 auto 28px;
  border: 3px solid var(--rule); border-top-color: var(--orange);
  border-radius: 50%;
  display: block;
  transform-origin: 50% 50%;
  animation: spin 0.85s linear infinite;
  -webkit-animation: spin 0.85s linear infinite;
  }
@keyframes spin { to { transform: rotate(360deg); } }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }

.gen-steps { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.gen-step  { font-size: 15px; color: var(--rule); transition: color 0.4s; }
.gen-step.active { color: var(--dark); font-weight: 600; }
.gen-step.done   { color: var(--green); }
.gen-step.done::before { content: '\2713\00a0'; }

.result-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.result-tick {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.result-head h2 { margin: 0; font-size: 22px; }
.result-head p  { margin: 4px 0 0; color: var(--gray); font-size: 14px; }

.result-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.btn-download { flex: 1; min-width: 200px; }
.result-actions .btn-primary,
.result-actions .btn-ghost { gap: 9px; }   .btn-icon { flex-shrink: 0; }
.map-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 18px;
}
.mode-chip {
  appearance: none;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 11px;
  cursor: pointer;
}
.mode-chip.active {
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: inset 0 -2px 0 var(--orange);
}
.mode-chip:disabled {
  cursor: wait;
  opacity: 0.65;
}

.pdf-preview {
  position: relative;
  width: 100%;
  background: var(--light);
  border: 1px solid var(--rule);
  margin-bottom: 28px;
  overflow: hidden;
}
.pdf-preview iframe {
  width: 100%;
  height: 820px;
  border: 0;
  display: block;
  background: var(--light);
}
@media (max-width: 700px) {
  .pdf-preview iframe { height: 600px; }
  .result-actions { flex-direction: column; gap: 12px; }
  .result-actions .btn-primary,
  .result-actions .btn-ghost {
    width: 100%;
    height: 54px;
    justify-content: center;
    font-size: 16px;
    border-radius: 12px;
  }
}

.pdf-mobile-note { display: none; }
@media (hover: none) and (pointer: coarse) {
  .pdf-preview { display: none; }
  .pdf-mobile-note {
    display: block;
    background: var(--orange-light);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 18px 16px;
    margin-bottom: 28px;
    color: var(--dark);
    font-size: 14px;
    line-height: 1.5;
  }
  #btn-fullscreen {
    order: -1;
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
    font-weight: 700;
  }
  #btn-fullscreen:hover { border-color: var(--orange); color: var(--white); }
  .btn-download {
    background: var(--white);
    border: 1px solid var(--orange);
    color: var(--orange);
  }
  .btn-download:hover { background: var(--orange-light); }
}

.contact-section {
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.contact-section h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.25;
}
.contact-section > p {
  max-width: 700px;
  color: var(--gray);
  font-size: 14px;
  margin: 0 0 14px;
}
.contact-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  margin: 0 0 18px;
}
.contact-flow span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--dark);
  font-size: 13px;
  font-weight: 650;
}
.contact-flow svg {
  flex: 0 0 auto;
  color: var(--green);
}
.contact-how {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--gray);
  font-size: 13px;
  margin: 0 0 10px;
}
.contact-how strong {
  color: var(--dark);
  font-size: 14px;
}
.contact-how span { text-align: right; }
.contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}
.contact-or {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.contact-comment {
  display: block;
  margin-bottom: 14px;
}
.contact-comment > span:first-child {
  display: block;
  margin-bottom: 6px;
}
.contact-comment small {
  color: var(--gray);
  font-weight: 400;
}
/* Der Rahmen sitzt auf der Huelle, nicht auf dem Textfeld — dadurch steht der
   Zaehler innerhalb des Rahmens, aber ausserhalb der Textflaeche. Text kann
   also nie dahinter verschwinden, auch nicht beim Scrollen. */
.comment-box {
  display: block;
  background: var(--white);
  border: 1px solid var(--rule);
  transition: border-color 0.15s;
}
.comment-box:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(239,115,0,0.13);
}
.comment-box textarea {
  min-height: 86px;
  resize: vertical;
  /* Rahmen und Fokusring liegen auf .comment-box, sonst doppelt. */
  border: 0;
  padding-bottom: 4px;
}
.comment-box textarea:focus { box-shadow: none; }
.comment-box .character-count {
  display: block;
  padding: 0 14px 8px;
  text-align: right;
  font-size: 11.5px;
  line-height: 1.4;
}
.status { font-size: 14px; color: var(--gray); margin: 10px 0 0; min-height: 20px; }
.status.error   { color: #c0392b; }
.status.success { color: var(--green); font-weight: 600; }

.privacy-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--gray);
  line-height: 1.5;
}
.privacy-note a { color: var(--gray); text-decoration: underline; }
.privacy-note a:hover { color: var(--dark); }

/* Einwilligung vor dem Absenden (Art. 6 Abs. 1 lit. a, Art. 7 DSGVO).
   Gestufte Darstellung: Details hinter einem Klick, damit das Formular nicht
   von Rechtstext erschlagen wird. Sichtbar bleiben müssen die
   Einwilligungserklärung selbst und der Widerrufshinweis — deshalb stehen
   .consent-check und .consent-summary ausserhalb des <details>. */
.consent-details {
  margin: 4px 0 10px;
  font-size: 12.5px;
}
.consent-details > summary {
  cursor: pointer;
  padding: 8px 10px;
  background: var(--light);
  color: var(--dark);
  list-style: none;
  user-select: none;
}
.consent-details > summary::-webkit-details-marker { display: none; }
/* Eigenes Dreieck, damit es in beiden Zuständen gleich aussieht (Safari/Firefox
   rendern den Standardmarker unterschiedlich). */
.consent-details > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.15s ease;
}
.consent-details[open] > summary::before { transform: rotate(90deg); }
.consent-details > summary:hover { color: var(--black); }
.consent-details > summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.consent-block {
  margin: 8px 0 0;
  padding: 12px 14px;
  background: var(--light);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dark);
}
.consent-block p { margin: 8px 0 0; }

.consent-summary {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--gray);
}
.consent-block a { color: var(--dark); text-decoration: underline; }
.consent-block a:hover { color: var(--black); }
.consent-list {
  margin: 0;
  padding-left: 18px;
}
.consent-list li { margin-bottom: 3px; }

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--dark);
  cursor: pointer;
}
.consent-check input {
  /* Nicht vorausgewählt (Art. 7 Abs. 2) — das steht im HTML, hier nur die Optik. */
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--orange);
  cursor: pointer;
}
.consent-check:hover { border-color: var(--gray); }
.consent-check input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
/* Nach einem Absendeversuch ohne Haken: Feld hervorheben, damit klar ist, was fehlt. */
.consent-check.consent-missing {
  border-color: #d33;
  background: #fdf3f3;
}
.page-footer {
  text-align: center;
  font-size: 12px;
  color: var(--gray);
  padding: 20px 16px 28px;
}
.page-footer a { color: var(--gray); text-decoration: underline; }
.page-footer a:hover { color: var(--dark); }
.page-footer span { margin: 0 6px; }
@media (max-width: 620px) {
  .addr-grid { grid-template-columns: 1fr 1fr; }
  .addr-street, .addr-city { grid-column: 1 / -1; }
  .choice-grid.four { grid-template-columns: 1fr 1fr; }
  .choice-grid.two  { grid-template-columns: 1fr; }
  .persons-grid { grid-template-columns: 1fr 1fr; }
  .contact-flow { display: grid; gap: 8px; }
  .contact-how  { display: block; }
  .contact-how span {
    display: block;
    margin-top: 2px;
    text-align: left;
  }
  .contact-row  { grid-template-columns: 1fr; gap: 10px; }
  .contact-or {
    height: auto;
    justify-content: center;
  }
  .mode-tabs    { width: 100%; }
  .mode-tab     { flex: 1; text-align: center; }
}
@media (max-width: 420px) {
  .choice-grid.four { grid-template-columns: 1fr 1fr; }
  .persons-grid { grid-template-columns: 1fr 1fr; }
}
