/* DSMS+ zum Anfassen: die Gerätedemo (fünf Knöpfe, Laptop und Handy mit der nachgebauten
 * App .ui), gemeinsam für die Startseite (index.html, Bereich «Software») und die
 * Software-Seite (datenschutz-management-software.html, Bereich «So läuft Ihr Test»). Markup steht auf beiden
 * Seiten (Kopie), Verhalten in js/demo.js. Nach css/style.css einbinden.
 *
 * Wird mit Versions-Query eingebunden (css/demo.css?v=JJJJMMTT), weil CSS ein Jahr lang
 * immutable gecacht wird — bei jeder Änderung hochzählen.
 */

/* ---------- Software: DSMS+ zum Anfassen ----------
   Links fünf Knöpfe, rechts ein Laptop und ein Handy, frei auf dem Hintergrund des
   Bereichs (ohne eigene Fläche dahinter: Himmel mit Wiese wirkte kindlich, ein Verlauf
   Blau → Grün gefiel auch nicht). Die Geräte zeigen NACHBAUTEN der App in HTML (.ui),
   gefüllt mit Beispieldaten; ein Knopf wechselt den Bildschirm in beiden Geräten.
   js/demo.js schaltet (.is-active), lässt die Szenen von selbst durchlaufen (.is-auto,
   .is-waiting = nicht im Bild) und rechnet die Grösse der Geräte (--k). */
.demo-sprite {
  position: absolute;
}

.demo {
  display: grid;
  grid-template-columns: minmax(0, 312px) minmax(0, 1fr);
  gap: clamp(20px, 2.2vw, 32px);
  align-items: center;
}

.demo-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demo-side .btn {
  justify-content: center;
  gap: 6px;
  padding: 13px 10px;
  font-size: 13.5px;
  white-space: nowrap;
}

.demo-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Linien-Symbole der App (aus dem Sprite) */
.ai {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-tab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 13px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 16px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.demo-tab:hover {
  background: rgba(255, 255, 255, 0.6);
}

.demo-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.demo-tab.is-active {
  border-color: rgba(0, 119, 182, 0.2);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 10px 28px rgba(15, 23, 42, 0.06);
}

.demo-tab-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 119, 182, 0.08);
  color: var(--accent);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.demo-tab-icon .ai {
  width: 22px;
  height: 22px;
}

.demo-tab.is-active .demo-tab-icon {
  background: linear-gradient(135deg, #0096c7, #0077b6);
  color: #fff;
}

/* Der Textblock ist ohne Beschreibung genau so hoch wie das Symbol (9 + 22 + 9 = 40px).
   Nur so wächst der Knopf vom ersten Pixel der Beschreibung an mit — und die Summe aus
   dem aufklappenden und dem zuklappenden Knopf bleibt in jedem Moment gleich. */
.demo-tab-text {
  min-width: 0;
  padding: 9px 0;
}

.demo-tab-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 22px;
}

/* Die Beschreibung klappt nur beim aktiven Knopf auf. Alle Beschreibungen sind gleich hoch
   (--desc-h = die längste, misst js/demo.js), und Auf- und Zuklappen laufen gleich lang mit
   derselben Kurve: So bleibt die Spalte bei jedem Wechsel exakt gleich hoch. Vorher wuchs
   sie kurz um bis zu 17px, und Bühne und alles darunter ruckten nach unten. */
.demo-tab-text span {
  display: block;
  height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0;
  transition: height 0.45s var(--ease), margin 0.45s var(--ease), opacity 0.3s ease;
}

.demo-tab.is-active .demo-tab-text span {
  height: var(--desc-h, 63px);
  margin-top: 3px;
  opacity: 1;
}

/* Balken am aktiven Knopf: füllt sich, dann geht es zur nächsten Szene. Mit der Maus
   über dem Bereich und ausserhalb des Bilds hält er an. */
.demo-tab-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0096c7, #ff8500);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.demo.is-auto .demo-tab.is-active .demo-tab-bar {
  animation: demo-fill 8s linear forwards;
}

.demo.is-auto:hover .demo-tab-bar,
.demo.is-auto:focus-within .demo-tab-bar,
.demo.is-waiting .demo-tab-bar {
  animation-play-state: paused;
}

@keyframes demo-fill {
  to { transform: scaleX(1); }
}

/* Bühne */
.demo-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  isolation: isolate;
  padding: 0 0 14px;
}

/* Geräte. --w/--h = Entwurfsgrösse des Bildschirms in px, --k = Massstab (setzt js/demo.js
   passend zur Breite der Bühne; die Werte hier gelten ohne Skript). */
