#results .filters {flex-wrap:wrap;justify-content:flex-start}
#results .filters label {flex:0 1 200px}
#results .filters label:first-child {flex:1 1 235px}
.category-controls {display:flex;gap:12px;align-items:end;padding:14px 18px;border-bottom:1px solid var(--line)}
.category-controls>label:first-child {flex:1}
.category-controls summary {cursor:pointer;color:var(--green);font-weight:600}
#category-filters {flex:2}
#category-filters summary,.category-controls .jump-period {display:none}
#category-filters .filters {display:flex;flex-wrap:nowrap;background:transparent;padding:0;border:0}
#category-filters .filters label {flex:1;min-width:0}
#results .scroll {max-height:70vh;max-height:70svh;overflow:auto}
#results #head th {position:sticky;top:0;z-index:2;background:#f6f8f5}
#results #head th:first-child {z-index:3}
#results .held-return {font-size:11px;font-weight:600}
@media(max-width:650px){
  .category-controls {display:grid;grid-template-columns:minmax(0,1fr) auto;padding:10px 12px;gap:6px 10px}
  .category-controls .jump-period {display:grid}
  #category-filters {grid-column:1/-1}
  #category-filters summary {display:list-item;padding:5px 0}
  #category-filters .filters {flex-wrap:wrap;padding-top:6px}
  #category-filters .filters label {flex:1 1 100px}
}
#results table {min-width:800px;font-size:12px}
#results td,#results th {padding:10px 12px}
#results thead small,#results td small {display:block;font-size:11px;font-weight:400;color:var(--muted)}
#head th:has(button) {padding:0}
#head button {display:block;width:100%;min-height:44px;padding:8px 10px;text-align:right;font:inherit;color:inherit;background:transparent;border:0;border-radius:0}
#head button:hover,#head th[aria-sort] button {background:#e3f1e7;color:var(--green)}
#head button:focus-visible {outline-offset:-3px}
#results tbody th {font-size:inherit;color:var(--ink);font-weight:600;background:white}
#results th:first-child {position:sticky;left:0;z-index:1;white-space:normal;width:29%;min-width:180px;max-width:280px;box-shadow:1px 0 var(--line)}
#results .level-0 th {background:#f4f8f3}
.group-name {display:flex;align-items:baseline;gap:5px}
.level-1 .group-name {padding-left:12px}
.level-2 .group-name {padding-left:32px}
.group-name button {font:inherit;display:flex;align-items:baseline;gap:5px;background:transparent;border:0;text-align:left;padding:3px}
.group-name button::before {content:'▸';font-size:12px;color:var(--green)}
.group-name button[aria-expanded=true]::before {content:'▾'}
.group-name a {font-size:11px;white-space:nowrap;font-weight:500}
#results {--heat-red:#eaa29b;--heat-green:#83c6a0}
.heat-key {display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;padding:10px 16px;color:var(--muted);font-size:12px}
.heat-scale {display:flex;justify-content:space-between;min-width:122px;border-radius:3px;background:linear-gradient(to right,var(--heat-red),white 50%,var(--heat-green));padding:3px 7px;color:var(--ink);font-weight:650}
#results td {background:white}
#results td.gain {--tone:var(--heat-green);color:#133f2b}
#results td.loss {--tone:var(--heat-red);color:#592321}
#results td:is(.gain,.loss) {background-color:color-mix(in srgb,var(--tone) var(--strength),white)}
#results td:is(.gain,.loss) small {color:inherit}
#results td.no-return {background:#f1f3f2;color:var(--muted)}
#method {margin-top:20px;font-size:14px;color:var(--muted)}
#method summary {cursor:pointer;color:var(--ink);font-weight:650}
#method p {margin-top:8px;max-width:88ch}
@media(max-width:650px){#results th:first-child{width:160px;min-width:160px}#results .filters label{flex:1 1 138px}#results td,#results th{padding:8px}.group-name{flex-wrap:wrap}}
