/* Keep the paper/forest visual system; separate selection from reading. */
html.stock-list-view #stocks-page .workspace{display:block!important}
html.stock-list-view #stocks-page .detail,html.stock-list-view #stocks-page .rightcol{display:none!important}
html.stock-list-view #stocks-page .watchlist{width:100%;max-width:none;height:auto;min-height:0;max-height:none;position:static;overflow:hidden;padding:0;display:block}
html.stock-list-view #stocks-page #list{max-height:none;overflow:visible;min-height:0;padding:0;text-align:left}
.stock-list-row{display:flex;align-items:center;border-bottom:1px solid #e1e7dd;padding:3px 10px}
.stock-list-row a.item{flex:1;min-width:0;text-decoration:none;color:inherit;border:0;display:block;padding:16px 12px}
.stock-list-row .item-row{display:flex;justify-content:space-between;gap:16px}
.stock-list-row .item-sub{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.stock-list-row .item-sub .badge{display:inline-block!important}
.stock-list-row .item-price{display:flex;gap:18px;font-variant-numeric:tabular-nums}
.stock-list-row .stock-remove{font-size:11px;color:#6c786b;margin:0 8px}
#stock-pager{display:flex;justify-content:center;align-items:center;gap:20px;padding:18px;color:#647261;font-size:12px}
/* Fully scoped: the independent list must not inherit the old sidebar geometry. */
html.stock-list-view #stocks-page .watchlist{scroll-margin-top:100px}
html.stock-list-view #stocks-page .watchlist .card-head{padding:20px 24px}
html.stock-list-view #stocks-page .watchlist #market-filters{position:static;inset:auto;width:auto;padding:14px 24px 8px;display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;border:0;background:transparent}
html.stock-list-view #stocks-page .watchlist #market-filters .filter{width:auto;min-width:64px;min-height:40px;padding:8px 16px;font-size:13px;white-space:nowrap}
html.stock-list-view #stocks-page .watchlist .list-tools{padding:8px 24px 16px}
html.stock-list-view #stocks-page #industry-filter{width:auto!important;max-width:100%;min-width:180px;min-height:40px}
html.stock-list-view #stocks-page .stock-list-row{padding:0 20px;border-color:#e1e7dd;gap:16px;transition:background .15s}
html.stock-list-view #stocks-page .stock-list-row:hover{background:#f0f4ed}
html.stock-list-view #stocks-page .stock-list-row a.item{height:auto;min-height:80px;box-sizing:border-box;padding:16px 4px;background:transparent;display:grid;grid-template-columns:minmax(180px,1fr) 260px;grid-template-areas:'name quote' 'meta quote';column-gap:24px;row-gap:6px}
html.stock-list-view #stocks-page .stock-list-row .item-row{display:contents;height:auto}
html.stock-list-view #stocks-page .stock-list-row .item-name{grid-area:name;font-size:15px;line-height:22px;color:#243d31;white-space:normal;overflow-wrap:anywhere;padding:0}
html.stock-list-view #stocks-page .stock-list-row .item-price{grid-area:quote;display:grid;grid-template-columns:1fr 100px;gap:20px;align-items:center;align-self:center;text-align:right;line-height:22px}
html.stock-list-view #stocks-page .stock-list-row .price-value{font-size:17px}
html.stock-list-view #stocks-page .stock-list-row .quote-signal{font-size:13px;line-height:22px}
html.stock-list-view #stocks-page .stock-list-row .item-sub{grid-area:meta;height:auto;overflow:visible;display:flex;justify-content:flex-start;flex-wrap:wrap;gap:8px;margin:0;line-height:18px;font-size:12px}
html.stock-list-view #stocks-page .stock-remove{margin:0;min-height:40px;min-width:48px;background:transparent;border-color:transparent;font-size:12px}
html.stock-list-view #stocks-page .stock-remove:hover{background:#f8eceb;color:#973e3e}
html.stock-list-view #stocks-page .stock-list-row a.item{border:0;min-height:72px;padding-top:12px;padding-bottom:12px}
@media(min-width:561px){html.stock-list-view #stocks-page .watchlist #market-filters{display:inline-flex;vertical-align:middle;padding-bottom:14px}html.stock-list-view #stocks-page .watchlist .list-tools{display:inline-block;vertical-align:middle;border:0;padding:12px 24px 12px 0}}
html.stock-list-view #stock-pager{position:static;clear:both;flex-shrink:0;border-top:1px solid #dce5d5;background:#f5f7f1;display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:18px 24px}
html.stock-list-view #stock-pager .pager-actions{display:flex;align-items:center;gap:12px}
html.stock-list-view #stock-pager button{min-height:44px;min-width:76px}
html.stock-list-view #stock-pager button:disabled{opacity:.4;cursor:not-allowed}
html.stock-list-view .stock-list-row a:focus-visible,html.stock-list-view #stock-pager button:focus-visible{outline:2px solid #54785e;outline-offset:-2px;border-radius:6px}
@media(max-width:900px){html.stock-list-view #stocks-page .stock-list-row a.item{grid-template-columns:minmax(150px,1fr) 200px;column-gap:16px}html.stock-list-view #stocks-page .stock-list-row .item-price{grid-template-columns:1fr 80px;gap:12px}}
@media(max-width:560px){html.stock-list-view #stocks-page .watchlist .card-head{padding:16px}html.stock-list-view #stocks-page .watchlist #market-filters{padding:12px 16px 6px}html.stock-list-view #stocks-page .watchlist .list-tools{padding:6px 16px 12px}html.stock-list-view #stocks-page .stock-list-row{padding:0 12px;gap:6px}html.stock-list-view #stocks-page .stock-list-row a.item{grid-template-columns:minmax(0,1fr) 88px;column-gap:8px}html.stock-list-view #stocks-page .stock-list-row .item-price{grid-template-columns:1fr;gap:2px}html.stock-list-view #stocks-page .stock-list-row .item-name{font-size:14px}html.stock-list-view #stocks-page .stock-list-row .price-value{font-size:15px}html.stock-list-view #stock-pager{padding:14px 16px;justify-content:center}html.stock-list-view #stock-pager .pager-summary{width:100%;text-align:center}}
html.stock-detail-view #stocks-page .workspace{display:block!important;max-width:1200px;margin:0 auto}
html.stock-detail-view #stocks-page .watchlist{display:none!important}
html.stock-detail-view #stocks-page .detail{display:flex!important;flex-direction:column;min-width:0;gap:14px}
html.stock-detail-view #stocks-page .detail>*{order:0!important;margin-top:0}
html.stock-detail-view #stocks-page .rightcol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;position:static;max-height:none;overflow:visible}
html.stock-detail-view #stocks-page [hidden]{display:none!important}
.stock-detail-nav{display:flex;justify-content:space-between;gap:12px;padding:5px 0 10px;font-size:13px}
.stock-detail-nav a{color:#31553e;text-decoration:none}
#stock-neighbours{display:flex;gap:22px}
#stock-detail-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #dce5d5;padding-bottom:12px}
html.stock-detail-view #stocks-page .hero{padding:18px 22px}
html.stock-detail-view #stocks-page .chart-wrap{width:100%;min-width:0}
html.stock-detail-view #stocks-page .value-center{padding:12px 16px;margin:0 0 12px}
html.stock-detail-view #stocks-page .clean-fundamentals{margin:0}
@media(max-width:900px){html.stock-detail-view #stocks-page .rightcol{grid-template-columns:1fr}.stock-list-row .item-price{gap:8px}}
@media(max-width:560px){.stock-list-row{padding:2px 4px}.stock-list-row a.item{padding:13px 6px}.stock-list-row .item-name{font-size:14px}.stock-list-row .stock-remove{padding:5px;margin:0}.stock-detail-nav{font-size:12px}#stock-neighbours{gap:12px}#stock-detail-tabs{gap:5px}#stock-detail-tabs button{font-size:12px;padding:8px}html.stock-detail-view #stocks-page .hero{padding:14px}html.stock-detail-view #stocks-page .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Explicit opt-in; the original stock page remains the default. */
.stock-detail-nav{flex-wrap:wrap;align-items:center}
.stock-detail-nav .investment-preview-switch{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 14px;border:1px solid #31553e;border-radius:9px;background:#edf4ee;font-weight:600;white-space:nowrap}
.stock-detail-nav .investment-preview-switch:hover{background:#dfece2}
.stock-detail-nav .investment-preview-switch:focus-visible{outline:2px solid #31553e;outline-offset:3px}
