/* INREMA Redesign 2026 — Sektions-Muster (Molekuele)
   Verbindlich: docs/composition-spec.md · Framework fw baustein
   Die 5 Atom-Komponenten (logo/btn/card/site-nav/site-footer) liegen in ihren
   PHP-Partials (lib/partials/*.php). Hier NUR die wiederverwendbaren Muster. */

/* ============ SECTION-EYEBROW + HEADING + LEAD ============ */
.sec-eyebrow { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--go-dark); margin-bottom: 26px; }
.section--nv .sec-eyebrow, .section--nv-deep .sec-eyebrow, .sec-eyebrow--on-nv { color: var(--go); }
/* Ueberschriften laufen von links nach rechts (keine kuenstliche Verengung).
   Umbruch NUR per <br> nach einem Satzpunkt (ein Satz pro Zeile) — nie mitten im Satz. */
.sec-h2 { font-weight: 800; font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.sec-h2 .hl { color: var(--go-dark); font-style: normal; }
.section--nv .sec-h2 .hl, .section--nv-deep .sec-h2 .hl { color: var(--go); }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--muted); }

/* ============ TYPE-SKALA (registrierte Groessen-IDs — keine Inline-font-size) ============
   Jede Textgroesse zeigt auf EINEN Token in tokens.css. Aendern = eine Zeile, ueberall. */
.t-xs   { font-size: var(--fs-xs); line-height: 1.5; }
.t-sm   { font-size: var(--fs-sm); line-height: 1.5; }
.t-md   { font-size: var(--fs-md); line-height: 1.55; }
.t-lg   { font-size: var(--fs-lg); line-height: 1.4; }
.mono-note { font-family: var(--font-mono); font-size: var(--fs-mono-note); letter-spacing: .04em; }
.section--nv .lead, .section--nv-deep .lead, .lead--on-nv { color: var(--on-nv-mut); }

/* ============ STAT ============ */
.stat__num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.stat__num .accent { color: var(--go); }
.stat__label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mono-nv); margin-top: 5px; }

/* ============ CHIP / PILL ============ */
.chip { display: inline-block; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; border: 1px solid var(--chip-bd); border-radius: var(--r-pill); padding: 9px 18px; color: var(--muted); }
.section--nv .chip, .section--nv-deep .chip, .chip--on-nv { border-color: rgba(255,255,255,.18); color: var(--on-nv-mut2); }

/* ============ SERVICE-ROW ============ */
.service-index { border-top: 1px solid var(--line); }
.section--nv .service-index { border-top-color: rgba(255,255,255,.12); }
.service-row { display: grid; grid-template-columns: 64px 1fr 1.1fr 40px; gap: 28px; align-items: center; padding: 30px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .18s ease; }
.section--nv .service-row { border-bottom-color: rgba(255,255,255,.12); }
.service-row:hover { background: var(--pa-2); }
.section--nv .service-row:hover { background: rgba(255,255,255,.04); }
.service-row__num { font-family: var(--font-mono); font-size: 14px; color: var(--go); }
.service-row__title { font-size: clamp(20px, 2vw, 27px); font-weight: 700; letter-spacing: -.01em; }
.service-row__desc { font-size: 15px; line-height: 1.55; color: var(--muted); }
.section--nv .service-row__desc { color: var(--on-nv-mut3); }
.service-row__arrow { font-size: 22px; color: var(--go); text-align: right; }
@media (max-width: 640px) {
  .service-row { grid-template-columns: 1fr 24px; gap: 6px 12px; padding: 22px 2px; align-items: start; }
  .service-row__num { display: none; }
  .service-row__title { grid-column: 1; grid-row: 1; }
  .service-row__arrow { grid-column: 2; grid-row: 1; font-size: 18px; }
  .service-row__desc { grid-column: 1 / -1; grid-row: 2; }
}

/* ============ ARTICLE-CARD ============ */
.article-card { display: flex; flex-direction: column; background: var(--wh); border: 1px solid var(--card-bd); border-radius: 14px; padding: 26px; text-decoration: none; color: inherit; transition: all .2s ease; }
.article-card:hover { border-color: var(--go); transform: translateY(-3px); }
.article-card__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--meta); margin-bottom: 14px; }
.article-card__title { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.article-card__foot { margin-top: auto; padding-top: 18px; font-size: 13px; font-weight: 700; color: var(--go-dark); }

/* ============ FORM-FIELD (Navy-Kontext) ============ */
.form-field { display: block; }
.form-field > label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }
.form-field input, .form-field textarea {
  width: 100%; background: var(--wh); border: 1px solid var(--card-bd);
  border-radius: var(--r-input); color: var(--ink); font-size: 16px; padding: 14px 16px; outline: none;
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--go); }

