/* Formularkarte (Jeremias 28.11.2026, docs/DESIGN.md › „Formularkarte“) – EINE Komponente für jeden Rechner und jedes Formular auf
   Website- und Content-Seiten, im Design des aktualisierten Bestellformulars (bestellformular.css, Formular „b2b-bestellformular“):
   eigene, deutlich abgesetzte Karte mit Symbol oben · Felder Porzellan/Beige · Preis-/Ergebnisbereich im Stahlblau-Verlauf (ohne
   Gitterlinien) · Hauptknopf wie „Jetzt Auftrag erteilen“. Markup: services/formularkarte.py bzw. templates/website/_formularkarte.html;
   Rechner (seo_rechner.html) und eingebettete Formulare auf Content-Seiten (.tnb-art-artikel) nutzen sie. Keine Inline-Skripte.
   Kontraste: Weiß auf dem hellsten Verlaufston #4F7196 5,1 : 1; Sand #E0CCA6 auf #3B5878 ≥ 4,7 : 1; Navy auf Porzellan 14,7 : 1. */
.tn-fk, .tnb-art-artikel .tnb-ct-formular {
  --fk-navy: #05173D; --fk-navy-dunkel: #102035; --fk-stahl: #3D6189; --fk-stahl-hell: #C3D5E8; --fk-porzellan: #EEEBE3;
  --fk-feldrand: #D9D2C0; --fk-knopfrand: #C7BEA4; --fk-sand: #E0CCA6; --fk-sanddunkel: #796B44; --fk-linie: #E6E1D6; --fk-grau: #56677D;
  --fk-platzhalter: #6E6857; --fk-fehler: #B42318;
  --fk-verlauf: linear-gradient(100deg, #102035 0%, #102035 30%, #3B5878 70%, #4F7196 100%);
  --fk-kursiv: var(--tnb-f-kursiv, "TNW Kursiv"), "Lora", Georgia, serif;
  --fk-schrift: var(--tnb-f-text, "TNW Archivo"), "Archivo", system-ui, sans-serif;
}

/* ------------------------------------------------------------------ Karte: eigene Fläche, deutlich abgesetzt */
.tn-fk {
  position: relative; box-sizing: border-box; container-type: inline-size; margin: 10px 0; padding: 34px 36px 30px;
  border-radius: 24px; background: #fff; border: 1px solid var(--fk-linie); color: var(--fk-navy); font: 400 16px/1.5 var(--fk-schrift);
  /* Porzellan-Rahmen (8 px) wie die Kacheln + großer, weicher Schatten der Bestellformular-Karte */
  box-shadow: 0 0 0 8px var(--fk-porzellan), 0 0 0 9px var(--fk-knopfrand), 0 44px 80px -36px rgba(5, 23, 61, .42), 0 2px 6px rgba(5, 23, 61, .05);
}
.tn-fk * { box-sizing: border-box; }
.tn-fk::before { display: none; content: none; }

/* Kopf: Symbol (Stahlblau-Verlauf, weißes Linien-Symbol, Sand-Ring) + Eyebrow + Überschrift mit kursivem Wort */
.tn-fk-kopf { display: flex; gap: 20px; align-items: flex-start; margin: 0 0 24px; padding-bottom: 22px; border-bottom: 1px solid var(--fk-linie); }
.tn-fk-symbol { flex: 0 0 66px; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background-color: var(--fk-navy-dunkel); background-image: linear-gradient(135deg, #102035 0%, #3B5878 60%, #4F7196 100%);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--fk-sand), 0 14px 26px -12px rgba(16, 32, 53, .6); }
.tn-fk-symbol svg { width: 30px; height: 30px; display: block; }
.tn-fk-kopf-text { min-width: 0; flex: 1 1 auto; }
.tn-fk p.tn-fk-eyebrow { margin: 2px 0 6px; font: 600 12px/1.3 var(--fk-schrift); letter-spacing: .14em; text-transform: uppercase; color: var(--fk-stahl); }
.tn-fk .tn-fk-titel, .tnb-seite .tnb-artikel-text .tn-fk .tn-fk-titel { margin: 0 0 6px; font: 400 clamp(26px, 4.4cqi, 36px)/1.12 var(--fk-schrift); letter-spacing: -.03em; color: var(--fk-navy);
  overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.tn-fk .tn-fk-titel em, .tnb-seite .tnb-artikel-text .tn-fk .tn-fk-titel em { font-family: var(--fk-kursiv); font-style: italic; font-weight: 600; color: var(--fk-sanddunkel); }
.tn-fk p.tn-fk-unter { margin: 0; color: var(--fk-grau); font-size: 16px; }
.tn-fk .tn-fk-kopf p.tn-rechner-verweis { margin: 10px 0 0; font-size: 15px; color: var(--fk-navy); }

/* ------------------------------------------------------------------ Felder: Porzellan wie im Bestellformular */
.tn-fk :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--fk-feldrand); background-color: var(--fk-porzellan);
  color: var(--fk-navy); font: 400 16px/1.3 var(--fk-schrift); }
.tn-fk :is(input, select, textarea)::placeholder { color: var(--fk-platzhalter); }
.tn-fk :is(input, select, textarea):hover { background-color: #F4F2EC; border-color: var(--fk-knopfrand); }
.tn-fk :is(input, select, textarea):focus { outline: none; background-color: #fff; border-color: var(--fk-stahl); box-shadow: 0 0 0 4px rgba(224, 204, 166, .45); }
.tn-fk label { color: var(--fk-navy); font-weight: 600; }

/* ------------------------------------------------------------------ Preis-/Ergebnisbereich im Stahlblau-Verlauf (keine Gitterlinien) */
.tn-fk-preis { position: relative; overflow: hidden; padding: 22px 24px 20px; border-radius: 20px; border: 0; color: #fff;
  background-color: var(--fk-navy-dunkel);
  background-image: radial-gradient(80% 120% at 100% 0%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 60%), var(--fk-verlauf);
  background-size: auto; box-shadow: 0 26px 46px -26px rgba(5, 23, 61, .75), 0 2px 6px rgba(5, 23, 61, .08); }
.tn-fk p.tn-fk-preis-titel { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .28);
  font: 600 12px/1.35 var(--fk-schrift); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.tn-fk .tn-fk-preis :is(p, li, dt, dd, span) { color: #fff; }
.tn-fk .tn-fk-preis em, .tn-fk .tn-fk-preis .tn-fk-akzent { color: var(--fk-sand); }

/* ------------------------------------------------------------------ Hauptknopf wie „Jetzt Auftrag erteilen“ (bestellformular.css › .bv-senden) */
@property --fk-winkel { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@keyframes fk-drehen { to { --fk-winkel: 360deg; } }
@keyframes fk-glanz { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(120%); } }
.tn-fk .tn-fk-knopf, .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn) {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 22px;
  width: 100%; min-height: 58px; margin: 16px 0 12px; padding: 6px 6px 6px 30px; border: 0; border-radius: 999px; cursor: pointer;
  color: #fff; text-decoration: none; font: 700 14.5px/1.2 var(--fk-schrift); letter-spacing: .1em; text-transform: uppercase; --tn-wisch-schrift: #fff;
  background: #3B5878 linear-gradient(115deg, #102035 0%, #2A4566 15%, #3D6189 33%, #4F7196 50%, #3D6189 67%, #2A4566 85%, #102035 100%) 0% 50% / 300% 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 12px 16px -12px rgba(255, 255, 255, .45),
    0 14px 28px -12px rgba(16, 32, 53, .7), 0 0 22px 3px rgba(79, 113, 150, .45);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .4s ease, background-position 1.2s ease; }
.tn-fk .tn-fk-knopf-text { position: relative; z-index: 1; min-width: 0; }
.tn-fk .tn-fk-knopf-pfeil { position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--fk-porzellan); color: var(--fk-navy); font: 700 20px/1 var(--fk-schrift); font-style: normal; box-shadow: inset 0 0 0 1px var(--fk-knopfrand);
  transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.tn-fk .tn-fk-knopf::after, .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn)::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; padding: 2px; opacity: .9; transform: none;
  transition: none; background: conic-gradient(from var(--fk-winkel, 0deg), #102035, #4F7196, #C3D5E8, #E0CCA6, #3D6189, #E8EFF6, #102035);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.tn-fk .tn-fk-knopf::before, .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn)::before {
  content: ""; display: block; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; transform: translateX(-120%);
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .38) 46%, rgba(195, 213, 232, .3) 54%, rgba(255, 255, 255, 0) 70%); }
.tn-fk .tn-fk-knopf:is(:hover, :focus-visible), .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn):is(:hover, :focus-visible) {
  transform: translateY(-2px); background-position: 50% 50%; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 12px 16px -12px rgba(255, 255, 255, .5), 0 20px 34px -12px rgba(16, 32, 53, .75),
    0 0 32px 8px rgba(79, 113, 150, .55), 0 0 56px 14px rgba(195, 213, 232, .45); }
