#systemMapView { --sm-ink: #1c1e40; color: var(--sm-ink); }
#systemMapView [data-phase="Anstoss"] { --phase: #0077ac; }
#systemMapView [data-phase="Grobkonzept"] { --phase: #009176; }
#systemMapView [data-phase="Detailkonzept"] { --phase: #74367c; }
#systemMapView [data-phase="Umsetzung"] { --phase: #f6a124; }
#systemMapView [data-phase="Auswertung"] { --phase: #004a61; }
.sm-heading { margin-top: 22px; }
.sm-heading h3 { font-size: 1.2rem; margin: 0; }
.sm-message:empty { display: none; }
.sm-legend { display: flex; gap: 12px 20px; flex-wrap: wrap; margin: 20px 0; font-size: .8rem; }
.sm-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.sm-dot { background: var(--phase); width: 9px; height: 9px; border-radius: 50%; }
.sm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; align-items: start; }
.sm-main { min-width: 0; }
.sm-canvas { position: relative; isolation: isolate; padding: 0; }
.sm-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; overflow: visible; }
.sm-lines path { fill: none; stroke: var(--sm-ink); stroke-width: 1.5; opacity: .5; }
.sm-lines marker path { fill: var(--sm-ink); stroke: none; opacity: 1; }
.sm-lines .sm-spine { stroke: #42c0ec; stroke-width: 13; opacity: .28; }
.sm-boundary { border: 1px solid #bac0ce; padding: 35px 18px 22px; border-radius: 4px; position: relative; }
.sm-boundary-label { position: absolute; top: 10px; left: 18px; background: white; font-size: .76rem; color: #52616a; }
.sm-system-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px 22px; }
.sm-node { border: 1.5px solid var(--sm-ink); border-radius: 5px; background: white; color: var(--sm-ink); display: flex; flex-direction: column; text-align: left; min-width: 0; min-height: 150px; width: 100%; font-weight: 400; position: relative; }
.sm-node[data-material="artifact"] { border-color: transparent; }
.sm-material-outline { position: absolute; inset: -1.5px; width: calc(100% + 3px); height: calc(100% + 3px); pointer-events: none; z-index: 1; overflow: visible; }
.sm-material-outline path { fill: none; stroke: var(--sm-ink); stroke-width: 3.8; stroke-linecap: round; stroke-linejoin: round; }
.sm-node[data-selected="true"] { outline: 2px solid var(--accent); outline-offset: 4px; }
.sm-node-main { border: 0; border-radius: 4px; background: transparent; color: var(--sm-ink); display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 7px; padding: 12px 10px; width: 100%; min-width: 0; min-height: 0; flex: 1; text-align: left; font-weight: 400; }
.sm-node-main:hover { background: var(--field); color: var(--sm-ink); }
.sm-node-main:focus-visible, .sm-tag:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sm-node-title { display: flex; align-items: flex-start; gap: 7px; width: 100%; }
.sm-node-title svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.sm-node-title span { min-width: 0; }
.sm-node-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 4px 10px 10px; }
.sm-tag { display: inline-flex; align-items: center; gap: 5px; padding: 6px; min-height: 32px; max-width: 100%; border: 1px solid #ccdbe1; border-radius: 4px; background: #fff; color: var(--accent-dark); font-size: .72rem; line-height: 1.4; font-weight: 650; text-decoration: none; }
.sm-tag:hover { background: var(--soft); border-color: var(--accent-dark); }
.sm-tag svg { width: 14px; height: 14px; flex-shrink: 0; }
.sm-tag-count { color: #52616a; font-size: .68rem; font-weight: 400; }
.sm-system-grid .sm-node { min-height: 205px; }
.sm-node[data-material="idea"] { border-style: dashed; }
.sm-node[data-material="described"] { border-style: dotted; }
.sm-node[data-kind="external"] { border-color: #89949b; min-height: 105px; }
.sm-node[data-michi="open"] { --michi-color: #a64b00; }
.sm-node[data-michi="done"] { --michi-color: #237343; }
.sm-node[data-michi] { border-color: var(--michi-color); }
.sm-node[data-michi][data-material="artifact"] { border-color: transparent; }
.sm-node[data-michi] .sm-material-outline path { stroke: var(--michi-color); }
.sm-michi-state { color: var(--michi-color); font-weight: 650; overflow-wrap: anywhere; }
.sm-michi-count { color: #52616a; }
.sm-node strong { font-size: .89rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.sm-node small { font-size: .71rem; line-height: 1.3; }
.sm-node-status { color: #52616a; overflow-wrap: anywhere; }
.sm-phase { display: inline-flex; align-items: center; gap: 5px; }
.sm-phase::before { content: ""; width: 7px; height: 13px; flex-shrink: 0; background: var(--phase); }
.sm-maturity { display: flex; align-items: center; gap: 5px; font-size: .73rem; margin-top: auto; width: 100%; }
.sm-maturity svg { width: 17px; height: 17px; flex-shrink: 0; }
.sm-material { font-size: .68rem; color: #52616a; }
.sm-system-grid [data-node-box="access"] { grid-row: 1; grid-column: 1; }
.sm-system-grid [data-node-box="frontend"] { grid-row: 1; grid-column: 2; }
.sm-system-grid [data-node-box="originals"] { grid-row: 1; grid-column: 3; }
.sm-system-grid [data-node-box="ai"] { grid-row: 2; grid-column: 1; }
.sm-system-grid [data-node-box="workbench"] { grid-row: 2; grid-column: 2; }
.sm-system-grid [data-node-box="overleaf"] { grid-row: 2; grid-column: 3; }
.sm-system-grid [data-node-box="learning"] { grid-row: 3; grid-column: 2; }
.sm-system-grid [data-node-box="second-brain"] { grid-row: 3; grid-column: 1; }
.sm-system-grid [data-node-box="privacy"] { grid-row: 3; grid-column: 3; }
.sm-externals { display: flex; justify-content: space-between; gap: 35px; margin-top: 40px; padding: 0 18px; }
.sm-externals .sm-node { max-width: 190px; }
.sm-key { display: flex; flex-wrap: wrap; gap: 14px 18px; font-size: .73rem; color: #52616a; margin-top: 22px; line-height: 1.5; }
.sm-key > span { display: inline-flex; gap: 7px; align-items: center; }
.sm-key svg { width: 15px; height: 15px; }
.sm-key-line::before { content: ""; width: 20px; border-top: 1.5px solid var(--sm-ink); }
.sm-key-line.idea::before { border-top-style: dashed; }
.sm-key-line.described::before { border-top-style: dotted; }
.sm-key-line.artifact::before { border-top-width: 4px; border-radius: 2px; transform: rotate(-1deg); }
.sm-inspector { border-left: 1px solid var(--line); padding-left: 24px; min-width: 0; scroll-margin-top: 20px; }
.sm-inspector h3 { font-size: 1.15rem; margin: 0 0 16px; }
.sm-inspector h4 { font-size: .85rem; margin: 0 0 8px; }
.sm-inspector p { font-size: .88rem; line-height: 1.65; margin: 8px 0; overflow-wrap: anywhere; white-space: pre-line; }
.sm-inspector small { font-size: .73rem; color: #52616a; }
.sm-inspector section, .sm-technical { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 18px; }
.sm-technical summary { font-size: .85rem; font-weight: 650; cursor: pointer; }
.sm-technical summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sm-inspector [data-detail-section] { scroll-margin-top: 24px; }
.sm-detail-status { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: .75rem; }
.sm-detail-status strong { display: flex; gap: 5px; align-items: center; font-weight: 500; }
.sm-detail-status svg { width: 17px; height: 17px; }
.sm-inspector .sm-v-link { margin: 16px 0 2px; width: 100%; }
.sm-evidence { margin: 0; padding: 0; list-style: none; }
.sm-evidence li { margin: 12px 0; }
.sm-evidence a, .sm-work-link { display: flex; align-items: flex-start; gap: 8px; font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.sm-evidence svg, .sm-work-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.sm-edit { margin-top: 22px; width: 100%; font-size: .83rem; }
.sm-michi-lines { margin: 0 0 14px; font-size: .85rem; line-height: 1.6; }
.sm-michi-lines dt { font-weight: 650; margin-top: 8px; }
.sm-michi-lines dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.sm-michi-done { display: block; }
.sm-michi-form { display: grid; gap: 8px; margin-top: 18px; }
.sm-michi-form label { margin: 0; font-size: .85rem; }
.sm-michi-form textarea { box-sizing: border-box; width: 100%; min-width: 0; resize: vertical; }
.sm-michi button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.sm-michi button[aria-disabled="true"] { opacity: .6; cursor: wait; }
.sm-michi button:focus-visible, .sm-michi textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sm-michi .form-message:empty { display: none; }
.sm-michi-tasks { padding: 0; margin: 0; list-style: none; font-size: .8rem; }
.sm-michi-tasks li { padding-block: 10px; overflow-wrap: anywhere; }
.sm-michi-tasks li + li { border-top: 1px solid var(--line); }
.sm-michi-tasks strong, .sm-michi-tasks span { display: block; line-height: 1.6; }
.sm-michi-tasks p { margin-bottom: 0; }
.sm-connections { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; font-size: .85rem; }
.sm-connections ul { padding: 0; list-style: none; }
.sm-connections button { flex-wrap: wrap; justify-content: flex-start; font-size: .8rem; text-align: left; }
.sm-connections small { flex-basis: 100%; font-weight: 400; }
.sm-v-axis { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 15px; font-size: .75rem; color: #52616a; }
.sm-v-axis span:last-child { text-align: right; }
.sm-v-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 25px; }
.sm-v-row[data-level="1"] { margin-inline: 5%; }
.sm-v-row[data-level="2"] { margin-inline: 10%; }
.sm-v-row[data-level="3"] { margin-inline: 15%; }
.sm-v-row .sm-node { min-height: 135px; max-width: 230px; }
.sm-v-row .sm-node:last-child { justify-self: end; }
.sm-pair { display: flex; flex-direction: column; gap: 4px; font-size: .66rem; background: white !important; padding: 8px 0; }
.sm-pair[aria-pressed="true"] { outline: 2px solid var(--accent); }
.sm-v-bottom { width: 200px; max-width: 80%; margin: 34px auto 0; }
.sm-v-bottom .sm-node { min-height: 135px; }
.sm-back { margin: 8px 0 22px; }
.sm-text-link { padding: 0; text-align: left; justify-content: flex-start; font-size: .9rem; }
.sm-form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sm-document-choices { max-height: 170px; overflow: auto; }
.sm-document-choices label { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: .85rem; overflow-wrap: anywhere; }
.sm-document-choices input { width: auto; min-height: auto; margin-top: 4px; }
.sm-revision { border-bottom: 1px solid var(--line); padding-block: 16px; font-size: .85rem; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .sm-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; }
  .sm-inspector { padding-left: 18px; }
  .sm-system-grid { gap: 30px 16px; }
  .sm-v-row { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); gap: 8px; }
  .sm-v-row[data-level="1"] { margin-inline: 3%; }
  .sm-v-row[data-level="2"] { margin-inline: 6%; }
  .sm-v-row[data-level="3"] { margin-inline: 9%; }
}
@media (max-width: 800px) {
  .sm-layout { grid-template-columns: minmax(0, 1fr); }
  .sm-inspector { border-left: none; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .sm-heading { align-items: flex-start; }
}
@media (max-width: 480px) {
  .sm-boundary { padding: 35px 10px 16px; }
  .sm-system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .sm-system-grid .sm-node { grid-row: auto; grid-column: auto; min-height: 225px; }
  .sm-tag-count { display: none; }
  .sm-v-row { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); gap: 6px; margin-bottom: 24px; }
  .sm-v-row[data-level] { margin-inline: 0; }
  .sm-v-row .sm-node { min-height: 174px; }
  .sm-v-row .sm-node-main { padding: 10px 7px; }
  .sm-v-row .sm-node strong { font-size: .82rem; hyphens: auto; }
  .sm-pair span { display: none; }
  .sm-pair svg { width: 20px; }
  .sm-maturity { font-size: .7rem; }
  .sm-form-pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sm-heading h3 { font-size: 1.05rem; }
  .sm-externals { padding: 0 10px; gap: 20px; }
}
@media (pointer: coarse) { .sm-tag { min-height: 44px; } }
@media (forced-colors: active) { .sm-material-outline path { stroke: CanvasText; } }
@media (max-width: 360px) {
  .sm-system-grid .sm-node-title, .sm-system-grid .sm-node-title span { display: block; hyphens: auto; }
  .sm-system-grid .sm-node-title svg { display: block; margin: 0 0 5px; }
}