.dv {
  position: relative;
  flex: none;
}

.dv-screen {
  position: relative;
  box-sizing: content-box;
  width: calc(var(--w) * var(--k));
  height: calc(var(--h) * var(--k));
  overflow: hidden;
  background: #f7fafd;
}

.dv--laptop {
  --w: 880px;
  --h: 550px;
  --k: 0.72;
}

.dv--laptop .dv-screen {
  border: 9px solid #1e293b;
  border-radius: 15px 15px 5px 5px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.2);
}

.dv-base {
  position: relative;
  display: block;
  height: 12px;
  margin: 0 -2.2%;
  border-radius: 2px 2px 14px 14px;
  background: linear-gradient(180deg, #e7ecf3, #b4c0cf);
  box-shadow: 0 14px 22px rgba(15, 23, 42, 0.16);
}

.dv-base::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 14%;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: #9aa6b5;
  transform: translateX(-50%);
}

.dv--phone {
  --w: 280px;
  --h: 580px;
  --k: 0.62;
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 2px;
}

.dv--phone .dv-screen {
  border: 6px solid #1e293b;
  border-radius: 26px;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.28);
}

.dv--phone::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(6px + 14px * var(--k));
  width: calc(70px * var(--k));
  height: calc(18px * var(--k));
  border-radius: 100px;
  background: #1e293b;
  transform: translateX(-50%);
}

.sv {
  display: block;
  flex: none;
  overflow: visible;
}

/* Die Flügel falten sich um die Körperachse (wie im Hero, in der Tour und in der App). */
.tc-fly-near,
.tc-fly-far {
  transform-box: view-box;
  transform-origin: 21.5px 24.8px;
  animation: home-fly-near 2.4s ease-in-out infinite;
}

.tc-fly-far {
  animation-name: home-fly-far;
  animation-delay: -1.37s;
}

/* In der nachgebauten App stehen die Flügel still. */
.ui .tc-fly-near,
.ui .tc-fly-far {
  animation: none;
}

@keyframes home-fly-near {
  0%, 100% { transform: rotate(39.5deg) skewY(0deg) scale(1, 1) rotate(-39.5deg); }
  42% { transform: rotate(39.5deg) skewY(14deg) scale(0.3, 0.96) rotate(-39.5deg); }
}

@keyframes home-fly-far {
  0%, 100% { transform: rotate(39.5deg) skewY(0deg) scale(1, 1) rotate(-39.5deg); }
  42% { transform: rotate(39.5deg) skewY(-14deg) scale(0.55, 1.03) rotate(-39.5deg); }
}

/* ---------- Die nachgebaute App (.ui) ----------
   Alle Masse in px in der Entwurfsgrösse des Geräts (Laptop 880 × 550, Handy 280 × 580);
   das Ganze wird als Bild auf --k verkleinert. Farben und Aufbau folgen der App
   («Aurora Weiss»: helles Blau, weisse Karten, Linien-Symbole, Pillen-Knöpfe). */
.ui {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--w);
  height: var(--h);
  background:
    radial-gradient(60% 50% at 34% 0%, #e2f0fb 0%, transparent 70%),
    radial-gradient(42% 42% at 100% 100%, #fdf2e8 0%, transparent 70%),
    #f7fafd;
  color: #0f172a;
  font: 400 10.5px/1.4 var(--font);
  text-align: left;
  transform: scale(var(--k));
  transform-origin: 0 0;
  user-select: none;
}

.ui .ui-b,
.ui .ui-s {
  font-weight: 600;
}

/* In der nachgebauten App stehen keine <b>, <strong> und <h4> (Seobility zählte sie als
   Fettungen und Überschriften der Seite): .ui-b = fett, .ui-s = Zahl, .ui-h = Titel. */
.ui .ui-h {
  margin: 0;
}

.ui [data-go] {
  cursor: pointer;
}

.ui--desk {
  display: flex;
}

/* Seitenleiste */
.ui-side {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 180px;
  padding: 14px 9px 12px;
  border-right: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.45);
}

.ui-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 10px;
}

.ui-logo .sv {
  width: 19px;
  height: 19px;
}

.ui-logo .ui-b {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.9px;
  line-height: 1;
}

.ui-logo i {
  display: block;
  margin-top: 2px;
  font-size: 7px;
  font-style: normal;
  letter-spacing: 1.7px;
  text-align: right;
}

.ui-label {
  padding: 9px 8px 4px;
  color: #64748b;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.2px;
}