.tn-fk .tn-fk-knopf:is(:hover, :focus-visible)::after,
.tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn):is(:hover, :focus-visible)::after { opacity: 1; animation: fk-drehen 3.5s linear infinite; }
.tn-fk .tn-fk-knopf:is(:hover, :focus-visible)::before,
.tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn):is(:hover, :focus-visible)::before { animation: fk-glanz 2.2s cubic-bezier(.4, 0, .2, 1) infinite; }
.tn-fk .tn-fk-knopf:is(:hover, :focus-visible) .tn-fk-knopf-pfeil { transform: translateX(4px); }
.tn-fk .tn-fk-knopf:focus-visible, .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn):focus-visible { outline: 3px solid var(--fk-stahl); outline-offset: 4px; }
.tn-fk .tn-fk-hinweise p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: var(--fk-grau); }

/* ------------------------------------------------------------------ Eingebettete Formulare auf Content-Seiten (Kontaktformular-Baustein)
   Gespeicherte Seiten tragen nur die Klasse .tnb-ct-formular – darum hier per CSS dieselbe Karte, das Symbol als Maske (eigene Datei). */
.tnb-art-artikel .tnb-ct-formular { position: relative; padding: 112px 36px 30px !important; margin: 10px 0 !important; border-radius: 24px;
  background: #fff; border: 1px solid var(--fk-linie);
  box-shadow: 0 0 0 8px var(--fk-porzellan), 0 0 0 9px var(--fk-knopfrand), 0 44px 80px -36px rgba(5, 23, 61, .42), 0 2px 6px rgba(5, 23, 61, .05); }
