/* ============================================================
   Basis-Stylesheet der Schach-App, übernommen von /apps/transcription
   (gleiches Look & Feel wie die übrigen WOSA-Apps). Ergänzungen in chess.css.
   ============================================================ */

:root {
  --red: #D32623;
  --red-hover: #F10400;
  --red-deep: #A81C1A;
  --red-tint: #FDECEB;

  --ink: #333333;
  --ink-strong: #16181C;
  --ink-mid: #5F646E;
  --ink-dim: #8B919C;

  --dark: #121418;
  --dark-soft: #1C1F26;

  --paper: #FFFFFF;
  --ground: #F4F5F7;
  --ground-soft: #FAFAFB;
  --line: #E3E5E9;
  --line-soft: #EEEFF2;

  --ok: #1CB014;
  --bmc-yellow: #FFDD00;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-xl: 16px;

  --shadow-card: 0 1px 2px rgba(22, 24, 28, .04), 0 12px 32px rgba(22, 24, 28, .07);
  --shadow-lift: 0 2px 4px rgba(22, 24, 28, .06), 0 20px 48px rgba(22, 24, 28, .12);
  --shadow-red: 0 8px 24px rgba(211, 38, 35, .28);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ease-back: cubic-bezier(.34, 1.4, .64, 1);

  --font: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }

a {
  color: var(--red);
  text-decoration: none;
  transition: color .2s var(--ease-soft);
}
a:hover { color: var(--red-hover); }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

input, select, textarea { font: inherit; color: inherit; }

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

[id="werkzeug"],
[id="resultcontainer"],
[id="einsatz"],
[id="ablauf"],
[id="fragen"] { scroll-margin-top: 88px; }

.mono { font-family: var(--mono); }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container { padding: 0 32px; }
}

.eyebrow {
  display: block;
  margin: 0 0 12px;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow--light { color: rgba(255, 255, 255, .6); }

.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink-mid);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { width: auto; height: 34px; }

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header__link {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink);
  transition: color .18s var(--ease-soft), background-color .18s var(--ease-soft);
}
.site-header__link:hover { color: var(--red); background: var(--red-tint); }

.site-header__link--hideSmall { display: none; }
.site-header .site-header__cta { display: none; }

@media (min-width: 576px) {
  .site-header__link--hideSmall { display: inline-block; }
}
@media (min-width: 768px) {
  .site-header .site-header__cta { display: inline-flex; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--paper);
  background: var(--red);
  transition: background-color .2s var(--ease-soft), color .2s var(--ease-soft),
              border-color .2s var(--ease-soft), transform .2s var(--ease), box-shadow .2s var(--ease);
}

.btn:hover,
.btn-primary:hover {
  color: var(--paper);
  background: var(--red-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-red);
}

.btn-primary {
  min-height: 52px;
  min-width: 200px;
  padding: 15px 34px;
  font-size: 1.0625rem;
}

.btn-primary:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary .btn-label { display: inline-flex; align-items: center; gap: 10px; }
.btn-primary .btn-label::after { content: '\2192'; font-size: 1.1em; }

.btn-loading {
  display: none;
  align-items: center;
  gap: 5px;
}
.btn-loading span {
  display: inline-block;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: currentColor;
  animation: loadBar 1s ease-in-out infinite;
}
.btn-loading span:nth-child(2) { animation-delay: .15s; }
.btn-loading span:nth-child(3) { animation-delay: .3s; }

@keyframes loadBar {
  0%, 100% { transform: scaleY(.4); }
  50%      { transform: scaleY(1); }
}

.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s var(--ease-soft), border-color .18s var(--ease-soft),
              color .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}

.btn-secondary {
  color: var(--ink-strong);
  background: var(--paper);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 8px 20px rgba(22, 24, 28, .1);
}

.btn-ghost {
  color: var(--ink-mid);
  background: transparent;
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--red); background: var(--red-tint); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 88px;
  color: var(--paper);
  background: var(--dark);
}

/* Gerader Abschluss nach unten, die Card ragt in den dunklen Bereich. */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  background: var(--ground);
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .25) 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .25) 70%, transparent 100%);
  pointer-events: none;
}

.hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 992px) {
  .hero__layout { grid-template-columns: minmax(0, 1fr) 340px; }
}

.hero__inner { max-width: 780px; }

.title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--paper);
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--red);
}

.hero__accent { color: var(--red); }

