/* Funnel-Engine – gemeinsame Styles (Schrift, Auswahlzustände, Cookie-Banner, Debug)
   Farben kommen aus den CSS-Variablen des jeweiligen Funnels (--accent, --tint, --line, --ink, --muted, --bg). */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/plus-jakarta-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Seiten */
section[data-page-name][hidden] { display: none !important; }
section[data-page-name]:focus { outline: none; }

/* Gewählte Antwort: sofort sichtbares Feedback, auch beim Zurückgehen */
[data-ps-question] [data-ps-value] { -webkit-tap-highlight-color: transparent; }
[data-ps-question] [data-ps-value][data-ps-selected="true"] {
  border-color: var(--accent, #1F5C3D) !important;
  background-color: var(--tint, #E4EFE6) !important;
  box-shadow: 0 0 0 1px var(--accent, #1F5C3D) inset, 0 1px 2px rgba(0, 0, 0, .05);
}

/* Pflicht-Hinweis bei Mehrfachauswahl */
@keyframes fnl-nudge { 0%, 100% { transform: none } 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
.fnl-nudge { animation: fnl-nudge .3s ease-in-out; }
.fnl-hint { margin-top: .25rem; text-align: center; font-size: .875rem; font-weight: 600; color: #B23A2E; }

/* Formular */
.fnl-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.fnl-error {
  border-radius: .75rem; padding: .75rem 1rem; font-size: .9375rem; line-height: 1.4;
  background: #FCF3F2; color: #8E2A20; border: 1px solid #F0C9C4;
}
button[aria-busy="true"] { cursor: progress; opacity: .9; }
.fnl-spin {
  display: inline-block; width: 1em; height: 1em; margin-right: .5em; vertical-align: -.15em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: fnl-spin .7s linear infinite;
}
@keyframes fnl-spin { to { transform: rotate(360deg) } }

/* Cookie-Banner (nicht blockierend: das Quiz bleibt bedienbar) */
.fnl-cc {
  position: fixed; z-index: 2147483000; left: 16px; right: 16px; bottom: 16px;
  max-width: 400px; max-height: calc(100svh - 32px); overflow: auto;
  background: #fff; color: var(--ink, #20271F);
  border-radius: 1rem; box-shadow: 0 10px 40px rgba(16, 24, 16, .18), 0 0 0 1px rgba(16, 24, 16, .06);
  font: 400 15px/1.45 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  animation: fnl-cc-in .35s cubic-bezier(.23, 1, .32, 1);
}
@keyframes fnl-cc-in { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
.fnl-cc__main { padding: 18px 18px 6px; }
.fnl-cc__t { margin: 0 0 6px; font-weight: 800; font-size: 16px; }
.fnl-cc__p { margin: 0; color: var(--muted, #4B5A50); font-size: 14px; }
.fnl-cc__prefs { margin-top: 12px; display: grid; gap: 8px; }
.fnl-cc__prefs[hidden] { display: none; }
.fnl-cc__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: .75rem; background: var(--bg, #F3F7F2); cursor: default;
}
label.fnl-cc__row { cursor: pointer; }
.fnl-cc__row b { display: block; font-size: 14px; }
.fnl-cc__row span { display: block; font-size: 12.5px; color: var(--muted, #4B5A50); }
.fnl-cc__always { flex-shrink: 0; font-size: 12px !important; font-weight: 700; color: var(--accent, #1F5C3D) !important; }
.fnl-cc__sw {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; position: relative; margin: 0;
  width: 42px; height: 24px; border-radius: 99px; background: #C9D3CB; cursor: pointer; transition: background .2s;
}
.fnl-cc__sw::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s;
}
.fnl-cc__sw:checked { background: var(--accent, #1F5C3D); }
.fnl-cc__sw:checked::after { transform: translateX(18px); }
.fnl-cc__sw:focus-visible { outline: 2px solid var(--accent, #1F5C3D); outline-offset: 2px; }
.fnl-cc__link { font-size: 13px; font-weight: 600; color: var(--accent, #1F5C3D); text-decoration: underline; text-underline-offset: 3px; }
.fnl-cc__btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 12px 18px 18px; }
.fnl-cc__b {
  min-height: 44px; padding: 6px 8px; border-radius: .75rem; border: 1.5px solid var(--accent, #1F5C3D);
  background: var(--accent, #1F5C3D); color: var(--on-accent, #fff); font-family: inherit; font-weight: 700; font-size: 13.5px; line-height: 1.15; cursor: pointer;
  transition: background .15s, transform .12s;
}
.fnl-cc__b:hover { background: var(--accent-dark, #17482F); }
.fnl-cc__b:active { transform: scale(.97); }
.fnl-cc__b:focus-visible { outline: 2px solid var(--accent, #1F5C3D); outline-offset: 2px; }
.fnl-cc__b--ghost { background: #fff; color: var(--accent, #1F5C3D); }
.fnl-cc__b--ghost:hover { background: var(--tint, #E4EFE6); }
@media (max-width: 380px) { .fnl-cc__btns { grid-template-columns: 1fr 1fr; } .fnl-cc__b--ghost { grid-column: 1 / -1; order: 3; } }

/* Debug-Panel */
#fnl-debug {
  position: fixed; z-index: 2147483001; right: 12px; top: 12px; max-width: 320px;
  padding: 10px 12px; border-radius: 10px; background: rgba(20, 28, 22, .92); color: #E9F2EA;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
#fnl-debug ul { margin: 6px 0; padding-left: 16px; list-style: disc; }
#fnl-debug button { margin-top: 6px; padding: 3px 8px; border-radius: 6px; background: #E9F2EA; color: #14201A; font: inherit; cursor: pointer; }
.fnl-debug__stale { color: #F3C969; }
.fnl-debug__err { margin-top: 6px; color: #FF9B8F; font-weight: bold; }

/* Perspective Style – Standard-Schriften (pro Funnel in :root überschreibbar) */
:root { --font-display: 'Plus Jakarta Sans'; --font-body: 'Plus Jakarta Sans'; }
