/* R6 product/keyword workspace. The existing sr-* detail chart keeps its geometry. */
.sr-page .sr-summary-bar { display:flex; flex-direction:row; flex-wrap:wrap; gap:8px 18px; margin:0; padding:8px 12px; }
.sr-page .sr-summary-filter { display:flex; align-items:center; gap:10px; height:32px; border:0; border-radius:6px; padding:0 10px; background:transparent; color:var(--ui-text-muted); cursor:pointer; font-size:12px; }
.sr-page .sr-summary-filter strong { color:var(--ui-text-strong); font-size:16px; font-variant-numeric:tabular-nums; }
.sr-page .sr-summary-filter[aria-pressed=true] { background:var(--ui-accent-soft-bg); color:var(--ui-info); }
.sr-page .sr-summary-filter:disabled { cursor:default; }
.sr-page .sr-summary-filter:focus-visible { outline:2px solid var(--ui-focus); outline-offset:2px; }
.sr-product-list { display:flex; flex-direction:column; min-width:0; }
.sr-product-row { display:grid; grid-template-columns:minmax(260px,1fr) minmax(140px,.6fr) minmax(320px,2.4fr) auto; gap:20px; align-items:start; padding:18px; border-bottom:1px solid var(--ui-divider); font-size:12px; }
.sr-product-row:last-child { border-bottom:0; }
.sr-product-row.is-selected { background:var(--ui-info-soft-bg); }
.sr-product-info { display:flex; align-items:flex-start; gap:12px; min-width:0; }
.sr-product-copy { flex:1; min-width:0; }
.sr-product-thumbnail { position:relative; display:grid; place-items:center; flex:0 0 64px; width:64px; height:64px; overflow:hidden; border:1px solid var(--ui-divider); border-radius:6px; background:var(--ui-surface-raised); }
.sr-product-thumbnail img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:var(--ui-surface-raised); }
.sr-product-thumbnail img[hidden] { display:none; }
.sr-thumbnail-empty { color:var(--ui-text-muted); font-size:11px; text-align:center; line-height:1.5; }
.sr-product-select { display:flex; align-items:flex-start; gap:8px; color:var(--ui-text-strong); font-size:14px; line-height:1.5; font-weight:600; }
.sr-product-select input { flex-shrink:0; margin-top:4px; }
.sr-product-identity { margin:8px 0 0 24px; color:var(--ui-text-muted); overflow-wrap:anywhere; line-height:1.6; }
.sr-product-identity a { color:var(--ui-info); }
.sr-product-meta { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin:8px 0 0 24px; color:var(--ui-text-muted); }
.sr-product-meta label { display:flex; align-items:center; gap:4px; }
.sr-product-actions { grid-column:4; grid-row:1; justify-self:end; display:flex; flex-direction:column; gap:6px; align-items:stretch; }
.sr-registration-delete { min-height:32px; min-width:48px; padding:0 10px; border:1px solid var(--ui-control-border); border-radius:6px; background:transparent; color:var(--ui-danger); font-size:12px; cursor:pointer; }
.sr-registration-delete:hover { background:var(--ui-danger-soft-bg); }
.sr-registration-delete:focus-visible { outline:2px solid var(--ui-focus); outline-offset:2px; }
.sr-registration-delete:disabled { opacity:.5; cursor:not-allowed; }
.sr-product-row input { accent-color:var(--ui-accent); }
.sr-product-row input:focus-visible { outline:2px solid var(--ui-focus); outline-offset:2px; }
.sr-product-trend { min-width:0; }
.sr-mini-head { display:flex; align-items:center; justify-content:space-between; gap:6px; min-width:0; }
.sr-mini-label { display:block; min-width:0; color:var(--ui-text-muted); overflow-wrap:anywhere; line-height:1.5; }
.sr-trend-detail { flex-shrink:0; display:inline-flex; align-items:center; gap:4px; min-height:28px; padding:0 8px; border:1px solid var(--ui-control-border); border-radius:6px; background:var(--ui-control-bg); color:var(--ui-text); font-size:12px; cursor:pointer; }
.sr-trend-detail:hover { background:var(--ui-control-bg-hover); }
.sr-trend-detail:focus-visible { outline:2px solid var(--ui-focus); outline-offset:2px; }
.sr-trend-detail i { font-size:10px; }
.sr-mini-stats { display:flex; flex-wrap:wrap; justify-content:space-between; gap:2px 8px; width:100%; max-width:180px; margin-top:2px; color:var(--ui-text-muted); font-size:11px; font-variant-numeric:tabular-nums; }
.sr-mini-stats b { color:var(--ui-text); font-weight:600; }
.sr-mini-chart { display:grid; place-items:center; min-height:56px; }
.sr-mini-chart svg { width:100%; max-width:180px; height:56px; overflow:visible; }
.sr-mini-chart polyline { fill:none; stroke:var(--ui-info); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.sr-mini-chart circle { fill:var(--ui-info); }
.sr-mini-chart rect { fill:var(--ui-warning); }
.sr-mini-chart path.is-supersaving { fill:var(--ui-success); }
.sr-mini-chart polyline.is-catalog { stroke:var(--ui-warning); stroke-dasharray:4 3; }
.sr-mini-empty { color:var(--ui-text-muted); text-align:center; line-height:1.5; }
.sr-product-keywords { min-width:0; }
.sr-product-row [hidden] { display:none!important; }
.sr-keyword-tools { display:flex; gap:12px; align-items:center; margin-top:8px; }
.sr-keyword-more { border:0; background:transparent; color:var(--ui-info); font-size:12px; min-height:32px; cursor:pointer; padding:0 4px; }
.sr-keyword-more:focus-visible { outline:2px solid var(--ui-focus); outline-offset:2px; }
.sr-keyword-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(165px,1fr)); gap:8px; min-width:0; align-items:stretch; }
.sr-keyword-entry { display:flex; min-width:0; border:1px solid var(--ui-control-border); border-radius:6px; background:var(--ui-control-bg); }
.sr-keyword-chip { display:flex; flex-direction:column; gap:4px; flex:1; min-width:0; border:0; border-radius:5px; padding:9px 8px; text-align:left; color:var(--ui-text); background:transparent; font-size:12px; cursor:pointer; }
.sr-keyword-chip[aria-pressed=true] { background:var(--ui-info-soft-bg); }
.sr-keyword-chip:hover,.sr-keyword-add:hover { background:var(--ui-control-bg-hover); }
.sr-keyword-top { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; min-width:0; }
.sr-keyword-top strong { overflow-wrap:anywhere; font-weight:500; }
.sr-keyword-top b { flex-shrink:0; font-size:14px; font-variant-numeric:tabular-nums; }
.sr-keyword-location { color:var(--ui-text-muted); font-size:12px; }
.sr-keyword-bottom { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-height:18px; }
.sr-rank-change { font-size:12px; color:var(--ui-text-muted); font-variant-numeric:tabular-nums; }
.sr-rank-change:is(.is-up,.is-entered) { color:var(--ui-danger); }
.sr-rank-change:is(.is-down,.is-exited) { color:var(--ui-info); }
.sr-catalog-badge { color:var(--ui-info); background:var(--ui-info-soft-bg); padding:1px 5px; border-radius:4px; font-size:12px; }
.sr-rank-mark { display:inline-block; margin-right:4px; padding:0 5px; border-radius:4px; font-size:11px; font-weight:600; line-height:18px; vertical-align:1px; }
.sr-rank-mark.is-super { color:var(--ui-success); background:var(--ui-success-soft-bg); }
.sr-rank-mark.is-catalog { color:var(--ui-info); background:var(--ui-info-soft-bg); }
.sr-keyword-pills { display:flex; flex-wrap:nowrap; gap:4px; min-width:0; overflow:hidden; }
.sr-pill { flex-shrink:0; padding:0 6px; border-radius:999px; font-size:11px; line-height:18px; white-space:nowrap; border:1px solid transparent; }
.sr-pill.is-super { color:var(--ui-success); background:var(--ui-success-soft-bg); }
.sr-pill.is-ad { color:var(--ui-warning); background:var(--ui-warning-soft-bg); }
.sr-pill.is-catalog { color:var(--ui-info); background:var(--ui-info-soft-bg); }
.sr-pill.is-more { color:var(--ui-text-muted); border-color:var(--ui-divider); }
.sr-keyword-side { display:flex; flex-direction:column; align-items:center; justify-content:space-between; flex-shrink:0; padding:2px 0; }
.sr-keyword-delete { flex-shrink:0; border:0; background:transparent; color:var(--ui-text-muted); min-width:28px; min-height:28px; border-radius:4px; cursor:pointer; }
.sr-keyword-delete:hover { color:var(--ui-danger); background:var(--ui-danger-soft-bg); }
.sr-keyword-delete:focus-visible { outline:2px solid var(--ui-focus); outline-offset:2px; }
.sr-keyword-favorite { flex-shrink:0; border:0; background:transparent; color:var(--ui-text-muted); min-width:28px; min-height:32px; cursor:pointer; }
.sr-keyword-favorite[aria-pressed=true] { color:var(--ui-warning); }
.sr-keyword-add { display:flex; justify-content:center; align-items:center; gap:6px; min-height:32px; padding:0 10px; border:1px dashed var(--ui-control-border); border-radius:6px; background:transparent; color:var(--ui-text-muted); font-size:12px; cursor:pointer; }
.sr-keyword-chip:focus-visible,.sr-keyword-favorite:focus-visible,.sr-keyword-add:focus-visible { outline:2px solid var(--ui-focus); outline-offset:2px; }
.sr-page .sr-chart-grid[data-catalog=false] { grid-template-columns:minmax(0,1fr); }
.sr-page .sr-chart-grid[data-catalog=false] .sr-catalog-chart { display:none; }
.sr-page .sr-catalog-state { padding:0 20px 8px; }
@media(min-width:1900px) { .sr-keyword-grid { grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); } }
@media(max-width:1100px) { .sr-product-row { grid-template-columns:minmax(0,1fr) 170px auto; gap:14px; } .sr-product-actions { grid-column:3; } .sr-product-keywords { grid-column:1/-1; } }
@media(max-width:520px) { .sr-product-row { grid-template-columns:minmax(0,1fr) auto; padding:14px; } .sr-product-actions { grid-column:2; } .sr-product-trend { grid-column:1/-1; display:flex; align-items:center; gap:12px; } .sr-mini-label { flex:1; } .sr-mini-chart { flex:1; } .sr-keyword-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .sr-page .sr-summary-bar { gap:4px; justify-content:space-between; } .sr-summary-filter { flex:0 1 calc(50% - 4px); } }

