/* Akzente für die Ratgeber (Thomas, 06.11.2026): animierte Schemazeichnungen, Studienwerte und Intervall-Linie.
   Eingesetzt von werkzeuge/akzente.py. Alles startet erst, wenn es ins Bild kommt (.aktiv durch akzente.js);
   bei «weniger Bewegung» steht sofort der ruhige Endzustand. */

/* ---------- gemeinsame Bildkarte ---------- */
.akzent-bild { margin: 44px 0 !important; border-radius: 22px; overflow: hidden; background-color: #0E1B22; background-image: radial-gradient(120% 140% at 70% 10%, #1B3340 0%, #0E1B22 62%); box-shadow: 0 30px 70px rgba(14,27,34,.22); }
.akzent-bild svg { display: block; width: 100%; height: auto; }
.akzent-bild figcaption { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 0 28px 24px; margin: 0 !important; color: rgba(255,255,255,.74) !important; font-size: 14.5px !important; line-height: 1.55 !important; text-align: left !important; }
.akzent-bild figcaption strong { color: #fff; font-weight: 600; }
.akzent-bild figcaption .art { flex: none; font-size: 12.5px; color: rgba(255,255,255,.62) !important; }
.akzent-bild .marke { font: 600 11px var(--sans); letter-spacing: .22em; text-transform: uppercase; fill: rgba(255,255,255,.55); transition: fill 1.6s ease; }
.akzent-bild .marke-minze { fill: rgba(127,224,198,.35); } .akzent-bild .marke-gold { fill: rgba(243,215,181,.35); } .akzent-bild .marke-hypo { fill: rgba(217,117,47,.85); }
.akzent-bild.aktiv .marke-minze { fill: var(--minze); } .akzent-bild.aktiv .marke-gold { fill: var(--sand); } .akzent-bild.aktiv .marke-hypo { fill: rgba(217,117,47,.8); }
.akzent-bild .klein { font: 500 12px var(--sans); fill: rgba(255,255,255,.45); }

/* Netz: vom Nebel zur Klarheit */
.akzent-netz .kante { stroke: rgba(255,255,255,.14); stroke-width: 1.2; fill: none; }
.akzent-netz .signal { fill: none; stroke: var(--minze); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 10 420; stroke-dashoffset: 430; opacity: 0; filter: drop-shadow(0 0 6px rgba(127,224,198,.9)); }
.akzent-netz .knoten { fill: #24414F; stroke: rgba(255,255,255,.28); stroke-width: 1; transition: fill 1.4s ease, stroke 1.4s ease; }
.akzent-netz .mito { fill: rgba(217,117,47,.25); stroke: rgba(243,215,181,.35); stroke-width: 1; transition: fill 1.6s ease; }
.akzent-netz .nebel { fill: #9FB2BA; opacity: .55; transition: opacity 2.6s ease .4s; }
.akzent-netz .marke-klar { fill: rgba(127,224,198,.25); }
.akzent-netz.aktiv .nebel { opacity: 0; }
.akzent-netz.aktiv .knoten { fill: #2F6C66; stroke: var(--minze); }
.akzent-netz.aktiv .mito { fill: rgba(217,117,47,.9); animation: akz-glimmen 2.8s ease-in-out infinite alternate; }
.akzent-netz.aktiv .mito:nth-of-type(2n) { animation-delay: .9s; } .akzent-netz.aktiv .mito:nth-of-type(3n) { animation-delay: 1.7s; }
.akzent-netz.aktiv .signal { opacity: 1; animation: akz-signal 3.2s linear infinite; }
.akzent-netz.aktiv .marke-nebel { fill: rgba(255,255,255,.25); } .akzent-netz.aktiv .marke-klar { fill: var(--minze); }

/* Mitochondrium */
.akzent-mito .glut { opacity: .25; transition: opacity 2s ease; }
.akzent-mito .huelle { fill: #1F3B47; stroke: rgba(243,215,181,.55); stroke-width: 2; }
.akzent-mito .innen { fill: #26495A; stroke: rgba(217,117,47,.55); stroke-width: 1.6; }
.akzent-mito .crista { fill: rgba(217,117,47,.22); stroke: #E08A4A; stroke-width: 1.6; stroke-linejoin: round; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scaleY(.2); transition: opacity 1s ease, transform 1.4s cubic-bezier(.2,.7,.2,1); }
.akzent-mito .funke { fill: var(--sand); opacity: 0; filter: drop-shadow(0 0 5px rgba(243,215,181,.95)); }
.akzent-mito.aktiv .glut { opacity: 1; animation: akz-atmen 4s ease-in-out 1.8s infinite alternate; }
.akzent-mito.aktiv .crista { opacity: 1; transform: none; }
.akzent-mito.aktiv .funke { animation-name: akz-funke; animation-timing-function: ease-out; animation-iteration-count: infinite; }

/* Gefäss */
.akzent-gefaess .gefaess-raum { fill: rgba(184,67,79,.12); }
.akzent-gefaess .wand { fill: none; stroke: rgba(243,215,181,.55); stroke-width: 2.2; }
.akzent-gefaess .zelle ellipse { fill: #1C3843; stroke: rgba(255,255,255,.14); stroke-width: 1; transition: fill 1.6s ease, stroke 1.6s ease; transition-delay: inherit; }
.akzent-gefaess .zelle .zkern { fill: rgba(255,255,255,.1); }
.akzent-gefaess .blutk { opacity: 0; transition: opacity .8s ease; }
.akzent-gefaess .o2 { fill: var(--minze); opacity: 0; filter: drop-shadow(0 0 5px rgba(127,224,198,.9)); }
.akzent-gefaess.aktiv .blutk { opacity: 1; }
.akzent-gefaess.aktiv .zelle ellipse { fill: #21504F; stroke: rgba(127,224,198,.42); }
.akzent-gefaess.aktiv .o2 { animation: akz-o2 3.4s ease-out infinite; }

/* Herzschlag und Herzratenvariabilität */
.akzent-hrv .grund { stroke: rgba(255,255,255,.12); stroke-width: 1; stroke-dasharray: 3 6; }
.akzent-hrv .puls { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 4200; stroke-dashoffset: 4200; transition: stroke-dashoffset 3.4s cubic-bezier(.45,0,.25,1); filter: drop-shadow(0 0 6px rgba(127,224,198,.35)); }
.akzent-hrv .rr { fill: rgba(127,224,198,.75); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.akzent-hrv.aktiv .puls { stroke-dashoffset: 0; }
.akzent-hrv.aktiv .rr { transform: scaleY(1); }

/* Lungenbläschen */
.akzent-atem .alv { stroke: rgba(127,224,198,.35); stroke-width: 1.4; transform-box: fill-box; transform-origin: center; }
.akzent-atem .kapillare { fill: none; stroke: rgba(184,67,79,.75); stroke-width: 5; stroke-linecap: round; opacity: .55; }
.akzent-atem .o2 { fill: var(--minze); opacity: 0; filter: drop-shadow(0 0 5px rgba(127,224,198,.9)); transition: opacity .8s ease; }
.akzent-atem.aktiv .alv { animation: akz-atmen-alv 4.8s ease-in-out infinite alternate; }
.akzent-atem.aktiv .o2 { opacity: 1; }

/* Immunzellen */
.akzent-immun .hof { fill: none; stroke: rgba(127,224,198,.0); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
.akzent-immun .izelle { stroke: rgba(127,224,198,.5); stroke-width: 1.6; }
.akzent-immun .kern { fill: #12303A; stroke: rgba(255,255,255,.18); }
.akzent-immun .mito { fill: rgba(217,117,47,.3); transition: fill 1.4s ease; }
.akzent-immun .erreger { stroke: #C79A5B; fill: rgba(199,154,91,.25); stroke-width: 1.4; opacity: 1; transition: opacity 1.2s ease, transform 1.2s ease; transform-box: fill-box; transform-origin: center; }
.akzent-immun.aktiv .mito { fill: #D9752F; animation: akz-glimmen 2.6s ease-in-out infinite alternate; }
.akzent-immun.aktiv .hof { animation: akz-hof 3.6s ease-out infinite; }
.akzent-immun.aktiv .erreger { opacity: .18; transform: scale(.6); }

.akzent-gefaess .blutk, .akzent-atem .o2, .akzent-intervall .punkt { visibility: hidden; }

/* ---------- Studienwert ---------- */
.akzent-studie { margin: 36px 0 !important; padding: 30px 30px 26px; border-radius: 20px; background-color: #0E1B22; background-image: radial-gradient(120% 160% at 80% 0%, #1B3340 0%, #0E1B22 70%); color: #fff; box-shadow: 0 24px 60px rgba(14,27,34,.18); }
.kapitel-dunkel .akzent-studie, .ton-dunkel .akzent-studie { background: #182A32; box-shadow: none; border: 1px solid rgba(255,255,255,.14); }
.akzent-studie .kopf { display: grid; grid-template-columns: auto 1fr; gap: 6px 26px; align-items: end; margin-bottom: 26px; }
.akzent-studie .gross { font-family: var(--serif); font-size: clamp(60px, 8vw, 92px); line-height: .9; letter-spacing: -.02em; color: var(--minze) !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.akzent-studie .gross small { font-size: .5em; }
.akzent-studie .gross span, .kapitel-dunkel .akzent-studie .gross span, .ton-dunkel .akzent-studie .gross span { color: var(--minze) !important; }
.akzent-studie .kopf p { margin: 0 !important; color: rgba(255,255,255,.8) !important; font-size: 15.5px !important; line-height: 1.5 !important; }
.akzent-studie .kopf:last-child { margin-bottom: 0; }
.akzent-studie .titel { font: 600 11.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.62); margin-bottom: 14px; }
.akzent-studie .zeile { display: grid; grid-template-columns: 190px 1fr 96px; gap: 14px; align-items: center; margin: 10px 0; font-size: 14.5px; color: rgba(255,255,255,.88); }
.akzent-studie .bahn { position: relative; height: 12px; border-radius: 99px; background: rgba(255,255,255,.08); }
.akzent-studie .bahn::before { content: ""; position: absolute; left: var(--null); top: -5px; bottom: -5px; width: 1px; background: rgba(255,255,255,.45); }
.akzent-studie .balken { position: absolute; top: 0; bottom: 0; left: var(--links); width: var(--breite); border-radius: 99px; transform: scaleX(0); transition: transform 1.6s cubic-bezier(.2,.7,.2,1) .3s; }
.akzent-studie .balken.gut { background: linear-gradient(90deg, #179C80, var(--minze)); transform-origin: left; }
.akzent-studie .balken.schlecht { background: linear-gradient(90deg, #B85F22, var(--hypo)); transform-origin: left; }
.akzent-studie .balken.neg { transform-origin: right; }
.akzent-studie.aktiv .balken { transform: scaleX(1); }
.akzent-studie .wert { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Intervall-Linie ---------- */
.akzent-intervall { margin: 8px 0 48px !important; }
.akzent-intervall svg { display: block; width: 100%; height: auto; overflow: visible; }
.akzent-intervall .linie { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1600; stroke-dashoffset: 1600; transition: stroke-dashoffset 3.2s cubic-bezier(.4,0,.2,1); }
.akzent-intervall .grund { stroke: var(--linie); stroke-width: 1; stroke-dasharray: 3 6; }
.akzent-intervall .beschr { font: 600 10.5px var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: 0; transition: opacity .8s ease 1.4s; }
.akzent-intervall .beschr.hypo { fill: var(--hypo); } .akzent-intervall .beschr.hyper { fill: var(--hyper); }
.akzent-intervall .punkt { fill: var(--tinte); opacity: 0; transition: opacity .6s ease 3s; }
.akzent-intervall.aktiv .linie { stroke-dashoffset: 0; }
.akzent-intervall.aktiv .beschr, .akzent-intervall.aktiv .punkt { opacity: 1; }
.akzent-intervall figcaption { text-align: center; margin: 10px 0 0 !important; font-size: 14px !important; color: var(--leise) !important; }

@keyframes akz-signal { from { stroke-dashoffset: 430; } to { stroke-dashoffset: 0; } }
@keyframes akz-glimmen { from { opacity: .55; } to { opacity: 1; } }
@keyframes akz-atmen { from { opacity: .7; } to { opacity: 1; } }
@keyframes akz-funke { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-120px); } }
@keyframes akz-o2 { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--ty)); } }
@keyframes akz-atmen-alv { from { transform: scale(.94); } to { transform: scale(1.04); } }
@keyframes akz-hof { 0% { stroke: rgba(127,224,198,.55); transform: scale(.85); } 100% { stroke: rgba(127,224,198,0); transform: scale(1.15); } }

@media (max-width: 640px) {
  .akzent-bild { margin: 32px 0 !important; border-radius: 18px; }
  .akzent-bild figcaption { flex-direction: column; align-items: flex-start; padding: 2px 20px 20px; }
  .akzent-studie { padding: 24px 20px 20px; }
  .akzent-studie .kopf { grid-template-columns: 1fr; }
  .akzent-studie .zeile { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .akzent-studie .zeile .bahn { grid-column: 1 / -1; grid-row: 2; }
  .akzent-intervall { margin: 0 0 36px !important; }
  .akzent-bild .marke { font-size: 21px; letter-spacing: .16em; }
  .akzent-bild .klein { font-size: 22px; }
  .akzent-intervall .beschr { font-size: 19px; letter-spacing: .14em; }
}
@media (prefers-reduced-motion: reduce) {
  .akzent-bild *, .akzent-studie *, .akzent-intervall * { transition: none !important; animation: none !important; }
  .akzent-netz .signal, .akzent-mito .funke, .akzent-gefaess .o2 { opacity: 0 !important; }
}
