/* =====================================================================
   DHS OS — Presence V4 / Sources UI (V13.4)
   Neue Klassen in EIGENER Datei — app.css bleibt unberührt.
   Markenkonform: DHS-Lime #B8E834, dunkler Grund, ruhige Microinteraction.
   ===================================================================== */

/* §60/§61 Recherche-Quellen: einklappbar unter der Antwort. */
.vo-quellen {
  margin-top: 8px;
  border-top: 1px solid rgba(184, 232, 52, 0.12);
  padding-top: 6px;
}
.vo-quellen-titel {
  cursor: pointer;
  font-size: 12px;
  color: #9aa39a;
  letter-spacing: 0.02em;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
}
.vo-quellen-titel::-webkit-details-marker { display: none; }
.vo-quellen-titel::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  color: #b8e834;
  transition: transform 0.15s ease;
}
.vo-quellen[open] > .vo-quellen-titel::before { transform: rotate(90deg); }

.vo-quelle {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  margin-top: 4px;
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.vo-quelle:hover,
.vo-quelle:focus-visible {
  background: rgba(184, 232, 52, 0.06);
  border-color: rgba(184, 232, 52, 0.18);
  outline: none;
}
.vo-quelle-titel {
  font-size: 13px;
  color: #e8ece6;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vo-quelle-domain { font-size: 11px; color: #7b857b; }

@media (prefers-reduced-motion: reduce) {
  .vo-quellen-titel::before,
  .vo-quelle { transition: none; }
}

/* §A Mail-Draft-Surface: ein echtes Arbeitsobjekt, editierbar, hochwertig —
   nicht eine graue Textarea in einer Debugkarte. */
.mv-draft {
  position: relative;
  margin-top: 12px;
  border: 1px solid rgba(184, 232, 52, 0.20);
  border-radius: 16px;
  /* Nex V2 Draft: hochwertiges Material — Lichtsaum oben, ruhige Tiefe darunter,
     als läge ein echtes Schreibobjekt auf dem Tisch, keine Debug-Karte (§31/§32). */
  background:
    radial-gradient(120% 54px at 50% 0%, rgba(184, 232, 52, 0.06), transparent 72%),
    linear-gradient(180deg, rgba(24, 32, 22, 0.9), rgba(15, 20, 17, 0.92));
  box-shadow: inset 0 1px 0 rgba(230, 250, 180, 0.05), 0 12px 30px rgba(0, 0, 0, 0.34);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}
/* §33 Aktiver Draft = aktuelles Arbeitsobjekt: sobald Kevin darin arbeitet,
   hebt sich das Objekt sichtbar (Lime-Kante + feiner Halo). */
.mv-draft:focus-within {
  border-color: rgba(184, 232, 52, 0.42);
  box-shadow: inset 0 1px 0 rgba(230, 250, 180, 0.06), 0 12px 30px rgba(0, 0, 0, 0.34), 0 0 0 3px rgba(184, 232, 52, 0.08);
}
.mv-draft-kopf { display: flex; align-items: center; gap: 9px; }
.mv-draft-titel { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: #e8ece6; }
.mv-draft-marke {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #b8e834; border: 1px solid rgba(184, 232, 52, 0.35);
  border-radius: 999px; padding: 2px 9px;
}
.mv-draft-zeile { display: flex; align-items: center; gap: 10px; }
.mv-draft-label {
  flex: 0 0 52px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #7b857b;
}
.mv-draft-an { font-size: 13.5px; color: #e8ece6; }
.mv-draft-betreff,
.mv-draft-text {
  width: 100%; background: rgba(10, 13, 11, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 9px;
  color: #e8ece6; font-family: inherit; padding: 9px 11px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.mv-draft-betreff { font-size: 14px; font-weight: 500; }
.mv-draft-text { font-size: 13.5px; line-height: 1.55; resize: vertical; min-height: 120px; }
.mv-draft-betreff:focus,
.mv-draft-text:focus {
  outline: none; border-color: rgba(184, 232, 52, 0.5);
  box-shadow: 0 0 0 3px rgba(184, 232, 52, 0.08);
}
.mv-draft-hinweis { margin: 0; font-size: 11.5px; line-height: 1.45; color: #7b857b; }
.mv-draft-knoepfe { display: flex; gap: 8px; margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  .mv-draft-betreff, .mv-draft-text { transition: none; }
}

/* =====================================================================
   Active-Read-Surface (V18) — sichtbares Vorlesen einer Mail.
   Leichte Nex-Glasflaeche mit Lime-Akzent, KEIN schwarzer Kasten.
   Bewegung nur beim echten Sprechen (.ar-spricht).
   ===================================================================== */
.ar-huelle { margin-top: 10px; }
.ar {
  position: relative; border-radius: 16px; padding: 14px 16px;
  background: linear-gradient(160deg, rgba(24,30,18,0.72), rgba(12,16,10,0.82));
  border: 1px solid rgba(184,232,52,0.22);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #eaf3d8;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.ar-spricht {
  border-color: rgba(184,232,52,0.45);
  box-shadow: 0 8px 34px rgba(184,232,52,0.15), 0 8px 30px rgba(0,0,0,0.4);
}
.ar-kopf { display: flex; align-items: flex-start; gap: 12px; }
.ar-glyph { display: flex; align-items: flex-end; gap: 3px; height: 24px; padding-top: 3px; }
.ar-welle { width: 3px; height: 6px; border-radius: 2px; background: var(--lime, #B8E834); opacity: 0.45; }
.ar-spricht .ar-welle { animation: ar-wave 1s ease-in-out infinite; }
.ar-spricht .ar-welle:nth-child(2) { animation-delay: .12s; }
.ar-spricht .ar-welle:nth-child(3) { animation-delay: .24s; }
.ar-spricht .ar-welle:nth-child(4) { animation-delay: .36s; }
@keyframes ar-wave { 0%,100% { height: 6px; opacity: .45; } 50% { height: 20px; opacity: 1; } }
.ar-meta { flex: 1; min-width: 0; }
.ar-von { font-weight: 650; font-size: 14px; color: #f2f8e6; }
.ar-betreff { font-size: 13px; color: #c3d3a6; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-zeit { font-size: 11px; color: #8ea36a; margin-top: 2px; }
.ar-x { background: none; border: 0; color: #9fb178; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; flex: none; }
.ar-x:hover { color: #eaf3d8; }
.ar-fortschritt { height: 3px; border-radius: 3px; background: rgba(184,232,52,0.12); margin: 12px 0 10px; overflow: hidden; }
.ar-balken { height: 100%; background: var(--lime, #B8E834); border-radius: 3px; transition: width var(--nex-state, .5s) var(--nex-ease, ease); }
.ar-abschnitt { font-size: 14px; line-height: 1.55; color: #e3eecb; max-height: 168px; overflow: auto; }
.ar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ar-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(184,232,52,0.25); background: rgba(184,232,52,0.06); color: #dcebbf; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.ar-btn:hover:not(:disabled) { background: rgba(184,232,52,0.14); border-color: rgba(184,232,52,0.5); }
.ar-btn:disabled { opacity: 0.4; cursor: default; }
.ar-btn-prim { background: var(--lime, #B8E834); color: #14210a; border-color: var(--lime, #B8E834); font-weight: 650; }
.ar-btn-an { background: rgba(184,232,52,0.2); border-color: rgba(184,232,52,0.6); color: #eaf3d8; }
.ar-ic { flex: none; }
.ar-pos { margin-left: auto; font-size: 11px; color: #8ea36a; }
.mi-vorlesen { display: inline-flex; align-items: center; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .ar-spricht .ar-welle { animation: none; height: 12px; } }

/* =====================================================================
   Active-Read-Surface MOBILE (V23 Item 35/37/38/43/46)
   390/430: >=44px Touch-Targets, Safe-Area unten, kein Overflow, lesbarer
   Abschnitt. Die Surface war seit V18 nur Desktop-getuned.
   ===================================================================== */
@media (max-width: 480px) {
  .ar { padding: 16px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px; }
  .ar-kopf { gap: 10px; }
  .ar-von { font-size: 15px; }
  .ar-betreff { font-size: 13px; }
  .ar-abschnitt { font-size: 15px; line-height: 1.6; max-height: 38vh; }
  .ar-controls { gap: 8px; margin-top: 14px; }
  /* Touch-Targets: jede Control mindestens 44px hoch (Apple/Material-Minimum). */
  .ar-btn { min-height: 44px; padding: 10px 16px; font-size: 14px; }
  .ar-x { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; }
  .ar-pos { width: 100%; text-align: right; margin-top: 2px; }
}
/* Der Vorlesen-Ausloeser in der Mail-Inbox: auf Touch ebenfalls >=44px. */
@media (max-width: 480px) {
  .mi-vorlesen { min-height: 44px; }
}