.hero__inner .eyebrow .beta-badge {
  margin-left: 8px;
  padding: 3px 10px;
  font-size: .68rem;
  vertical-align: 1px;
}

.hero__lead {
  margin-top: 20px;
  max-width: 60ch;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .72);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.hero__fact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9375rem;
  color: rgba(255, 255, 255, .78);
}
.hero__fact i { color: var(--red); }

/* Animierte Wellenform, nur als ruhige Grafik neben dem Text */
.waveform-hero {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 160px;
}

@media (min-width: 992px) {
  .waveform-hero { display: flex; }
}

.waveform-hero .bar {
  flex-shrink: 0;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
  opacity: .85;
  animation: wave 1.6s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { height: 10px; }
  50%      { height: 110px; }
}

/* Einblenden wie in aiact */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.reveal { opacity: 0; animation: rise .6s var(--ease) forwards; }
.reveal--1 { animation-delay: .05s; }
.reveal--2 { animation-delay: .13s; }
.reveal--3 { animation-delay: .21s; }
.reveal--4 { animation-delay: .29s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; animation: none; }
}

/* ============================================================
   Werkzeug-Card
   ============================================================ */

.tool {
  position: relative;
  z-index: 2;
  margin-top: -56px;
  padding-bottom: 56px;
}

.tool__card,
.result-card {
  padding: 32px 20px 20px;
  background: var(--paper);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
  .tool__card,
  .result-card { padding: 56px 32px 32px; }
}

.tool__head {
  max-width: 62ch;
  margin-bottom: 32px;
}

/* Link zum Kundenkonto oben rechts in der Werkzeug-Card */
.tool__card { position: relative; }
.tool__konto {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin: -12px 0 20px auto;
  padding: 9px 16px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-strong);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: color .18s var(--ease-soft), border-color .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}
.tool__konto i { color: var(--red); }
.tool__konto:hover {
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 8px 20px rgba(22, 24, 28, .1);
}
@media (min-width: 768px) {
  .tool__konto { position: absolute; top: 32px; right: 32px; margin: 0; }
}

.tool__title {
  margin: 0;
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.55rem);
  font-weight: 300;
  letter-spacing: -.01em;
  line-height: 1.18;
  color: var(--ink);
}

.tool__head .lead { margin-top: 12px; }

/* Segmentierte Auswahl Upload / Aufnahme */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.seg button {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink-strong);
  background: var(--paper);
  transition: color .18s var(--ease-soft), background-color .18s var(--ease-soft),
              border-color .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}

.seg button:hover { border-color: var(--red); color: var(--red); }

.seg button.active {
  color: var(--paper);
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 6px 16px rgba(211, 38, 35, .22);
}

.panel { display: none; }
.panel.active { display: block; animation: fadeInPanel .3s var(--ease); }

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Ablage */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 300px;
  padding: 56px 20px;
  text-align: center;
  background: var(--ground-soft);
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color .2s var(--ease-soft), background-color .2s var(--ease-soft);
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--red);
  background: var(--red-tint);
}

.dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  padding: 15px;
  color: var(--red);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform .2s var(--ease-back);
}

.dropzone.is-dragover .dropzone-icon { transform: scale(1.08); }

.dropzone-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink-strong);
}

.dropzone-sub {
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink-dim);
}

/* Gewaehlte Datei */
.file-info {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  background: var(--ground-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-size: .9375rem;
}

.file-info.visible { display: flex; }
.option-row + .file-info { margin-top: 12px; }

.file-info .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}

.file-info .meta span {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--ink-mid);
}

.file-info .meta strong {
  font-weight: 600;
  color: var(--ink-strong);
  word-break: break-all;
}

.file-info .remove {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 22px;
  line-height: 1;
  color: var(--ink-mid);
  transition: color .18s var(--ease-soft), background-color .18s var(--ease-soft);
}
.file-info .remove:hover { color: var(--red); background: var(--red-tint); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

/* Fortschritt beim Upload in Teilen (app.js, upload.php) */
.upload-progress {
  margin-top: 20px;
}
.upload-progress[hidden] { display: none; }
.upload-progress__track {
  height: 6px;
  overflow: hidden;
  background: var(--line-soft);
  border-radius: 999px;
}
.upload-progress__track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  border-radius: 999px;
  transition: width .3s var(--ease-soft);
}
.upload-progress__text {
  margin: 10px 0 0;
  font-size: .875rem;
  color: var(--ink-mid);
  font-variant-numeric: tabular-nums;
}

