/* Hedger v2: delta vs deep hedge step-through. Dark panels; delta = orange, deep = teal. */
.hv2{--cd:#e7a66b;--cn:#86c5b0;display:flex;flex-direction:column;gap:14px;min-width:0;color:var(--text)}
.slot-stage.hv-stage{background:transparent;color:var(--text);overflow:visible;border-radius:0}
.hv2 .vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hv2 .cd{color:var(--cd)}.hv2 .cn{color:var(--cn)}
.hv-key{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13.5px;color:var(--sec)}
.hv-key span::before{content:"";display:inline-block;width:18px;height:3px;border-radius:2px;margin-right:7px;vertical-align:middle;background:currentColor}
.hv-key .kd{color:var(--cd)}.hv-key .kn{color:var(--cn)}.hv-key .ks{color:#c9d3ce}
.hv-bar{display:flex;flex-wrap:wrap;gap:12px 22px;align-items:flex-end}
.hv-pick{display:flex;flex-direction:column;gap:6px}
.hv-pick label{font-size:13.5px;font-weight:700;color:var(--sec)}
.hv-pick select{min-height:44px;background:var(--panel);color:var(--text);border:1px solid var(--line2);border-radius:6px;padding:0 10px;font:inherit;font-size:14.5px;font-variant-numeric:tabular-nums}
.hv-transport{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center;padding:10px 12px;background:var(--panel);border:1px solid var(--line);border-radius:8px;position:sticky;top:var(--hv-sticky,0px);z-index:6}
.hv-transport .btn{min-height:44px;min-width:44px;justify-content:center}
.hv-transport .btn:disabled{opacity:.35;cursor:default}
.hv-play{min-width:96px!important;font-weight:700}
.hv2 .seg.hv-speed,.hv2 .seg.hv-mode{flex-wrap:nowrap;gap:4px}
.hv2 .hv-speed legend,.hv2 .hv-mode legend{float:none;width:auto;margin:0 6px 0 0;font-size:12.5px}
.hv2 .hv-speed span,.hv2 .hv-mode span{min-height:36px;padding:0 9px;font-size:13px}
.hv2 .seg.hv-speed{display:flex;align-items:center;margin-left:4px}
.hv2 .seg.hv-mode{display:flex;align-items:center;margin-bottom:10px}
.hv-t.simple tbody th{width:46%}
.hv-t.simple td,.hv-t.simple tbody th{padding:8px 6px;font-size:15px}
.hv-day{flex:1 1 220px;display:flex;flex-direction:column;gap:0;min-width:180px;padding-left:6px}
.hv-day label{font-size:13.5px;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums}
.hv-day input{width:100%;accent-color:var(--sig);height:36px;margin:0}
.hv-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.hv-charts,.hv-step,.hv-logic,.hv-sum{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:12px 14px;min-width:0}
.hv-charts{cursor:pointer}
.hv-svg{display:block;max-width:100%}
.hv-svg .ct{fill:var(--sec);font-size:12px;font-weight:700}
.hv-svg .tk{fill:var(--dim);font-size:11px;font-variant-numeric:tabular-nums}
.hv-svg .ax{stroke:var(--line2);stroke-width:1}
.hv-svg .gr{stroke:var(--line);stroke-width:1}
.hv-svg .rf{stroke:var(--dim);stroke-width:1;stroke-dasharray:3 4}
.hv-svg .ln{fill:none;stroke-width:2.2;stroke-linejoin:round}
.hv-svg .fu{fill:none;stroke-width:1.2;stroke-opacity:.18}
.hv-svg .cur{fill:rgba(134,197,176,.08)}
.hv-t{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
.hv-cap{caption-side:top;text-align:left;font-size:15px;font-weight:700;color:var(--text);padding:0 0 8px}
.hv-t thead th{font-size:13px;text-align:left;padding:4px 6px;border-bottom:1px solid var(--line2)}
.hv-t tbody th{font-weight:400;color:var(--sec);text-align:left;padding:4px 6px;vertical-align:top;width:40%}
.hv-t td{padding:4px 6px;vertical-align:top}
.hv-t td.sh{color:var(--text)}
.hv-t .dim{color:var(--dim)}
.hv-t tr.tot th,.hv-t tr.tot td{border-top:1px solid var(--line2);font-size:15px}
.hv-sec th{padding:9px 6px 3px!important;font-size:12.5px;font-weight:700!important;letter-spacing:.04em;text-transform:uppercase;color:var(--text)!important;width:auto!important}
.hv2 .num{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;border:1px solid var(--line2);font-size:11.5px;margin-right:7px;color:var(--sec);text-transform:none;letter-spacing:0;flex:none}
.hv-t tr{transition:background .15s}
.hv-t tr.act{background:rgba(134,197,176,.13)}
.hv-sec.act .num,.fb.act .num{background:var(--sig);color:var(--page);border-color:var(--sig)}
.hv-why{margin-top:10px;font-size:14.5px;line-height:1.5;color:var(--text);border-left:2px solid var(--sig);padding-left:10px}
.hv-logic-top{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;justify-content:space-between;margin-bottom:10px}
.hv2 h3{font-size:17px;font-weight:700;color:var(--text)}
.lane{margin-bottom:12px}
.ln-t{font-size:13.5px;font-weight:700;margin-bottom:6px}
.ld .ln-t{color:var(--cd)}.lnn .ln-t{color:var(--cn)}
.ln-b{display:flex;align-items:stretch;gap:6px;min-width:0}
.fa{align-self:center;color:var(--dim);font-size:16px;flex:none}
.fb{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:3px;padding:8px 9px;border:1px solid var(--line2);border-radius:6px;background:var(--panel2);transition:border-color .15s,background .15s,box-shadow .15s}
.fb.wide{flex-grow:1.25}
.fb b{display:flex;align-items:center;font-size:13px;color:var(--text)}
.fb .fv{font-size:12.5px;line-height:1.4;color:var(--sec);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.ld .fb.act{border-color:var(--cd);box-shadow:0 0 0 1px var(--cd) inset;background:rgba(231,166,107,.1)}
.lnn .fb.act{border-color:var(--cn);box-shadow:0 0 0 1px var(--cn) inset;background:rgba(134,197,176,.1)}
.hv-note{font-size:13px;line-height:1.5;color:var(--sec);max-width:72ch;margin-top:6px}
#hv-neurons:not([hidden]){display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:14px;align-items:start}
.nv{width:100%;height:auto;display:block}
.nv line{stroke:#9fb8ae;stroke-width:.8;stroke-opacity:.04;transition:stroke-opacity .2s}
.nv line.neg{stroke:#c99ad6}
.nv circle{fill:#1a201e;stroke:var(--line2);stroke-width:1;cursor:pointer;transition:fill .2s}
.nv circle:not(.off){stroke:var(--cn)}
.nv .nl{fill:var(--sec);font-size:12px}
.nv .nvv{fill:var(--text);font-size:12px;font-variant-numeric:tabular-nums}
.nv .nvv.big{font-size:15px;font-weight:700;fill:var(--cn)}
.nv-count{font-size:14.5px;line-height:1.5}
.nv-delta{margin:10px 0;padding:8px 10px;border:1px solid var(--line2);border-radius:6px;font-size:13.5px;line-height:1.5;display:flex;flex-direction:column;gap:3px;color:var(--sec)}
.hv-sum-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px;align-items:start;margin-top:8px}
.hv-stats tbody th{width:52%}
@media (max-width:1100px){.hv-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px){
  .hv-sum-grid,#hv-neurons:not([hidden]){grid-template-columns:minmax(0,1fr)}
  .ln-b{flex-direction:column;gap:4px}
  .fa{transform:rotate(90deg);font-size:14px;line-height:1}
  .fb{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
  .hv-t{font-size:13.5px}
  .nv .nl{font-size:21px}.nv .nvv{font-size:21px}.nv .nvv.big{font-size:24px}
  .hv-t tbody th{width:36%}
  .hv-charts,.hv-step,.hv-logic,.hv-sum{padding:10px}
  .hv-transport{position:sticky;top:var(--hv-sticky,0px);z-index:6;padding:6px 8px;gap:6px 8px;box-shadow:0 6px 12px -6px rgba(0,0,0,.6)}
  .hv-day{flex-basis:100%;padding-left:2px}
  .hv2 .seg.hv-speed{margin-left:0}
  .hv2 .hv-speed legend{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .hv2 .hv-speed span{padding:0 7px;min-width:38px;justify-content:center}
  .hv-day input{height:28px}
}
@media (prefers-reduced-motion:reduce){.hv-t tr,.fb,.nv line,.nv circle{transition:none}}
/* live histogram (27 Nov): fill = paths simulated in the browser at the current day, outline = repository's final histogram */
.hv-svg .ghost{fill:none;stroke-width:1.6;stroke-dasharray:2 3;stroke-opacity:.95}
.hv-live{font-size:13.5px;line-height:1.5;color:var(--sec);margin-top:4px;max-width:80ch;font-variant-numeric:tabular-nums;min-height:3em}
.hv-hkey{margin-top:6px}
.hv-key .kg{color:#c9d3ce}
.hv-key .kg::before{background:none;border-top:2px dotted currentColor;height:0}
/* ---- shared: disabled segments, How to read this ---- */
.seg input:disabled+span{opacity:.35;border-style:dashed;cursor:not-allowed}
.seg label:hover input:disabled+span{background:none}
.hiw{margin-top:8px;font-size:13.5px;color:var(--sec)}
.hiw summary{display:inline-flex;align-items:center;min-height:44px;cursor:pointer;font-weight:700;color:var(--sig)}
.hiw summary:focus-visible{outline:3px solid var(--text);outline-offset:2px}
.hiw p{margin:4px 0 0;line-height:1.5;max-width:72ch}

/* tap targets: every control at least 44 px */
.hv2 .hv-speed span,.hv2 .hv-mode span{min-height:44px;min-width:44px;justify-content:center}
.hv-day input{height:44px}
/* ---- deep-hedging playground (playground.js) ---- */
.pg{gap:14px}
.pg-market{flex-wrap:wrap}
.pg-market span small{font-size:11.5px;color:var(--dim);margin-left:5px;font-weight:400}
.pg-mhelp{margin:-4px 0 0;font-size:13px;color:var(--sec);line-height:1.45;max-width:90ch}
.pg-label{font-size:14px;color:var(--sec);line-height:1.5}
.pg-label p{margin:0}.pg-label strong{color:var(--text)}
.pg-params{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:0 14px}
.pg-params>summary{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;min-height:48px;cursor:pointer;list-style:none}
.pg-params>summary::-webkit-details-marker{display:none}
.pg-params>summary::before{content:"\25b8";color:var(--sig);font-size:13px;transition:transform .15s}
.pg-params[open]>summary::before{transform:rotate(90deg)}
.pg-params>summary:focus-visible{outline:3px solid var(--text);outline-offset:2px}
.pg-ptitle{font-weight:700;color:var(--sig)}
.pg-sum{font-size:13.5px;color:var(--text);font-variant-numeric:tabular-nums}
.pg-pbody{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:14px 24px;padding:4px 0 14px}
.pg-vol label{font-size:13.5px;font-weight:700;color:var(--sec);display:block}
.pg-vol output{color:var(--text);margin-left:6px;font-variant-numeric:tabular-nums}
.pg-vol input{width:100%;height:44px;margin:0;accent-color:var(--sig)}
.pg-ticks{display:flex;justify-content:space-between;font-size:11px;color:var(--dim);margin-top:-6px;font-variant-numeric:tabular-nums}
.pg-ticks span:nth-child(even){visibility:hidden}
.pg-snap{margin:6px 0 0;font-size:13px;color:var(--sec);min-height:2.6em}
.pg-facts{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px 22px;margin:0;font-size:13.5px}
.pg-facts div{display:flex;gap:6px}.pg-facts dt{color:var(--dim)}.pg-facts dd{margin:0;color:var(--text);font-variant-numeric:tabular-nums}
.pg-tabs{display:flex;gap:8px;flex-wrap:wrap}
.pg-tabs .btn{min-height:44px;padding:0 16px}
.pg-tabs .btn[aria-selected="true"]{background:var(--sig);color:var(--page);border-color:var(--sig)}
.pg-tabs .btn:focus-visible{outline:3px solid var(--text);outline-offset:2px}
.pg-panel{display:flex;flex-direction:column;gap:12px}
.pg-panel[hidden]{display:none}
.pg-se{color:var(--dim);font-size:12px;white-space:nowrap}
.pg .hv-t td{text-align:right}
.pg .hv-charts{cursor:default}
@media (max-width:760px){.pg-pbody{grid-template-columns:minmax(0,1fr)}.pg-ticks span:nth-child(even){visibility:hidden}.pg .hv-t{font-size:13px}.pg .hv-t th,.pg .hv-t td{padding:6px 3px}.pg-se{display:block}}
@media (prefers-reduced-motion:reduce){.pg-params>summary::before{transition:none}}
/* ---- Heston playground (playground-heston.js) ---- */
.ph-select{display:block;width:100%;max-width:340px;min-height:44px;margin-top:6px;padding:0 10px;border:1px solid var(--line2);border-radius:6px;background:var(--panel);color:var(--text);font:inherit;font-size:14.5px}
.ph-select option{background:var(--panel);color:var(--text)}
.pg-feller{grid-column:1/-1;margin:0;font-size:14px;line-height:1.45;color:var(--sec)}
.pg-feller-no{color:var(--text);border-left:3px solid #e7a66b;padding-left:10px}
.pg-delta{margin:10px 0 0}
.ph-stats th,.ph-stats td{padding-left:6px;padding-right:6px}
@media (max-width:760px){.ph-stats{font-size:13px}.ph-stats .pg-se{display:block}.ph-stats th[scope=col]{font-size:12px;line-height:1.25}}
.hv-sum-grid.ph-sumgrid{grid-template-columns:minmax(0,1fr)}
.pg-delta{max-width:none}

/* ---- phone UX pass (28 Nov): compact parameters, sticky transport below the tab bar ---- */
.hv-transport{top:calc(var(--hv-sticky,0px) + var(--tabs-h,0px))}
@media (max-width:760px){
  .hv-transport{top:calc(var(--hv-sticky,0px) + var(--tabs-h,0px))}
  .pg{gap:12px}
  .pg-params{padding:0 12px}
  .pg-params>summary{min-height:44px}
  .pg-params[open]>summary .pg-sum{display:none}      /* the open panel already shows these values */
  .pg-pbody{gap:6px;padding:0 0 12px}
  .pg-vol label{line-height:1.3}
  .pg-vol input{margin-top:-2px}
  .pg-ticks{font-size:11.5px;margin-top:-8px}
  .pg-snap{margin:4px 0 0;font-size:12.5px;line-height:1.35;min-height:2.7em}
  #ph-load:empty{min-height:0;margin:0}
  .ph-select{max-width:none}
  /* five cost chips on one row at 360 px and up */
  .pg-pbody>.seg{flex-wrap:wrap;gap:5px}
  .pg-pbody>.seg legend{margin-bottom:4px}
  .pg-pbody>.seg label{flex:1 1 calc(20% - 5px);min-width:0}
  .pg-pbody>.seg span{width:100%;justify-content:center;padding:0 2px;font-size:13.5px}
  .pg-facts{gap:2px 16px;font-size:13px}
  .pg-facts div{gap:5px}
  .pg-feller{font-size:13px;line-height:1.4}
  .pg-tabs{gap:6px}
  .pg-tabs .btn{flex:1 1 0;padding:0 8px}
}
