/* oncel Protokoll – Oberfläche. Schrift und Farben wie das oncel CRM: Bricolage Grotesque, Indigo, warmes Papier, Haarlinien. */

@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/assets/bricolage-grotesque-latin-opsz-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/assets/bricolage-grotesque-latin-ext-opsz-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113;
}

:root {
  --ink: #14161F; --ink-2: #3A3D4A; --grau: #6B7080; --grau-2: #9A9EAB;
  --linie: #E6E1D6; --linie-2: #F0ECE3; --papier: #FAF9F5; --sand: #F3EFE6; --weiss: #FFFFFF;
  --indigo: #2531C8; --indigo-dunkel: #1B2580; --lavendel-hell: #ECEEFF;
  --rot: #D62839; --rot-hell: #FBE7E9; --gruen: #178C67; --gruen-hell: #E3F3EC; --orange: #C86710; --orange-hell: #FBEEDD;
  --s1: #3A48E6; --s2: #C86710; --s3: #178C67; --s4: #8A5BD6; --s5: #B8244C;
  --font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px; --radius-gross: 16px; --rail: 236px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--papier); line-height: 1.45; font-size: 15px; font-variation-settings: 'opsz' 14; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: 26px; font-variation-settings: 'opsz' 48; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Rahmen ---------- */
.rahmen { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.leiste { border-right: 1px solid var(--linie); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--papier); }
.marke { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; padding: 4px 8px 18px; color: var(--ink); }
.marke:hover { text-decoration: none; }
.marke img { width: 30px; height: 30px; }
.marke .punkt { color: var(--rot); }
.marke small { display: block; font-weight: 500; font-size: 12px; color: var(--grau); letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.nav:hover { background: var(--sand); text-decoration: none; }
.nav.aktiv { background: var(--lavendel-hell); color: var(--indigo); }
.nav .zahl { margin-left: auto; font-size: 12px; color: var(--grau); }
.leiste__titel { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--grau); padding: 18px 10px 6px; display: flex; justify-content: space-between; align-items: center; }
.leiste__fuss { margin-top: auto; padding-top: 16px; }
.haupt { min-width: 0; padding: 28px 36px 80px; max-width: 1360px; }