/* Sprechererkennung */
.option-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.switch input { position: absolute; opacity: 0; pointer-events: none; }

.switch .switch-track {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  background: var(--line);
  border-radius: 999px;
  transition: background-color .2s var(--ease-soft);
}

.switch .switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--paper);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(22, 24, 28, .25);
  transition: transform .22s var(--ease);
}

.switch input:checked + .switch-track { background: var(--red); }
.switch input:checked + .switch-track .switch-knob { transform: translateX(20px); }

.switch input:focus-visible + .switch-track {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.switch-label {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink-strong);
}

.speaker-count {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .9375rem;
  color: var(--ink-mid);
}
.speaker-count[hidden] { display: none; }
.speaker-count label { display: inline-flex; align-items: center; gap: 6px; }
.speaker-count .muted { color: var(--ink-dim); font-size: .8125rem; }

.speaker-count input {
  width: 76px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-strong);
  text-align: center;
  transition: border-color .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}
.speaker-count input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(211, 38, 35, .15);
}

.diarize-hint {
  flex-basis: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #FFF6E5;
  border: 1px solid #F1D9A6;
  border-radius: var(--radius);
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--ink);
  animation: fadeInPanel .22s var(--ease);
}
.diarize-hint[hidden] { display: none; }
.diarize-hint svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: #B26B00; }

/* Aufnahme */
.record-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  background: var(--ground-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.record-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--red);
  box-shadow: var(--shadow-card);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease);
}

.record-btn .dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  transition: all .2s var(--ease);
}

.record-btn:hover { transform: scale(1.04); box-shadow: var(--shadow-red); }

.record-btn.recording .dot { width: 28px; height: 28px; border-radius: 6px; }

.record-btn.recording::before,
.record-btn.recording::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--red);
  border-radius: 50%;
  animation: pulseRing 1.8s ease-out infinite;
}
.record-btn.recording::after { animation-delay: .9s; }

@keyframes pulseRing {
  0%   { transform: scale(1); opacity: .9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.record-timer {
  min-height: 40px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 2rem;
  letter-spacing: .08em;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

.record-status {
  min-height: 18px;
  margin-top: 6px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

.live-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  max-width: 360px;
  height: 60px;
  margin-top: 28px;
  opacity: .3;
  transition: opacity .3s var(--ease);
}
.live-waveform.active { opacity: 1; }

.live-waveform .bar {
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: var(--red);
  transition: height 80ms linear;
}

.record-saved {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  width: 100%;
  max-width: 520px;
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .875rem;
  color: var(--ink-mid);
}
.record-saved[hidden] { display: none; }

/* Fehlermeldungen */
.inline-error {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--red-tint);
  border: 1px solid #F4C3C1;
  border-radius: var(--radius);
  font-size: .9375rem;
  color: var(--red-deep);
  animation: fadeInPanel .25s var(--ease);
}
.inline-error.visible { display: flex; }
.inline-error .close {
  flex-shrink: 0;
  padding: 0 6px;
  font-size: 20px;
  line-height: 1;
  color: var(--red-deep);
}

.app-error,
.recovery-bar {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  font-size: .9375rem;
  line-height: 1.55;
  animation: fadeInPanel .25s var(--ease);
}

.app-error {
  color: var(--ink);
  background: var(--red-tint);
  border: 1px solid #F4C3C1;
}

.recovery-bar {
  align-items: center;
  flex-wrap: wrap;
  background: var(--ground-soft);
  border: 1px solid var(--line);
}
.recovery-bar[hidden] { display: none; }

.app-error svg,
.recovery-bar svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.app-error svg { color: var(--red); }
.recovery-bar svg { margin-top: 0; color: var(--red); }

.app-error div,
.recovery-text { display: flex; flex-direction: column; gap: 3px; }
.app-error strong,
.recovery-text strong { font-weight: 600; color: var(--ink-strong); }
.app-error span,
.recovery-text span { color: var(--ink-mid); }

.recovery-text { flex: 1 1 220px; }

.recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 560px) {
  .recovery-actions { width: 100%; margin-left: 0; }
  .recovery-actions .btn-secondary,
  .recovery-actions .btn-ghost { flex: 1 1 auto; }
}

/* ============================================================
   Ergebnis
   ============================================================ */

.result-section {
  padding-bottom: 88px;
  animation: fadeInPanel .4s var(--ease);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.result-head .label {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
}

.result-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.result-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink-strong);
  background: var(--paper);
  transition: color .18s var(--ease-soft), border-color .18s var(--ease-soft), background-color .18s var(--ease-soft);
}
.result-actions button svg { display: inline-block; }
.result-actions button:hover { color: var(--red); border-color: var(--red); }
.result-actions button.copied { color: var(--paper); background: var(--ok); border-color: var(--ok); }

