/* Shared filter controls, based on neutral auction trade. */
body main :is(#strategy-form,#compare-filters,.module-settings,.resale-settings-form,#settings-form) :is(label,.pc-cash-group>span,.auction-category-filter>span){font-size:13px;font-weight:400;color:#a9bdd0;line-height:1.5}
body main #strategy-form :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select),body main #compare-filters :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select),body main :is(.module-settings,.resale-settings-form,#settings-form) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){box-sizing:border-box;height:38px;min-height:38px;margin:0;padding:7px 10px;border:1px solid #40566c;border-radius:5px;background:#0d1724;color:#e1e9f3;color-scheme:dark;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5}
body main #strategy-form :is(#discount-category,#category-selection),body main #compare-filters #category-selection{box-sizing:border-box;min-height:38px;padding:7px 10px;border:1px solid #40566c;border-radius:5px;background:#0d1724;color:#e1e9f3;font-size:14px;font-weight:400;line-height:1.5}
body main #strategy-form .controls>label,body main #strategy-form .auction-category-picker{font-size:13px;font-weight:400;color:#a9bdd0;gap:8px}
body main :is(#strategy-form,#compare-filters) input[type=checkbox]{width:16px;height:16px;min-height:0;flex:none;margin:0;padding:0;accent-color:#ad96eb}
body main :is(#strategy-form,#compare-filters) :is(input,select,summary,button):focus-visible{outline:2px solid #ad96eb;outline-offset:2px}
body main #strategy-form :is(.cash-fields,.money-inputs){gap:5px;align-items:center}
body main #strategy-form .cash-fields input,body main #compare-filters .money-inputs input{width:60px!important;flex:none}
body main #strategy-form .cash-fields>label{flex:none;gap:5px}
body main :is(.cash-fields,.money-inputs) svg.coin-icon{display:inline-block;width:16px;height:16px;flex:none;vertical-align:middle}
body main :is(.nc-money,.money) svg.coin-icon{display:inline-block;width:14px;height:14px;flex:none;vertical-align:middle}
@media(max-width:700px){body main #strategy-form .cash-fields input,body main #compare-filters .money-inputs input{width:47px!important}}

body main #content #strategy-form :is(label,.auction-category-picker,.pc-cash-group>span){font-size:13px;font-weight:400;color:#a9bdd0}

/* Fixed geometry shared by all three gold/silver/copper input groups. */
body main :is(#content #strategy-form,#compare-filters) .gugu-currency{--coin-input-width:60px;display:grid;grid-template-columns:repeat(3,calc(var(--coin-input-width) + 21px));gap:5px;width:max-content;max-width:100%;align-items:center;justify-content:start}
body main :is(#content #strategy-form,#compare-filters) .gugu-currency>:is(label,.currency-unit){display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:5px;margin:0;padding:0;min-width:0;width:auto;flex:none}
body main :is(#content #strategy-form,#compare-filters) .gugu-currency input{width:var(--coin-input-width)!important;min-width:var(--coin-input-width);max-width:var(--coin-input-width);height:38px;flex:0 0 var(--coin-input-width)}
body main :is(#content #strategy-form,#compare-filters) .gugu-currency svg.coin-icon{width:16px;height:16px;min-width:16px;margin:0;flex:0 0 16px}
@media(max-width:700px){body main :is(#content #strategy-form,#compare-filters) .gugu-currency{--coin-input-width:47px}}

body main :is(#content #strategy-form,#compare-filters) .gugu-currency{min-width:max-content;max-width:none}
body main #compare-filters .filter-row>label:has(.gugu-currency){min-width:max-content}

/* Keep short numeric text visible without reserving space for spinner arrows. */
body main :is(#content #strategy-form,#compare-filters) .gugu-currency input,body main #content #strategy-form .profession input[type=number]{appearance:textfield;-moz-appearance:textfield}
body main :is(#content #strategy-form,#compare-filters) .gugu-currency input::-webkit-inner-spin-button,body main :is(#content #strategy-form,#compare-filters) .gugu-currency input::-webkit-outer-spin-button,body main #content #strategy-form .profession input::-webkit-inner-spin-button,body main #content #strategy-form .profession input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
body main #content #strategy-form .pc-cash-group{min-width:max-content;flex:none}
body main #content #strategy-form .pc-depth select{width:108px;min-width:108px;padding:7px 26px 7px 10px;line-height:normal}
body main #content #strategy-form .pc-prof .profession-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}
body main #content #strategy-form .pc-prof .profession{height:auto;min-height:52px;grid-template-columns:16px 24px minmax(0,1fr) 52px;gap:6px;padding:6px;align-items:center}
body main #content #strategy-form .pc-prof .profession input[type=number]{width:52px!important;min-width:52px;max-width:52px;padding:7px 5px;margin:0}
#content .pc-product{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
#content .pc-product>.item{min-width:0;overflow-wrap:anywhere}
#content .pc-product>.pc-exclude-product{margin:0;flex:none;height:auto;line-height:18px;align-self:center}
#content .pc-product>small{flex-basis:100%;margin:0}
body main #content #strategy-form.resale-investment{padding:16px}
body main #content #strategy-form.resale-investment>.controls,body main #content #strategy-form.resale-investment .mobile-filters>.controls{display:flex;flex-wrap:wrap;gap:12px 16px;align-items:end}
body main #content #strategy-form.resale-investment .controls>label{flex:0 0 150px;min-width:0;max-width:100%;gap:6px}
body main #content #strategy-form.resale-investment .controls>label:has(#discount-query){flex:1 1 240px;max-width:320px}
body main #content #strategy-form.resale-investment .auction-category-picker{flex:1 1 210px;max-width:260px;min-width:180px}
body main #content #strategy-form.resale-investment .controls>label:has(#days){flex:0 0 120px}
body main #content #strategy-form.resale-investment .controls>label:has(#lowest-quantity){flex:0 0 175px}
body main #content #strategy-form.resale-investment .controls>.resale-currency-label{flex:0 0 auto;min-width:max-content;grid-column:auto}
body main #content #strategy-form.resale-investment .resale-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:16px;padding-top:12px;border-top:1px solid #2b3e50}
body main #content #strategy-form.resale-investment .resale-exclusions{margin:0;padding:0;border:0;gap:16px}
body main #content #strategy-form.resale-investment .resale-submit{margin:0}
@media(max-width:700px){body main #content #strategy-form .pc-prof .profession-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}body main #content #strategy-form.resale-investment .controls>label{flex:1 1 135px}body main #content #strategy-form.resale-investment .controls>.resale-currency-label{flex:0 0 auto}}

/* Profession controls size to their contents, rather than stretching names. */
body main #content #strategy-form .pc-prof .profession-grid{display:flex;flex-wrap:wrap;gap:6px}
body main #content #strategy-form .pc-prof .profession{display:flex;flex:0 0 auto;width:auto;min-width:0;min-height:44px;height:auto;gap:4px;padding:4px 5px;white-space:nowrap}
body main #content #strategy-form .pc-prof .profession .preview-profession-icon{width:20px;height:20px;flex:none}
body main #content #strategy-form .pc-prof .profession input[type=number]{width:44px!important;min-width:44px;max-width:44px;height:34px;min-height:34px;padding:5px 4px;margin:0 0 0 2px;flex:0 0 44px}

body main .product-exclusions{position:relative;flex:none;margin:0 0 0 auto;min-width:0}
body main .product-exclusions>summary{padding:10px 14px;border:1px solid #40566c;border-radius:5px;cursor:pointer;white-space:nowrap;color:#aac8de}
body main .product-exclusions .pc-exclusion-list{position:absolute;right:0;top:100%;z-index:30;background:#142131;padding:12px;border:1px solid #40566c;border-radius:5px;min-width:260px;max-width:calc(100vw - 64px);max-height:300px;overflow:auto}
body main .product-exclusions .pc-exclusion-list>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:8px}
body main :is(.pc-exclude-product,.product-exclusions .pc-exclusion-list button){display:inline-flex;align-items:center;margin:0;padding:3px 8px;min-height:0;border:1px solid #405e70;border-radius:4px;background:transparent;color:#7abdd1;font-size:12px;line-height:18px;font-weight:400;white-space:nowrap;cursor:pointer}
body main :is(.pc-exclude-product,.product-exclusions .pc-exclusion-list button):hover{color:#9edbeb;background:#19303c;border-color:#7abdd1}
.excluded-item-line{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.comparison-scroll td:first-child .comparison-item{display:inline-flex;vertical-align:middle;margin-right:6px}
body main #content #strategy-form.resale-investment .resale-footer{justify-content:flex-start}
@media(max-width:700px){.compare-filters>.filter-actions{flex-wrap:wrap}.compare-filters #comparison-status{flex:1;min-width:160px}}

/* Keep resale captions and controls on consistent rows. */
body main #content #strategy-form.resale-investment>.controls,
body main #content #strategy-form.resale-investment .mobile-filters>.controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 20px;align-items:end}
body main #content #strategy-form.resale-investment .controls>label,
body main #content #strategy-form.resale-investment .controls>.auction-category-picker{min-width:0;max-width:none;width:100%;margin:0;gap:8px;align-self:end}
body main #content #strategy-form.resale-investment .controls input,
body main #content #strategy-form.resale-investment #discount-category{height:44px;box-sizing:border-box;margin:0;padding:10px 12px;border-radius:6px}
body main #content #strategy-form.resale-investment #discount-category{width:100%;font-size:15px;font-weight:400}
body main #content #strategy-form.resale-investment .controls>.resale-currency-label{min-width:0}
body main #content #strategy-form.resale-investment .cash-fields{display:flex;align-items:center;gap:6px}
body main #content #strategy-form.resale-investment .cash-fields input{min-width:0;width:100%}
body main #content #strategy-form.resale-investment .cash-fields label{min-width:0;flex:1;display:flex;align-items:center;gap:5px}
@media(max-width:900px){body main #content #strategy-form.resale-investment>.controls,body main #content #strategy-form.resale-investment .mobile-filters>.controls{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){body main #content #strategy-form.resale-investment>.controls,body main #content #strategy-form.resale-investment .mobile-filters>.controls{grid-template-columns:minmax(0,1fr)}}

/* Desktop resale filters occupy two balanced rows. */
@media(min-width:1001px){
 body main #content #strategy-form.resale-investment>.controls,
 body main #content #strategy-form.resale-investment .mobile-filters>.controls{grid-template-columns:repeat(12,minmax(0,1fr))}
 body main #content #strategy-form.resale-investment .controls>label{grid-column:span 2}
 body main #content #strategy-form.resale-investment .controls>label:has(#discount-query),
 body main #content #strategy-form.resale-investment .controls>.auction-category-picker{grid-column:span 3}
 body main #content #strategy-form.resale-investment .controls>.resale-currency-label{grid-column:span 4}
 body main #content #strategy-form.resale-investment #days,
 body main #content #strategy-form.resale-investment #resale-price-basis{height:44px}
}

/* Keep related money controls together and exclusion actions on their own line. */
.resale-funds-group{display:contents}
body main .excluded-item-line{flex-direction:column;align-items:flex-start;gap:6px}
@media(min-width:1001px){
 body main #content #strategy-form.resale-investment .controls>.resale-funds-group{display:flex;grid-column:span 8;align-items:end;justify-content:flex-start;gap:24px}
 body main #content #strategy-form.resale-investment .resale-funds-group>.resale-currency-label{flex:0 0 auto;width:auto;min-width:0;margin:0}
}
body main #content #result .excluded-item-line>.pc-exclude-product{margin:0;align-self:flex-start}
/* Two-row desktop filters; captions and all controls share one baseline. */
@media(min-width:1100px){
 body main #content #strategy-form.resale-investment>.controls,
 body main #content #strategy-form.resale-investment .mobile-filters>.controls{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;align-items:end}
 body main #content #strategy-form.resale-investment .controls>.resale-funds-group{display:contents}
 body main #content #strategy-form.resale-investment .resale-funds-group>.resale-currency-label{grid-column:span 3;width:auto}
 body main #content #strategy-form.resale-investment .controls>label{grid-column:span 2;min-width:0;margin:0;display:flex;flex-direction:column;gap:8px}
 body main #content #strategy-form.resale-investment .controls>label:has(#discount-query),body main #content #strategy-form.resale-investment .controls>.auction-category-picker{grid-column:span 3;min-width:0}
 body main #content #strategy-form.resale-investment .cash-fields{gap:5px;width:100%}
 body main #content #strategy-form.resale-investment .cash-fields input{width:100%!important;min-width:0}
 body main #content #strategy-form.resale-investment .cash-fields>label{margin:0;min-width:0;flex:1}
 body main #compare-filters{display:grid;grid-template-columns:repeat(24,minmax(0,1fr));gap:16px;align-items:end}
 body main #compare-filters>.filter-row{display:contents}
 body main #compare-filters .filter-row>label,body main #compare-filters .auction-category-filter{grid-column:span 4;min-width:0;max-width:none;margin:0}
 body main #compare-filters .search-filter,body main #compare-filters .auction-category-filter,body main #compare-filters label:has(#profit-gold){grid-column:span 6;grid-row:1}
 body main #compare-filters label[data-turnover-selector],body main #compare-filters label:has(#price-basis){grid-column:span 3;grid-row:1}
 body main #compare-filters .filter-actions{grid-column:1/-1}
 body main #compare-filters input[type=number],body main #compare-filters select{width:100%}
 body main #compare-filters .money-inputs{width:100%}
 body main #compare-filters .currency-unit{flex:1;min-width:0}
 body main #compare-filters .money-inputs input{width:100%!important;min-width:0}
 body main #compare-filters #competition-filter:not([hidden]){grid-row:1;grid-column:span 3}
 body main #compare-filters:has(#competition-filter:not([hidden])) .search-filter{grid-column:span 3}
}
body main #content #strategy-form.resale-investment :is(input:not([type=checkbox]):not([type=hidden]),select),body main #compare-filters :is(input:not([type=checkbox]),select),body main #content #strategy-form.resale-investment #discount-category,body main #compare-filters #category-selection{height:40px!important;min-height:40px;box-sizing:border-box;margin:0}
body main #content #strategy-form.resale-investment .controls>label>span:first-child,body main #compare-filters .filter-row>label>span:first-child{min-height:20px;line-height:20px}
body main #content #strategy-form.resale-investment [data-turnover-selector]{line-height:20px;gap:8px}
body main #compare-filters [data-turnover-selector]{line-height:20px;gap:8px}
@media(min-width:1100px){
 body main #compare-filters .filter-row>label.search-filter{grid-column:span 6}
 body main #compare-filters:has(#competition-filter:not([hidden])) .filter-row>label.search-filter{grid-column:span 3}
 body main #content #strategy-form.resale-investment .controls>label>select{width:100%!important}
}