/* ---------- Bausteine ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 9px; border: 1px solid var(--linie); background: var(--weiss); cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--grau-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn--primaer { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn--primaer:hover { background: var(--indigo-dunkel); border-color: var(--indigo-dunkel); }
.btn--leise { background: transparent; border-color: transparent; }
.btn--leise:hover { background: var(--sand); border-color: transparent; }
.btn--gefahr { color: var(--rot); }
.btn--klein { padding: 5px 10px; font-size: 13.5px; border-radius: 7px; }
.btn--rund { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.icon { width: 18px; height: 18px; flex: none; }
.feld { width: 100%; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 9px; background: var(--weiss); }
.feld:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--lavendel-hell); }
textarea.feld { resize: vertical; min-height: 90px; }
label.beschriftung { display: block; font-size: 13px; color: var(--grau); margin: 12px 0 5px; }
.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius-gross); }
.hilfe { color: var(--grau); font-size: 13.5px; }
.zeile { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.zeile--zwischen { justify-content: space-between; }
.kopfzeile { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--sand); color: var(--ink-2); white-space: nowrap; }
.chip--indigo { background: var(--lavendel-hell); color: var(--indigo); }
.chip--gruen { background: var(--gruen-hell); color: var(--gruen); }
.chip--rot { background: var(--rot-hell); color: var(--rot); }
.chip--orange { background: var(--orange-hell); color: var(--orange); }
.chip .puls { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: puls 1.2s infinite; }
@keyframes puls { 50% { opacity: .25; } }
.leer { text-align: center; padding: 48px 20px; color: var(--grau); }
.leer h2 { color: var(--ink); margin-bottom: 6px; }

/* ---------- Neu-Karten ---------- */
.neu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.neu__karte { padding: 18px; border: 1px solid var(--linie); border-radius: var(--radius-gross); background: var(--weiss); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, transform .15s; }
.neu__karte:hover { border-color: var(--indigo); transform: translateY(-1px); }
.neu__karte .symbol { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--lavendel-hell); color: var(--indigo); }
.neu__karte.rot .symbol { background: var(--rot-hell); color: var(--rot); }
.neu__karte.gruen .symbol { background: var(--gruen-hell); color: var(--gruen); }
.neu__karte.orange .symbol { background: var(--orange-hell); color: var(--orange); }
.neu__karte strong { font-size: 15.5px; }
.ablage { border: 2px dashed var(--linie); border-radius: var(--radius-gross); padding: 34px 20px; text-align: center; color: var(--grau); transition: border-color .15s, background .15s; cursor: pointer; }
.ablage.drueber { border-color: var(--indigo); background: var(--lavendel-hell); color: var(--indigo); }
.balken { height: 6px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.balken > div { height: 100%; background: var(--indigo); width: 0; transition: width .2s; }

/* ---------- Liste ---------- */
.werkzeug { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.werkzeug .suche { flex: 1; min-width: 220px; position: relative; }
.werkzeug .suche .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--grau); }
.werkzeug .suche input { padding-left: 38px; }
.liste { border-top: 1px solid var(--linie); }
.eintrag { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--linie); color: inherit; }
.eintrag:hover { background: var(--weiss); text-decoration: none; }
.eintrag__art { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--sand); color: var(--ink-2); }
.eintrag__art.meet { background: var(--lavendel-hell); color: var(--indigo); }
.eintrag__art.youtube { background: var(--rot-hell); color: var(--rot); }
.eintrag__art.aufnahme { background: var(--gruen-hell); color: var(--gruen); }
.eintrag__titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eintrag__meta { color: var(--grau); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.eintrag__treffer { color: var(--ink-2); font-size: 13.5px; margin-top: 3px; }
.eintrag__treffer mark { background: var(--gelb-hell, #FBF3D9); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 26px; align-items: start; }
.titelfeld { font-size: 26px; font-weight: 600; border: 0; background: transparent; width: 100%; padding: 2px 0; letter-spacing: -0.01em; font-variation-settings: 'opsz' 48; border-bottom: 1px solid transparent; }
.titelfeld:hover, .titelfeld:focus { outline: none; border-bottom-color: var(--linie); }
.player { position: sticky; top: 0; z-index: 5; background: var(--papier); padding: 12px 0; border-bottom: 1px solid var(--linie); margin-bottom: 8px; display: flex; gap: 12px; align-items: center; }
.player audio { flex: 1; height: 40px; min-width: 0; }
.player select { width: auto; padding: 6px 8px; }
.transkript { padding: 4px 0 40px; }
.seg { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 8px 8px; border-radius: 8px; }
.seg:hover { background: var(--weiss); }
.seg.jetzt { background: var(--lavendel-hell); }
.seg__zeit { font-size: 12.5px; color: var(--grau); font-variant-numeric: tabular-nums; padding-top: 3px; background: none; border: 0; cursor: pointer; text-align: left; }
.seg__zeit:hover { color: var(--indigo); }
.seg__sprecher { font-weight: 600; font-size: 13.5px; cursor: pointer; border: 0; background: none; padding: 0; margin-bottom: 2px; }
.seg__sprecher:hover { text-decoration: underline; }
.seg__text { outline: none; border-radius: 4px; white-space: pre-wrap; }
.seg__text:focus { background: var(--weiss); box-shadow: 0 0 0 2px var(--lavendel-hell); }
.seg__text mark { background: #FBF3D9; color: inherit; }
.seg__uebersetzung { color: var(--grau); font-size: 14px; margin-top: 4px; border-left: 2px solid var(--linie); padding-left: 10px; }
.seite { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.reiter { display: flex; gap: 2px; border-bottom: 1px solid var(--linie); overflow-x: auto; flex: none; }
.reiter button { border: 0; background: none; padding: 10px 8px; font-size: 14px; cursor: pointer; color: var(--grau); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter button.aktiv { color: var(--indigo); border-bottom-color: var(--indigo); }
.reiter__inhalt { padding: 16px 2px; overflow-y: auto; flex: 1; }
.abschnitt { margin-bottom: 20px; }
.abschnitt h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--grau); margin-bottom: 8px; font-weight: 600; }
.punkte { margin: 0; padding-left: 18px; }
.punkte li { margin-bottom: 6px; }
.todo { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie-2); }
.todo .meta { color: var(--grau); font-size: 13px; }
.highlight { display: flex; gap: 10px; padding: 6px 0; cursor: pointer; }
.highlight:hover { color: var(--indigo); }
.highlight .zeit { color: var(--grau); font-variant-numeric: tabular-nums; font-size: 13px; padding-top: 1px; }
.anteil { margin-bottom: 12px; }
.anteil .zeile { font-size: 14px; margin-bottom: 4px; }
.anteil .balken > div { background: var(--farbe, var(--indigo)); }
.nachricht { padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; white-space: pre-wrap; }
.nachricht.frage { background: var(--indigo); color: #fff; margin-left: 40px; }
.nachricht.antwort { background: var(--weiss); border: 1px solid var(--linie); margin-right: 20px; }
.nachricht .quellen { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.chat-eingabe { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--linie); flex: none; }
.chat-eingabe textarea { min-height: 44px; height: 44px; }
.vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.vorschlaege button { border: 1px solid var(--linie); background: var(--weiss); border-radius: 999px; padding: 5px 11px; cursor: pointer; font-size: 13px; }
.vorschlaege button:hover { border-color: var(--indigo); color: var(--indigo); }
.verlauf li { margin-bottom: 6px; font-size: 13.5px; }
.verlauf .zeit { color: var(--grau); font-size: 12px; }

/* ---------- Fragen ---------- */
.fragen { max-width: 820px; }
.fragen .karte { padding: 18px; min-height: 300px; }

/* ---------- Aufnahme ---------- */
.aufnahme { text-align: center; padding: 20px 0 6px; }
.aufnahme .uhr { font-size: 42px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 10px 0; }
.pegel { height: 8px; background: var(--sand); border-radius: 999px; overflow: hidden; max-width: 320px; margin: 0 auto 18px; }
.pegel > div { height: 100%; width: 0; background: var(--rot); transition: width .08s; }
.aufnahme .rec { width: 74px; height: 74px; border-radius: 50%; border: 0; background: var(--rot); color: #fff; cursor: pointer; display: inline-grid; place-items: center; }
.aufnahme .rec.laeuft { animation: puls 1.4s infinite; }

/* ---------- Dialog, Meldung, Menü ---------- */
.schleier { position: fixed; inset: 0; background: rgba(20, 22, 31, .35); display: grid; place-items: center; z-index: 50; padding: 16px; }
.dialog { background: var(--papier); border-radius: var(--radius-gross); width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; border: 1px solid var(--linie); }
.dialog h2 { margin-bottom: 4px; }
.dialog .knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.meldung { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; z-index: 60; max-width: calc(100vw - 32px); font-size: 14px; }
.meldung.fehler { background: var(--rot); }
.menue { position: relative; display: inline-block; }
.menue__liste { position: absolute; right: 0; top: calc(100% + 6px); background: var(--weiss); border: 1px solid var(--linie); border-radius: 12px; padding: 6px; min-width: 230px; z-index: 20; }
.menue__liste button, .menue__liste a { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink); }
.menue__liste button:hover, .menue__liste a:hover { background: var(--sand); text-decoration: none; }
.menue__trenner { border-top: 1px solid var(--linie); margin: 6px 0; }
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.anmeldung .karte { padding: 32px; width: 100%; max-width: 380px; }
.hinweis { padding: 12px 14px; border-radius: 10px; background: var(--orange-hell); color: var(--ink-2); font-size: 14px; margin-bottom: 18px; }
.hinweis--fehler { background: var(--rot-hell); }
.oben-mobil { display: none; }

/* ---------- Mobil ---------- */
@media (max-width: 1100px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .seite { position: static; max-height: none; }
  .neu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .rahmen { grid-template-columns: minmax(0, 1fr); }
  .nur-breit { display: none; }
  .leiste { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-105%); transition: transform .2s; height: 100%; }
  .leiste.offen { transform: none; }
  .oben-mobil { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--linie); position: sticky; top: 0; background: var(--papier); z-index: 30; }
  .haupt { padding: 18px 16px 80px; }
  .neu { grid-template-columns: 1fr 1fr; gap: 8px; }
  .neu__karte { padding: 14px; }
  .neu__karte .hilfe { display: none; }
  h1, .titelfeld { font-size: 22px; }
  .seg { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Drucken (PDF) ---------- */
@media print {
  .leiste, .oben-mobil, .player, .seite, .kein-druck { display: none !important; }
  .rahmen, .detail { display: block; }
  .haupt { padding: 0; max-width: none; }
  body { background: #fff; font-size: 11pt; }
  .seg { break-inside: avoid; grid-template-columns: 52px 1fr; padding: 3px 0; }
  .druck-zusammenfassung { display: block !important; margin-bottom: 18px; }
}
.druck-zusammenfassung { display: none; }
