/* ══════════════════════════════════════════════════════════════════
   /tools — Discovery Hub (V3)
   Eigene Schicht, ausschliesslich fuer /tools. Alles ist auf `th-`
   genamespaced (tools hub), damit nichts in die vier Rechner, die
   Startseite oder die Hausverwaltung blutet — die Lehre aus dem
   `.v-note`-Post-it-Bug.

   Tokens kommen aus dem bestehenden Owner: die Seite setzt
   `data-tool-v3` auf den Wrapper und liest damit die V3-Variablen aus
   vertical.css. Kein zweites Token-System, kein neues Orange,
   kein neues Ivory.

   Material wie in der Familie: dunkle Schale als Marken-/Orientierungs-
   rahmen, helle Flaechen dort, wo gearbeitet wird.
   Orange = Aktion · Ivory = Bedeutung · Neutral = Lesetext.
   ══════════════════════════════════════════════════════════════════ */

.th-hub {
  --th-gap: 22px;
  --th-round: 16px;
}

.th-wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
@media (max-width: 700px) { .th-wrap { width: calc(100% - 32px); } }

/* ---------- Hero: kurz. Die Branchenwahl soll frueh sichtbar sein. ---------- */
.th-hero { padding: 26px 0 22px; }
.th-hero h1 {
  max-width: 17ch;
  margin: 0 0 12px;
  color: var(--v3-offwhite);
  font: 650 clamp(30px, 5.2vw, 46px) / 1.08 var(--font-display);
  letter-spacing: -0.015em;
}
.th-hero h1 .th-sig { color: var(--v-signal); }
.th-sub {
  max-width: 54ch;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.55;
}
.th-sub b { color: var(--v-signal); font-weight: 500; }
.th-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.th-facts li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13.5px; }
.th-facts li::before {
  content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%;
  background: var(--v3-core);
}

/* Ab Desktop darf der Hero enger sitzen: die Branchenwahl soll moeglichst weit
   in den ersten Viewport rutschen, ohne die Vorschauen zu schrumpfen - die sind
   der Grund, warum die Flaechen ueberhaupt etwas taugen. */
@media (min-width: 1000px) {
  .th-hero { padding: 18px 0 16px; }
  .th-hero h1 { margin-bottom: 10px; }
  .th-sub { margin-bottom: 12px; }
  .th-picker { gap: 18px; }
}

/* ---------- Branchenwahl: vier echte Produktflaechen ---------- */
.th-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--th-gap);
  padding-bottom: 34px;
}
@media (max-width: 860px) { .th-picker { grid-template-columns: minmax(0, 1fr); } }