.ui-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4.5px 8px;
  border-radius: 8px;
  color: #516179;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ui-nav .ai {
  width: 12.5px;
  height: 12.5px;
}

.ui-nav[data-go]:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #0077b6;
}

.ui-nav.is-active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
  color: #0077b6;
  font-weight: 600;
}

.ui-product {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
}

.ui-product .sv {
  width: 13px;
  height: 13px;
}

/* Hauptbereich */
.ui-main {
  position: relative;
  flex: 1;
  min-width: 0;
}

.ui-top {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #475569;
}

.ui-top .ai {
  width: 14px;
  height: 14px;
}

.ui-co,
.ui-user {
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

.ui-co {
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 600;
}

.ui-user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px 3px 4px;
}

.ui-user i {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #0096c7;
  color: #fff;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 700;
}

.ui-user .ui-b {
  display: block;
  font-size: 9.5px;
  line-height: 1.2;
}

.ui-user span span:where(:not(.ui-b, .ui-s)) {
  display: block;
  color: #64748b;
  font-size: 8px;
  line-height: 1.2;
}

/* Ansichten: liegen übereinander, sichtbar ist die aktive. Ihr Inhalt kommt gestaffelt herein. */
.ui-view {
  position: absolute;
  inset: 0;
  padding: 16px 20px 16px 22px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.ui-view.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s ease 0.05s;
}

.ui-view.is-active .in {
  animation: ui-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 70ms + 140ms);
}

@keyframes ui-in {
  from { opacity: 0; transform: translateY(9px); }
}

/* Bausteine */
.ui-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.ui-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #e2eff9;
  color: #0077b6;
}

.ui-tile .ai {
  width: 15px;
  height: 15px;
}

.ui-tile--warm,
.ui-stat--warm .ui-tile {
  background: #ffe8d8;
  color: #ff5400;
}

.ui-tile--lg {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.ui-tile--lg .ai {
  width: 20px;
  height: 20px;
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border: 1px solid #0077b6;
  border-radius: 100px;
  background: #fff;
  color: #0077b6;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.ui-btn .ai {
  width: 11px;
  height: 11px;
}

.ui-btn--primary {
  background: #0077b6;
  box-shadow: 0 4px 10px rgba(0, 119, 182, 0.3);
  color: #fff;
}

.ui-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.ui-pill--ok {
  background: #e2f6e9;
  color: #15803d;
}

.ui-pill--mid {
  background: #fff0d9;
  color: #b45309;
}

.ui-pill--high {
  background: #ffe3da;
  color: #c2410c;
}

/* Übersicht */
.ui-title {
  margin: 5px 0 24px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.ui-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 2.05fr;
  gap: 10px;
}

.ui-score {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
}

.ui-ring {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  flex: none;
  width: 76px;
  height: 76px;
}

.ui-ring svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.ui-ring circle {
  fill: none;
  stroke: #e3eef6;
  stroke-width: 6;
}

.ui-ring .ui-ring-val {
  stroke: #0096c7;
  stroke-dasharray: 78 100;
  stroke-linecap: round;
}

.ui-view.is-active .ui-ring-val {
  animation: ui-ring 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.35s backwards;
}

@keyframes ui-ring {
  from { stroke-dasharray: 0 100; }
}

.ui-ring .ui-b {
  font-size: 21px;
  line-height: 1;
}

.ui-ring i {
  color: #64748b;
  font-size: 7.5px;
  font-style: normal;
}

.ui-score > span:last-child > .ui-b,
.ui-mini .ui-b,
.ui-stat .ui-b,
.ui-mod .ui-b,
.m-card .ui-b {
  display: block;
  font-size: 10.5px;
}

.ui-score > span:last-child > span:where(:not(.ui-b, .ui-s)),
.ui-mini span span:where(:not(.ui-b, .ui-s)),
.ui-stat span span:where(:not(.ui-b, .ui-s)),
.ui-mod span span:where(:not(.ui-b, .ui-s)),
.m-card span span:where(:not(.ui-b, .ui-s)) {
  display: block;
  color: #64748b;
  font-size: 9px;
}

.ui-score > span:last-child > span:where(:not(.ui-b, .ui-s)) {
  margin: 3px 0 7px;
}

.ui-score em,
.ui-mod em {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #0077b6;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 600;
}

.ui-score em .ai,
.ui-mod em .ai {
  width: 10px;
  height: 10px;
}

.ui .ui-s {
  margin-right: 2px;
  color: #0f172a;
  font-size: 12px;
}

.ui-duo {
  display: grid;
  gap: 10px;
}

.ui-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
}

