/* Compact overview controls share a row when the panel has room. */
.overview-panel-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;min-height:44px;margin:0 0 16px}
.shortlist-ranking{display:inline-flex;flex-shrink:0;border:1px solid var(--line);border-radius:4px;overflow:visible}
.shortlist-ranking button{min-height:40px;background:transparent;color:var(--ink);font:11px/1.4 var(--sans);padding:8px 10px;border:0;cursor:pointer;white-space:nowrap}
.shortlist-ranking button:first-child{border-radius:3px 0 0 3px;border-right:1px solid var(--line)}
.shortlist-ranking button:last-child{border-radius:0 3px 3px 0}
.shortlist-ranking button[aria-pressed=true]{background:var(--mint);font-weight:600}
.shortlist-ranking button:hover,.shortlist-quality button:hover{background:#f3f4ef}
.shortlist-controls .shortlist-quality{margin-left:auto;gap:2px;flex-shrink:0}
.shortlist-quality>span{font-size:11px;color:var(--muted);margin-right:5px}
.shortlist-controls .shortlist-quality button{min-width:27px;min-height:40px;padding:5px;border:1px solid transparent;border-radius:3px;font:11px/1.4 var(--sans)}
.shortlist-controls .shortlist-quality button[aria-pressed=true]{border-color:var(--line);background:var(--mint);color:var(--ink);font-weight:600}
.funds-toggle{display:inline-flex;align-items:center;gap:9px;font-size:12px;min-height:44px;cursor:pointer}
.conviction-controls{justify-content:flex-end}
.quality-rating{display:inline-grid;place-items:center;flex:none;width:34px;height:34px;background:#e8eadf;color:#5b694b;border-radius:1px;font:400 15px/1 var(--sans)}
.rated-company{display:flex;align-items:center;gap:10px}
.rated-company>div{min-width:0}
.funds-toggle input{appearance:none;position:relative;width:32px;height:19px;flex:none;border:1px solid #929b82;border-radius:12px;background:#e0e3d8;cursor:pointer;margin:0}
.funds-toggle input:before{content:'';position:absolute;left:2px;top:2px;width:13px;height:13px;border-radius:50%;background:white;transition:transform .15s}
.funds-toggle input:checked{background:#7c8c65;border-color:#7c8c65}
.funds-toggle input:checked:before{transform:translateX(13px)}
.overview-list{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px}
.overview-list th{padding:10px 5px 12px;border-bottom:1px solid var(--line);color:var(--muted);font:11px/1.4 var(--sans);text-align:left;white-space:normal;vertical-align:bottom}
.overview-list td{height:67px;padding:11px 5px;border-bottom:1px solid var(--line);color:var(--ink);text-align:left;font-size:12px;vertical-align:middle;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.overview-list th:first-child,.overview-list td:first-child{padding-left:0}
.overview-list th:last-child,.overview-list td:last-child{padding-right:0}
.overview-list button[data-company]{background:none;border:0;padding:3px 0;color:var(--ink);font:600 13px/1.4 var(--sans);text-align:left;cursor:pointer}
.overview-list button[data-company]:hover{text-decoration:underline;text-underline-offset:3px}
.overview-list small{display:block;margin:2px 0 0;color:var(--muted);font:11px/1.4 var(--sans);white-space:normal}
.concentration-list th:first-child{width:50px}
.concentration-list th:last-child{width:40%;text-align:right}
.concentration-list .holding-quality{font-size:15px}
.holding-weight{display:flex;align-items:center;justify-content:flex-end;gap:12px}
.holding-weight .bar-track{width:100%;max-width:110px;flex:1;min-width:12px;height:4px}
.holding-weight>span{min-width:43px;text-align:right}
.shortlist-list th:first-child{width:43%}
.shortlist-list th:nth-child(2){width:19%}
.shortlist-list th:nth-child(3){width:21%}
.shortlist-list th:last-child{width:17%;overflow-wrap:anywhere}
.shortlist-list th:nth-child(n+3),.shortlist-list td:nth-child(n+3){text-align:right}
.shortlist-list th[aria-sort]{color:var(--green);font-weight:600}
.shortlist-list td.positive{color:var(--green)}
.shortlist-list td.negative{color:var(--rust)}
.shortlist-list .badge{display:inline-block;white-space:normal;text-align:center}
.overview-list thead,.overview-list th{background:transparent}
.lower-grid>.panel>.panel-head{min-height:58px}
@media(min-width:1001px){.lower-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){.lower-grid{grid-template-columns:1fr}.lower-grid>.panel:first-child{border-right:0;padding-right:0}.shortlist-controls .shortlist-quality{margin-left:0}}
@media(max-width:520px){.shortlist-controls{gap:6px 12px}.shortlist-controls .shortlist-quality{margin-left:0}.overview-list th{font-size:10px;padding-left:4px;padding-right:4px}.overview-list td{font-size:11px;padding-left:4px;padding-right:4px}.overview-list small{font-size:10px}.shortlist-list th:first-child{width:33%}.shortlist-list th:nth-child(2){width:23%}.shortlist-list th:nth-child(3){width:24%}.shortlist-list th:last-child{width:20%}.concentration-list th:first-child{width:44px}.concentration-list th:last-child{width:38%}.lower-grid>.panel>.panel-head{flex-wrap:wrap;min-height:0;gap:8px}.lower-grid>.panel>.panel-head>a{margin-top:0}.shortlist-ranking button{min-height:44px}.shortlist-controls .shortlist-quality button{min-height:44px;min-width:32px}}
@media(prefers-reduced-motion:reduce){.funds-toggle input:before{transition:none}}
@media(max-width:520px){.shortlist-list th:first-child{width:41%}.shortlist-list th:nth-child(2){width:18%}.shortlist-list th:nth-child(3){width:21%}.shortlist-list th:last-child{width:20%;white-space:nowrap;overflow-wrap:normal}.quality-rating{width:30px;height:30px;font-size:14px}.rated-company{gap:7px}}
/* Selected layout: controls share the masthead; navigation follows the rows. */
.lower-grid>.panel>.panel-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;min-height:54px;padding:0 0 12px}
.lower-grid .panel-head h2{margin:0;font-size:25px;white-space:nowrap}
.conviction-panel .funds-toggle{margin-left:auto;margin-right:auto}
.ranking-switch{display:inline-flex;align-items:center;gap:6px;margin-left:auto;white-space:nowrap}
.ranking-switch button{background:none;border:0;padding:4px 0;font:11px/1.4 var(--sans);color:var(--muted);cursor:pointer;min-height:32px}
.ranking-switch button[aria-pressed=true]{color:var(--ink);font-weight:600}
.ranking-switch input{appearance:none;position:relative;width:30px;height:18px;border:1px solid #929b82;border-radius:12px;background:#7c8c65;margin:0;cursor:pointer;flex:none}
.ranking-switch input:before{content:'';position:absolute;width:12px;height:12px;top:2px;left:2px;border-radius:50%;background:white}
.ranking-switch input:checked:before{transform:translateX(12px)}
.quality-dropdown{position:relative;flex:none;color:var(--ink);font:11px/1.4 var(--sans);padding:0;border:0;background:none}
.quality-dropdown summary{cursor:pointer;list-style:none;border:1px solid var(--line);border-radius:3px;padding:8px;white-space:nowrap}
.quality-dropdown summary:after{content:' ▾'}
.quality-options{position:absolute;right:0;top:calc(100% + 4px);z-index:20;min-width:130px;background:var(--paper);border:1px solid var(--line);padding:4px}
.quality-options button{display:block;width:100%;text-align:left;border:0;background:none;padding:8px;color:var(--ink);font:12px var(--sans);cursor:pointer}
.quality-options button[aria-pressed=true]{background:var(--mint);font-weight:600}
.quality-options button:hover{background:#f3f4ef}
.overview-panel-footer{text-align:right;padding-top:12px;font-size:11px}
.overview-panel-footer a{color:var(--green);text-decoration:underline;text-underline-offset:3px}
@media(min-width:1001px) and (max-width:1400px){.lower-grid>.panel>.panel-head{min-height:92px;align-content:flex-start}.value-panel h2{flex-basis:100%}.value-panel .ranking-switch{margin-left:0}}
@media(max-width:520px){.lower-grid>.panel>.panel-head{min-height:0}.value-panel h2{flex-basis:100%}.ranking-switch{margin-left:0}.quality-dropdown{margin-left:auto}}
/* Segmented metrics and matching, prominent navigation actions. */
.conviction-header-actions,.value-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-left:auto}
.conviction-header-actions .funds-toggle{margin:0}
.overview-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:7px 11px;border:1px solid var(--green);border-radius:6px;background:var(--green);color:white!important;font:600 11px/1.4 var(--sans);text-decoration:none!important;white-space:nowrap}
.overview-action svg{width:15px;height:15px;flex:none}
.overview-action:hover{background:#35462c;border-color:#35462c}
.metric-segments{gap:0;margin-left:0;overflow:hidden;border:1px solid #83916f;border-radius:6px}
.metric-segments button{padding:7px 10px;min-height:32px;color:var(--ink);font-size:11px}
.metric-segments button+button{border-left:1px solid #83916f}
.metric-segments button[aria-pressed=true]{background:var(--green);color:white}
.metric-segments button:hover:not([aria-pressed=true]){background:var(--mint)}
.metric-segments input[hidden]{display:none}
.value-panel .quality-dropdown{margin:0}
.lower-grid>.panel>.panel-head{min-height:92px;align-content:flex-start;align-items:center}
.value-panel .panel-head h2{flex-basis:100%}
@media(max-width:1000px){.lower-grid>.panel>.panel-head{min-height:0}.value-panel .panel-head h2{flex-basis:auto}.value-header-actions{margin-left:auto}}
@media(max-width:600px){.conviction-header-actions,.value-header-actions{margin-left:0;gap:8px}.lower-grid>.panel>.panel-head{gap:8px}.lower-grid .panel-head h2{flex-basis:100%}.overview-action{min-height:40px}.metric-segments button{min-height:40px}.value-header-actions{width:100%}.value-header-actions .overview-action{margin-left:auto}.conviction-header-actions{width:100%;justify-content:flex-end}.value-header-actions .quality-dropdown summary{min-height:40px;display:flex;align-items:center;gap:3px}}
/* Symbols retain accessible labels and expose help on hover or focus. */
.lower-grid>.panel>.panel-head{min-height:56px;align-content:center}
.value-panel .panel-head h2{flex-basis:auto}
.conviction-header-actions{gap:28px}
.value-header-actions{gap:10px}
.overview-action{background:#f5f6f0;border-color:#b3bba5;color:var(--green)!important;font-weight:500}
.overview-action:hover{background:var(--mint);border-color:#83916f}
.metric-segments{overflow:visible}
.metric-segments button{position:relative;display:grid;place-items:center;min-width:38px;padding:7px 10px}
.metric-segments button:first-child{border-radius:5px 0 0 5px}
.metric-segments button:last-child{border-radius:0 5px 5px 0;border-left:1px solid #83916f}
.metric-segments svg,.quality-dropdown summary svg{width:19px;height:19px;flex:none}
.quality-dropdown summary{display:flex;align-items:center;justify-content:center;gap:5px;min-height:34px;border-color:#b3bba5;background:#f5f6f0;color:var(--green);border-radius:6px;position:relative}
.quality-dropdown summary::-webkit-details-marker{display:none}
[data-tooltip]:after{position:absolute;top:calc(100% + 7px);left:50%;transform:translateX(-50%);z-index:40;display:none;width:max-content;max-width:220px;padding:7px 9px;border:1px solid var(--line);border-radius:4px;background:var(--paper);color:var(--ink);font:11px/1.5 var(--sans);white-space:normal;pointer-events:none;content:attr(data-tooltip)}
[data-tooltip]:hover:after,[data-tooltip]:focus-visible:after{display:block}
.quality-dropdown summary:after{position:static;transform:none;display:inline;width:auto;padding:0;border:0;background:none;content:'▾';font-size:10px}
.quality-dropdown summary:before{content:attr(data-tooltip);position:absolute;top:calc(100% + 7px);right:0;z-index:40;display:none;width:max-content;padding:7px 9px;border:1px solid var(--line);border-radius:4px;background:var(--paper);color:var(--ink);font:11px/1.5 var(--sans);pointer-events:none}
.quality-dropdown:not([open]) summary:hover:before,.quality-dropdown:not([open]) summary:focus-visible:before{display:block}
.view-switch button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:600px){.lower-grid>.panel>.panel-head{min-height:0}.conviction-header-actions{gap:28px}.metric-segments button,.value-header-actions .quality-dropdown summary{min-height:40px}.value-panel .panel-head h2{flex-basis:100%}}