.sr-select-all{display:inline-flex;align-items:center;gap:7px;min-height:32px;cursor:pointer;font-size:12px;white-space:nowrap}.sr-select-all[hidden]{display:none}.sr-select-all input{width:16px;height:16px;accent-color:var(--ui-accent)}.sr-product-row{cursor:pointer}

/* Profile choice is a comparison of execution settings, with optional product detail. */
.sr-collection-profiles { display:flex; flex-direction:column; gap:20px; }
.sr-collection-group { min-width:0; padding-bottom:20px; border-bottom:1px solid var(--ui-divider); }
.sr-collection-group:last-child { padding-bottom:0; border-bottom:0; }
.sr-collection-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.sr-collection-heading > div { min-width:0; }
.sr-collection-heading h3 { margin:0; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.sr-collection-counts { margin:4px 0 0; color:var(--ui-text); font-size:12px; line-height:1.6; }
.sr-collection-counts span { display:block; color:var(--ui-text-muted); }
.sr-collection-heading > .btn { flex-shrink:0; }
.sr-collection-meta { display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; margin:12px 0; padding:12px; background:var(--ui-surface-sunken); border-radius:6px; font-size:12px; line-height:1.5; }
.sr-collection-meta > div { display:grid; grid-template-columns:64px minmax(0,1fr); gap:8px; }
.sr-collection-meta > div:last-child { grid-column:1/-1; }
.sr-collection-meta dt { color:var(--ui-text-muted); }
.sr-collection-meta dd { margin:0; overflow-wrap:anywhere; }
.sr-collection-details { font-size:12px; line-height:1.6; }
.sr-collection-details summary { cursor:pointer; color:var(--ui-text); min-height:32px; align-content:center; }
.sr-collection-details > ul { list-style:none; padding:0; margin:8px 0 0; max-height:240px; overflow:auto; scrollbar-color:var(--ui-control-border) var(--ui-surface); }
.sr-collection-details > ul > li { padding:10px 0; border-top:1px solid var(--ui-divider); }
.sr-collection-product { display:flex; flex-wrap:wrap; gap:2px 12px; overflow-wrap:anywhere; }
.sr-collection-product > span { color:var(--ui-text-muted); }
.sr-collection-keywords { list-style:none; margin:6px 0 0; padding:0; }
.sr-collection-keywords > li { display:flex; justify-content:space-between; gap:12px; padding:2px 0; overflow-wrap:anywhere; }
.sr-collection-tracking { flex-shrink:0; color:var(--ui-text-muted); }
.sr-collection-details summary:focus-visible { outline:2px solid var(--ui-focus); outline-offset:2px; }
.sr-dialog .sr-field > .btn { align-self:flex-start; }
.sr-dialog .sr-field { min-width:0; }
.sr-dialog .sr-selection-summary { overflow-wrap:anywhere; }
.sr-dialog .sr-form details > .sr-field { margin-top:12px; }
.sr-dialog .sr-form summary { cursor:pointer; min-height:32px; align-content:center; }
#rankToolbar .page-toolbar-search { position:relative; }
#rankToolbar #sr-keyword-filter { flex:1 1 0; width:0; padding-right:6px; font-weight:400; }
#rankToolbar .sr-search-clear { position:static; flex:0 0 30px; width:30px; height:30px; padding:0; border:0; border-radius:4px; background:transparent; color:var(--ui-text-muted); transform:none; }
#rankToolbar .sr-search-clear:hover { background:var(--ui-control-bg-hover); color:var(--ui-text-strong); }
#rankToolbar .sr-search-clear:focus-visible { outline-offset:-2px; }
#rankToolbar .sr-search-clear svg { display:block; flex-shrink:0; }
#sr-product-list[aria-busy=true] { opacity:.65; transition:opacity .12s; }
@media(max-width:520px) {
    .sr-collection-heading { flex-wrap:wrap; }
    .sr-collection-heading > .btn { margin-left:auto; }
    .sr-collection-meta { grid-template-columns:minmax(0,1fr); }
}
@media(prefers-reduced-motion:reduce) {
    #sr-product-list[aria-busy=true] { transition:none; }
    #rankToolbar .fa-spin { animation:none; }
}
.sr-sale-badge { display:inline-flex; align-items:center; padding:2px 6px; border:1px solid var(--ui-divider); border-radius:4px; background:var(--ui-warning-soft-bg); color:var(--ui-warning); font-size:12px; line-height:1.5; }
.sr-sale-badge.is-eligible { background:var(--ui-success-soft-bg); color:var(--ui-success); }

/* Product actions and comparison share existing lines to keep single-keyword rows compact. */
.sr-product-actions .sr-keyword-add{min-height:28px;padding:0 9px;border-style:solid;color:var(--ui-text)}
.sr-keyword-location-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.sr-keyword-location-row .sr-rank-change{flex-shrink:0}
.sr-login-attention-copy{min-width:0;flex:1}
.sr-login-attention-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sr-login-dialog{width:min(1200px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 24px)}
.sr-login-dialog .app-dialog-body{position:relative;padding:16px;display:flex;flex-direction:column;gap:12px;overflow:auto}
.sr-login-state,.sr-login-help{margin:0;font-size:12px;line-height:1.6;color:var(--ui-text-muted)}
.sr-login-state{color:var(--ui-text)}
.sr-login-state.is-error{color:var(--ui-danger)}
.sr-login-screen{height:clamp(200px,60dvh,700px);min-width:0;overflow:hidden;background:var(--ui-bg-muted);border:1px solid var(--ui-divider);border-radius:6px}
.sr-login-keyboard{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;left:16px;bottom:16px;resize:none}
.sr-login-dialog .app-dialog-footer{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:520px){.sr-login-dialog{width:calc(100vw - 16px)}.sr-login-dialog .app-dialog-body{padding:12px}.sr-login-dialog .app-dialog-footer .btn{flex:1 1 auto}}

.sr-keyword-tools:has(>.sr-keyword-more[hidden]){display:none}
@media(max-width:520px){.sr-login-screen{height:clamp(180px,60vw,45dvh)}}

.sr-login-dialog [hidden] { display: none !important; }

/* Long collector labels must fit the mobile summary width. */
.sr-page #sr-execution-profile { min-width:0; max-width:100%; }

/* Collection confirmation keeps the decision above bounded detail lists. */
.sr-confirm { min-width:0; display:flex; flex-direction:column; gap:12px; }
.sr-confirm-sticky { position:sticky; top:0; z-index:1; padding-bottom:8px; background:var(--ui-surface-raised); }
.sr-confirm-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0; padding:12px 0; border:1px solid var(--ui-divider); border-radius:6px; background:var(--ui-surface-sunken); }
.sr-confirm-summary > div { min-width:0; text-align:center; }
.sr-confirm-summary > div + div { border-left:1px solid var(--ui-divider); }
.sr-confirm-summary dt { font-size:12px; color:var(--ui-text-muted); white-space:nowrap; }
.sr-confirm-summary dd { margin:4px 0 0; font-size:22px; line-height:1.4; font-weight:600; font-variant-numeric:tabular-nums; color:var(--ui-text-strong); }
.sr-confirm-summary dd span { margin-left:3px; font-size:12px; font-weight:400; }
.sr-confirm-summary.is-large-scope > div:first-child dd { color:var(--ui-accent); font-weight:700; }
.sr-confirm-collector { margin:10px 0 0; font-size:12px; line-height:1.5; color:var(--ui-text-muted); overflow-wrap:anywhere; }
.sr-confirm-warning { margin:0; padding:10px 12px; border:1px solid var(--ui-warning); border-radius:6px; color:var(--ui-text); background:var(--ui-warning-soft-bg); font-size:12px; line-height:1.6; }
.sr-confirm-warning ul { margin:4px 0 0; padding-left:16px; max-height:140px; overflow:auto; overflow-wrap:anywhere; }
.sr-confirm-products { list-style:none; padding:0; margin:0; max-height:240px; overflow:auto; scrollbar-color:var(--ui-control-border) var(--ui-surface-raised); }
.sr-confirm-products > li { display:grid; grid-template-columns:minmax(0,1fr) max-content; gap:12px; padding:10px 0; border-bottom:1px solid var(--ui-divider); font-size:12px; line-height:1.6; }
.sr-confirm-products > li > span:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sr-confirm-products > li > span:last-child { color:var(--ui-text-muted); font-variant-numeric:tabular-nums; }
.sr-confirm-checked { margin:0; font-size:12px; line-height:1.5; color:var(--ui-text-muted); }

