/* Portfolio uses the shared orange, paper and charcoal palette. */
html[data-theme] body #main-content #portfolio-view .portfolio-layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:1.25rem!important}
html[data-theme] body #main-content #portfolio-view :is(.research-portfolio-manager,.portfolio-intelligence-panel,.portfolio-coverage-panel){min-width:0!important;padding:clamp(1rem,2.5vw,2rem)!important;border:1px solid #646464!important;border-radius:20px!important;background:#222!important;color:#fff!important}
html[data-theme] body #main-content #portfolio-view :is(input,select){background:#333!important;color:#fff!important;border:1px solid #888!important;border-radius:8px!important;min-height:44px!important;max-width:100%!important;width:100%;padding:.65rem!important;font:inherit!important}
html[data-theme] body #main-content #portfolio-view :is(button,a){min-height:44px}
html[data-theme] body #main-content #portfolio-view :is(button,summary):focus-visible{outline:2px solid #ff4d00!important;outline-offset:4px!important}
html[data-theme] body #main-content #portfolio-view .research-portfolio-form{display:grid!important;grid-template-columns:2fr 1fr auto!important;gap:1rem!important;align-items:end!important;margin-block:1.2rem!important}
html[data-theme] body #main-content #portfolio-view .hypothetical-position-form{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1rem!important;align-items:start!important;padding-block:1.25rem!important;border-block:1px solid #646464!important}
html[data-theme] body #main-content #portfolio-view :is(.research-portfolio-form,.hypothetical-position-form) label{display:grid;gap:.5rem;min-width:0;font-size:.82rem}
html[data-theme] body #main-content #portfolio-view .research-portfolio-summary{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1rem!important;margin:1rem 0!important}
html[data-theme] body #main-content #portfolio-view .research-portfolio-summary strong{font-size:clamp(1.5rem,3vw,2.4rem)!important;line-height:1.15!important;display:block;overflow-wrap:anywhere}
html[data-theme] body #main-content #portfolio-view :is(.research-portfolio-summary small,.research-portfolio-summary span){display:block;margin:.5rem 0}
html[data-theme] body #main-content #portfolio-view .pw-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin-bottom:1.5rem}
html[data-theme] body #main-content #portfolio-view .pw-toolbar p{flex:1 1 18rem;margin:0;font-size:.85rem}
html[data-theme] body #main-content #portfolio-view :is(.pw-toolbar,.pw-position) button{padding:.6rem .9rem!important;background:#fff!important;color:#171717!important;border:1px solid #fff!important;border-radius:8px!important;font:700 .82rem/1.2 inherit;cursor:pointer}
html[data-theme] body #main-content #portfolio-view .pw-allocation{padding:1.25rem!important;background:#fff!important;color:#171717!important;border-radius:14px!important;margin-bottom:1.25rem!important}
html[data-theme] body #main-content #portfolio-view .pw-allocation :is(h3,span,strong,small){color:#171717!important}
.pw-allocation header{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;flex-wrap:wrap}.pw-allocation h3{margin:0}.pw-allocation header span{font-size:.75rem}.pw-allocation-bar{display:flex;gap:3px;height:28px;margin:1rem 0;border-radius:5px;overflow:hidden}.pw-allocation-bar i{flex:var(--share);background:#ff4d00;opacity:var(--shade)}.pw-allocation ul{list-style:none;display:flex;flex-wrap:wrap;gap:1rem 2rem;margin:0;padding:0}.pw-allocation li{display:grid;grid-template-columns:1fr auto;gap:.25rem .8rem;min-width:8rem}.pw-allocation small{grid-column:1/-1}
html[data-theme] body #main-content #portfolio-view .pw-position-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1rem!important}
html[data-theme] body #main-content #portfolio-view .pw-position{border:1px solid #777!important;border-radius:12px!important;padding:1.2rem!important;background:#333!important;color:#fff!important;min-width:0}
.pw-position header,.pw-position footer{display:flex;justify-content:space-between;align-items:center;gap:.75rem;flex-wrap:wrap}.pw-position header a{font-size:1.5rem;font-weight:800}.pw-position header span{font-size:.75rem}.pw-position dl{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:1.2rem 0}.pw-position dt{font-size:.7rem}.pw-position dd{margin:.35rem 0 0;font-size:1.2rem;font-weight:750;overflow-wrap:anywhere}.pw-position small{display:block;margin-top:1rem;font-size:.75rem}.pw-next{border-left:3px solid #ff4d00;padding-left:.75rem}.pw-position a{color:#fff!important;display:inline-flex;align-items:center;text-decoration:underline}
.pw-coverage-row{border-top:1px solid #777;padding:1rem 0}.pw-coverage-row>header{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}.pw-coverage-row>header a{font-size:1.15rem;font-weight:750;display:inline-flex;align-items:center;color:#fff!important}.pw-coverage-row>header span,.pw-coverage-note{font-size:.85rem}.pw-coverage-row ul{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem;list-style:none;padding:0}.pw-coverage-row li{padding:.8rem;border:1px solid #888;border-radius:8px;display:grid;gap:.4rem;min-width:0;font-size:.75rem}.pw-coverage-row li[data-pw-state=partial]{border-top:3px solid #ff4d00}.pw-coverage-row li[data-pw-state=stale]{border-style:dashed}.pw-coverage-row summary{cursor:pointer;padding:.8rem 0;font-weight:700}.pw-coverage-row .re-provenance{background:#333!important;padding:.5rem 1rem}.pw-coverage-row :is(dd,p){overflow-wrap:anywhere}.pw-empty{padding:1rem 0}.pw-empty>span{display:block;color:#ff4d00;font-size:3rem}.pw-empty h3{font-size:1.7rem!important}
@media(max-width:700px){html[data-theme] body #main-content #portfolio-view :is(.research-portfolio-form,.hypothetical-position-form,.research-portfolio-summary,.pw-position-grid){grid-template-columns:minmax(0,1fr)!important}.pw-coverage-row ul{grid-template-columns:repeat(2,minmax(0,1fr))}.pw-position dl{grid-template-columns:1fr}.pw-toolbar button{width:100%}.pw-allocation header{display:block}.pw-allocation header span{display:block;margin-top:.5rem}}
html[data-theme] body #main-content #portfolio-view #portfolio-intelligence-feed{display:block!important}
html[data-theme] body #main-content #portfolio-view #portfolio-coverage-map{display:block!important}
html[data-theme] body #main-content #portfolio-view #portfolio-intelligence-feed .pw-allocation,html[data-theme] body #main-content #portfolio-view #portfolio-intelligence-feed .pw-allocation :is(header,h3,span,strong,small,p,li){color:#171717!important}
html[data-theme] body #main-content #portfolio-view #portfolio-intelligence-feed .pw-allocation-bar i{background:#ff4d00!important;opacity:var(--shade)!important;border:0!important}
html[data-theme] body #main-content #portfolio-view #portfolio-intelligence-feed .pw-next{border-left:3px solid #ff4d00!important}

/* Legacy seeded analytics are restricted to explicit prototype mode. */
html[data-theme] body #main-content #portfolio-view .portfolio-layout > [hidden]{display:none!important}
/* Keep summary figures legible inside the dark scenario panel. */
html[data-theme] body #main-content #portfolio-view #research-portfolio-summary{background:#333!important;color:#fff!important;border:1px solid #777!important;border-radius:12px!important;padding:1rem!important}
html[data-theme] body #main-content #portfolio-view #research-portfolio-summary :is(div,span,strong,small,p,em){color:#fff!important;background:transparent!important}
