/* ==========================================================================
   innovio.ch/testen – Bewerbung Beta-Testrunde 2026/27
   Baut auf site.css auf (Schriften, Tokens, Basis, .btn). Alle Klassen hier
   tragen das Praefix t-, damit nichts mit den Komponenten von site.css
   kollidiert (Lehre aus .split, siehe directives/marketing-website.md).
   Keine style-Attribute im Markup: die CSP erlaubt nur 'self'.
   ========================================================================== */

.t-seite {
  --t-feldrand: rgba(55, 58, 56, 0.22);
  --t-feldrand-hover: rgba(55, 58, 56, 0.38);
  --t-fehler: #9a3b2e;
  --t-fehler-flaeche: #fbefec;
  background: var(--paper);
}

.t-wrap {
  max-width: 1280px;
}

.t-nw {
  white-space: nowrap;
}

/* --- Kopf ---------------------------------------------------------------- */

.t-kopf {
  padding-block: clamp(18px, 2.6vw, 30px);
}

.t-marke {
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  text-decoration: none;
  color: var(--ink);
}
.t-marke__logo {
  height: 28px;
  width: auto;
}
.t-marke__beta {
  margin-top: -7px;
  padding: 1px 7px 2px;
  border-radius: var(--pill);
  background: var(--matcha);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
}

/* --- Raster: Einleitung links, Formular rechts --------------------------- */

.t-raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 40px);
  padding-top: clamp(8px, 2vw, 28px);
  padding-bottom: clamp(48px, 7vw, 96px);
}

@media (min-width: 1000px) {
  .t-raster {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(48px, 5.5vw, 96px);
    align-items: start;
  }
  .t-intro {
    position: sticky;
    top: 32px;
  }
}

/* --- Einleitung ---------------------------------------------------------- */

.t-intro h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  /* 1.1 statt 1.07 aus site.css: die zweizeilige Zeile traegt "g" und "j". */
  line-height: 1.1;
  max-width: 16ch;
}

.t-lede {
  margin-top: clamp(16px, 2vw, 22px);
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  line-height: 1.62;
  color: var(--text-muted);
  max-width: 54ch;
}

.t-fakten {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: clamp(24px, 3vw, 32px) 0 0;
  border-top: 1px solid var(--line);
}
.t-fakt {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.t-fakt dt {
  font-size: 0.88rem;
  color: var(--text-faint);
}
.t-fakt dd {
  margin: 0;
  font-weight: 500;
  font-size: 1.02rem;
  text-align: right;
}

@media (min-width: 560px) {
  .t-fakten {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 0;
    gap: 12px;
  }
  .t-fakt {
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 2px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--card);
  }
  .t-fakt dd {
    text-align: left;
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    letter-spacing: -0.01em;
  }
}