.result-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink);
}

.result-text.diarized { white-space: normal; }

.speaker-block {
  margin: 0;
  padding: 16px 0;
}

.speaker-block + .speaker-block { border-top: 1px solid var(--line-soft); }

.speaker-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
}

.speaker-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--speaker-color, var(--red));
}

.speaker-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.speaker-time {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--ink-dim);
}

.speaker-text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
}

.bmc-block {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.bmc-block .prompt { font-size: .9375rem; color: var(--ink-mid); }

.bmc-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 600;
  color: #111;
  background: var(--bmc-yellow);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease);
}
.bmc-btn:hover {
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 170, 0, .35);
}
.bmc-btn svg { width: 20px; height: 20px; }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  padding: 56px 0;
  color: rgba(255, 255, 255, .7);
  background: var(--dark);
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer__brand img { width: auto; height: 30px; }

.site-footer__links { display: flex; flex-wrap: wrap; gap: 20px; }

.site-footer__link {
  font-size: .9375rem;
  color: rgba(255, 255, 255, .78);
}
.site-footer__link:hover { color: var(--paper); }

.site-footer__legal {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .5);
}

.site-footer__legal a { color: rgba(255, 255, 255, .78); }
.site-footer__legal a:hover { color: var(--paper); }

/* ============================================================
   Erklaerung, Ablauf und FAQ (Aufbau wie aiact, gerade Kanten)
   ============================================================ */

.law {
  position: relative;
  padding: 88px 0;
  color: var(--paper);
  background: var(--red);
}

.law::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.law h2,
.guide-section h2 {
  margin: 0;
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.55rem);
  font-weight: 300;
  letter-spacing: -.01em;
  line-height: 1.18;
}

.law h2 { color: var(--paper); }
.guide-section h2 { color: var(--ink); }

.law__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 56px;
}

@media (min-width: 992px) {
  .law__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 88px;
    align-items: start;
  }
}

.law__lead {
  margin-top: 20px;
  max-width: 52ch;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .88);
}

.law__cta { margin-top: 32px; }

.law__list { display: flex; flex-direction: column; gap: 12px; }

.law__item {
  padding: 18px 20px;
  background: rgba(0, 0, 0, .16);
  border-radius: var(--radius-lg);
}

.law__itemTitle {
  margin: 0 0 6px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--paper);
}

.law__itemText {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .85);
}

.btn--lg { padding: 15px 34px; font-size: 1.125rem; }

.btn--onDark {
  color: var(--paper);
  background: transparent;
  border-color: rgba(255, 255, 255, .45);
}

.btn--onDark:hover {
  color: var(--ink-strong);
  background: var(--paper);
  border-color: var(--paper);
  box-shadow: none;
}

.guide-section { padding: 88px 0 0; }
.guide-section--tight { padding-top: 56px; }

.guide-section__head { max-width: 62ch; margin-bottom: 32px; }

.steps { display: grid; gap: 20px; }

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.step {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.step__no {
  display: block;
  margin-bottom: 8px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--red);
}

.step__title {
  margin: 0 0 6px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-strong);
}

.step__text {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--ink-mid);
}

.faq { display: flex; flex-direction: column; gap: 8px; max-width: 860px; }

.faq__item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink-strong);
  cursor: pointer;
  list-style: none;
  transition: color .18s var(--ease-soft);
}

.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--red); }

.faq__q i {
  flex: 0 0 auto;
  color: var(--red);
  transition: transform .22s var(--ease);
}

.faq__item[open] .faq__q i { transform: rotate(45deg); }

.faq__a {
  padding: 0 20px 18px;
  font-size: .9688rem;
  line-height: 1.65;
  color: var(--ink-mid);
}

.faq__a p { margin: 0; }

/* Tageskontingent aufgebraucht (inc/input_forms.php) */
.tool__forms[hidden] { display: none; }