/* ============ SUB-NAVIGATION (Kategorien in Wissen / Leistungen) ============ */
.subnav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.subnav--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.subnav__item { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 9px 15px; border-radius: var(--r-pill); border: 1px solid var(--chip-bd); white-space: nowrap; transition: all .16s ease; }
.subnav__item:hover { color: var(--ink); border-color: var(--go-dark); }
.subnav__item.is-active { background: var(--nv); color: var(--on-nv); border-color: var(--nv); }
.section--nv .subnav__item, .section--nv-deep .subnav__item { border-color: rgba(255,255,255,.18); color: var(--on-nv-mut2); }
.section--nv .subnav__item.is-active, .section--nv-deep .subnav__item.is-active { background: var(--go); color: var(--nv); border-color: var(--go); }

/* ============ SEARCH-FIELD ============ */
.search-field { display: flex; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; overflow: hidden; }
.search-field input { flex: 1; background: transparent; border: none; outline: none; color: var(--on-nv); font-family: var(--font-sans); font-size: 16px; padding: 16px 20px; }
.search-field button { background: var(--go); color: var(--nv); border: none; font-weight: 700; font-size: 15px; padding: 0 26px; cursor: pointer; }

/* ============ THEMEN / WISSENSHUB ============ */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--meta); margin-bottom: 22px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--go-dark); }
.crumb span { opacity: .5; }

.tldr { background: var(--pa-2); border-left: 3px solid var(--go); border-radius: 0 12px 12px 0; padding: 20px 24px; margin: 26px 0 6px; }
.tldr__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--go-dark); margin: 0 0 8px; }

.themen-body { margin-top: 30px; }
.themen-h2 { font-size: clamp(21px, 2.4vw, 28px); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; margin: 34px 0 12px; }
.themen-body h3 { font-size: 18px; font-weight: 700; margin: 22px 0 8px; }
.themen-body p { font-size: 17px; line-height: 1.7; color: var(--ink); margin: 0 0 14px; }
.themen-body ul { margin: 0 0 16px; padding-left: 22px; }
.themen-body li { font-size: 17px; line-height: 1.65; color: var(--ink); margin-bottom: 7px; }
.themen-body strong { color: var(--nv); }

.faq { margin-top: 40px; }
.faq-item { border: 1px solid var(--card-bd); border-radius: 12px; background: var(--wh); margin-bottom: 10px; overflow: hidden; }
.faq-item > summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 16px; color: var(--nv); padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; color: var(--go-dark); font-weight: 400; }
.faq-item[open] > summary::after { content: "\2013"; }
.faq-item__a { padding: 0 20px 16px; font-size: 16px; line-height: 1.65; color: var(--muted); }

.related { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.related-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--wh); border: 1px solid var(--card-bd); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--nv); font-weight: 600; font-size: 15px; line-height: 1.35; transition: border-color .18s ease, transform .18s ease; }
.related-card:hover { border-color: var(--go); transform: translateY(-2px); }
.related-card span { color: var(--go-dark); }

.q-list { border-top: 1px solid var(--line); }
.q-row { display: grid; grid-template-columns: 1fr 40px; gap: 6px 16px; padding: 22px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .18s ease; }
.q-row:hover { background: var(--pa-2); }
.q-row__titel { grid-column: 1; font-size: clamp(18px, 2vw, 22px); font-weight: 700; letter-spacing: -.01em; }
.q-row__desc { grid-column: 1; font-size: 15px; line-height: 1.55; color: var(--muted); }
.q-row__arrow { grid-column: 2; grid-row: 1; text-align: right; font-size: 20px; color: var(--go-dark); }

.th-ask { display: flex; background: var(--wh); border: 1px solid var(--card-bd); border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(10,26,48,.06); }
.th-ask input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--ink); font-family: var(--font-sans); font-size: 16px; padding: 17px 20px; }
.th-ask button { flex: none; }
.th-ask button { background: var(--go); color: var(--nv); border: none; font-weight: 700; font-size: 15px; padding: 0 28px; cursor: pointer; white-space: nowrap; }
.th-ask button:hover { filter: brightness(1.05); }
.themen-answer { margin-top: 26px; text-align: left; }
.themen-answer h3 { font-size: 18px; font-weight: 700; margin: 18px 0 8px; }
.themen-answer p { font-size: 16px; line-height: 1.7; color: var(--ink); margin: 0 0 12px; }
.themen-answer ul { padding-left: 20px; margin: 0 0 12px; }
.themen-answer li { font-size: 16px; line-height: 1.6; margin-bottom: 6px; }
.themen-answer strong { color: var(--nv); }
.themen-answer a { color: var(--go-dark); }