.t-karten {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 720px) and (max-width: 999.98px) {
  .t-karten {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.t-karte {
  padding: clamp(18px, 2.2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
.t-karte--matcha {
  background: var(--matcha-50);
  border-color: transparent;
}
.t-karte h2 {
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  margin-bottom: 6px;
}
.t-karte p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.t-karte--matcha p {
  color: var(--ink);
}

/* --- Formular-Karte ------------------------------------------------------ */

.t-form,
.t-panel {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
  padding: clamp(20px, 3.4vw, 40px);
  box-shadow: var(--shadow-sm);
}

/* Auf schmalen Telefonen traegt die Karte keinen eigenen Innenabstand mehr
   zusaetzlich zum Seitenrand: sonst blieben bei 320 px rund 240 px fuer die
   Felder. Die Karte faellt weg, der Inhalt laeuft auf dem Seitengrund. */
@media (max-width: 479.98px) {
  .t-form {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
  .t-form .t-block {
    padding-top: 28px;
  }
}

.t-fortschritt {
  margin-bottom: 8px;
}
.t-fortschritt__zeile {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.t-fortschritt__balken {
  height: 6px;
  border-radius: var(--pill);
  background: var(--paper-2);
  overflow: hidden;
}
.t-fortschritt__balken span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--matcha-500);
  transition: width 0.3s var(--ease);
}

.t-block {
  margin: 0;
  padding: 32px 0 0;
  border: 0;
  min-width: 0;
}
.t-block + .t-block {
  margin-top: 8px;
  border-top: 1px solid var(--line-soft);
}

/* legend sitzt sonst in der Rahmenlinie des fieldset. Float nimmt sie in
   den normalen Fluss, clear setzt den Inhalt darunter. */
.t-block__titel {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin-bottom: 20px;
  font-size: clamp(1.2rem, 1.9vw, 1.42rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.016em;
}
.t-nr {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--matcha-50);
  color: var(--matcha-700);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
}

.t-block__titel + * {
  clear: both;
}

.t-zeile2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 16px;
}
@media (min-width: 560px) {
  .t-zeile2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.t-feld {
  margin-bottom: 22px;
  min-width: 0;
}

.t-feld > label,
.t-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}
.t-stern {
  margin-left: 2px;
  color: var(--matcha-700);
  font-weight: 500;
}
.t-hinweis {
  margin: -4px 0 10px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-faint);
}

/* Eingabefelder: 16 px Schrift, sonst zoomt iOS beim Fokussieren. */
.t-form input[type="text"],
.t-form input[type="email"],
.t-form select,
.t-kt__knopf {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--t-feldrand);
  border-radius: 12px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.t-form input[type="text"]:hover,
.t-form input[type="email"]:hover,
.t-form select:hover,
.t-kt__knopf:hover {
  border-color: var(--t-feldrand-hover);
}
.t-form input[type="text"]:focus,
.t-form input[type="email"]:focus,
.t-form select:focus,
.t-kt__knopf:focus-visible,
.t-kt__knopf[aria-expanded="true"] {
  outline: none;
  border-color: var(--matcha-700);
  box-shadow: 0 0 0 3px rgba(116, 152, 109, 0.22);
}

.t-form select,
.t-kt__knopf {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  text-align: left;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23373a38' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* --- Kantonsauswahl mit Fahnen ------------------------------------------- */

.t-kt {
  position: relative;
}
.t-kt__wahl {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.t-kt__platzhalter {
  color: var(--ink);
}
.t-kt__wahl .t-kt__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t-kt__liste {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(340px, 52vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.t-kt__liste:focus {
  outline: none;
}
/* Im unteren Bildschirmteil oeffnet die Liste nach oben (setzt testen.js). */
.t-kt__liste.is-oben {
  top: auto;
  bottom: calc(100% + 6px);
}

.t-kt__liste [role="option"] {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.97rem;
  line-height: 1.3;
}
.t-kt__liste [role="option"].is-aktiv {
  background: var(--paper-2);
}
.t-kt__liste [role="option"][aria-selected="true"] {
  background: var(--matcha-50);
  font-weight: 500;
}
.t-kt__liste img,
.t-kt__wahl img,
.t-kt__leer {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.t-kt__leer {
  display: block;
  border-style: dashed;
  border-color: var(--t-feldrand);
}
.t-kt__name {
  flex: 1 1 auto;
  min-width: 0;
}
.t-kt__code {
  flex: none;
  font-size: 0.8rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.t-kt__wahl .t-kt__code {
  display: none;
}

/* --- Auswahl-Chips ------------------------------------------------------- */

.t-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.t-chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.t-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.t-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--t-feldrand);
  border-radius: var(--pill);
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.3;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease);
}
.t-chip:hover span {
  border-color: var(--t-feldrand-hover);
}
.t-chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.t-chip input:focus-visible + span {
  outline: 2px solid var(--matcha-700);
  outline-offset: 2px;
}

/* --- Einwilligung -------------------------------------------------------- */

.t-feld--einwilligung {
  margin-top: 10px;
  padding: 16px;
  border-radius: var(--r);
  background: var(--paper-2);
}
.t-einwilligung {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 0.92rem;
  line-height: 1.55;
  cursor: pointer;
}
.t-einwilligung input {
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--ink);
  cursor: pointer;
}

/* --- Fehler -------------------------------------------------------------- */

.t-fehler {
  display: none;
  margin: 8px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--t-fehler);
}
.t-feld.is-fehler .t-fehler {
  display: block;
}
.t-feld.is-fehler input[type="text"],
.t-feld.is-fehler input[type="email"],
.t-feld.is-fehler select,
.t-feld.is-fehler .t-kt__knopf {
  border-color: var(--t-fehler);
}
.t-feld.is-fehler .t-chip span {
  border-color: rgba(154, 59, 46, 0.45);
}
.t-feld--einwilligung.is-fehler {
  background: var(--t-fehler-flaeche);
}

/* Honigtopf: fuer Menschen unsichtbar, fuer Bots ein normales Feld. */
.t-honig {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Abschluss ----------------------------------------------------------- */

.t-abschluss {
  margin-top: 26px;
  text-align: center;
}
.t-senden {
  width: 100%;
  min-height: 54px;
}
.t-senden[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
.t-formfehler {
  display: none;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--t-fehler-flaeche);
  color: var(--t-fehler);
  font-size: 0.92rem;
  text-align: left;
}
.t-formfehler.is-sichtbar {
  display: block;
}
.t-frist {
  margin: 14px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-faint);
}

/* --- Erfolg und geschlossen ---------------------------------------------- */

.t-panel h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin-bottom: 10px;
}
.t-panel p {
  color: var(--text-muted);
}
.t-panel:focus {
  outline: none;
}
.t-haken {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--matcha);
  color: var(--ink);
}
.t-schritte {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.t-schritte li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
  line-height: 1.5;
}
.t-schritte__datum {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--matcha-700);
}
@media (min-width: 560px) {
  .t-schritte li {
    grid-template-columns: 9.5rem minmax(0, 1fr);
    gap: 16px;
  }
  .t-schritte__datum {
    font-size: 0.97rem;
  }
}

/* --- Fuss ---------------------------------------------------------------- */

.t-fuss {
  border-top: 1px solid var(--line);
  padding-block: 24px 32px;
  font-size: 0.86rem;
  color: var(--text-faint);
}
.t-fuss__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}
.t-fuss address {
  font-style: normal;
}
.t-fuss__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.t-fuss a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .t-fortschritt__balken span,
  .t-chip span,
  .t-form input,
  .t-form select,
  .t-kt__knopf {
    transition: none;
  }
}