.quota-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--red-tint);
  border: 1px solid #F4C3C1;
  font-size: .9375rem;
  line-height: 1.6;
  animation: fadeInPanel .25s var(--ease);
}
.quota-box > svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; color: var(--red); }
.quota-box__text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.quota-box__text strong { font-size: 1.125rem; font-weight: 600; color: var(--ink-strong); }
.quota-box__text > span { color: var(--ink-mid); max-width: 60ch; }
.quota-box__cta { margin-top: 8px; text-decoration: none; }

@media (max-width: 560px) {
  .quota-box { flex-direction: column; padding: 18px; }
  .quota-box__cta { width: 100%; justify-content: center; }
}

/* ============================================================
   Eigenes Kontingent (inc/kontingent_box.php)
   Links immer das Gratis-Kontingent als 8 Stunden-Segmente,
   rechts nur bei aktivem Kauf das Angebot «Kein Abo» (dunkel,
   wie der Hero, damit es sich klar vom Gratis-Teil abhebt).
   ============================================================ */
.trk-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--ground-soft);
  overflow: hidden;
  line-height: 1.5;
}
.trk-panel.has-offer { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }

.trk-free { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 28px 30px; }
.trk-free__head { margin: 0; font-size: 1.1875rem; color: var(--ink-mid); }
.trk-free__reset { margin: 4px 0 0; font-size: 1.5rem; font-weight: 600; line-height: 1.25; color: var(--ink-strong); }
.trk-free__head strong { color: var(--ink-strong); font-weight: 600; }
.trk-free__num { font-size: 2.25rem; font-weight: 700; line-height: 1; color: var(--ink-strong); font-variant-numeric: tabular-nums; margin-right: 2px; }
.trk-panel.is-empty .trk-free__head strong { color: var(--red); }

.trk-hours { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.trk-hour {
  position: relative;
  height: 14px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.trk-hour::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--red);
}
.trk-hour.f100::after { width: 100%; }
.trk-hour.f75::after { width: 75%; }
.trk-hour.f50::after { width: 50%; }
.trk-hour.f25::after { width: 25%; }
.trk-hour.f0::after { width: 0; }

.trk-free__text { margin: 0; color: var(--ink-mid); font-size: 1rem; max-width: 60ch; }
.trk-free__firma { margin: 6px 0 0; color: var(--ink); font-size: 1rem; max-width: 60ch; }
.trk-free__cta { align-self: flex-start; text-decoration: none; }
.trk-soon {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 0;
  padding: 12px 14px;
  border: 1px solid #F4C3C1;
  border-radius: var(--radius-lg);
  background: var(--red-tint);
  color: var(--ink);
  font-size: 1rem;
  max-width: 68ch;
}
.trk-soon i { color: var(--red); margin-top: 4px; }
.trk-own { margin: 4px 0 0; font-size: .9375rem; color: var(--ink-mid); }
.trk-own strong { color: var(--ink-strong); }
.trk-own a { margin-left: 10px; font-weight: 600; }

.trk-offer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px 30px;
  background: var(--dark);
  color: #E6E8EC;
}
.trk-offer__title { margin: 0; font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; color: #fff; }
.trk-offer__price { margin: 0; font-size: 1rem; color: #B9BDC5; }
.trk-offer__price strong { font-size: 1.5rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.trk-offer__list { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 6px; padding: 0; list-style: none; font-size: .9375rem; }
.trk-offer__list li { position: relative; padding-left: 22px; }
.trk-offer__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .45em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}
.trk-offer__cta { text-decoration: none; }
.trk-offer__login,
.trk-offer__firma { margin: 0; font-size: .875rem; color: #B9BDC5; }
.trk-offer a:not(.btn-primary) { color: #fff; font-weight: 600; }
.trk-offer a:not(.btn-primary):hover { color: #FF6B68; }

.trk-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #F4C3C1;
  border-radius: var(--radius-lg);
  background: var(--red-tint);
  color: var(--ink);
  font-size: .9375rem;
}

@media (max-width: 860px) {
  .trk-panel.has-offer { grid-template-columns: minmax(0, 1fr); }
  .trk-free,
  .trk-offer { padding: 22px 20px; }
  .trk-offer__cta,
  .trk-free__cta { align-self: stretch; justify-content: center; }
  .trk-hours { gap: 4px; }
}