/* ============ THEMEN-HUB ============ */
.th-ask-section { padding-top: 46px; padding-bottom: 40px; }
.th-cluster-section { padding-top: 10px; }
.th-ask-lead { font-size: 17px; font-weight: 600; color: var(--ink); text-align: center; margin: 0 0 16px; }
.th-ask-note { text-align: center; color: var(--meta); margin-top: 12px; }

.th-answer { margin-top: 30px; text-align: left; background: var(--wh); border: 1px solid var(--card-bd); border-radius: 14px; padding: 26px 28px; box-shadow: 0 10px 34px rgba(10,26,48,.07); }
.th-answer__label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--go-dark); margin: 0 0 12px; }
.th-answer__status { color: var(--muted); margin: 0; }
.th-answer__q { font-size: 19px; font-weight: 700; color: var(--nv); line-height: 1.3; margin: 0 0 10px; }
.th-answer__body h3 { font-size: 17px; font-weight: 700; color: var(--nv); margin: 18px 0 8px; }
.th-answer__body p, .th-answer > p { font-size: 16px; line-height: 1.7; color: var(--ink); margin: 0 0 12px; }
.th-answer__body ul { padding-left: 20px; margin: 0 0 12px; }
.th-answer__body li { font-size: 16px; line-height: 1.6; color: var(--ink); margin-bottom: 6px; }
.th-answer__body strong { color: var(--nv); }
.th-answer__srclabel { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--go-dark); margin: 18px 0 6px; }
.th-answer__src { list-style: none; padding: 0; margin: 0; }
.th-answer__src li { margin-bottom: 5px; }
.th-answer__src a { color: var(--go-dark); text-decoration: none; font-size: 14.5px; }
.th-answer__src a:hover { text-decoration: underline; }
.th-answer__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.th-btn { display: inline-block; background: var(--go); color: var(--nv); font-weight: 700; font-size: 14px; padding: 13px 24px; border-radius: 6px; text-decoration: none; transition: filter .18s ease; }
.th-btn:hover { filter: brightness(1.05); color: var(--nv); }
.th-btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ghost-bd, var(--card-bd)); }
.th-btn--ghost:hover { border-color: var(--go); color: var(--ink); filter: none; }
.th-btn--merkt { background: var(--go); color: var(--nv); border-color: var(--go); }
.th-btn--merkt:hover { background: var(--go); color: var(--nv); }

.th-cluster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 34px; }
.th-cluster-card { display: flex; flex-direction: column; background: var(--wh); border: 1px solid var(--card-bd); border-radius: 14px; padding: 24px 26px; text-decoration: none; color: inherit; transition: border-color .2s ease, transform .2s ease; }
.th-cluster-card:hover { border-color: var(--go); transform: translateY(-3px); }
.th-cluster-card__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--go-dark); margin-bottom: 14px; }
.th-cluster-card__title { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.3; margin-bottom: 8px; }
.th-cluster-card__desc { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin-bottom: 18px; }
.th-cluster-card__more { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--go-dark); }

/* Suchtreffer (kostenlose Suche) */
.th-hits { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 4px; }
.th-hit { display: grid; grid-template-columns: 1fr 24px; gap: 4px 12px; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .16s ease; }
.th-hit:hover { background: var(--pa-2); }
.th-hit__q { grid-column: 1; font-size: 16px; font-weight: 700; color: var(--nv); line-height: 1.35; }
.th-hit__a { grid-column: 1; font-size: 14px; color: var(--muted); line-height: 1.5; }
.th-hit__arrow { grid-column: 2; grid-row: 1; text-align: right; color: var(--go-dark); }
.th-ki-answer { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }

