/* Baufinanzierungs-Funnel – nutzt Tokens, Buttons und Marke aus /styles.css */
.funnel-page { min-height: 100svh; display: flex; flex-direction: column; }
.fn-header {
  position: sticky; top: 0; z-index: 50; height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
}
.fn-header-actions { display: flex; align-items: center; gap: 8px; }
.fn-back-site {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px;
  font-size: 13px; color: var(--muted); transition: color .2s;
}
.fn-back-site:hover { color: var(--text); }

.fn-main { flex: 1; padding: clamp(28px, 6vw, 72px) 16px clamp(48px, 7vw, 96px); }
.fn-shell { width: 100%; max-width: 680px; margin: 0 auto; }
.fn-intro-eyebrow { margin-bottom: 14px; }
h1.fn-intro-eyebrow { font-family: inherit; line-height: inherit; text-transform: uppercase; text-wrap: initial; }

/* Fortschritt */
.fn-progress { margin-bottom: clamp(28px, 4vw, 40px); }
.fn-progress-label { margin: 0 0 10px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.fn-progress-track { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.fn-progress-bar {
  display: block; height: 100%; width: 14.29%; border-radius: 3px;
  background: linear-gradient(90deg, #e0bd80, var(--gold)); transition: width .35s ease;
}

/* Schritte */
.fn-step[hidden], .fn-form[hidden], .fn-success[hidden] { display: none; }
.fn-title {
  margin: 0 0 14px; font: 400 clamp(30px, 4.6vw, 44px)/1.08 var(--serif); letter-spacing: -.03em;
  text-wrap: balance;
}
.fn-title:focus { outline: none; }
.fn-title:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 6px; }
.fn-lead { margin: 0 0 26px; color: var(--muted); font-size: 17px; }
.fn-step > .fn-title + .fn-choices { margin-top: 26px; }

/* Auswahlkarten (echte Radio-Buttons, Pfeiltasten funktionieren) */
.fn-choices { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fn-choices--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fn-choice { position: relative; display: block; cursor: pointer; }
.fn-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fn-choice-body {
  display: flex; align-items: center; gap: 14px; min-height: 72px; height: 100%; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.fn-choice-body::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--text) 32%, transparent); background: transparent;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.fn-choice-title { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--text); }
.fn-choice:hover .fn-choice-body { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.fn-choice input:checked + .fn-choice-body {
  border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--bg-elevated));
  box-shadow: 0 0 0 1px var(--gold);
}
.fn-choice input:checked + .fn-choice-body::before { border-color: var(--gold); box-shadow: inset 0 0 0 5px var(--gold); }
.fn-choice input:focus-visible + .fn-choice-body { outline: 2px solid var(--gold-strong); outline-offset: 3px; }

/* Eingabefelder */
.fn-fields { display: grid; gap: 22px; }
.fn-fields--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.fn-field--wide { grid-column: 1 / -1; }
.fn-field--spaced { margin-top: 30px; }
.fn-field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.fn-optional { font-weight: 400; color: var(--muted); }
.fn-field input[type="text"], .fn-field input[type="email"], .fn-field input[type="tel"] {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); background: var(--bg-elevated); color: var(--text);
  font-size: 17px; transition: border-color .18s ease, box-shadow .18s ease;
}
.fn-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent); }
.fn-field input[aria-invalid="true"] { border-color: #b4483a; }
html[data-theme="dark"] .fn-field input[aria-invalid="true"] { border-color: #e07a6a; }
.fn-euro { position: relative; }
.fn-euro input { padding-right: 44px !important; font-variant-numeric: tabular-nums; }
.fn-euro-suffix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 16px; pointer-events: none; }
.fn-help { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.fn-error { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #a33f32; min-height: 0; }
.fn-error:empty { display: none; }
html[data-theme="dark"] .fn-error { color: #f09a8c; }

/* Zusammenfassung */
.fn-summary { margin: 0 0 26px; border-top: 1px solid var(--line); }
.fn-summary-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 6px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fn-summary dt { font-size: 13px; color: var(--muted); }
.fn-summary dd { margin: 0; font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.fn-edit {
  min-height: 44px; min-width: 44px; padding: 0 6px; border: 0; background: none; cursor: pointer;
  color: var(--gold-strong); font-size: 13px; font-weight: 700;
}
.fn-edit:hover { text-decoration: underline; }

/* Einwilligung */
.fn-consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated); }
.fn-consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gold); cursor: pointer; }
.fn-consent label { font-size: 14px; line-height: 1.5; color: var(--text); cursor: pointer; }
.fn-consent a { color: var(--gold-strong); text-decoration: underline; text-underline-offset: 2px; }

/* Navigation */
.fn-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: clamp(30px, 4vw, 40px); }
.fn-nav .btn { min-width: 132px; cursor: pointer; font-family: inherit; }
.fn-nav .btn-secondary { background: transparent; }
.fn-prev[hidden] { display: none; }
.fn-nav .fn-prev[hidden] + .fn-next { margin-left: auto; }
.fn-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fn-preview-note { margin: 18px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* Erfolg */
.fn-success { text-align: left; }
.fn-success-mark {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 22px;
  border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-strong); font-size: 22px;
}
.fn-success .btn { margin-top: 6px; }
.fn-success-back { margin: 12px 0 0; }
.fn-noscript { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated); }