.ui-brief {
  padding: 12px 14px;
  border-color: #ffd8bb;
  background: #fff4ea;
}

.ui-brief-label {
  color: #c2410c;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.ui-brief-body {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 7px;
}

.ui-brief-fly {
  display: grid;
  flex: none;
  justify-items: center;
  gap: 9px;
}

.ui-brief-fly .sv {
  width: 38px;
  height: 39px;
}

.ui-brief-fly i {
  padding: 5px 10px;
  border: 1px solid #0077b6;
  border-radius: 100px;
  background: #fff;
  color: #0077b6;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.ui-brief-text {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.ui q {
  color: #475569;
  font-size: 10.5px;
  quotes: "«" "»";
}

.ui-todo {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 10px;
}

.ui-todo .ai {
  width: 11px;
  height: 11px;
  padding: 2px;
  border-radius: 50%;
  background: #15803d;
  color: #fff;
  stroke-width: 3.4;
  box-sizing: border-box;
}

.ui-todo i {
  width: 11px;
  height: 11px;
  border: 3.5px solid #0077b6;
  border-radius: 50%;
  background: #fff;
  box-sizing: border-box;
}

.ui-todo .ui-b {
  color: #0f172a;
}

.ui-sub {
  display: block;
  margin: 14px 0 8px;
  font-size: 11.5px;
  font-weight: 500;
}

.ui-mods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ui-mod {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ui-mod em {
  margin-left: auto;
}

.ui-mod[data-go]:hover,
.ui-mini[data-go]:hover {
  border-color: rgba(0, 119, 182, 0.35);
  box-shadow: 0 6px 16px rgba(0, 119, 182, 0.12);
}

/* Geführte Erfassung mit dem Sommervogel */
.ui-guide-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
}

.ui-guide-head > .ai {
  width: 14px;
  height: 14px;
  color: #475569;
}

.ui-guide-head .sv {
  width: 22px;
  height: 22px;
}

.ui-guide-head .ui-b,
.m-guide .ui-b {
  display: block;
  font-size: 12.5px;
}

.ui-guide-head span span:where(:not(.ui-b, .ui-s)),
.m-guide span span:where(:not(.ui-b, .ui-s)) {
  display: block;
  color: #64748b;
  font-size: 9.5px;
}

.ui-guide-head em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #0077b6;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
}

.ui-guide-head em .ai {
  width: 12px;
  height: 12px;
}

.ui-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 20px;
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 600;
}

.ui-steps span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}

.ui-steps .is-on {
  color: #0077b6;
}

.ui-steps .is-on::before {
  background: #0077b6;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.18);
}

.ui-steps i {
  width: 34px;
  height: 1px;
  background: #cbd5e1;
}

.ui-chat {
  width: 76%;
  margin: 0 auto;
}

.ui-bubble {
  position: relative;
  margin-left: 28px;
  padding: 12px 15px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.ui-bubble > .sv {
  position: absolute;
  left: -28px;
  bottom: 4px;
  width: 20px;
  height: 20px;
}

.ui-bubble .ui-b {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.ui-bubble span span:where(:not(.ui-b, .ui-s)) {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 9px;
}

.ui-hint {
  display: block;
  margin: 12px 0 8px 28px;
  color: #64748b;
  font-size: 9.5px;
}

.ui-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-left: 28px;
}

.ui-chip {
  padding: 5px 12px;
  border: 1px solid #ff8500;
  border-radius: 100px;
  background: #fff;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

/* Eine Antwort wird «angetippt»: Sie füllt sich kurz nach dem Erscheinen. */
.ui-view.is-active .ui-chip.is-picked {
  animation: ui-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) backwards, ui-pick 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 70ms + 140ms), 2.5s;
}

@keyframes ui-pick {
  40% { transform: scale(0.94); }
  100% { background: #ff8500; box-shadow: 0 5px 14px rgba(255, 133, 0, 0.38); color: #fff; }
}

/* Modul-Ansichten: Kopf, Kennzahlen, Tabelle */
.ui-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 46px 0 13px;
}

.ui-head .ui-h {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.ui-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.ui-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 11px;
}

.ui-stats--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ui-stat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  background: #fff;
}

.ui-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 11px;
}

.ui-tabs span {
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.6);
  color: #516179;
  font-size: 10px;
  font-weight: 600;
}

.ui-tabs .is-on {
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
  color: #0077b6;
}

.ui-table {
  overflow: hidden;
}

.ui-table-title {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  font-size: 11px;
  font-weight: 500;
}

.ui-row {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 8.5px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  color: #334155;
  font-size: 10px;
}