/* Antwort-Seitenleiste */
.th-aside { position: sticky; top: 90px; }
.th-aside > * { margin-bottom: 16px; }
.th-aside__links { list-style: none; padding: 0; margin: 0; }
.th-aside__links li { border-top: 1px solid var(--line); }
.th-aside__links li:first-child { border-top: none; }
.th-aside__links a { display: block; padding: 11px 0; color: var(--nv); text-decoration: none; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.th-aside__links a:hover { color: var(--go-dark); }
.th-aside__match { border-color: var(--go); }
.th-aside__links--strong a { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.th-aside__links--strong a span { color: var(--go-dark); }
@media (max-width: 900px) { .th-aside { position: static; } }

/* ============ EIGENE PROJEKTE (Proof of Concept) ============ */
.poc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 40px; }
.poc-card { display: flex; flex-direction: column; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.10); border-radius: 14px; padding: 26px; text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.poc-card:hover { border-color: var(--go); transform: translateY(-3px); }
.poc-card__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--go); margin-bottom: 14px; }
.poc-card__title { font-size: 20px; font-weight: 800; color: var(--on-nv); letter-spacing: -.01em; margin-bottom: 12px; }
.poc-card__desc { font-size: 14.5px; line-height: 1.6; color: var(--on-nv-mut2); margin-bottom: 20px; }
.poc-card__link { margin-top: auto; font-family: var(--font-mono); font-size: 13px; color: var(--go-light); }
.poc-closing { margin-top: 34px; }

/* ============ KI-Markierung + Teilen ============ */
.ki-flag { background: rgba(200,162,77,.10); border: 1px solid var(--go); border-radius: 12px; padding: 18px 22px; margin-bottom: 28px; }
.ki-flag__label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--go-dark); margin: 0 0 8px; }
.ki-flag__text { font-size: 15px; line-height: 1.6; color: var(--ink); margin: 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.share__label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--meta); margin-right: 4px; }
.share__btn { font-size: 13px; font-weight: 600; color: var(--ink); background: var(--wh); border: 1px solid var(--card-bd); border-radius: 7px; padding: 8px 14px; text-decoration: none; cursor: pointer; transition: border-color .16s ease; }
.share__btn:hover { border-color: var(--go); }
.ki-disclaimer { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; }
.ki-disclaimer__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--meta); margin: 0 0 6px; }
.ki-disclaimer__text { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; }
.share-block { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.share-block .share { border-top: none; padding-top: 14px; }
.share-block__hint { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 6px 0 0; }
.share-block__hint a { color: var(--go-dark); }

/* Frage-Box in der schmalen Seitenleiste: „Suchen" unter das Feld */
.th-aside .th-ask { flex-direction: column; align-items: stretch; overflow: visible; }
.th-aside .th-ask input { padding: 14px 16px; }
.th-aside .th-ask button { width: 100%; padding: 13px; border-top: 1px solid var(--card-bd); }

/* Druck-/PDF-Ansicht: nur Überschrift + Inhalt + Beitrags-/Kontakt-Fuß */
.print-only { display: none; }
.ki-print-foot__t { font-weight: 700; margin: 0 0 5px; }
@media print {
  header, footer, aside, .no-print, .share-block, .ki-disclaimer, .related, .th-ask-section { display: none !important; }
  .print-only { display: block !important; }
  .section { padding: 0 !important; background: none !important; }
  .container { max-width: 100% !important; }
  .layout { display: block !important; }
  .themen-body { color: var(--ink); }
  .ki-print-foot { margin-top: 22pt; padding-top: 10pt; border-top: 2px solid var(--ink); font-size: 9pt; color: var(--ink); }
}

/* Copy-Feedback (Teilen-Leiste) */
.share__btn--ok { border-color: var(--go); color: var(--nv); background: var(--go); }

/* Honeypot (Bot-Falle) — für Menschen unsichtbar, nicht fokussierbar */
.th-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* KI-Antwort: Lade-Overlay mit Schritten (mobilfähig) */
.th-noscroll { overflow: hidden; }
.th-loading { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(8, 21, 42, .82); }
.th-loading[hidden] { display: none; }
.th-loading__card { width: 100%; max-width: 420px; background: var(--wh); border: 1px solid var(--card-bd); border-radius: 14px; padding: 30px 26px; text-align: center; box-shadow: 0 18px 50px rgba(8, 21, 42, .28); }
.th-loading__spin { width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%; border: 3px solid var(--card-bd); border-top-color: var(--go); animation: th-spin .8s linear infinite; }
.th-loading__step { font-weight: 700; color: var(--ink); font-size: 16px; min-height: 22px; margin: 0 0 14px; }
.th-loading__bar { height: 4px; border-radius: 4px; background: var(--card-bd); overflow: hidden; }
.th-loading__bar span { display: block; height: 100%; width: 40%; border-radius: 4px; background: var(--go); animation: th-bar 1.4s ease-in-out infinite; }
.th-loading__hint { margin: 16px 0 0; font-size: 13px; color: var(--ink); opacity: .72; }
@keyframes th-spin { to { transform: rotate(360deg); } }
@keyframes th-bar { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .th-loading__spin, .th-loading__bar span { animation: none; } }
