/* Projektkartei Studios in Motion. Baut ausschließlich auf sim-tokens.css auf. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg-1); color: var(--fg-2); font: 14.5px/1.55 var(--font); overflow-x: hidden; }
a { color: var(--sim-blue-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--fg-1); font-family: var(--font-display); letter-spacing: -.01em; margin: 0; }
code { font: 12.5px/1.45 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }
:focus-visible { outline: 2px solid var(--sim-blue); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 720px) { .wrap { padding: 0 16px; } }

/* Kopf */
.kopf { background: var(--header-bg); box-shadow: 0 1px 0 var(--l1); position: sticky; top: 0; z-index: 10; }
.kopf-in { max-width: 1240px; margin: 0 auto; padding: 0 28px; height: 56px; display: flex; align-items: center; gap: 24px; }
.marke { display: flex; align-items: center; gap: 14px; color: var(--fg-1); min-width: 0; }
.marke:hover { text-decoration: none; }
.marke img { height: 26px; width: auto; flex: none; }
.marke-titel { font: 600 14px var(--font-display); color: var(--fg-1); padding-left: 14px; box-shadow: -1px 0 0 var(--l2); white-space: nowrap; }
.hauptnav { margin-left: auto; display: flex; gap: 4px; }
.hauptnav a { color: var(--fg-2); font-weight: 600; font-size: 13.5px; padding: 7px 12px; border-radius: var(--r-sm); }
.hauptnav a:hover { background: var(--s3); text-decoration: none; color: var(--fg-1); }
.hauptnav a[aria-current="page"] { color: var(--nav-active-text); background: var(--accent-bg); }
@media (max-width: 720px) {
  .kopf-in { padding: 0 16px; gap: 10px; }
  .marke img { height: 20px; }
  .marke-titel { display: none; }
  .hauptnav a { padding: 6px 9px; font-size: 13px; }
}

