/* =====================================================================
   demo.css — gemeinsame Bausteine fuer Startseite und /anwendungen/
   Chat-Vorfuehrung, Berufs-Knoepfe, Ablauf-Karten, Aufwand-Kurve.
   Eine Datei fuer alle Seiten, damit die Darstellung nicht auseinanderlaeuft.
   Erzeugt NICHT von Hand pflegen: Inhalte kommen aus anwendungen_bauen.py,
   nur das Aussehen steht hier.
   ===================================================================== */

/* ---------- Berufs-Knoepfe ---------- */
.uc-tabs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 0 0 26px; }
.uc-tab {
  display: flex; align-items: center; gap: 12px; text-align: left;
  min-height: 64px; padding: 12px 16px; cursor: pointer;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.25; color: var(--txt);
  background: transparent; border: 1px solid var(--card-line); border-radius: 10px;
  transition: border-color .2s, background .2s;
}
.uc-tab svg { width: 26px; height: 26px; flex-shrink: 0; stroke: var(--ac); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.uc-tab:hover { border-color: rgba(74,222,128,.45); }
.uc-tab:focus-visible { outline: 3px solid var(--ac); outline-offset: 2px; }
.uc-tab[aria-selected="true"] { background: rgba(74,222,128,.1); border-color: var(--ac); box-shadow: inset 0 -3px 0 var(--ac); }
.uc-tab > span { min-width: 0; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.uc-tab small { display: block; font-weight: 400; font-size: .8rem; opacity: .8; }

/* Ohne JavaScript stehen alle Panels untereinander. Mit JS nur das gewaehlte. */
.uc-panel { margin-bottom: 40px; }
.js-tabs .uc-panel { display: none; margin-bottom: 0; }
.js-tabs .uc-panel.on { display: block; animation: uc-in .45s cubic-bezier(.2,.6,.2,1); }
.uc-tabs { display: none; }
.js-tabs .uc-tabs { display: grid; }
.uc-panel-head { display: none; }
.uc-panel > h3.uc-panel-title { font-size: 1.3rem; margin-bottom: 16px; }
.js-tabs .uc-panel > h3.uc-panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes uc-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.uc-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 36px; align-items: start; }
@media (min-width: 901px) { .uc-grid > .werk { position: sticky; top: 90px; } }
.uc-more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-weight: 600; font-size: 1rem; color: var(--ac); text-decoration: none;
  border-bottom: 1px solid rgba(74,222,128,.35); padding-bottom: 2px;
}
.uc-more:hover { border-color: var(--ac); }

