.statistic-with-help{display:grid;grid-template-columns:minmax(0,1fr) 22px;align-items:center;gap:6px;min-width:0}
.research-controls .statistic-with-help>label{display:grid;grid-template-columns:60px minmax(0,1fr);align-items:center;gap:6px;font-size:12px;min-width:0;white-space:nowrap}
.method-help>button{display:grid;place-items:center;width:22px;height:22px;padding:0;border:1px solid #b8c9c2;border-radius:50%;background:#f2f7f4;color:#315d4c;font-size:13px;cursor:help}
.method-help>button:focus-visible{outline:2px solid #315d4c;outline-offset:2px}
.method-tooltip{position:fixed;z-index:100;width:340px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow:auto;padding:14px;border:1px solid #cfded5;border-radius:8px;background:#fff;box-shadow:0 6px 28px #163b2829;color:var(--ink);font-size:12px;line-height:1.7;white-space:normal}
.method-tooltip[hidden]{display:none}.method-tooltip p{margin:8px 0}
.research-page .region-child{padding-left:12px}
@media(max-width:760px),(pointer:coarse){.statistic-with-help{grid-template-columns:minmax(0,1fr) 36px}.method-help>button{width:36px;height:44px;border-radius:8px;font-size:16px}}
.research-page .research-sidebar .sample-heading{display:flex;align-items:center;gap:4px;min-height:32px;list-style:none}
.sample-heading::-webkit-details-marker{display:none}.sample-heading-title{display:flex;align-items:center;gap:3px;white-space:nowrap;font-size:13px}
.sample-heading-title:before{content:none}
.research-page .sample-heading:after{display:none}
.sample-heading-actions{display:flex;align-items:center;gap:4px;margin-left:auto}
.sample-heading-actions button{border:1px solid #dce5df;border-radius:5px;background:#f8faf9;color:#365e4c;padding:4px 6px;font-size:11px;line-height:1.5;white-space:nowrap;cursor:pointer}
.sample-heading-actions button:hover{background:#eaf2ee}.sample-heading-actions button:focus-visible{outline:2px solid #315d4c;outline-offset:2px}
.sample-heading-actions #filter-count:not(:empty){margin-left:3px}
.query-help-dialog{width:440px;max-width:calc(100vw - 24px)}.query-help-dialog .query-syntax{padding:0 16px 16px;font-size:13px;line-height:1.9}
@media(pointer:coarse){.sample-heading-actions button{min-height:44px;padding-inline:8px}}

#chart-order-label[hidden]{display:none!important}

/* Shared disclosure markers match the statistics heading's solid triangle. */
.research-sidebar .control-section>summary{display:flex;align-items:center;gap:6px;list-style:none;color:#365e4c}
.research-sidebar .control-section>summary::-webkit-details-marker{display:none}
.research-sidebar .control-section>summary::before{content:'';width:9px;height:6px;flex:none;background:currentColor;clip-path:polygon(0 0,100% 0,50% 100%);transform:rotate(-90deg)}
.research-sidebar .control-section[open]>summary::before{transform:none}
.research-sidebar .sample-heading-title{font-size:inherit;color:inherit}

/* Each filter dimension starts its own row in the shared dialog. */
@media(min-width:761px){
 #filter-dialog .multi-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
 #filter-dialog .multi-picker[data-filter-key="provinces"]{grid-column:1}
}

.chart-type-control{display:grid;grid-template-columns:60px minmax(0,1fr);align-items:center;gap:6px;width:100%;font-size:12px;color:var(--muted)}.chart-type-switch{display:flex;gap:2px;padding:2px;height:34px;box-sizing:border-box;min-width:0;border:1px solid #dce5df;border-radius:8px;background:#f1f5f2}.chart-type-switch button{flex:1;min-width:0;padding:3px 2px;border:0;border-radius:5px;background:transparent;color:#365e4c;font:inherit;cursor:pointer}.chart-type-switch button[aria-checked="true"]{background:#365e4c;color:white;box-shadow:0 1px 3px #365e4c22}.chart-type-switch button:disabled{color:#a5aaa7;cursor:not-allowed;background:transparent;box-shadow:none}.chart-type-switch button:focus-visible{outline:2px solid #365e4c;outline-offset:2px}#chart-type-note{grid-column:2;margin:0;font-size:10px;line-height:1.5;color:#758379}.research-sidebar-footer{display:grid;gap:10px}.annual-bar-track{border-left:1px solid #b6c8bd}.year-dot.year-bar{top:var(--bar-top);height:4px;transform:none;border:0;border-radius:1px;box-shadow:none;min-width:2px}.heat-scatter .bar-fill{height:8px;top:50%;transform:translateY(-50%);border-radius:50%}

.research-sidebar .statistics-heading:after{display:none}.statistics-heading .compact-export{margin-left:auto;display:inline-flex;align-items:center;gap:4px;padding:4px 7px;border:1px solid #dce5df;border-radius:5px;background:#f8faf9;color:#365e4c;font-size:11px;line-height:1.5;cursor:pointer;white-space:nowrap}.compact-export svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.compact-export:disabled{opacity:.45;cursor:not-allowed}.compact-export:hover:enabled{background:#e7f0ea}.compact-export:focus-visible{outline:2px solid #365e4c;outline-offset:2px}.compact-statistics+.chart-type-control{margin-top:8px}#chart-type-note{font-size:10px}

#chart-type-note:empty{display:none}@media(max-width:760px),(pointer:coarse){.chart-type-switch{height:44px}}

.chart-order-controls{display:flex;align-items:center;gap:4px;min-width:0}.research-controls .compact-statistics .chart-order-controls select{width:0;flex:1;min-width:0}.chart-order-controls button{flex:none;height:34px;padding:0 6px;border:1px solid #dce5df;border-radius:5px;background:#f1f5f2;color:#365e4c;font:inherit;white-space:nowrap;cursor:pointer}.chart-order-controls button[aria-pressed="true"]{background:#365e4c;color:#fff}.chart-order-controls button:focus-visible{outline:2px solid #365e4c;outline-offset:2px}@media(max-width:760px),(pointer:coarse){.chart-order-controls button{height:44px}}

/* The full shared toolbar is a card, with a separate restore control. */
.research-sidebar.table-card{top:calc(var(--nav-height) + 14px);left:16px;bottom:14px;border:1px solid #e0e5e9;border-radius:9px}
.controls-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px;border-bottom:1px solid var(--line);flex-shrink:0}
.controls-card-head h2{margin:0;font-size:15px;font-weight:600}
.controls-card-head .text-button{font-size:12px}
body.research-page:not(.components-page) main{margin-left:calc(var(--controls-width) + 16px)}
body.research-page.controls-collapsed:not(.components-page) main{margin-left:60px}
.controls-collapsed .research-sidebar{display:none}
.controls-reopen{position:fixed;top:calc(var(--nav-height) + 14px);left:16px;width:44px;justify-content:center;padding:10px 6px;white-space:normal;text-align:center;font-size:12px;line-height:1.6;z-index:10}
.controls-reopen[hidden]{display:none}
.components-page .controls-reopen{position:static;width:auto;margin:12px}
@media(max-width:760px){
 .research-sidebar.table-card{width:calc(100% - 24px);margin:12px 12px 0}
 body.research-page:not(.components-page) main,body.research-page.controls-collapsed:not(.components-page) main{margin-left:0}
 .controls-reopen{position:static;width:auto;margin:12px 12px 0;padding:8px 12px;white-space:nowrap}
 .controls-card-head .text-button{min-height:44px;padding-inline:6px}
 .components-page #filter-statistics-host .research-sidebar{margin:0}
}