/* Leiste: Titel, Suche, Chips */
.leiste { padding: 26px 0 18px; display: grid; gap: 12px; }
.leiste-zeile { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.seitentitel { font-size: 22px; font-weight: 700; }
.zaehler { margin: 0; color: var(--fg-3); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.suche { display: flex; align-items: center; gap: 8px; background: var(--s1); box-shadow: var(--shadow); border-radius: var(--r-md); padding: 0 12px; max-width: 560px; }
.suche svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--fg-3); stroke-width: 2; stroke-linecap: round; }
.suche input { flex: 1; min-width: 0; border: 0; background: transparent; font: 15px var(--font); color: var(--fg-1); padding: 11px 0; outline: none; }
.suche:focus-within { box-shadow: var(--shadow), 0 0 0 2px var(--sim-blue); }
.suche input::-webkit-search-cancel-button { cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chips-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-3); width: 64px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--l2); background: var(--s1); color: var(--fg-2); font: 600 12.5px var(--font); cursor: pointer; }
.chip:hover { border-color: var(--sim-blue); color: var(--fg-1); }
.chip[aria-pressed="true"] { background: var(--sim-blue); border-color: var(--sim-blue); color: #fff; }
.chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px #fff; }
.chip-n { font-weight: 500; opacity: .7; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .chips-label { width: 100%; } }

/* Status */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--fg-3); }
.dot.st-aktiv { background: var(--green); }
.dot.st-wartet { background: #D98E04; }
.dot.st-idee { background: var(--sim-blue); }
.dot.st-verworfen { background: var(--red); }
.dot.st-grau { background: #A9B3C2; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fg-2); white-space: nowrap; }

/* Bereichsfarben: dezente Kennfarben, nur als Balken und Marke, nie als Fläche */
.bc-golf { --bc: #7E9C86; }
.bc-templates { --bc: #8593B0; }
.bc-eigene-marken { --bc: #B39A7C; }
.bc-kunden { --bc: #7C9DB2; }
.bc-zentrale { --bc: #9488AE; }
.bc-portal { --bc: #74A3A0; }
.bc-content { --bc: #B7A274; }
.bc-videos { --bc: #B08489; }
.bc-vortraege { --bc: #9C9F78; }
.bc-betrieb { --bc: #959FAB; }
.bc-ideen { --bc: #A6B2C4; }
.bc-sonst { --bc: #A9B3C2; }
.b-farbe { width: 10px; height: 10px; border-radius: 3px; background: var(--bc); display: inline-block; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Filterzeile mit Umschalter rechts */
.filter-zeile { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.filter-chips { display: grid; gap: 10px; min-width: 0; flex: 1 1 520px; }
.umschalter { display: inline-flex; flex: none; background: var(--s1); box-shadow: var(--shadow); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.umschalter button { height: 28px; padding: 0 13px; border: 0; border-radius: 6px; background: transparent; color: var(--fg-2); font: 600 12.5px var(--font); cursor: pointer; }
.umschalter button:hover { color: var(--fg-1); background: var(--s3); }
.umschalter button[aria-pressed="true"] { background: var(--accent-bg); color: var(--nav-active-text); }

/* Sprungleiste */
.sprung { display: flex; flex-wrap: wrap; gap: 4px 14px; border-top: 1px solid var(--l1); padding-top: 12px; }
.sprung a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fg-2); padding: 2px 0; }
.sprung a:hover { color: var(--sim-blue-bright); text-decoration: none; }
.sprung a[hidden] { display: none; }
.sprung-n { font-weight: 500; color: var(--fg-3); font-variant-numeric: tabular-nums; }

/* Gruppen */
.gruppen { display: grid; gap: 24px; padding: 8px 0 32px; }
.gruppe { scroll-margin-top: 72px; }
.gruppe[hidden], .zuletzt[hidden] { display: none; }
.gruppe-titel { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.gruppe-n { font: 600 12.5px var(--font); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.zuletzt { padding: 4px 0 18px; }
.zuletzt .gruppe-titel { font-size: 14px; }

/* Kacheln */
.raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1020px) { .raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .raster { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.kachel { background: var(--s1); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; color: inherit; display: grid; grid-template-columns: minmax(0, 1fr); transition: box-shadow .18s ease, transform .18s ease; }
.kachel:hover { text-decoration: none; box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.kachel[hidden] { display: none; }
.kachel.ohne-bild { border-top: 4px solid var(--bc); }
.kachel.mit-bild { grid-template-columns: 116px minmax(0, 1fr); grid-template-areas: "bild meta" "bild titel" "bild kurz" "next next" "treffer treffer"; grid-template-rows: auto auto 1fr auto auto; gap: 3px 12px; padding: 12px 14px 12px 12px; }
.mit-bild .k-text { display: contents; }
.mit-bild .k-bild { grid-area: bild; } .mit-bild .k-meta { grid-area: meta; } .mit-bild .k-titel { grid-area: titel; } .mit-bild .k-kurz { grid-area: kurz; align-self: start; } .mit-bild .k-next { grid-area: next; } .mit-bild .k-treffer { grid-area: treffer; }
.k-bild { aspect-ratio: 16 / 10; background: var(--s3); overflow: hidden; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--l1); align-self: start; }
.k-bild img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.k-text { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.k-meta { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; min-width: 0; }
.k-bereich { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-3); }
.k-meta .status { font-size: 11.5px; }
.k-datum { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--fg-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-titel { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-kurz { margin: 0; font-size: 13px; line-height: 1.45; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-next { margin: auto 0 0; padding-top: 6px; font-size: 12.5px; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-zug { color: var(--sim-blue-bright); font-weight: 700; }
.k-zug::after { content: ":"; }
.k-ohne { color: var(--fg-3); }
.k-treffer { margin: 4px 0 0; padding: 7px 9px; background: var(--s2); border-radius: var(--r-sm); font-size: 12.5px; color: var(--fg-2); line-height: 1.45; }
@media (max-width: 640px) { .kachel.mit-bild { grid-template-columns: 96px minmax(0, 1fr); } }

/* Liste */
.zeilen { display: none; }
html[data-ansicht="liste"] .raster { display: none; }
html[data-ansicht="liste"] .zeilen { display: block; }
html[data-ansicht="liste"] .gruppen { gap: 22px; }
.zeilen-box { background: var(--s1); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }
.zeile { display: grid; grid-template-columns: 14px minmax(0, 1.3fr) 112px 84px 72px minmax(0, 2fr); align-items: center; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--l1); color: var(--fg-2); font-size: 13px; }
.zeile:first-child { border-top: 0; }
.zeile[hidden] { display: none; }
.zeile:hover { background: var(--s2); text-decoration: none; }
.zeile:hover .z-titel { color: var(--sim-blue-bright); }
.z-dot { display: flex; }
.z-titel { color: var(--fg-1); font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.z-bereich { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.z-datum { font-variant-numeric: tabular-nums; color: var(--fg-3); font-weight: 600; font-size: 12.5px; }
.z-zug { font-weight: 600; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.z-next { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .zeile { grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: "dot titel datum" ". meta meta" ". next next"; gap: 1px 10px; padding: 9px 14px; }
  .z-dot { grid-area: dot; } .z-titel { grid-area: titel; } .z-datum { grid-area: datum; }
  .z-bereich { grid-area: meta; }
  .z-zug { grid-area: meta; justify-self: end; font-size: 12px; }
  .z-next { grid-area: next; font-size: 12.5px; }
  .z-next:empty { display: none; }
}
mark { background: var(--accent-bg); color: var(--fg-1); font-weight: 600; border-radius: 2px; padding: 0 1px; }
.leer { color: var(--fg-3); padding: 24px 0 48px; }
.linkbtn { border: 0; background: none; color: var(--sim-blue-bright); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

/* Zeitleiste */
.zeitleiste { padding-bottom: 40px; display: grid; gap: 18px; }
.monat { background: var(--s1); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 16px 20px 6px; }
.monat[hidden] { display: none; }
.monat-titel { font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; padding-bottom: 8px; }
.monat-n, .block-n { font: 600 12px var(--font); color: var(--fg-3); }
.zl { list-style: none; margin: 0; padding: 0; }
.zl-e { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 9px 0; border-top: 1px solid var(--l1); }
.zl-e[hidden] { display: none; }
.zl-e time { font-size: 12.5px; font-weight: 600; color: var(--fg-3); font-variant-numeric: tabular-nums; padding-top: 1px; }
.zl-projekt { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; color: var(--fg-1); }
.zl-projekt:hover { color: var(--sim-blue-bright); }
.zl-text { font-size: 13.5px; color: var(--fg-2); overflow-wrap: anywhere; }
.zl-kompakt .zl-e:first-child { border-top: 0; }
.prosa ol.zl { padding-left: 0; margin: 0; }
@media (max-width: 640px) { .zl-e { grid-template-columns: minmax(0, 1fr); gap: 2px; } .monat { padding: 14px 14px 4px; } }

/* Projektseite */
.pfad { display: flex; gap: 8px; padding: 18px 0 0; font-size: 12.5px; color: var(--fg-3); flex-wrap: wrap; }
.pfad a { color: var(--fg-2); }
.p-kopf { padding: 10px 0 20px; display: grid; gap: 12px; }
.p-titelzeile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.p-titel { font-size: 26px; font-weight: 700; line-height: 1.2; }
.p-kopf .status { font-size: 13px; background: var(--s1); box-shadow: var(--shadow); padding: 4px 11px; border-radius: 999px; }
.p-kurz { margin: 0; font-size: 15px; color: var(--fg-2); max-width: 760px; }
.p-fakten { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; font-size: 13px; }
.p-fakten dt { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-3); }
.p-fakten dd { margin: 0; color: var(--fg-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.naechster { background: var(--s1); box-shadow: var(--shadow); border-radius: var(--r-md); padding: 14px 20px 16px; position: relative; overflow: hidden; }
.naechster::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sim-blue); }
.naechster-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--sim-blue-bright); }
.naechster p { margin: 4px 0 0; font: 600 18px/1.4 var(--font-display); color: var(--fg-1); }
.linkleiste { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--l2); background: var(--s1); color: var(--fg-1); font: 600 13px var(--font); max-width: 100%; }
.btn:hover { border-color: var(--sim-blue); color: var(--sim-blue-bright); text-decoration: none; }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; flex: none; }
.btn-primary { background: var(--sim-blue); border-color: var(--sim-blue); color: #fff; }
.btn-primary:hover { background: var(--sim-blue-deep); border-color: var(--sim-blue-deep); color: #fff; }

.block { background: var(--s1); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 16px 20px 18px; }
.block-titel { font-size: 13px; font-weight: 600; letter-spacing: .01em; display: flex; gap: 8px; align-items: baseline; margin-bottom: 10px; }
.galerie-block { margin-bottom: 18px; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.shot { margin: 0; }
.shot a { display: block; border-radius: var(--r-sm); overflow: hidden; background: var(--s3); aspect-ratio: 16 / 10; box-shadow: 0 0 0 1px var(--l1); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .25s ease; }
.shot a:hover img { transform: scale(1.02); }
.shot figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding-top: 6px; color: var(--fg-1); font-weight: 500; }
.shot figcaption time { color: var(--fg-3); font-weight: 400; white-space: nowrap; }

.p-raster { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; padding-bottom: 40px; }
.p-haupt, .p-seite { display: grid; gap: 18px; min-width: 0; }
@media (max-width: 960px) { .p-raster { grid-template-columns: minmax(0, 1fr); } }

/* Gerenderte Akte */
.prosa { color: var(--fg-2); font-size: 14.5px; overflow-wrap: anywhere; }
.prosa > :first-child { margin-top: 0; }
.prosa > :last-child { margin-bottom: 0; }
.prosa p { margin: 0 0 10px; }
.prosa h3 { font-size: 14.5px; font-weight: 600; margin: 16px 0 6px; }
.prosa h4 { font-size: 13.5px; margin: 12px 0 4px; }
.prosa ul, .prosa ol { margin: 0 0 10px; padding-left: 20px; }
.prosa li { margin: 3px 0; }
.prosa li::marker { color: var(--fg-3); }
.prosa li.has-who { list-style: none; margin-left: -20px; }
.prosa strong { color: var(--fg-1); }
.prosa code { background: var(--s3); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; color: var(--fg-1); }
.prosa pre { background: var(--s2); padding: 12px 14px; border-radius: var(--r-sm); overflow-x: auto; }
.prosa pre code { background: none; padding: 0; }
.prosa table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 0 0 12px; display: block; overflow-x: auto; }
.prosa th { text-align: left; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-3); background: var(--s2); padding: 7px 10px; }
.prosa td { padding: 7px 10px; border-top: 1px solid var(--l1); vertical-align: top; }
.prosa blockquote { margin: 0 0 10px; padding: 2px 0 2px 14px; box-shadow: inset 3px 0 0 var(--l2); color: var(--fg-2); }
.prosa hr { border: 0; border-top: 1px solid var(--l1); margin: 14px 0; }
.who { display: inline-block; font: 700 10.5px/1 var(--font); letter-spacing: .04em; padding: 4px 7px 3px; border-radius: 4px; margin-right: 4px; vertical-align: 1px; text-transform: uppercase; }
.who-rene { background: var(--crit-bg); color: var(--red); }
.who-kunde { background: var(--warn-bg); color: var(--warn); }
.who-ich { background: var(--accent-bg); color: var(--sim-blue-bright); }
.tag-pruefen { display: inline-block; font: 700 10.5px/1 var(--font); padding: 3px 6px; border-radius: 4px; background: var(--warn-bg); color: var(--warn); vertical-align: 1px; }

/* Seitenleiste */
.liste { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.liste li { padding: 7px 0; border-top: 1px solid var(--l1); display: flex; gap: 8px; align-items: baseline; justify-content: space-between; overflow-wrap: anywhere; }
.liste li:first-child { border-top: 0; padding-top: 0; }
.liste a { color: var(--fg-1); font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.liste a:hover { color: var(--sim-blue-bright); }
.liste time { color: var(--fg-3); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.liste-icons li { justify-content: flex-start; align-items: center; }
.ico svg { width: 16px; height: 16px; fill: none; stroke: var(--fg-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.repos li { display: grid; gap: 3px; }
.repos strong { color: var(--fg-1); font-weight: 600; }
.repos .zweige { font-size: 12px; color: var(--fg-2); }
.repos code { color: var(--fg-2); font-size: 11.5px; overflow-wrap: anywhere; }
.repos code.remote { color: var(--fg-3); }
.mono li { font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; color: var(--fg-2); }
.fehlt { color: var(--fg-3); }
.hinweis { font-size: 11.5px; color: var(--fg-3); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--s3); color: var(--fg-2); }

.fuss { color: var(--fg-3); font-size: 12px; padding-top: 8px; padding-bottom: 28px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
