/* MONALISA_HEDGE_ALAVANCAGEM_V1 — Etapa D */
body.hg-on #view-hedge > .hedge-input-card,
body.hg-on #view-hedge > #hedgeSnapshotSection,
body.hg-on #view-hedge > .card:has(> button[onclick*="builder"]),
body.hg-on #view-hedge > #moFeedback-hedge,
body.hg-on #view-hedge > .journey-next-card,
body.hg-on #view-hedge .mo-work-context{display:none!important;}

.hg{--hg-up:#0d9f6e;--hg-dn:#d63b3b;--hg-acc:#1d6fd8;--hg-amb:#b45309;--hg-pur:#7c5cd6;--hg-t1:#0f1923;--hg-t2:#4a6080;--hg-t3:#8a9ab5;--hg-bd:#dde4ee;--hg-sf:#f4f7fb;
  font-family:'DM Sans',sans-serif;color:var(--hg-t1);display:grid;gap:14px;margin-bottom:12px;min-width:0;}
.hg *{box-sizing:border-box;}
.hg-card{background:#fff;border:1px solid var(--hg-bd);border-top:3px solid var(--hg-acc);border-radius:16px;padding:18px 20px;display:grid;gap:14px;min-width:0;position:relative;}
.hg-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;flex-wrap:wrap;}
.hg-head > div{min-width:0;flex:1 1 320px;}
.hg-kicker{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--hg-t3);}
.hg-head h3{margin:4px 0 2px;font-size:20px;line-height:1.25;}
.hg-sub{margin:0;font-size:13px;color:var(--hg-t2);line-height:1.5;}
.hg-sub b{color:var(--hg-t1);}
.hg-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
.hg-muted{font-size:12px;color:var(--hg-t2);}
.hg-goal svg,.hg-ask svg,.hg-ib svg,.hg-link svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.is-up{color:var(--hg-up);} .is-down{color:var(--hg-dn);}