.tnb-art-artikel .tnb-ct-formular::before { content: ""; position: absolute; left: 36px; top: 30px; width: 66px; height: 66px; border-radius: 50%;
  background-color: #102035; background-image: linear-gradient(135deg, #102035 0%, #3B5878 60%, #4F7196 100%);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--fk-sand), 0 14px 26px -12px rgba(16, 32, 53, .6); }
.tnb-art-artikel .tnb-ct-formular::after { content: ""; position: absolute; left: 54px; top: 48px; width: 30px; height: 30px; background: #fff;
  -webkit-mask: url("/static/img/website/formularkarte/formular.svg") center / contain no-repeat;
  mask: url("/static/img/website/formularkarte/formular.svg") center / contain no-repeat; }
.tnb-art-artikel .tnb-ct-formular :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) {
  min-height: 52px; border-radius: 12px; border: 1px solid var(--fk-feldrand); background-color: var(--fk-porzellan); color: var(--fk-navy); font-size: 16px; }
.tnb-art-artikel .tnb-ct-formular textarea { min-height: 120px; }
.tnb-art-artikel .tnb-ct-formular :is(input, select, textarea):focus { outline: none; background-color: #fff; border-color: var(--fk-stahl);
  box-shadow: 0 0 0 4px rgba(224, 204, 166, .45); }
.tnb-art-artikel .tnb-ct-formular :is(.tnf-price, .tnc-price) { color: #fff; border: 0; border-radius: 20px; background-color: #102035;
  background-image: radial-gradient(80% 120% at 100% 0%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 60%), var(--fk-verlauf); background-size: auto;
  box-shadow: 0 26px 46px -26px rgba(5, 23, 61, .75), 0 2px 6px rgba(5, 23, 61, .08); }
