/* Tab „Hedge-Exit“: TP/SL bei Hedges erklärt. Grundfarben aus style.css, dazu Börsen- und Hinweisfarben je Theme. */
#hedgeExit{--he-hl:#3ed6c6;--he-ext:#f2a65a;--he-long:var(--green);--he-short:var(--red);--he-warn:#e6b450;
  display:grid;gap:44px;margin:22px auto 0;width:100%;min-width:0;max-width:980px;font-variant-numeric:tabular-nums}
:root[data-theme=light] #hedgeExit{--he-hl:#0a8479;--he-ext:#b35c0c;--he-warn:#946a00}
@media(prefers-color-scheme:light){:root:not([data-theme=dark]) #hedgeExit{--he-hl:#0a8479;--he-ext:#b35c0c;--he-warn:#946a00}}
#hedgeExit[hidden],#hedgeExit [hidden]{display:none!important}
#hedgeExit>*,#hedgeExit .he-sec>*{min-width:0}
#hedgeExit h2,#hedgeExit h3,#hedgeExit h4{margin:0;text-wrap:balance}
#hedgeExit p{margin:0;max-width:68ch}
#hedgeExit svg text{font-family:var(--font)}

.he-intro{display:grid;gap:10px}
.he-intro h2{font-size:30px;line-height:1.15}
.he-intro h2::after{content:"";display:block;width:64px;height:3px;border-radius:3px;margin-top:12px;background:var(--accent)}
.he-intro p{color:var(--muted);font-size:16px}
.he-sec{display:grid;gap:14px}
.he-sec>h3{font-size:22px;line-height:1.25}
.he-eyebrow{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.he-muted{color:var(--muted)}
.he-c-hl{color:var(--he-hl)} .he-c-ext{color:var(--he-ext)} .he-c-long{color:var(--he-long)} .he-c-short{color:var(--he-short)}
.he-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.he-figure{padding:14px 14px 10px;overflow-x:auto}
.he-figure svg{display:block;width:100%;min-width:520px;height:auto}
.he-legend{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:13px;color:var(--muted);padding:0 4px 10px}
.he-legend i{display:inline-block;width:18px;height:3px;border-radius:2px;vertical-align:middle;margin-right:6px}
.he-legend i.dash{height:0;border-top:2px dashed currentColor;background:none}

/* Ausgangslage */
.he-pair{display:grid;grid-template-columns:1fr auto 1fr;gap:12px}
.he-leg{padding:16px 18px;display:flex;flex-direction:column;gap:6px;min-width:0}
.he-venue{font-weight:700;font-size:17px}
.he-price{font-size:30px;font-weight:600;letter-spacing:-.01em}
.he-leg small,.he-gap small{font-size:12.5px;color:var(--muted)}
.he-side{display:inline-block;font-size:12.5px;font-weight:600;padding:2px 8px;border-radius:5px;width:max-content}
.he-side.l{background:var(--green-bg);color:var(--he-long)}
.he-side.s{background:var(--red-bg);color:var(--he-short)}
.he-gap{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:0 6px;text-align:center}
.he-gap b{font-size:21px;color:var(--he-warn)}
@media(max-width:560px){.he-pair{grid-template-columns:1fr}.he-gap{flex-direction:row;gap:10px}}

/* Chips */
.he-chips{display:flex;flex-wrap:wrap;gap:8px}
.he-chip{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;padding:6px 11px;border-radius:8px;border:1px solid var(--line);background:var(--surface-alt)}
.he-dot{width:8px;height:8px;border-radius:50%;flex:none;display:inline-block}
.he-chip.ok .he-dot{background:var(--he-long)} .he-chip.bad .he-dot{background:var(--he-short)} .he-chip.mid .he-dot{background:var(--he-warn)}

/* Exit ändern */
.he-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.he-step{padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.he-n{font-size:12.5px;font-weight:600;color:var(--muted)}
.he-mock{background:var(--surface-alt);border:1px solid var(--line);border-radius:8px;padding:10px;font-size:13.5px;display:flex;flex-direction:column;gap:7px}
.he-row{display:flex;justify-content:space-between;gap:10px}
.he-btn,.he-field{border:1px solid var(--line);border-radius:6px;padding:6px 8px;background:var(--input)}
.he-btn{text-align:center;font-weight:600}
.he-hot{outline:2px solid var(--he-warn);outline-offset:2px;border-radius:5px}
@media(max-width:680px){.he-steps{grid-template-columns:1fr}}

/* Wächter */
.he-lanes{padding:16px;display:flex;flex-direction:column;gap:14px}
.he-lane{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:26px}
.he-lane-h{font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.he-box{border:1px solid var(--line);background:var(--surface-alt);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;min-width:0;position:relative;font-size:14px}
.he-box svg{width:34px;height:34px}
.he-box small{font-size:13px;color:var(--muted)}
.he-box:not(:last-child)::after{content:"";position:absolute;right:-20px;top:50%;width:14px;height:2px;background:var(--muted)}
.he-box:not(:last-child)::before{content:"";position:absolute;right:-21px;top:calc(50% - 4px);border:5px solid transparent;border-left-color:var(--muted);border-right:0}
.he-box.good{border-color:var(--he-long)} .he-box.good b{color:var(--he-long)}
.he-box.fail{border-color:var(--he-short)} .he-box.fail b{color:var(--he-short)}
.he-box.dim{opacity:.55}
@media(max-width:680px){.he-lane{grid-template-columns:1fr;gap:22px}
  .he-box:not(:last-child)::after{right:auto;left:50%;top:auto;bottom:-16px;width:2px;height:12px}
  .he-box:not(:last-child)::before{right:auto;left:calc(50% - 4px);top:auto;bottom:-21px;border:5px solid transparent;border-top-color:var(--muted);border-bottom:0}}

/* Welche Seite */
.he-twin{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.he-twin .he-card{padding:14px 16px;display:flex;flex-direction:column;gap:10px;min-width:0}
.he-twin h4{font-size:17px}
.he-twin svg{width:100%;height:auto;display:block}
.he-rule{font-size:14px;color:var(--muted)}
.he-rule b{color:var(--text)}
.he-note{padding:12px 16px;font-size:14.5px;display:flex;gap:12px;align-items:center}
.he-note svg{flex:none}
@media(max-width:640px){.he-twin{grid-template-columns:1fr}}

/* Rechner */
.he-lab{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)}
.he-controls{padding:18px;display:flex;flex-direction:column;gap:18px;border-right:1px solid var(--line);min-width:0}
.he-viz{padding:14px;min-width:0}
.he-viz svg{width:100%;height:auto;display:block}
.he-ctl{display:flex;flex-direction:column;gap:6px}
.he-ctl label{display:flex;justify-content:space-between;gap:12px;font-size:13.5px;color:var(--muted)}
.he-ctl output{color:var(--text);font-weight:600;white-space:nowrap}
#hedgeExit input[type=range]{width:100%;accent-color:var(--he-ext)}
#hedgeExit input[type=range]:focus-visible,#hedgeExit button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.he-presets{display:flex;flex-wrap:wrap;gap:6px}
.he-presets button{font:inherit;font-size:12.5px;color:var(--text);background:var(--surface-alt);border:1px solid var(--line);border-radius:6px;padding:4px 9px;cursor:pointer}
.he-presets button:hover{border-color:var(--muted)}
.he-verdict{border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:4px;border:1px solid var(--line);background:var(--surface-alt)}
.he-v-head{font-weight:700;font-size:17px;display:flex;align-items:center;gap:8px}
.he-v-head .he-dot{width:10px;height:10px}
.he-v-sub{font-size:13.5px;color:var(--muted)}
.he-band{display:flex;flex-direction:column;gap:6px}
.he-band-row{display:grid;grid-template-columns:86px 1fr 60px;gap:10px;align-items:center;font-size:12.5px}
.he-bar{height:8px;border-radius:4px;background:var(--surface-alt);position:relative;overflow:hidden}
.he-bar span{position:absolute;inset:0 auto 0 0;border-radius:4px}
.he-lbl{color:var(--muted)}
.he-val{text-align:right}
@media(max-width:700px){.he-lab{grid-template-columns:1fr}.he-controls{border-right:0;border-bottom:1px solid var(--line)}}

/* Faustregeln */
.he-rules{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.he-rules .he-card{padding:16px;display:grid;grid-template-columns:44px 1fr;gap:6px 14px;align-items:start;min-width:0}
.he-rules svg{width:44px;height:44px;grid-row:span 2}
.he-rules h4{font-size:16.5px}
.he-rules p{font-size:14px;color:var(--muted)}
.he-tagline{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:2px 6px;border-radius:4px;border:1px solid var(--line);color:var(--muted);margin-left:6px;vertical-align:2px}
@media(max-width:640px){.he-rules{grid-template-columns:1fr}}
.he-foot{font-size:13px;color:var(--muted);border-top:1px solid var(--line);padding-top:14px}

/* SVG */
.he-grid{stroke:var(--line);stroke-width:1}
.he-axis{fill:var(--muted);font-size:13.5px}
.he-hl{stroke:var(--he-hl);fill:none;stroke-width:2.4;stroke-linejoin:round}
.he-ext{stroke:var(--he-ext);fill:none;stroke-width:2.4;stroke-linejoin:round}
.he-closed{opacity:.22}
.he-trig-hl{stroke:var(--he-hl);stroke-width:1.6;stroke-dasharray:6 5}
.he-trig-ext{stroke:var(--he-ext);stroke-width:1.6;stroke-dasharray:6 5}
.he-trig-both{stroke:var(--text);stroke-width:1.6;stroke-dasharray:6 5}
.he-market{stroke:var(--muted);stroke-width:1.4}
.he-tag-hl rect{fill:var(--he-hl)} .he-tag-ext rect{fill:var(--he-ext)} .he-tag-both rect{fill:var(--text)}
.he-tag text{fill:var(--surface);font-size:12.5px;font-weight:700}
.he-ok{fill:var(--he-long)} .he-bad{fill:var(--he-short)}
.he-okring{fill:var(--surface);stroke:var(--he-long);stroke-width:2.5}
.he-label{font-size:14px;font-weight:600;paint-order:stroke;stroke:var(--surface);stroke-width:4px;stroke-linejoin:round}
.he-label.ok{fill:var(--he-long)} .he-label.bad{fill:var(--he-short)} .he-label.m{fill:var(--muted);font-weight:500}
.he-open{fill:var(--he-short);opacity:.10}
.he-brk{stroke:var(--he-short);stroke-width:1.6;fill:none}
.he-brk-m{stroke:var(--muted);stroke-width:1.4;fill:none}
.he-arrow-hl{stroke:var(--he-hl);stroke-width:3;fill:none}
.he-arrow-ext{stroke:var(--he-ext);stroke-width:3;fill:none}
.he-fill-hl{fill:var(--he-hl)} .he-fill-ext{fill:var(--he-ext)}
.he-move{stroke:var(--he-warn);stroke-width:2;fill:none}
.he-fill-warn{fill:var(--he-warn)}
.he-gap-fill{fill:var(--he-warn);opacity:.16}
.he-col{font-size:17px;font-weight:700}
.he-o-card{stroke-width:1.5}
.he-o-tp{fill:var(--green-bg);stroke:var(--he-long)}
.he-o-sl{fill:var(--red-bg);stroke:var(--he-short)}
.he-o-h{font-size:13.5px;font-weight:700}
.he-o-h.tp{fill:var(--he-long)} .he-o-h.sl{fill:var(--he-short)}
.he-o-t{font-size:13px;fill:var(--text)}
.he-o-s{font-size:12.5px;fill:var(--muted)}
.he-o-field{fill:var(--surface-alt);stroke:var(--he-warn);stroke-width:1.6}

/* „Im Panel ansehen“: Screenshot-Tooltips (Verhalten aus help.js) */
.he-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
.he-tip{cursor:pointer}
.he-tip-pill{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--accent);border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:5px 12px;line-height:1.2;white-space:nowrap}
.he-tip:hover .he-tip-pill,.he-tip:has(.help-button:focus-visible) .he-tip-pill,.he-tip:has(.help-button[aria-expanded=true]) .he-tip-pill{border-color:var(--accent);background:var(--accent-soft)}
.he-tip-icon{width:16px;height:16px;flex:none}
.he-tip .help-button{border-radius:999px;cursor:pointer}
.he-chips .he-tip{align-self:center}
.he-rules .he-tip{grid-column:2;justify-self:start;margin-top:4px}
.field-tooltip.he-wide{width:min(720px,calc(100vw - 24px))}
.help-image.he-shot::after{display:none}
.help-image.he-shot+.help-image.he-shot{margin-top:10px}
.he-mark{position:absolute;border:2px solid var(--he-warn);border-radius:4px;box-shadow:0 0 0 2px #0008;pointer-events:none}
.help-image.he-shot{width:max-content;max-width:100%}
.help-image.he-shot img{width:auto;max-width:100%}
