/* Verordnungshilfe Kompression – Entwurf neue Bedienung */
.vo2-draft {
  display: inline-block; margin: 0 0 1rem; padding: .25rem .7rem; border-radius: 999px;
  background: var(--focus); color: var(--ink); font-weight: 600; font-size: .9rem;
}
.vo2-section { padding-top: clamp(2rem, 4vw, 3rem); }

/* Aufbau: links die Schritte, rechts die Grafik (klebt beim Scrollen) */
.vo2-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 19rem; column-gap: 2.5rem;
  align-items: start;
}
.vo2-step { grid-column: 1; margin-bottom: 2.5rem; min-width: 0; }
.vo2-aside {
  grid-column: 2; grid-row: 1 / span 4; align-self: start;
  position: sticky; top: 8rem;
}
.vo2-step h2 {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  font-size: 1.45rem; font-weight: 650; margin: 0 0 1rem;
}
.vo2-optional { font-size: 1rem; font-weight: 550; color: var(--muted); }

/* Schaltflächen-Gruppen statt Klappmenüs */
.vo2-seg { display: inline-flex; flex-wrap: nowrap; max-width: 100%; gap: 0; border: 2px solid var(--blue); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.vo2-seg-opt { position: relative; display: flex; cursor: pointer; }
.vo2-seg-opt + .vo2-seg-opt { border-left: 2px solid var(--blue); }
.vo2-seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vo2-seg-opt span {
  display: flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: .45rem 1rem; font-weight: 600; color: var(--blue); white-space: nowrap;
}
@media (hover: hover) { .vo2-seg-opt:hover span { background: var(--mist); } }
.vo2-seg-opt input:checked + span { background: var(--blue); color: var(--white); }
.vo2-seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.vo2-seg-opt input:disabled + span { color: #9aa5b4; background: var(--mist); cursor: not-allowed; text-decoration: line-through; }
.vo2-seg-big .vo2-seg-opt span { min-width: 8rem; font-size: 1.15rem; min-height: 3.1rem; }

.vo2-fields { display: flex; flex-wrap: wrap; gap: 1.4rem 2.5rem; }
.vo2-seg[hidden], .vo2-fixed[hidden] { display: none; }
.vo2-seg-field { border: 0; margin: 0; padding: 0; min-width: 0; max-width: 100%; }
.vo2-seg-field legend { font-weight: 600; margin-bottom: .45rem; padding: 0; }
.vo2-seg-field[hidden] { display: none; }
.vo2-seg-opt[hidden] { display: none; }
.vo2-seg-opt[hidden] + .vo2-seg-opt { border-left: 0; }
#vo-live-text { white-space: pre-line; }
.vo2-fixed { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .45rem 1rem; border-radius: var(--radius); background: var(--mist); font-weight: 600; }

/* Strumpfart als Kacheln mit Piktogramm */
.vo2-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.vo2-cards[hidden] { display: none; }
.vo2-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: .8rem .5rem .7rem; cursor: pointer; text-align: center;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--white);
}
@media (hover: hover) { .vo2-card:hover { border-color: var(--blue); } }
.vo2-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vo2-card:has(input:checked) { border-color: var(--blue); background: var(--mist); box-shadow: inset 0 0 0 1px var(--blue); }
.vo2-card:has(input:checked)::after {
  content: "✓"; position: absolute; top: .35rem; right: .45rem; width: 1.4rem; height: 1.4rem;
  display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: var(--white); font-size: .85rem; font-weight: 600;
}
.vo2-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.vo2-card-text { font-size: 1rem; line-height: 1.25; hyphens: auto; overflow-wrap: break-word; }
.vo2-card-text strong { display: block; color: var(--blue); font-size: .85rem; letter-spacing: .02em; }
.vo2-picto { width: auto; height: 6.5rem; }
.vo2-picto .form { fill: #e3eaf2; stroke: #8a9bb0; stroke-width: .8; }
.vo2-picto .stark { fill: var(--blue); opacity: .85; }
.vo2-picto .hell { fill: var(--blue); opacity: .3; }
.vo2-cards-arm { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Grafik rechts */
.vo2-aside .vo-figures { flex-wrap: wrap; justify-content: center; }
.vo2-aside .vo-figure[data-gruppe="Arm"] { flex: 1 1 100%; }
.vo2-aside .vo-figure-hand { flex: 0 1 62% !important; }
.vo2-aside .vo-figure[data-gruppe="Bein"] { flex: 0 1 16rem; }
.vo2-aside .vo-coverage-text { font-size: var(--fs-small); }

/* Zusätze kompakt, nach Bereichen */
.vo2-zgroup { margin-bottom: 1.4rem; }
.vo2-zgroup[hidden] { display: none; }
.vo2-zgroup-note { margin: -.2rem 0 .6rem; font-size: var(--fs-small); color: var(--muted); }
.vo2-zgroup h3 { font-size: 1rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .5rem; }
.vo2-zlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.vo2-z {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .2rem .5rem;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--white); padding: .55rem .6rem .55rem .8rem;
}
.vo2-z[hidden] { display: none; }
.vo2-z:has(input:checked) { border-color: var(--blue); background: var(--mist); }
.vo2-z.is-disabled { opacity: .55; }
.vo2-z.is-open { grid-column: 1 / -1; }
.vo2-z-check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; cursor: pointer; min-width: 0; }
.vo2-z-check span { hyphens: auto; overflow-wrap: break-word; min-width: 0; }
.vo2-z-check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--blue); flex: 0 0 auto; }
.vo2-z.is-disabled .vo2-z-check { cursor: not-allowed; }
.vo2-z-more {
  width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--blue); background: var(--white);
  color: var(--blue); font: inherit; font-weight: 700; font-style: italic; line-height: 1; cursor: pointer;
}
.vo2-z-more[aria-expanded="true"] { background: var(--blue); color: var(--white); }
.vo2-z-more:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vo2-z-why { grid-column: 1 / -1; margin: 0; font-size: .9rem; color: var(--muted); padding-left: 1.8rem; }
.vo2-z-why[hidden] { display: none; }
.vo2-z-info {
  grid-column: 1 / -1; display: flex; gap: 1rem; align-items: flex-start;
  font-size: var(--fs-small); border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .6rem;
}
.vo2-z-info[hidden] { display: none; }
.vo2-z-info img { width: 6rem; height: auto; border-radius: 4px; flex: 0 0 auto; }
.vo2-z-info p { margin: 0 0 .5rem; hyphens: auto; }