/* V1.1: Standort + Makler */
.fn-field[hidden], .fn-subq[hidden], .fn-orient[hidden], .fn-orient-coverage[hidden] { display: none; }
.fn-select {
  width: 100%; min-height: 52px; padding: 0 44px 0 16px; border-radius: 10px; appearance: none; -webkit-appearance: none;
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); color: var(--text); font: inherit; font-size: 17px; cursor: pointer;
  background: var(--bg-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a08a5c' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 18px center;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.fn-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent); }
.fn-select[aria-invalid="true"] { border-color: #b4483a; }
html[data-theme="dark"] .fn-select[aria-invalid="true"] { border-color: #e07a6a; }
.fn-subq { margin: 34px 0 0; padding: 0; border: 0; min-width: 0; }
.fn-subq-title { padding: 0; margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--text); }
.fn-choices--inline { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fn-choices--inline .fn-choice-body { min-height: 56px; padding: 14px 16px; }

/* V1.1: Orientierung nach dem Absenden */
.fn-orient { margin-top: clamp(36px, 5vw, 52px); padding: clamp(20px, 3.2vw, 30px); border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elevated); }
.fn-orient-title { margin: 0 0 8px; font: 400 clamp(24px, 3.2vw, 30px)/1.15 var(--serif); letter-spacing: -.02em; }
.fn-orient-lead { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.fn-orient-grid { margin: 0; border-top: 1px solid var(--line); }
.fn-orient-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.fn-orient-row dt { font-size: 14px; color: var(--muted); }
.fn-orient-row dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fn-orient-coverage { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 15px; line-height: 1.45; border: 1px solid var(--line); }
.fn-orient-coverage.is-covers { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.fn-orient-coverage.is-partial, .fn-orient-coverage.is-unclear { background: color-mix(in srgb, var(--text) 4%, transparent); }
.fn-orient-notes { margin-top: 18px; }
.fn-orient-subtitle { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--text); }
.fn-orient-notes ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.fn-orient-notes li + li { margin-top: 4px; }
.fn-orient-cta { margin-top: 22px; }
.fn-orient-cta .btn { cursor: pointer; font-family: inherit; background: transparent; }
.fn-orient-cta .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }

.fn-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 20px;
  padding: 14px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.fn-footer p { margin: 0; }

@media (max-width: 600px) {
  .fn-choices, .fn-choices--compact { grid-template-columns: 1fr; gap: 10px; }
  .fn-choices--inline { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .fn-choices--inline .fn-choice-body { min-height: 52px; padding: 12px 10px; gap: 8px; }
  .fn-orient-row { grid-template-columns: 1fr; }
  .fn-orient-row dd { text-align: left; white-space: normal; }
  .fn-choice-body { min-height: 60px; padding: 15px 16px; }
  .fn-fields--grid { grid-template-columns: 1fr; }
  .fn-summary-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fn-summary dd { grid-column: 1 / 2; }
  .fn-summary .fn-edit { grid-row: 1 / span 2; grid-column: 2; }
  .fn-nav .btn { min-width: 0; flex: 1; }
  .fn-nav .fn-prev { flex: 0 0 auto; }
  .fn-back-site { font-size: 12px; padding: 0 6px; }
}
@media (max-width: 420px) {
  .fn-header .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fn-progress-bar, .fn-choice-body, .fn-choice-body::before, .fn-field input, .fn-select { transition: none !important; }
}
