/* edda v28 · Eigene Stile für systeme.html (Klassenpräfix sys-, siehe briefs-v28/00-gemeinsam.md) */

.sys-card { --sys-grey: #8C877D; --sys-logo-col: 56px; }
.sys-groups, .sys-legend, .sys-modes, .sys-where, .sys-map { --sys-grey: #8C877D; }

/* ---------- Status-Marken: ■ angebunden, ◇ live, □ auf Anfrage, ■ bernstein (Wissens-Interview) ---------- */
.sys-mk { display: inline-block; flex: none; box-sizing: border-box; width: 9px; height: 9px; border: 1.5px solid var(--sys-grey, #8C877D); background: var(--sys-grey, #8C877D); transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), rotate 0.3s var(--ease); }
.sys-mk--live { rotate: 45deg; width: 10px; height: 10px; border: 1.5px dashed var(--accent-600); background: transparent; }
.sys-mk--anf { background: transparent; }
.sys-mk--head { border-color: var(--warning-fg); background: #D9A441; }
.sys-mk--lg { width: 16px; height: 16px; }
.sys-mk--lg.sys-mk--live { width: 17px; height: 17px; border-width: 2px; }

/* Logos: ohne Kasten, Seitenverhältnis bleibt (contain), nie verzerrt */
.sys-row__logo, .sys-sys__logo { display: flex; align-items: center; justify-content: flex-start; min-width: 0; }
.sys-row__logo img { width: auto; height: 24px; max-width: 100%; object-fit: contain; object-position: left center; }
.sys-row__logo--head { color: var(--warning-fg); }
.sys-row__logo--head svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; }

/* ---------- Hero: Karte „Quellen“ ---------- */
.sys-mono-sm { text-transform: none; letter-spacing: 0.04em; color: var(--text); }
.sys-rows { display: flex; flex-direction: column; }
.sys-row { display: grid; grid-template-columns: var(--sys-logo-col) minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 24px; border-bottom: 1px solid var(--border); }
.sys-row:last-child { border-bottom: 0; }
.sys-row__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sys-row__t b { font-size: 15px; font-weight: 600; color: var(--ink); }
.sys-row__t small { font-family: var(--mono); font-size: 11.5px; line-height: 1.4; color: var(--text-3); overflow-wrap: anywhere; }
.sys-row__s { display: inline-flex; align-items: center; gap: 8px; max-width: 9.5em; font-size: 12.5px; line-height: 1.3; color: var(--text); text-align: right; }
.sys-row__s .sys-mk { margin-right: 0; }
.sys-card .origin__sync { margin-left: 0; }

/* Einmalige Bewegung (nur mit JS gesetzt: data-run); ohne JS und bei reduzierter Bewegung steht der Endzustand */
.sys-card[data-run] .sys-row { opacity: 0; translate: 0 6px; transition: opacity 0.4s var(--ease), translate 0.4s var(--ease); }
.sys-card[data-run] .sys-row.is-in { opacity: 1; translate: 0 0; }
.sys-card[data-run] .sys-row:not(.is-done) .sys-mk { background: transparent; border-style: solid; border-color: var(--sys-grey); rotate: 0deg; }

/* ---------- 01 Legende und Karten ---------- */
.sys-legend { display: flex; flex-wrap: wrap; gap: 10px 32px; padding: 14px 0; margin-bottom: 40px; border-block: 1px solid var(--border); font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--text); }
.sys-legend li { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.sys-legend .sys-mk { align-self: center; }
.sys-legend b { font-weight: 500; color: var(--ink); }

.sys-groups { display: flex; flex-direction: column; gap: 40px; }
.sys-gh { margin-bottom: 14px; font-family: var(--mono); font-size: 12px; line-height: 1.4; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.sys-gh::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; background: var(--accent-800); }
.sys-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sys-sys { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sys-sys__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; }
.sys-sys__logo { flex: 0 1 auto; flex-wrap: wrap; gap: 6px 18px; height: auto; max-width: 100%; }
.sys-sys__logo img { width: auto; height: 26px; max-width: 120px; object-fit: contain; object-position: left center; }
.sys-sys__logo--multi { gap: 6px 16px; }
.sys-sys__logo--multi img { height: 24px; }
.sys-sys__logo--sym { color: var(--ink); }
.sys-sys__logo--sym svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sys-sys__name { font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.sys-sys__name + p { margin-top: -8px; }
.sys-st { display: inline-flex; flex: none; align-items: center; height: 24px; margin-left: auto; }
.sys-sys p { font-size: 14.5px; line-height: 1.55; color: var(--text); text-wrap: pretty; }
.sys-k { font-family: var(--mono); font-size: 12px; color: var(--text-3); }

.sys-wide { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 20px 32px; padding: 28px 32px; background: var(--warning-bg); border: 1px solid #EBD7A8; border-radius: var(--radius); color: var(--warning-fg); }
.sys-wide__text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; flex: 1 1 28em; max-width: 46em; }
.sys-wide__title { color: var(--ink); font-size: 30px; line-height: 1.15; }
.sys-wide__text p:not(.h3) { color: #5E3F00; text-wrap: pretty; }
.sys-wide .tlink { color: var(--warning-fg); margin-top: 4px; }
@media (hover: hover) { .sys-wide .tlink:hover { color: var(--ink); } }

/* ---------- 02 Tabelle: Quelle → Wissensbereich → Frage ---------- */
.sys-map { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--surface); border: 1px solid var(--border); }
.sys-map th, .sys-map td { position: relative; padding: 24px 56px 24px 24px; text-align: left; vertical-align: middle; border-top: 1px solid var(--border); }
.sys-map thead th { padding-block: 14px; border-top: 0; background: var(--subtle); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.sys-map col { width: auto; }
/* Herkunftslinie: feine Petrol-Linie mit Quadrat am Ende, zwischen den Spalten */
.sys-map tbody td:not(:last-child)::after, .sys-map tbody th::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 36px; height: 5px; translate: 0 -50%; pointer-events: none;
  background: linear-gradient(var(--accent-300), var(--accent-300)) 0 50% / 100% 1.5px no-repeat, linear-gradient(var(--accent-800), var(--accent-800)) 100% 50% / 5px 5px no-repeat;
}
.sys-from { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sys-map .chip { font-family: var(--mono); font-size: 12.5px; background: var(--surface); max-width: 100%; flex-wrap: wrap; }
.sys-map .chip img { width: auto; height: 12px; }
.sys-chip__sep { color: var(--muted); }
.sys-chip__t { color: var(--text-3); overflow-wrap: anywhere; }
.sys-area { display: flex; align-items: center; gap: 16px; font-size: 18px; font-weight: 600; color: var(--ink); }
.sys-dots { flex: none; width: 56px; height: 32px; background: radial-gradient(circle, var(--pool) 0 2px, transparent 2.4px) 0 0 / 8px 8px; }
.sys-dots--1 { clip-path: polygon(0 0, 100% 0, 100% 40%, 80% 100%, 0 100%); }
.sys-dots--2 { clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%, 0 30%); }
.sys-dots--3 { clip-path: polygon(0 20%, 60% 0, 100% 30%, 100% 100%, 0 100%); }
.sys-dots--4 { clip-path: polygon(0 0, 70% 0, 100% 50%, 70% 100%, 0 100%); }
.sys-dots--5 { clip-path: polygon(20% 0, 100% 0, 100% 80%, 60% 100%, 0 100%, 0 40%); }
.sys-q { font-family: var(--serif); font-size: 19px; line-height: 1.35; color: var(--ink); }
.sys-map tbody td.sys-q { padding-right: 24px; }
.sys-note { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--text-3); }

/* ---------- 03 Zwei Modi ---------- */
.sys-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.sys-mode { display: flex; flex-direction: column; gap: 18px; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sys-mode__head { display: flex; align-items: center; gap: 14px; }
.sys-mode p { color: var(--text); text-wrap: pretty; }
.sys-mode .kv { margin-top: auto; }

/* ---------- 04 Drei Orte ---------- */
.sys-where { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sys-where li { display: flex; flex-direction: column; gap: 12px; padding: 24px 0 0; border-top: 2px solid var(--accent-800); }
.sys-where__h { font-family: var(--serif); font-size: 28px; line-height: 1.15; font-weight: 400; letter-spacing: -0.01em; color: var(--ink); }
.sys-where p { color: var(--text); text-wrap: pretty; }

/* Symbol-Stapel über der Spalte: 40-px-Chips, 10 px Überlappung, Ring in Seitenfarbe, erster Chip oben (nur Zierde) */
.sys-stack { display: flex; align-items: center; margin-bottom: 4px; }
.sys-stack__i { display: grid; place-items: center; flex: none; box-sizing: border-box; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 0 0 3px var(--bg); }
.sys-stack__i + .sys-stack__i { margin-left: -10px; }
.sys-stack__i:nth-child(1) { position: relative; z-index: 3; }
.sys-stack__i:nth-child(2) { position: relative; z-index: 2; }
.sys-stack__i:nth-child(3) { position: relative; z-index: 1; }
.sys-stack__i img { display: block; width: 22px; height: 22px; object-fit: contain; }
.sys-stack__i--sym { color: var(--ink); }
.sys-stack__i--sym svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 05 Start und Kasten ---------- */
.sys-miss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; margin-top: 72px; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sys-miss__text { display: flex; flex-direction: column; gap: 10px; flex: 1 1 26em; max-width: 44em; }
.sys-miss__text p { color: var(--text); text-wrap: pretty; }
.sys-miss .btn { flex: none; }

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .sys-map th, .sys-map td { padding: 20px 44px 20px 18px; }
  .sys-map tbody td.sys-q { padding-right: 18px; }
  .sys-area { gap: 12px; font-size: 17px; }
}
@media (max-width: 1180px) and (min-width: 961px) {
  .sys-sys__logo--multi { gap: 6px 12px; }
  .sys-sys__logo--multi img { height: 20px; }
}
@media (max-width: 960px) {
  .sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys-where { grid-template-columns: minmax(0, 1fr); }
  .sys-where li { padding-top: 20px; }
}
@media (max-width: 640px) {
  .sys-row { padding-inline: 16px; gap: 12px; }
  .sys-grid, .sys-modes { grid-template-columns: minmax(0, 1fr); }
  .sys-legend { flex-direction: column; }
  .sys-wide { padding: 22px 20px; }
  .sys-wide__title { font-size: 26px; }
  .sys-mode, .sys-miss { padding: 24px 20px; }
  .sys-miss { margin-top: 48px; }
  .sys-miss .btn { width: 100%; white-space: normal; }

  /* Tabelle als gestapelte Karten */
  .sys-map, .sys-map tbody, .sys-map tr, .sys-map th, .sys-map td { display: block; }
  .sys-map { background: transparent; border: 0; }
  .sys-map thead { display: none; }
  .sys-map tr { margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-left: 2px solid var(--accent-800); }
  .sys-map th, .sys-map td, .sys-map tbody td.sys-q { padding: 14px 16px; border-top: 0; }
  .sys-map tbody td + th, .sys-map tbody th + td { border-top: 1px solid var(--inset); }
  .sys-map tbody td:not(:last-child)::after, .sys-map tbody th::after { display: none; }
  .sys-map td::before, .sys-map th::before { content: attr(data-label); display: block; margin-bottom: 8px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
}
@media (max-width: 400px) {
  .sys-row { grid-template-columns: var(--sys-logo-col) minmax(0, 1fr); }
  .sys-row__s { grid-column: 2; justify-content: flex-start; max-width: none; text-align: left; }
  .sys-sys { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .sys-mk, .sys-card[data-run] .sys-row { transition: none; }
}