/* ---------- Vorfuehrung: was es liest, was es ergibt ---------- */
.doc { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.werk { margin: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 22px 22px 14px; background: #0E120F; }
.werk-satz { font-family: var(--disp); font-size: 1.32rem; font-weight: 500; line-height: 1.3; color: var(--txt); margin-bottom: 18px; }
.werk-ort { display: block; font-family: var(--sans); font-size: .86rem; font-weight: 400; color: var(--mut); margin-bottom: 4px; }
.werk-grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 18px; align-items: start; }
.werk-k { font-size: .86rem; color: var(--mut); margin-bottom: 6px; }
.werk-liest ul { list-style: none; margin: 0; padding: 0; }
.werk-liest li { display: flex; gap: 8px; align-items: center; font-size: .93rem; color: #C9D3CC; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.07); transition: color .3s, opacity .3s; }
.werk-liest li .doc { color: var(--ac); }
.werk-blatt { background: #F1EFE7; color: #1B1F1C; border-radius: 6px; padding: 16px 18px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.werk-blatt .werk-k { color: #6B716C; }
.werk-titel { font-family: var(--disp); font-weight: 600; font-size: 1.06rem; margin-bottom: 8px; }
.werk-blatt ul { list-style: none; margin: 0; padding: 0; }
.werk-blatt li { font-size: .98rem; line-height: 1.45; padding: 6px 0; border-top: 1px solid rgba(0,0,0,.09); }
.werk-ablage { font-size: .82rem; color: #6B716C; margin-top: 10px; }
.werk-fuss { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); font-size: .84rem; color: var(--mut); }
.werk-fuss > span:first-child { color: #C9D3CC; }
.nochmal { font: inherit; font-size: .84rem; color: var(--txt); cursor: pointer; background: none; border: none; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; margin-left: 8px; }
.nochmal:hover { color: var(--ac); }
.nochmal:focus-visible { outline: 3px solid var(--ac); outline-offset: 2px; }
/* Ablauf der Vorfuehrung (nur mit JS, nur ohne reduzierte Bewegung) */
.werk.laeuft .werk-liest li.st { opacity: .3; }
.werk.laeuft .werk-liest li.st.da { opacity: 1; color: var(--txt); }
.werk.laeuft .werk-blatt .st { opacity: 0; transform: translateY(4px); }
.werk.laeuft .werk-blatt .st.da { opacity: 1; transform: none; transition: opacity .4s, transform .4s; }

/* ---------- Beispiele ---------- */
.ab-list { display: grid; gap: 0; }
.ab-list.zwei { grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 36px; }
.ab { border-top: 1px solid var(--card-line); padding: 18px 0 20px; }
.ab .satz { font-family: var(--disp); font-size: 1.12rem; font-weight: 500; line-height: 1.35; color: var(--txt); margin-bottom: 8px; }
.ab .liest { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--mut); margin-bottom: 8px; }
.ab .liest .doc { color: var(--ac); margin-top: 4px; }
.ab .tut { font-size: 1rem; color: #C9D3CC; line-height: 1.55; margin: 0; }
.ab .zeit { margin-top: 10px; font-size: .88rem; color: var(--mut); }
.ab .zeit s { text-decoration-color: rgba(240,147,127,.8); }
.ab .zeit b { color: var(--ac); font-weight: 600; }
.hinweis-zeit { font-size: .84rem; color: var(--mut); margin-top: 6px; border-top: 1px solid var(--card-line); padding-top: 12px; }

/* ---------- Zuschnitt-Leiste ---------- */
.zuschnitt { margin-top: 30px; display: flex; gap: 16px; align-items: flex-start; border-left: 3px solid var(--ac); padding: 6px 0 6px 18px; }
.zuschnitt svg { width: 30px; height: 30px; flex-shrink: 0; stroke: var(--ac); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.zuschnitt p { margin: 0; font-size: 1.04rem; color: var(--txt); line-height: 1.55; max-width: 760px; }
.zuschnitt p span { color: var(--mut); }

/* ---------- Aufwand ---------- */
.aufwand { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 22px; margin-top: 22px; align-items: stretch; }
.kurve-box { background: transparent; border: 1px solid var(--card-line); border-radius: 10px; padding: 22px 22px 16px; }
.aw-titel { font-family: var(--disp); font-weight: 600; font-size: 1.12rem; letter-spacing: -.01em; text-transform: none; color: var(--txt); margin-bottom: 6px; }
.kurve-box .unter { font-size: .9rem; color: var(--mut); margin-bottom: 8px; }
.kurve { width: 100%; height: auto; display: block; }
.kurve .linie { fill: none; stroke: var(--ac); stroke-width: 3.5; stroke-linecap: round; }
.kurve .flaeche-minus { fill: rgba(240,147,127,.16); }
.kurve .flaeche-plus { fill: rgba(74,222,128,.13); }
.kurve .achse { stroke: rgba(255,255,255,.22); stroke-width: 1.5; }
.kurve .null { stroke: rgba(255,255,255,.3); stroke-width: 1.5; stroke-dasharray: 5 6; }
.kurve text { font-family: var(--sans); font-size: 17px; fill: var(--mut); }
.kurve text.hell { fill: var(--txt); font-weight: 600; }
.kurve text.gruen { fill: var(--ac); font-weight: 600; }
.kurve text.rot { fill: #F0937F; font-weight: 600; }
.kurve .punkt { fill: var(--ac); }
.kurve-box .fuss { font-size: .78rem; color: var(--mut); margin-top: 6px; }
/* Zeichnen beim Sichtbarwerden */
.kurve.zeichnen .linie { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.kurve.zeichnen .flaeche-minus, .kurve.zeichnen .flaeche-plus, .kurve.zeichnen .punkt, .kurve.zeichnen text.spaet { opacity: 0; }
.kurve.zeichnen.in .linie { transition: stroke-dashoffset 2.2s cubic-bezier(.4,.1,.2,1); stroke-dashoffset: 0; }
.kurve.zeichnen.in .flaeche-minus { transition: opacity .6s .5s; opacity: 1; }
.kurve.zeichnen.in .flaeche-plus, .kurve.zeichnen.in .punkt, .kurve.zeichnen.in text.spaet { transition: opacity .7s 1.6s; opacity: 1; }

.wer-box { background: transparent; border: 1px solid var(--card-line); border-radius: 10px; padding: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wer-box .aw-titel { grid-column: 1 / -1; margin-bottom: 0; }
.wer-box .wer-t { font-family: var(--disp); font-size: 1rem; font-weight: 600; color: var(--ac); margin-bottom: 8px; }
.wer-box { align-content: start; }
.wer-box ul { list-style: none; margin: 0; padding: 0; }
.wer-box li { position: relative; padding: 0 0 10px 22px; font-size: .97rem; color: #C9D3CC; line-height: 1.5; }
.wer-box li::before { content: '✓'; position: absolute; left: 0; color: var(--ac); font-weight: 700; }
.wer-box .ich li::before { content: '→'; }

@media (prefers-reduced-motion: reduce) {
  .js-tabs .uc-panel.on { animation: none; }
  .werk.laeuft .st { opacity: 1 !important; transform: none !important; }
  .kurve.zeichnen .linie { stroke-dasharray: none; stroke-dashoffset: 0; }
  .kurve.zeichnen .flaeche-minus, .kurve.zeichnen .flaeche-plus, .kurve.zeichnen .punkt, .kurve.zeichnen text.spaet { opacity: 1; }
  .uc-tab:hover { transform: none; }
}
@media (max-width: 900px) {
  .uc-tabs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .uc-grid, .aufwand, .werk-grid { grid-template-columns: 1fr; }
  .ab-list.zwei { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .uc-tab { min-height: 58px; padding: 10px 12px; font-size: .95rem; gap: 9px; }
  .uc-tab svg { display: none; }
  .uc-tab small { font-size: .76rem; }
  .kurve text { font-size: 21px; }
  .wer-box { grid-template-columns: 1fr; }
  .zuschnitt { flex-direction: column; align-items: flex-start; padding: 20px; }
  .werk { padding: 18px 14px 12px; }
  .werk-satz { font-size: 1.18rem; }
}

/* ---------- Kompakte Berufswahl (Startseite, Uebersicht) ---------- */
.uc-kompakt .uc-tabs { display: none; flex-wrap: wrap; gap: 8px; grid-template-columns: none; margin-bottom: 22px; }
.uc-kompakt.js-tabs .uc-tabs { display: flex; }
.uc-kompakt .uc-tab { min-height: 46px; padding: 8px 16px 8px 12px; border-radius: 99px; font-size: .98rem; gap: 8px; }
.uc-kompakt .uc-tab svg { width: 19px; height: 19px; }
.uc-kompakt .uc-tab[aria-selected="true"] { box-shadow: none; }
.uc-kompakt .uc-panel { margin-bottom: 26px; }
.uc-kompakt.js-tabs .uc-panel { margin-bottom: 0; }
.uc-wer { font-family: var(--disp); font-weight: 600; font-size: 1.2rem; color: var(--txt); margin: 4px 0 14px; }
.uc-kompakt .werk { max-width: 920px; }
.uc-weiter { margin-top: 14px; }
.uc-schluss { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--card-line); display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; max-width: 920px; }
.uc-schluss p { margin: 0; max-width: 540px; color: var(--mut); font-size: 1.02rem; line-height: 1.55; }
.uc-schluss p b { color: var(--txt); }
@media (max-width: 520px) {
  .uc-kompakt .uc-tab svg { display: block; width: 17px; height: 17px; }
  .uc-kompakt .uc-tab { font-size: .92rem; padding: 7px 13px 7px 10px; min-height: 44px; }
  .uc-schluss .btn-main { width: 100%; text-align: center; }
}

/* =====================================================================
   Startseite: helles Verzeichnis der Anwendungsfaelle + Fenster
   Bewusst anders als der Rest der Seite (hell statt dunkel), damit man
   sieht: hier beginnt ein neuer Abschnitt.
   ===================================================================== */
.uc-start { position: relative; padding: 96px 0 88px; overflow: hidden; }
.uc-start::before { content: ''; position: absolute; left: 50%; top: -260px; width: 1100px; height: 620px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(74,222,128,.11) 0%, transparent 65%); pointer-events: none; }
.uc-start .wrap { position: relative; }
.uc-kopf { max-width: 720px; margin: 0 auto; text-align: center; }
.uc-kopf h2 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); margin: 0 0 16px; }
.uc-einl { color: var(--mut); font-size: 1.08rem; line-height: 1.6; margin: 0 auto; max-width: 600px; }
.uc-kacheln { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.uc-kacheln > li { display: flex; min-width: 0; }
.uc-kachel {
  flex: 1; display: flex; flex-direction: column; gap: 16px; cursor: pointer;
  padding: 20px 20px 18px; border-radius: var(--r); text-decoration: none; color: var(--txt);
  background: var(--card); border: 1px solid var(--card-line);
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.uc-kachel:hover { border-color: var(--ac); background: rgba(74,222,128,.09); transform: translateY(-5px); box-shadow: 0 18px 46px -16px var(--ac-glow), 0 0 0 1px rgba(74,222,128,.35); }
.uc-kachel:active { transform: translateY(-2px) scale(.985); }
.uc-k-icon, .uc-k-icon svg, .uc-k-beruf small { transition: background .2s, stroke .2s, color .2s; }
.uc-kachel:hover .uc-k-icon { background: var(--ac); }
.uc-kachel:hover .uc-k-icon svg { stroke: #06210F; }
.uc-kachel:hover .uc-k-beruf small { color: var(--txt); }
@media (hover: none) { .uc-k-pfeil { border-color: rgba(74,222,128,.5); color: var(--ac); } }
.uc-kachel:focus-visible { outline: 3px solid var(--ac); outline-offset: 3px; }
.uc-k-kopf { display: flex; justify-content: space-between; align-items: center; }
.uc-k-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ac-soft); }
.uc-k-icon svg { width: 23px; height: 23px; stroke: var(--ac); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.uc-k-pfeil { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 99px; border: 1px solid var(--card-line); color: var(--mut); font-size: 1rem; transition: all .2s; }
.uc-kachel:hover .uc-k-pfeil { background: var(--ac); border-color: var(--ac); color: #06210F; transform: rotate(-45deg); }
.uc-k-beruf { font-family: var(--disp); font-weight: 600; font-size: 1.24rem; line-height: 1.2; min-width: 0; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.uc-k-beruf small { display: block; font-family: var(--sans); font-weight: 400; font-size: .86rem; color: var(--mut); margin-top: 4px; letter-spacing: 0; }
.uc-k-frage { margin-top: auto; padding: 11px 13px; border-radius: 12px 12px 12px 4px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.06); font-size: .93rem; line-height: 1.42; color: #D5DDD6; }
.uc-k-du { display: block; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ac); margin-bottom: 4px; }
.uc-fuss { margin: 30px auto 0; color: var(--mut); font-size: 1rem; max-width: 720px; text-align: center; }
.uc-fuss a { color: var(--ac); font-weight: 600; white-space: nowrap; text-decoration: none; }
.uc-fuss a:hover { text-decoration: underline; }
@media (max-width: 960px) { .uc-kacheln { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) {
  .uc-start { padding: 64px 0 60px; }
  .uc-kopf { text-align: left; }
  .uc-kopf h2 { font-size: 1.75rem; }
  .uc-kopf h2 br { display: none; }
  .uc-kacheln { gap: 10px; margin-top: 32px; }
  .uc-kachel { min-height: 0; padding: 14px 13px 13px; gap: 11px; }
  .uc-k-icon { width: 36px; height: 36px; border-radius: 10px; }
  .uc-k-icon svg { width: 19px; height: 19px; }
  .uc-k-pfeil { width: 28px; height: 28px; font-size: .9rem; }
  .uc-k-beruf { font-size: 1rem; }
  .uc-k-beruf small { font-size: .76rem; }
  .uc-k-frage { font-size: .82rem; padding: 9px 10px; }
  .uc-k-du { font-size: .62rem; }
  .uc-fuss { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .uc-kachel, .uc-k-pfeil { transition: none; } .uc-kachel:hover { transform: none; } .uc-kachel:hover .uc-k-pfeil { transform: none; } }

.uc-dlg {
  padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  background: #0B0E0C; color: var(--txt);
  width: min(940px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 40px); overflow: auto;
  margin: auto; /* die Seite setzt margin:0 fuer alles, das schiebt den Dialog sonst in die Ecke */
}
.uc-dlg::backdrop { background: rgba(8,10,8,.74); }
.uc-dlg[open] { animation: dlg-in .25s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html.dlg-offen { overflow: hidden; }
.uc-dlg-kopf { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px 0; }
.uc-dlg-t { font-family: var(--disp); font-weight: 600; font-size: 1.15rem; margin: 0; }
.uc-zu { font: inherit; font-size: .9rem; color: var(--txt); background: none; border: 1px solid var(--card-line); border-radius: 99px; padding: 8px 14px; min-height: 40px; cursor: pointer; white-space: nowrap; }
.uc-zu:hover { border-color: var(--ac); }
.uc-zu:focus-visible { outline: 3px solid var(--ac); outline-offset: 2px; }
.uc-dlg .werk { border: none; background: transparent; box-shadow: none; padding: 16px 22px 6px; }
.uc-dlg-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding: 16px 22px 22px; border-top: 1px solid var(--card-line); }
.uc-dlg-fuss .uc-more { margin: 0; }

@media (max-width: 860px) {
}
@media (max-width: 600px) {
  .uc-dlg { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: none; margin: 0; }
  .uc-dlg-kopf { padding: 14px 16px 0; align-items: flex-start; }
  .uc-dlg-t { font-size: 1.02rem; line-height: 1.35; }
  .uc-dlg .werk { padding: 12px 16px 4px; }
  .uc-dlg-fuss { padding: 14px 16px 22px; }
  .uc-dlg-fuss .btn-main { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .uc-dlg[open] { animation: none; }
}
