/* ==========================================================================
   Themenseiten (z. B. 3d-scan-fabrikhalle.html). Ergänzt site.css.
   ========================================================================== */

.thema-hero {
  padding: calc(var(--nav-h) + clamp(40px, 6vw, 88px)) 0 clamp(48px, 6vw, 80px);
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}
.thema-hero .container { display: grid; gap: 22px; justify-items: start; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: rgba(0, 0, 0, .62); }
.crumbs a { color: var(--blue); }
.crumbs a:hover { text-decoration: underline; }

.thema-title {
  max-width: 22ch;
  font-size: clamp(36px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--blue);
  text-wrap: balance;
}
.thema-title .nobr { white-space: nowrap; }
.thema-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Inhalt mit Seitenleiste */
.thema__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.prose { max-width: 72ch; font-size: 17.5px; line-height: 1.7; color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2.2em;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--blue);
  text-wrap: balance;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; font-size: 21px; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink); }
.prose a:not(.btn) { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:not(.btn):hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { display: grid; gap: .5em; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--blue); }
.prose strong { font-weight: 600; }

.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; height: auto; border-radius: var(--r); background: var(--paper); }
.prose figcaption { margin-top: 10px; font-size: 14.5px; color: rgba(0, 0, 0, .62); }

/* Scanbilder aus LYTHEON (Punktwolke nach Inventarklassen) mit Farblegende.
   Klassenfarben wie im LYTHEON Planer (lytheon-planer/src/core/categories.ts),
   Scannermarken #004AAC und Kabelwege #2F6EB2 wie dort in render/overlays.ts. */
.prose .scan-fig img { border: 1px solid var(--line); }
.prose .scan-fig figcaption { margin-top: 14px; }
.prose .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  line-height: 1.35;
  color: rgba(0, 0, 0, .74);
}
.prose .legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.legend .k-anlagen { --c: #4F7FC4; }
.legend .k-rohr { --c: #62A9C8; }
.legend .k-tga { --c: #86BFA8; }
.legend .k-regal { --c: #8F7A62; }
.legend .k-buehne { --c: linear-gradient(135deg, #A593C9 50%, #BF9FC0 50%); }
.legend .k-kran { --c: #C9B46A; }
.legend .k-boden { --c: #C2BCB0; }
.legend .k-scanner {
  width: auto;
  height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  --c: var(--blue);
  box-shadow: none;
  color: #fff;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  line-height: 16px;
}
.legend .k-kabel { width: 18px; height: 3px; border-radius: 2px; --c: #2F6EB2; box-shadow: none; }

/* Filmausschnitt: natives Video, startet per Medienfragment (#t=…) am passenden Kapitel
   des Startseitenfilms. Kein eigenes Skript nötig. */
.prose .scan-film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  background: var(--navy);
}
.prose .scan-film figcaption { margin-top: 12px; }

/* Hinweis- und Merkkasten im Fließtext */
.note {
  padding: 20px 24px;
  border-left: 3px solid var(--sky);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--paper);
  font-size: 16.5px;
}

/* Vergleichstabelle */
.table-wrap { overflow-x: auto; margin-block: 2em; border: 1px solid var(--line); border-radius: var(--r); }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.prose th, .prose td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--paper); font-weight: 600; color: var(--blue); }
.prose tbody tr:last-child td, .prose tbody tr:last-child th { border-bottom: 0; }
.prose tbody th { font-weight: 600; }
.prose td.is-us, .prose th.is-us { background: rgba(46, 174, 240, .08); }

/* Seitenleiste */
.thema__aside { position: sticky; top: calc(var(--nav-h) + 32px); display: grid; gap: 20px; }
.aside-box {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.aside-box h2 { margin-bottom: 14px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.aside-facts { display: grid; gap: 14px; margin-bottom: 22px; }
.aside-facts div { display: grid; gap: 2px; }
.aside-facts dt { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--blue); }
.aside-facts dd { font-size: 15px; line-height: 1.45; }
.aside-links { display: grid; gap: 10px; font-size: 15.5px; }
.aside-links a { color: var(--blue); }
.aside-links a:hover { text-decoration: underline; }
.aside-links a[aria-current="page"] { font-weight: 600; text-decoration: none; cursor: default; }

/* FAQ und Abschluss */
.thema-faq .faq__list { max-width: 900px; }
.thema-cta .container { display: grid; gap: 22px; justify-items: start; max-width: 900px; margin-inline: auto; }
.thema-cta .h2 { color: #fff; }
.thema-cta .lead { color: var(--mist-hi); }

@media (max-width: 980px) {
  .thema__grid { grid-template-columns: minmax(0, 1fr); }
  .thema__aside { position: static; }
}
@media (max-width: 560px) {
  .prose { font-size: 16.5px; }
  .thema-ctas .btn { width: 100%; }
  .qa__body p, .qa__inner { padding-right: 8px; }
}