.th-branch {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 20px 18px;
  border: 1px solid var(--v-line);
  border-radius: var(--th-round);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  transition: border-color 0.18s, transform 0.18s;
}
.th-branch:hover { border-color: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.th-branch:focus-within { border-color: var(--v3-core); }

.th-b-name {
  margin: 0;
  color: var(--text);
  font: 650 19px / 1.2 var(--font-display);
}
.th-b-sig { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
/* Ivory traegt hier den fachlichen Parameter, nicht die ganze Zeile. */
.th-b-sig b { color: var(--v-signal); font-weight: 500; }

/* Die Vorschau ist die echte erste Frage des jeweiligen Rechners,
   als helle Arbeitsflaeche — keine erfundene UI, kein erfundenes Ergebnis. */
.th-b-prev {
  margin-top: auto;
  padding: 14px 14px 13px;
  border-radius: 12px;
  background: var(--v3-paper);
  color: var(--v3-ink);
}
.th-b-q { margin: 0 0 10px; color: var(--v3-ink-2); font: 500 13.5px / 1.35 var(--font-display); }
.th-b-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.th-b-opts span {
  padding: 8px 11px;
  border: 1px solid var(--v3-ink-line);
  border-radius: 9px;
  background: #fff;
  color: var(--v3-ink-2);
  font-size: 12.5px;
  line-height: 1.2;
}
/* Zahleneingabe: dieselbe Form wie im Rechner (Wert zwischen zwei Tasten). */
.th-b-num { display: flex; align-items: stretch; width: max-content; max-width: 100%; border: 1px solid var(--v3-ink-line); border-radius: 10px; background: #fff; overflow: hidden; }
.th-b-num i { display: grid; place-items: center; width: 38px; color: var(--v3-ink-mut); font-style: normal; font-size: 17px; }
.th-b-num i + b { border-inline: 1px solid var(--v3-ink-line); }
.th-b-num b { display: grid; place-items: center; min-width: 96px; padding: 9px 12px; color: var(--v3-ink); font: 600 15px / 1.2 var(--font-display); }
.th-b-num em { display: grid; place-items: center; padding-right: 12px; color: var(--v3-ink-mut); font-style: normal; font-size: 12.5px; }
.th-b-hint { margin: 9px 0 0; color: var(--v3-ink-mut); font-size: 11.5px; line-height: 1.4; }

.th-b-go {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  min-height: 48px; padding: 0 2px;
  color: var(--v3-core);
  font: 650 15px / 1 var(--font-display);
  text-decoration: none;
}
.th-b-go::after { content: ""; position: absolute; inset: 0; border-radius: var(--th-round); }
.th-b-go svg { width: 15px; height: 15px; }
.th-branch:hover .th-b-go { text-decoration: underline; }

/* ---------- Warum branchenspezifisch: Vergleich statt Absatz ---------- */
.th-why { padding: 30px 0 34px; border-top: 1px solid var(--v-line-2); }
.th-h2 { margin: 0 0 8px; color: var(--text); font: 650 clamp(21px, 2.6vw, 27px) / 1.2 var(--font-display); }
.th-lead { max-width: 60ch; margin: 0 0 22px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.th-lead b { color: var(--v-signal); font-weight: 500; }

.th-cmp { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px; align-items: stretch; }
@media (max-width: 860px) { .th-cmp { grid-template-columns: minmax(0, 1fr); } }
.th-col { padding: 16px 16px 14px; border: 1px solid var(--v-line-2); border-radius: 14px; }
.th-col-h { margin: 0 0 12px; color: var(--muted); font: 500 12px / 1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.th-col--generic { background: rgba(255, 255, 255, 0.015); }
.th-col--eo { background: rgba(255, 255, 255, 0.035); }

.th-params { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.th-params li { display: flex; align-items: baseline; gap: 9px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.th-params li span { flex: none; min-width: 84px; color: var(--v3-faint, var(--muted)); font-size: 12.5px; }
/* Ein Flex-Item je Zeileninhalt: sonst wird aus "<b>Wort</b>, Rest" zweimal Flex und die
   Gap reisst das Komma vom Wort ab. */
.th-params li em { font-style: normal; min-width: 0; }
.th-col--generic .th-params li { color: var(--v3-sheet-1); }
.th-col--eo .th-params li b { color: var(--v-signal); font-weight: 500; }
.th-cmp-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- Was der Rechner liefert: kompakte Sequenz ---------- */
.th-gets { padding: 30px 0 34px; border-top: 1px solid var(--v-line-2); }
.th-seq { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: th; }
@media (max-width: 1000px) { .th-seq { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .th-seq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.th-seq li {
  position: relative;
  padding: 13px 12px 12px;
  border: 1px solid var(--v-line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.th-seq b { display: block; margin-bottom: 4px; color: var(--text); font: 500 14px / 1.25 var(--font-display); }
.th-seq span { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.th-seq-after { margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.th-seq-after b { color: var(--v-signal); font-weight: 500; }

/* ---------- Branche fehlt ---------- */
.th-missing { padding: 26px 0 30px; border-top: 1px solid var(--v-line-2); }
.th-missing-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 18px 20px; border: 1px solid var(--v-line-2); border-radius: 14px; background: rgba(255, 255, 255, 0.022); }
.th-missing-t { flex: 1 1 320px; margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.th-missing-t b { color: var(--text); font-weight: 500; }
.th-missing .btn { flex: none; }

/* ---------- Wissen: nachgeordnet, aber im DOM ---------- */
.th-know { padding: 26px 0 40px; border-top: 1px solid var(--v-line-2); }
.th-acc { margin-top: 14px; }
.th-acc details { border-top: 1px solid var(--v-line); }
.th-acc details:last-of-type { border-bottom: 1px solid var(--v-line); }
.th-acc summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 52px; padding: 13px 2px;
  color: var(--text); font: 500 15.5px / 1.35 var(--font-display);
  cursor: pointer; list-style: none;
}
.th-acc summary::-webkit-details-marker { display: none; }
.th-acc summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px;
  border-right: 1.7px solid var(--muted); border-bottom: 1.7px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.2s;
}
.th-acc details[open] summary::after { transform: rotate(-135deg); }
.th-acc .th-acc-body { padding: 0 2px 16px; }
.th-acc p { margin: 0 0 10px; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.th-acc p:last-child { margin-bottom: 0; }
.th-acc b { color: var(--text); font-weight: 500; }
.th-guides { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.th-guides a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 13px;
  border: 1px solid var(--v-line); border-radius: 999px;
  color: var(--muted); font-size: 13.5px; text-decoration: none;
}
.th-guides a:hover { border-color: rgba(255, 255, 255, 0.22); color: var(--text); }

/* ---------- Bewegung nur, wenn erwuenscht ---------- */
@media (prefers-reduced-motion: reduce) {
  .th-branch, .th-acc summary::after { transition: none; }
  .th-branch:hover { transform: none; }
}