.ui-row:last-child {
  border-bottom: 0;
}

.ui-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-row > span:first-child {
  color: #0f172a;
  font-weight: 600;
}

.ui-row--head,
.ui-row--head > span:first-child {
  background: #f8fafc;
  color: #64748b;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Handy */
.m-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 16px 8px;
}

.m-top .ai {
  width: 15px;
  height: 15px;
}

.m-product {
  padding: 4px 11px;
  border-radius: 100px;
  background: linear-gradient(135deg, #0096c7, #023e8a);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
}

.ui--mob .ui-view {
  inset: 64px 0 50px;
  padding: 4px 14px 0;
  overflow: hidden;
}

.m-title {
  margin-bottom: 10px;
  font-size: 14.5px;
  font-weight: 600;
}

.m-card {
  margin-bottom: 8px;
}

.m-score,
.m-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
}

.m-brief {
  display: grid;
  justify-items: start;
  gap: 7px;
  padding: 11px 13px;
}

.m-guide,
.m-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.m-guide .ai {
  width: 14px;
  height: 14px;
}

.m-head .ui-h {
  font-size: 14px;
  font-weight: 600;
}

.m-bubble {
  margin-left: 24px;
}

.m-bubble > .sv {
  left: -25px;
}

.ui--mob .ui-hint,
.ui--mob .ui-chips {
  margin-left: 0;
}

.ui--mob .ui-chip {
  font-size: 9.5px;
}

.m-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.m-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 7px;
}

.m-item > span:first-child {
  min-width: 0;
}

.m-item .ui-b {
  display: block;
  font-size: 10.5px;
}

.m-item span span:where(:not(.ui-b, .ui-s)) {
  display: block;
  color: #64748b;
  font-size: 9px;
}

.m-item .ui-pill {
  flex: none;
}

.m-toast {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #1e293b;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.3);
  color: #fff;
}

.m-toast .ai {
  width: 16px;
  height: 16px;
  color: #ffb04d;
}

.m-toast .ui-b {
  display: block;
  font-size: 10.5px;
}

.m-toast span span:where(:not(.ui-b, .ui-s)) {
  color: #cbd5e1;
  font-size: 9px;
}

.m-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 50px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
}

.m-nav span {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  color: #516179;
  font-size: 8px;
}

.m-nav .ai {
  width: 15px;
  height: 15px;
}

.m-nav .is-active {
  color: #0077b6;
  font-weight: 600;
}


/* Ohne Skript: kleinere Geräte auf schmaleren Bildschirmen (mit Skript rechnet home.js genau). */
@media (max-width: 1300px) {
  .dv--laptop { --k: 0.63; }
  .dv--phone { --k: 0.54; }
}

/* Untereinander: Knöpfe als Reihe zum Wischen, darunter die Bühne, dann der Aufruf. */
@media (max-width: 1060px) {
  .demo {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .demo-side {
    display: contents;
  }

  .demo-tabs {
    flex-direction: row;
    gap: 8px;
    margin: 0 -20px;
    padding: 2px 20px 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .demo-tabs::-webkit-scrollbar {
    display: none;
  }

  .demo-tab {
    flex: none;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 8px;
    border-color: rgba(15, 23, 42, 0.07);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.6);
  }

  .demo-tab-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
  }

  .demo-tab-icon .ai {
    width: 18px;
    height: 18px;
  }

  .demo-tab-text {
    padding: 0;
  }

  .demo-tab-text strong {
    font-size: 14.5px;
    white-space: nowrap;
  }

  .demo-tab-text span {
    display: none;
  }

  .demo-side .btn {
    order: 3;
    justify-self: center;
  }

  .dv--laptop { --k: 0.68; }
}

/* Schmale Bühne (js/demo.js setzt .is-narrow; ohne Skript ab 640px): nur das Handy, in der Mitte. */
.demo.is-narrow .dv--laptop {
  display: none;
}

.demo.is-narrow .demo-stage {
  justify-content: center;
  padding-left: 0;
}

.demo.is-narrow .dv--phone {
  position: relative;
  right: auto;
  bottom: auto;
}

@media (max-width: 640px) {
  .dv--laptop {
    display: none;
  }

  .dv--phone {
    --k: 0.82;
    position: relative;
    right: auto;
    bottom: auto;
  }

  .demo-stage {
    justify-content: center;
    padding: 6px 0 10px;
  }
}

/* ---------- Ohne Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .ui *,
  .ui-view.is-active .in {
    animation: none !important;
  }

  .ui-view,
  .demo-tab-text span {
    transition: none !important;
  }
}
