/* Analyse */
.page-analyse .analyse-settings {
  align-self: center;
}

.analyse-settings .panel-body,
.analyse-example .panel-body {
  padding: clamp(18px, 2.5vw, 32px);
}

.analyse-settings dl,
.analyse-example dl {
  margin: 16px 0 0;
}

.analyse-settings dl > div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.analyse-settings dl > div:last-child {
  padding-bottom: 0;
}

.analyse-settings dt {
  font-weight: 650;
}

.analyse-settings dd,
.analyse-example dd {
  margin: 0;
}

.analyse-settings dd,
.analyse-example p,
.analyse-scope {
  color: var(--text-2);
}

.analyse-scope {
  margin: 16px 0 28px;
}

.analyse-scope strong {
  color: var(--text);
}

.analyse-example p {
  margin-top: 8px;
}

.analyse-example dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 16px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.analyse-example dl > div:last-child {
  padding-bottom: 0;
}

.analyse-example dd {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.analyse-example .analyse-example-total {
  color: var(--accent-text);
  font-weight: 650;
}

@media (max-width: 620px) {
  .page-analyse .analyse-settings {
    display: none;
  }
}

/* Umfang-Rechner Namensanalyse (18.11.2026, Luca: rechts nicht leer lassen,
   Kunde soll sehen, dass Umfang, KI-Profile und Kriterien frei wählbar sind) */
.analyse-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "head panel" "ablauf panel";
  column-gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.analyse-name-head { grid-area: head; }
.analyse-name-ablauf { grid-area: ablauf; }
.analyse-name-head .lead { margin-top: 24px; }

.analyse-rechner {
  grid-area: panel;
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.analyse-rechner.is-hoch { position: relative; top: auto; }

.analyse-rechner .panel-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.analyse-rechner-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .04em;
}

.analyse-rechner .panel-body { padding: clamp(18px, 2.4vw, 30px); }

.analyse-regler { margin-top: 18px; }

.analyse-regler label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-weight: 650;
}

.analyse-regler output {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.analyse-regler input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 32px;
  margin: 4px 0 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  --fill: 50%;
}

.analyse-regler input[type="range"]:focus { outline: none; }

.analyse-regler input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--fill), var(--line-2) var(--fill));
}

.analyse-regler input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
}

.analyse-regler input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
}

.analyse-regler input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.analyse-regler input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
}

.analyse-regler input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-soft); }
.analyse-regler input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-soft); }

.analyse-wahl {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.analyse-wahl legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 650;
}

.analyse-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analyse-chips label { position: relative; }

.analyse-chips label > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.analyse-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text-2);
  font-size: .88rem;
  font-weight: 600;
  transition: background-color .15s, border-color .15s, color .15s;
}

.analyse-chips label > input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

.analyse-chips label > input:checked + span::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.analyse-chips label > input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.analyse-ergebnis {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.analyse-ergebnis p { margin: 0; }

.analyse-ergebnis-label {
  color: var(--accent-text);
  font-weight: 650;
}

.analyse-ergebnis .analyse-ergebnis-zahl {
  margin-top: 4px;
  color: var(--accent-text);
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.analyse-ergebnis .analyse-ergebnis-satz {
  margin-top: 10px;
  color: var(--text-2);
  font-size: .95rem;
}

.analyse-rechner-hinweis {
  margin: 14px 0 0;
  color: var(--muted, var(--text-2));
  font-size: .88rem;
}

.analyse-rechner-cta { margin-top: 18px; }

.analyse-kombi {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.analyse-kombi p {
  margin: 0 0 8px;
  color: var(--muted, var(--text-2));
  font-size: .88rem;
}

.analyse-kombi ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analyse-kombi a {
  display: inline-block;
  padding: 6px 0;
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

@media (max-width: 920px) {
  .analyse-name {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "head" "panel" "ablauf";
    row-gap: 32px;
  }

  .analyse-rechner { position: relative; top: auto; }
  .analyse-scope { margin-bottom: 0; }
}

@media (max-width: 620px) {
  .analyse-chips span { min-height: 40px; }
  .analyse-rechner-cta { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .analyse-chips span { transition: none; }
}

/* Karte „Weitere Analysen auf Anfrage“ (18.11.2026, Luca: klebte an den Kästen, innen zu eng) */
.page-analyse #weitere > .wrap > .panel { margin-top: 20px; }
.page-analyse #weitere > .wrap > .panel .panel-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 48px;
  padding: clamp(24px, 2.6vw, 34px);
}
.page-analyse #weitere > .wrap > .panel h3 { grid-column: 1; margin: 0; }
.page-analyse #weitere > .wrap > .panel p { grid-column: 1; margin: 0; max-width: 62ch; color: var(--text-2); }
.page-analyse #weitere > .wrap > .panel .link-arrow { grid-column: 2; grid-row: 1 / span 2; justify-self: end; white-space: nowrap; }
@media (max-width: 720px) {
  .page-analyse #weitere > .wrap > .panel .panel-body { grid-template-columns: minmax(0, 1fr); }
  .page-analyse #weitere > .wrap > .panel .link-arrow { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
}

/* Plus-Knopf: bis zu 3 eigene Zielgruppen und Kriterien (18.11.2026) */
.analyse-plus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  background: none;
  color: var(--accent-text);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s;
}
.analyse-chips .analyse-plus > span { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; color: inherit; font-size: 1.15rem; font-weight: 600; line-height: 1; transition: none; }
.analyse-chips .analyse-plus > span::before { content: none; }
.analyse-plus:hover { background: var(--accent-soft); }
.analyse-plus:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.analyse-plus[hidden] { display: none; }

.analyse-eingabe { display: inline-flex; max-width: 100%; }
.analyse-eingabe input {
  width: 14em;
  max-width: 100%;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: .88rem;
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.analyse-eingabe input::placeholder { color: var(--muted, var(--text-2)); opacity: 1; }

.analyse-chips .analyse-eigen > span { padding-right: 36px; }
.analyse-weg {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.analyse-weg:hover { background: var(--line); color: var(--text); }
.analyse-weg:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }

@media (max-width: 620px) {
  .analyse-plus, .analyse-eingabe input { min-height: 40px; }
  /* 16 px verhindert das automatische Hineinzoomen am iPhone */
  .analyse-eingabe input { font-size: 16px; }
  .analyse-weg { width: 32px; height: 32px; margin-top: -16px; }
}

/* Eigene Einträge, Fassung 2 (18.11.2026, Luca: Knopf darf ohne Text nichts tun).
   Feld immer sichtbar, rundes + rechts, erst mit Text aktiv. */
.analyse-neu {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 36px;
  padding: 0 4px 0 14px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  transition: border-color .15s, box-shadow .15s;
}
.analyse-neu[hidden] { display: none; }
.analyse-neu:focus-within { border-style: solid; box-shadow: 0 0 0 4px var(--accent-soft); }
.analyse-neu input {
  width: 10.5em;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  outline: none;
}
.analyse-neu input::placeholder { color: var(--accent-text); opacity: .85; font-weight: 600; }
.analyse-neu button {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent, #0B1A2A);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.analyse-neu button:disabled { background: var(--line); color: var(--muted, var(--text-2)); cursor: default; }
.analyse-neu button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 620px) {
  .analyse-neu { min-height: 40px; }
  .analyse-neu input { font-size: 16px; }
  .analyse-neu button { width: 32px; height: 32px; }
}