.hg-add{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;gap:10px;align-items:end;}
.hg-f{display:flex;flex-direction:column;gap:5px;min-width:0;}
.hg-f > span:first-child{font-size:12px;font-weight:700;color:var(--hg-t2);}
.hg-f em{font-style:normal;font-weight:500;color:var(--hg-t3);}
.hg-f input,.hg-num{width:100%;border:1px solid #cfd9e6;border-radius:10px;padding:9px 11px;font:500 14px 'DM Sans',sans-serif;color:var(--hg-t1);background:#fff;min-height:40px;}
.hg-add input#hgAddU{text-transform:uppercase;}
.hg-f input:focus,.hg-num:focus-within{outline:none;border-color:var(--hg-acc);box-shadow:0 0 0 3px rgba(29,111,216,.12);}
.hg-add button{min-height:40px;white-space:nowrap;}
.hg-msg{margin:-6px 0 0;font-size:12.5px;color:var(--hg-acc);} .hg-msg.is-err{color:var(--hg-dn);} .hg-msg:empty{display:none;}
.hg-num{display:flex;align-items:center;gap:6px;padding:0 11px;}
.hg-num i{font-style:normal;color:var(--hg-t3);font-weight:600;font-size:13px;}
.hg-num input{border:0;padding:9px 0;min-height:38px;box-shadow:none!important;}
.hg-f-inline{max-width:360px;}

.hg-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--hg-bd);border-radius:12px;}
.hg-table{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums;}
.hg-table th,.hg-table td{padding:9px 12px;text-align:right;border-bottom:1px solid #eef2f7;white-space:nowrap;}
.hg-table thead th{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--hg-t3);background:var(--hg-sf);}
.hg-table th:first-child,.hg-table td:first-child{text-align:left;}
.hg-table tbody tr:last-child th,.hg-table tbody tr:last-child td{border-bottom:0;}
.hg-table small{display:block;font-size:11px;color:var(--hg-t3);font-weight:500;}
.hg-port tbody th{font-weight:500;} .hg-port tbody th b{font-size:14px;}
.hg-act{width:1%;}
.hg-ib{width:32px;height:32px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--hg-t2);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;}
.hg-ib svg{width:16px;height:16px;} .hg-ib:hover{background:var(--hg-sf);border-color:var(--hg-bd);color:var(--hg-t1);}
.hg-table tr.is-zero th,.hg-table tr.is-zero td{background:#f8fafc;font-weight:700;}

.hg-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.hg-kpis:empty{display:none;}
.hg-kpi{background:var(--hg-sf);border:1px solid var(--hg-bd);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;min-width:0;}
.hg-kpi span{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--hg-t3);}
.hg-kpi strong{font-size:18px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
.hg-kpi small{font-size:11.5px;color:var(--hg-t2);}
.hg-kpi.is-up strong{color:var(--hg-up);} .hg-kpi.is-down strong{color:var(--hg-dn);}
.hg-empty{border:1px dashed #cfd9e6;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--hg-t2);}
.hg-empty strong{color:var(--hg-t1);}
.hg-wait{display:flex;align-items:center;justify-content:center;min-height:120px;border:1px dashed #cfd9e6;border-radius:12px;color:var(--hg-t2);font-size:13px;padding:16px;text-align:center;}

.hg-ask{display:inline-flex;align-items:center;gap:7px;min-height:38px;white-space:nowrap;} .hg-ask svg{width:16px;height:16px;}
.hg-goals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.hg-goal{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;text-align:left;border:1px solid #cfd9e6;background:#fff;border-radius:14px;padding:12px 14px;cursor:pointer;font-family:'DM Sans',sans-serif;color:var(--hg-t1);min-width:0;}
.hg-goal svg{grid-row:1 / span 2;width:26px;height:26px;color:var(--hg-t2);}
.hg-goal strong{font-size:14.5px;} .hg-goal small{font-size:12px;color:var(--hg-t2);line-height:1.35;}
.hg-goal[aria-pressed="true"]{border-color:var(--hg-acc);background:#e8f1fc;box-shadow:0 0 0 1px var(--hg-acc) inset;}
.hg-goal[aria-pressed="true"] svg,.hg-goal[aria-pressed="true"] strong{color:var(--hg-acc);}
.hg-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:14px;}
.hg-field{display:flex;flex-direction:column;gap:7px;min-width:0;}
.hg-label{font-size:12px;font-weight:700;color:var(--hg-t2);}
.hg-chips{display:flex;flex-wrap:wrap;gap:6px;}
.hg-chip{border:1px solid #cfd9e6;background:#fff;border-radius:999px;padding:6px 12px;min-height:34px;font:600 13px 'DM Sans',sans-serif;color:var(--hg-t2);cursor:pointer;}
.hg-chip[aria-pressed="true"]{background:#e8f1fc;border-color:var(--hg-acc);color:var(--hg-acc);}
.hg-chip-all{border-style:dashed;}
.hg-chip-exp{display:inline-flex;flex-direction:column;align-items:flex-start;border-radius:10px;padding:4px 11px;line-height:1.35;}
.hg-chip-exp small{font-weight:500;font-size:11px;color:var(--hg-t3);}
.hg-goal:focus-visible,.hg-chip:focus-visible{outline:2px solid var(--hg-acc);outline-offset:2px;}
.hg-ctrl:empty{display:none;}
.hg-range{display:flex;flex-direction:column;gap:6px;background:var(--hg-sf);border:1px solid var(--hg-bd);border-radius:12px;padding:12px 14px;}
.hg-range > span:first-child{font-size:13px;color:var(--hg-t2);display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.hg-range b{color:var(--hg-t1);font-variant-numeric:tabular-nums;}
.hg-range input{width:100%;accent-color:var(--hg-acc);height:28px;margin:0;}
.hg-range-ends{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--hg-t3);}
.hg-note{margin:0;font-size:12.5px;color:var(--hg-t2);line-height:1.5;}

.hg-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.hg-opt{--pk:var(--hg-acc);border:1px solid var(--hg-bd);border-top:4px solid var(--pk);border-radius:14px;padding:14px;background:#fff;display:flex;flex-direction:column;gap:9px;min-width:0;}
.hg-opt.is-a{--pk:#1d6fd8;} .hg-opt.is-b{--pk:#7c5cd6;} .hg-opt.is-c{--pk:#b45309;}
.hg-opt.is-on{box-shadow:0 0 0 2px var(--pk);}
.hg-opt-top{display:flex;justify-content:space-between;align-items:center;gap:6px;flex-wrap:wrap;}
.hg-opt-tag{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--pk);}
.hg-opt-tag i{width:10px;height:10px;background:var(--pk);border-radius:50%;}
.hg-warn{font-size:11px;font-weight:700;color:var(--hg-amb);background:#fff4e0;border-radius:999px;padding:2px 8px;}
.hg-opt h4{margin:0;font-size:15.5px;line-height:1.3;overflow-wrap:anywhere;}
.hg-legs{margin:-4px 0 0;font-size:12px;color:var(--hg-t2);overflow-wrap:anywhere;line-height:1.45;}
.hg-big{background:var(--hg-sf);border-radius:10px;padding:9px 11px;display:flex;flex-direction:column;gap:1px;}
.hg-big span{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--hg-t3);}
.hg-big strong{font-size:22px;font-variant-numeric:tabular-nums;}
.hg-big small{font-size:12px;color:var(--hg-t2);}
.hg-facts{display:grid;gap:7px;margin:0;}
.hg-facts div{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:8px;align-items:baseline;border-bottom:1px dashed #eef2f7;padding-bottom:6px;}
.hg-facts dt{font-size:12px;color:var(--hg-t2);line-height:1.35;}
.hg-facts dd{margin:0;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.4;overflow-wrap:anywhere;}
.hg-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;}
.hg-actions .primary-btn,.hg-actions .secondary-btn{flex:1 1 auto;min-height:38px;white-space:nowrap;}
.hg-link{display:inline-flex;align-items:center;gap:6px;border:0;background:none;padding:4px 0;color:var(--hg-acc);font:600 12.5px 'DM Sans',sans-serif;cursor:pointer;text-align:left;flex:1 1 100%;}
.hg-link svg{width:15px;height:15px;flex:none;} .hg-link:disabled{color:var(--hg-up);cursor:default;}
.hg-compare{margin-top:12px;border:1px solid var(--hg-bd);border-radius:12px;padding:12px 14px;background:var(--hg-sf);display:grid;gap:8px;}
.hg-compare h4{margin:0;font-size:14px;} .hg-compare p{margin:0;font-size:13px;color:var(--hg-t2);line-height:1.5;} .hg-compare b{color:var(--hg-t1);}

.hg-chart{position:relative;min-width:0;}
.hg-svg{display:block;max-width:100%;font-family:'DM Sans',sans-serif;}
.hg-gl{stroke:#eef2f7;} .hg-gl.is-zero{stroke:#a9b8cc;}
.hg-ax{fill:var(--hg-t3);font-size:10.5px;font-variant-numeric:tabular-nums;}
.hg-l-base{fill:none;stroke:#0f1923;stroke-width:2;stroke-linejoin:round;}
.hg-l-with{fill:none;stroke:var(--hg-acc);stroke-width:2.4;stroke-linejoin:round;}
.hg-better{fill:rgba(13,159,110,.16);stroke:none;} .hg-worse{fill:rgba(214,59,59,.12);stroke:none;}
.hg-cross{stroke:#8a9ab5;stroke-dasharray:2 3;pointer-events:none;}
.hg-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:11.5px;color:var(--hg-t2);margin-top:-6px;}
.hg-lg{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;}
.hg-lg i{display:inline-block;width:16px;height:0;border-top:2px solid currentColor;}
.hg-lg.is-base i{color:#0f1923;} .hg-lg.is-with i{color:var(--hg-acc);border-top-width:3px;}
.hg-lg.is-better i{height:9px;border:0;background:rgba(13,159,110,.3);border-radius:2px;} .hg-lg.is-worse i{height:9px;border:0;background:rgba(214,59,59,.22);border-radius:2px;}
.hg-lg-x{color:var(--hg-t3);}
.hg-tip{position:absolute;z-index:20;pointer-events:none;max-width:260px;background:#0f1923;color:#fff;border-radius:9px;padding:8px 10px;font:12.5px/1.45 'DM Sans',sans-serif;box-shadow:0 8px 24px rgba(15,25,35,.25);}
.hg-tip .is-up{color:#5fe0b0;} .hg-tip .is-down{color:#ff8f8f;}

@media (max-width:1100px){.hg-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}.hg-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:820px){.hg-row{grid-template-columns:minmax(0,1fr);}.hg-goals{grid-template-columns:minmax(0,1fr);}.hg-add{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}.hg-add button{grid-column:1/-1;}}
@media (max-width:760px){.hg-grid{grid-template-columns:minmax(0,1fr);}}
@media (max-width:600px){
  .hg-card{padding:14px 12px;border-radius:14px;}
  .hg-add{grid-template-columns:minmax(0,1fr);}
  .hg-actions .primary-btn,.hg-actions .secondary-btn{flex:1 1 100%;}
  /* carteira vira cartões no celular */
  .hg-port thead{display:none;}
  .hg-port,.hg-port tbody,.hg-port tr{display:block;width:100%;}
  .hg-port tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 12px;padding:10px 12px;border-bottom:1px solid #eef2f7;}
  .hg-port tbody tr:last-child{border-bottom:0;}
  .hg-port th,.hg-port td{display:block;padding:0;border:0;text-align:left;white-space:normal;}
  .hg-port td[data-l]::before{content:attr(data-l);display:block;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--hg-t3);}
  .hg-port .hg-act{grid-column:2;grid-row:1;justify-self:end;width:auto;}
  .hg-table-wrap.hg-stress-wrap{font-size:12px;}
  .hg-table th,.hg-table td{padding:8px 9px;}
}
.hg-table.is-narrow{font-size:12px;}
.hg-table.is-narrow th,.hg-table.is-narrow td{padding:7px 6px;}
.hg-table.is-narrow thead th{font-size:10px;letter-spacing:.02em;}
