/* Lead-Popup der Gratis-Tools (templates/site/_funnel.html, js/site-funnel.js).
 * Nur Tokens aus tokens.css, damit ein neues Designsystem das Popup ohne Umbau übernimmt.
 * Mobil als Blatt von unten, ab 640 px als Karte in der Mitte. Liegt unter dem Cookie-Banner (z-index). */
.fn-layer { position: fixed; inset: 0; z-index: 2147481000; display: grid; align-items: end; justify-items: center; }
.fn-layer[hidden] { display: none; }
.fn-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 48%, transparent); opacity: 0; transition: opacity var(--t) ease; }
.fn-dialog {
  position: relative; width: 100%; max-height: min(92dvh, 760px); overflow: auto; overscroll-behavior: contain;
  background: var(--sheet-2); color: var(--ink); border: 1px solid var(--rule); border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-3);
  padding: 1.25rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(16px); opacity: 0; transition: transform var(--t) ease, opacity var(--t) ease;
}
.fn-dialog:focus { outline: none; }
.fn-dialog:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fn-layer.in .fn-backdrop { opacity: 1; }
.fn-layer.in .fn-dialog { transform: none; opacity: 1; }
html.fn-locked { overflow: hidden; }

.fn-x { position: absolute; top: .6rem; right: .6rem; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--pill); background: transparent; color: var(--ink-3); cursor: pointer; }
.fn-x:hover { background: var(--paper-2); color: var(--ink); }
.fn-x svg { width: 20px; height: 20px; }
.fn-body { display: grid; gap: .85rem; }
.fn-kicker { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--accent-ink); padding-right: 3rem; }
.fn-title { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.15; font-weight: 600; color: var(--ink); text-wrap: balance; }
.fn-title:focus { outline: none; }
.fn-text { color: var(--ink-2); font-size: var(--fs-base); line-height: 1.55; }
.fn-note { color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.5; }

.fn-progress { display: grid; gap: .45rem; padding: .75rem .85rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.fn-dots { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; list-style: none; margin: 0; padding: 0; }
.fn-dots li { height: 8px; border-radius: var(--pill); background: var(--rule); }
.fn-dots li.on { background: var(--accent); }
.fn-dots li.goal { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 3.5px var(--marker); }
.fn-progress-text { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.45; }
.fn-progress-text b { display: block; color: var(--ink); }
.fn-progress.is-open { border-color: var(--ins); background: var(--ins-soft); }
.fn-progress.is-open .fn-dots li.on { background: var(--ins); }

.fn-form { display: grid; gap: .8rem; }
.fn-field { display: grid; gap: .35rem; }
.fn-field > span { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.fn-field .input { width: 100%; min-height: 48px; font-size: 1rem; }
.fn-field .input[aria-invalid="true"] { border-color: var(--del); }
.fn-consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; align-items: start; font-size: var(--fs-xs); line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.fn-consent input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--accent); }
.fn-consent a { color: var(--accent-ink); font-weight: 600; }
.fn-error { color: var(--del); font-size: var(--fs-sm); font-weight: 600; }
.fn-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.fn-actions .btn { flex: 1 1 auto; justify-content: center; }
.fn-actions .btn svg { width: 18px; height: 18px; }
.fn-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 640px) {
  .fn-layer { align-items: center; padding: 1.5rem; }
  .fn-dialog { max-width: 560px; border-bottom: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 1.75rem 1.75rem 1.5rem; }
  .fn-actions .btn { flex: 0 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .fn-backdrop, .fn-dialog { transition: none; }
}
