/* Story Studio — Hülle: Seitenrahmen, Kopfzeile, Seitenleiste und die wenigen Bausteine, die die Seiten brauchen.
   Alle Werte aus dem Design-Token der Zentrale. Gehört später nach packages/ (gemeinsame Bausteine der Anwendungen). */
@import url("https://lab.vehmeier.com/vds/design.css?v=1");
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 300 16px/1.6 'Open Sans', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: 'Lora', Georgia, serif; font-weight: 500; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 28px; }
h2 { font-size: 19px; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-nur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopfzeile */
.kopf { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; padding: 0 clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.kopf__links { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.marke { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.marke img { display: block; height: 26px; width: auto; border-radius: 4px; }
.marke span { font: 400 14.5px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--dim); }
.werkzeuge { display: inline-flex; align-items: center; gap: 4px; flex: none; }

/* Seite */
main { flex: 1; width: 100%; max-width: var(--breite, 1040px); margin: 0 auto; padding: 40px clamp(16px, 3vw, 32px) 56px; display: flex; flex-direction: column; gap: 28px; }
.seitenkopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.seitenkopf__aktionen { display: inline-flex; align-items: center; gap: 8px; }
.pfadzeile { font-size: 13.5px; color: var(--dim); margin-bottom: 6px; }
.pfadzeile a { color: var(--dim); text-decoration: none; }
.pfadzeile a:hover { color: var(--ink); }
.lede { color: var(--dim); margin: 6px 0 0; max-width: 62ch; font-size: 15px; }
.leer { color: var(--dim); }
#inhalt { display: flex; flex-direction: column; gap: 36px; }

/* Seitenleiste der Projektseite: nur die Navigation der Story */
body.konsole { display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-height: 100vh; }
body.konsole > .kopf { grid-column: 1 / -1; grid-row: 1; }
body.konsole > .kl { grid-column: 1; grid-row: 2 / span 2; position: sticky; top: 0; align-self: start; height: calc(100vh - 61px); }
body.konsole > main { grid-column: 2; grid-row: 2; max-width: 1120px; margin: 0; padding: 40px clamp(20px, 4vw, 56px) 56px; }
body.konsole > vds-fuss { grid-column: 2; grid-row: 3; }
.kl { display: flex; flex-direction: column; gap: 4px; padding: 20px 12px 12px; background: var(--leiste-bg); border-right: 1px solid var(--rand); overflow-y: auto; font-size: 14.5px; }
.kl__zurueck { display: flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 9px; color: var(--dim); text-decoration: none; font-weight: 400; }
.kl__zurueck:hover { background: var(--hover); color: var(--ink); }
.kl__titel { padding: 12px 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kl__mandant { font-size: 13px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kl__titel b { font: 500 16px/1.3 'Lora', Georgia, serif; overflow-wrap: anywhere; }
.kl__nav { display: flex; flex-direction: column; gap: 2px; }
.kl__punkt { display: flex; align-items: center; min-height: 38px; padding: 0 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 400; }
.kl__punkt:hover { background: var(--hover); }
.kl__neu { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; color: var(--dim); }
.kl__neu:hover { color: var(--ink); }
.kl__punkt[aria-current="page"] { background: var(--thema-strategie-flaeche); font-weight: 600; }

/* Tasten: eine Familie, Tinte als Haupthandlung */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); font: 400 15px/1 inherit; font-family: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn--haupt { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 500; }
.btn--haupt:hover:not(:disabled) { opacity: .9; }
.btn--klein { min-height: 32px; padding: 0 12px; font-size: 14px; }
.btn--sym { width: 32px; min-height: 32px; padding: 0; border-color: transparent; color: var(--dim); border-radius: 8px; }
.btn--sym:hover:not(:disabled) { border-color: transparent; background: var(--hover); color: var(--ink); }
.btn--text { border-color: transparent; color: var(--dim); padding: 0 10px; }
.btn--text:hover:not(:disabled) { border-color: transparent; color: var(--ink); text-decoration: underline; }

/* Hinweise, Leerzustand */
.hinweis { padding: 12px 14px; border-radius: var(--radius-md); background: var(--field); color: var(--dim); font-size: 14.5px; }
.hinweis--warn { background: var(--highlight-soft); color: var(--ink); }
.hinweis--fehler { color: var(--fail); }
.leerzustand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 56px 16px; color: var(--dim); }
.leerzustand b { color: var(--ink); font-weight: 600; font-size: 15.5px; }
.leerzustand p { margin: 0 0 8px; max-width: 52ch; font-size: 14.5px; }

/* Listen: Zeilen mit Linie, ohne Kasten (Projektauswahl) */
.gruppe { display: flex; flex-direction: column; }
.gruppenkopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 8px 8px; }
.liste { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.liste > li { border-top: 1px solid var(--line); }
.eintrag { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px; border-radius: var(--radius); text-decoration: none; }
a.eintrag:hover { background: var(--field); }
.eintrag__titel { font-weight: 500; font-size: 16px; min-width: 0; }
.eintrag__meta { color: var(--dim); font-size: 13.5px; margin-left: auto; text-align: right; white-space: nowrap; }

/* Schmal: Seitenleiste wird zur Leiste unter der Kopfzeile */
@media (max-width: 860px) {
  body.konsole { display: flex; }
  body.konsole > .kl { position: static; align-self: stretch; height: auto; flex-direction: column; gap: 0; padding: 8px 12px 0; border-right: 0; border-bottom: 1px solid var(--rand); overflow: visible; }
  body.konsole > main { padding: 24px 16px 40px; }
  .kl__titel { padding: 4px 10px 8px; }
  .kl__nav { flex-direction: row; overflow-x: auto; gap: 2px; }
  .kl__punkt { flex: none; white-space: nowrap; border-radius: 9px 9px 0 0; }
  .marke span { display: none; }
  .kopf vds-projekt { display: none !important; }   /* Mandant und Projekt stehen schon in der Leiste darunter */
  main { padding: 24px 16px 40px; }
}