@media (max-width: 1060px) {
  .vo2-layout { grid-template-columns: minmax(0, 1fr) 16rem; column-gap: 1.75rem; }
  .vo2-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vo2-cards-arm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vo2-zlist { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .vo2-layout { display: flex; flex-direction: column; }
  .vo2-s1 { order: 1; } .vo2-s2 { order: 2; } .vo2-aside { order: 3; position: static; margin-bottom: 2.5rem; }
  .vo2-s3 { order: 4; } .vo2-s4 { order: 5; }
  .vo2-aside .vo-figure[data-gruppe="Bein"] { flex-basis: 15rem; }
  .vo2-aside .vo-figures { flex-wrap: nowrap; }
  .vo2-aside .vo-figure[data-gruppe="Arm"] { flex: 1.146 1 0; }
  .vo2-aside .vo-figure-hand { flex: .695 1 0 !important; }
}
@media (max-width: 560px) {
  .vo2-cards, .vo2-cards-arm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vo2-picto { height: 5rem; }
  .vo2-seg-big { display: flex; }
  .vo2-seg-big .vo2-seg-opt { flex: 1 1 0; }
  .vo2-seg-big .vo2-seg-opt span { min-width: 0; width: 100%; }
  .vo2-seg-field, .vo2-seg { width: 100%; }
  .vo2-seg { display: flex; }
  .vo2-seg .vo2-seg-opt { flex: 1 1 0; min-width: 0; }
  .vo2-seg-opt span { width: 100%; padding: .4rem .35rem; white-space: normal; text-align: center; line-height: 1.2; font-size: 1rem; }
  .vo2-z-info { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   Farbakzente aus den Grundfarben der Website (Blau, Hellblau, Flächenblau)
   -------------------------------------------------------------------------- */
.vo2 { --sky-tint: #e4f0fb; --kkl1: #3471b0; --kkl2: #2c6db3; --kkl3: #004f9f; --kkl4: #003a75; }

/* Schrittnummern: offen hellblau, erledigt blau mit Haken; verbunden durch eine Linie */
.vo2-step .vo-num { background: var(--sky); color: var(--blue-deep); position: relative; transition: background .2s; }
.vo2-step.is-done .vo-num { background: var(--blue); color: transparent; }
.vo2-step.is-done .vo-num::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); font-size: 1.05rem; }
@media (min-width: 821px) {
  .vo2-step { position: relative; padding-left: 3.1rem; }
  .vo2-step h2 { margin-left: -3.1rem; gap: .9rem; }
  .vo2-step:not(.vo2-s4)::before {
    content: ""; position: absolute; left: 1.05rem; top: 2.6rem; bottom: -2.2rem;
    border-left: 3px solid var(--sky); opacity: .7;
  }
}

@media (hover: hover) { /* Kacheln */
.vo2-card:hover { background: #f6faff; } }
.vo2-card:has(input:checked) { background: var(--sky-tint); }
.vo2-picto .form { fill: #edf2f8; stroke: #8ea6c2; }
.vo2-picto .hell { fill: var(--sky); opacity: 1; }
.vo2-card:has(input:checked) .vo2-picto .form { fill: var(--white); }

@media (hover: hover) { /* Schaltflächen */
.vo2-seg-opt:hover span { background: var(--sky-tint); } }
.vo2-fixed { background: var(--sky-tint); color: var(--blue-deep); }

/* Kompressionsklasse: von KKL 1 bis 4 zunehmend kräftiges Blau */
#feld-kkl .vo2-seg-opt span { box-shadow: inset 0 -5px 0 var(--k); }
#feld-kkl .vo2-seg-opt:nth-child(1) { --k: var(--kkl1); }
#feld-kkl .vo2-seg-opt:nth-child(2) { --k: var(--kkl2); }
#feld-kkl .vo2-seg-opt:nth-child(3) { --k: var(--kkl3); }
#feld-kkl .vo2-seg-opt:nth-child(4) { --k: var(--kkl4); }
#feld-kkl .vo2-seg-opt input:checked + span { background: var(--k); box-shadow: none; }
#feld-kkl .vo2-seg-opt input:disabled + span { box-shadow: none; }

/* Grafik rechts */
.vo2-aside { background: linear-gradient(180deg, var(--mist), var(--white)); border-top: 5px solid var(--sky); border-radius: var(--radius); box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line) inset; }
.vo2-aside .vo-coverage-text strong { color: var(--blue-deep); }

/* Zusätze */
.vo2-zgroup h3 { color: var(--blue-deep); border-left: 4px solid var(--sky); padding-left: .55rem; }
.vo2-z:has(input:checked) { background: var(--sky-tint); box-shadow: inset 4px 0 0 var(--blue); }
@media (hover: hover) { .vo2-z-more:hover { background: var(--sky-tint); } }
.vo2-z-info { border-top-color: var(--sky); }

/* Leiste mit dem Verordnungstext */
.vo2 .vo-bar { border-top: 5px solid var(--sky); }
.vo2 .vo-bar-label { color: var(--blue-deep); text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }

/* --------------------------------------------------------------------------
   Warmer Zweitakzent: Orange (wie das Entwurf-Etikett) für „was als Nächstes
   kommt“, Hinweise und die Hauptaktion. Text auf Orange immer dunkel.
   -------------------------------------------------------------------------- */
.vo2 { --amber: #e8a317; --amber-tint: #fdf3dc; --amber-deep: #8a5300; }

/* Der nächste offene Schritt leuchtet orange */
.vo2-step.is-current .vo-num { background: var(--amber); color: var(--ink); box-shadow: 0 0 0 4px var(--amber-tint); }

/* Haken auf der gewählten Kachel */
.vo2-card:has(input:checked)::after { background: var(--amber); color: var(--ink); }

/* Hinweise */
.vo2 .vo-note:not([hidden]) {
  display: block; width: fit-content; max-width: 22rem; margin-top: .5rem; background: var(--amber-tint); color: var(--amber-deep);
  border-left: 4px solid var(--amber); border-radius: 0 var(--radius) var(--radius) 0;
  padding: .3rem .7rem; font-weight: 550; font-size: .95rem;
}
.vo2-z-why { color: var(--amber-deep); font-weight: 550; }

/* Gruppenüberschriften der Zusätze */
.vo2-zgroup h3 { border-left-color: var(--amber); }

/* Aufgeklappte Details */
.vo2-z.is-open { border-color: var(--amber); }
.vo2-z.is-open .vo2-z-info { border-top-color: var(--amber); }
.vo2-z-more[aria-expanded="true"] { background: var(--amber); border-color: var(--amber); color: var(--ink); }

/* Hauptaktion „Text kopieren“ in Orange */
.vo2 .vo-bar { border-top-color: var(--amber); }
.vo2 .vo-bar-label { color: var(--amber-deep); }
.vo2 #vo-copy { background: var(--amber); border-color: var(--amber); color: var(--ink); }
@media (hover: hover) { .vo2 #vo-copy:hover { background: #d18f0a; border-color: #d18f0a; color: var(--ink); } }

/* --------------------------------------------------------------------------
   Dezenter: dünnere Rahmen, leichtere Schrift in Schaltflächen
   -------------------------------------------------------------------------- */
.vo2 { --rand: #c5d4e5; }

/* Leiste unten: ein gleichmäßiger, feiner Rahmen */
.vo2 .vo-bar { border: 1px solid var(--rand); box-shadow: 0 -4px 16px rgba(20, 36, 58, .10); }

/* Schaltflächen-Gruppen */
.vo2-seg { border: 1px solid var(--rand); }
.vo2-seg-opt + .vo2-seg-opt { border-left: 1px solid var(--rand); }
.vo2-seg-opt span { font-weight: 550; }
#feld-kkl .vo2-seg-opt span { box-shadow: inset 0 -3px 0 var(--k); }
#feld-kkl .vo2-seg-opt input:checked + span { box-shadow: none; }

/* Kacheln */
.vo2-card { border: 1px solid var(--rand); }
@media (hover: hover) { .vo2-card:hover { border-color: var(--blue); } }
.vo2-card:has(input:checked) { border-color: var(--blue); box-shadow: none; }

/* Zusätze */
.vo2-z { border: 1px solid var(--rand); }
.vo2-z:has(input:checked) { border-color: var(--blue); box-shadow: none; }
.vo2-z-check { font-weight: 550; }
.vo2-z-more { border-width: 1.5px; width: 1.85rem; height: 1.85rem; }
.vo2-zgroup h3 { border-left-width: 3px; }

/* Grafik rechts */
.vo2-aside { border-top: 0; box-shadow: 0 0 0 1px var(--rand) inset; }

/* Schritte und Hinweise */
@media (min-width: 821px) { .vo2-step:not(.vo2-s4)::before { border-left-width: 2px; } }
.vo2 .vo-note:not([hidden]) { border-left-width: 3px; font-weight: 500; }
.vo2-step.is-current .vo-num { box-shadow: 0 0 0 3px var(--amber-tint); }
.vo2 .vo-bar .btn { border-width: 1px; font-weight: 550; }


.vo2-aside .vo-swatch-light { margin-left: 0; }
.vo2-aside .vo-legend { flex-direction: column; align-items: flex-start; gap: .3rem; }
.vo-legend-item { display: inline-flex; align-items: center; gap: .5rem; }

/* Handteil: vier Optionen – bis 680 px wie auf dem Handy über die volle Breite */
@media (max-width: 680px) {
  #feld-hand, #feld-hand .vo2-seg { width: 100%; }
  #feld-hand .vo2-seg { display: flex; }
  #feld-hand .vo2-seg-opt { flex: 1 1 0; min-width: 0; }
  #feld-hand .vo2-seg-opt span { width: 100%; padding: .4rem .35rem; white-space: normal; text-align: center; line-height: 1.2; }
}

/* Handteil in der Grafik: angestrickt = ein Stück (gemeinsamer Rahmen), separat = zwei Teile mit „+“ */
.vo-group-tag, .vo-figure-tag {
  display: block; margin: 0 0 .4rem; font-size: .85rem; font-weight: 600; color: var(--blue-deep);
}
.vo-group-tag { flex: 1 1 100%; text-align: center; }
.vo-group-tag[hidden], .vo-figure-tag[hidden], .vo-plus[hidden] { display: none; }
.vo-figures[data-hand="einheit"] {
  border: 2px solid var(--blue); border-radius: var(--radius); background: var(--white); padding: .6rem .5rem .4rem;
}
.vo-figures[data-hand="einheit"] .vo-figure-img { border-color: transparent; }
.vo-figures[data-hand="getrennt"] .vo-figure-img { border: 2px solid var(--blue); }
.vo-plus {
  flex: 0 0 100%; display: flex; justify-content: center; align-items: center;
  font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--blue); margin: -.2rem 0;
}
@media (max-width: 820px) {
  .vo2-aside .vo-figures[data-hand] { flex-wrap: wrap; }
  .vo-plus { flex: 0 0 auto; align-self: center; margin: 0; }
}

/* Rechte Hand: gespiegelte Zeichnung, Markierung ebenfalls spiegeln */
.vo-hl-flip { transform: scaleX(-1); }
/* Beidseitig: beide Hände nebeneinander */
.vo2-aside .vo-figures[data-haende="2"] .vo-figure-hand { flex: 0 1 calc(50% - .4rem) !important; }
@media (max-width: 820px) {
  .vo2-aside .vo-figures[data-haende="2"] .vo-figure-hand { flex: .52 1 0 !important; }
}
@media (max-width: 560px) {
  .vo2-aside .vo-figures[data-haende="2"] { flex-wrap: wrap; }
  .vo2-aside .vo-figures[data-haende="2"] .vo-figure[data-gruppe="Arm"]:not(.vo-figure-hand) { flex: 1 1 100%; }
  .vo2-aside .vo-figures[data-haende="2"] .vo-figure-hand { flex: 0 1 calc(50% - .4rem) !important; }
  .vo2-aside .vo-figures[data-haende="2"] .vo-plus { flex: 0 0 100%; }
}

/* Handzeichnung unterhalb von C1 abschneiden: Hand und Handgelenk, den Unterarm zeigt die Armgrafik */
.vo-figure-hand .vo-figure-img { aspect-ratio: 600 / 715; }
.vo-figure-hand .vo-hl { bottom: auto; aspect-ratio: 600 / 863; }