.tnb-art-artikel .tnb-ct-formular :is(.tnf-price, .tnc-price) :is(.pc-label, .pc-total, .pc-pos, .pc-hint, .pc-brutto, .tnf-help, .tnc-price-title,
  .tnc-price-total, .tnc-price-pos, .tnc-price-note, .pc-foerder-hinweis) { color: #fff; border-color: rgba(255, 255, 255, .28); }
.tnb-art-artikel .tnb-ct-formular :is(.tnf-price, .tnc-price) .pc-minus { color: var(--fk-sand); }
.tnb-art-artikel .tnb-ct-formular :is(.tnf-price, .tnc-price) .pc-error { color: #FFD9D2; font-weight: 600; }
.tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn) { justify-content: center; padding: 6px 30px; }
.tnb-art-artikel .tnb-ct-formular .tnf-actions { text-align: left; }

/* ------------------------------------------------------------------ Handy: eine Spalte, Knopf über die volle Breite */
@media (max-width: 640px) {
  .tn-fk { padding: 24px 18px 22px; border-radius: 20px;
    box-shadow: 0 0 0 6px var(--fk-porzellan), 0 0 0 7px var(--fk-knopfrand), 0 30px 60px -30px rgba(5, 23, 61, .42); }
  .tn-fk-kopf { gap: 14px; margin-bottom: 18px; padding-bottom: 16px; }
  .tn-fk-symbol { flex-basis: 52px; width: 52px; height: 52px; }
  .tn-fk-symbol svg { width: 24px; height: 24px; }
  .tn-fk .tn-fk-titel { font-size: 25px; }
  .tn-fk-preis { padding: 18px 16px 16px; }
  .tn-fk .tn-fk-knopf, .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn) { padding-left: 22px; font-size: 13px; letter-spacing: .08em; gap: 12px; }
  .tnb-art-artikel .tnb-ct-formular { padding: 92px 18px 22px !important; border-radius: 20px; }
  .tnb-art-artikel .tnb-ct-formular::before { left: 18px; top: 22px; width: 52px; height: 52px; }
  .tnb-art-artikel .tnb-ct-formular::after { left: 32px; top: 36px; width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .tn-fk .tn-fk-knopf, .tn-fk .tn-fk-knopf-pfeil, .tn-fk .tn-fk-knopf::after, .tn-fk .tn-fk-knopf::before,
  .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn), .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn)::after,
  .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn)::before { transition: none; animation: none !important; }
  .tn-fk .tn-fk-knopf:is(:hover, :focus-visible), .tn-fk .tn-fk-knopf:is(:hover, :focus-visible) .tn-fk-knopf-pfeil,
  .tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn):is(:hover, :focus-visible) { transform: none; }
}
/* Überschrift der Karte immer Navy (Artikel-Überschriften sind Stahlblau bzw. auf dunklen Köpfen Sand) */
.tn-fk :is(h2, h3).tn-fk-titel, .tnb-seite .tnb-artikel-text .tn-fk :is(h2, h3).tn-fk-titel { color: var(--fk-navy) !important; }
.tn-fk :is(h2, h3).tn-fk-titel em, .tnb-seite .tnb-artikel-text .tn-fk :is(h2, h3).tn-fk-titel em { color: var(--fk-sanddunkel) !important; }
/* Formular nicht (mehr) veröffentlicht → keine leere Karte und keine verwaiste Überschrift */
.tnb-art-artikel .tnb-ct-formular:not(:has(form)) { display: none; }
.tnb-art-artikel .tnb-widget-heading:has(+ .tnb-ct-formular:not(:has(form))) { display: none; }
/* Absende-Knopf eingebetteter Formulare: gegen Theme-/public.css-Regeln (Porzellan-Knopf) durchsetzen – Schrift weiß, ≥ 58 px */
.tnb-art-artikel .tnb-ct-formular :is(.s_website_form_send, .tnc-btn) { color: #fff !important; min-height: 58px !important; width: 100% !important;
  font-size: 14.5px !important; letter-spacing: .1em !important; text-transform: uppercase !important; border: 0 !important; }