/* Rank detail opens as a right-side panel so the product list stays usable. */
.sr-page .sr-detail-drawer { position:fixed; top:0; right:0; bottom:0; z-index:40; width:min(760px,100vw); margin:0; border-radius:0; border-left:1px solid var(--ui-divider); box-shadow:-8px 0 24px rgba(15,23,42,.18); overflow:auto; overscroll-behavior:contain; background:var(--ui-surface-raised); }
.sr-page .sr-detail-drawer[hidden] { display:none !important; }
.sr-page .sr-detail-drawer .sr-detail-head { position:sticky; top:0; z-index:1; background:var(--ui-surface-raised); border-bottom:1px solid var(--ui-divider); padding-right:56px; }
.sr-detail-close { position:absolute; top:14px; right:14px; width:32px; height:32px; border:1px solid var(--ui-control-border); border-radius:6px; background:var(--ui-control-bg); color:var(--ui-text); cursor:pointer; }
.sr-detail-close:hover { background:var(--ui-control-bg-hover); }
.sr-detail-close:focus-visible { outline:2px solid var(--ui-focus); outline-offset:2px; }
/* From 1280px the list stays beside the panel so another keyword can be picked
   while it is open; the narrowed list uses the compact (<=1100px) row layout. */
@media(min-width:1280px) {
    .sr-page .sr-detail-drawer { width:min(640px,40vw); }
    .sr-page.is-detail-open { padding-right:calc(min(640px,40vw) + 16px); }
    .sr-page.is-detail-open .sr-product-row { grid-template-columns:minmax(0,1fr) 170px auto; gap:14px; }
    .sr-page.is-detail-open .sr-product-actions { grid-column:3; }
    .sr-page.is-detail-open .sr-product-keywords { grid-column:1/-1; }
}
@media(max-width:700px) { .sr-page .sr-detail-drawer { width:100vw; border-left:0; } }
.sr-mini-chart polyline.is-supersaving { stroke:var(--ui-success); stroke-dasharray:2 2; }
