:root {
  color-scheme: light;
  --background: #f2f5f3;
  --surface: #ffffff;
  --surface-quiet: #f8faf9;
  --line: #d8e2dd;
  --line-light: #e9efec;
  --ink: #192a26;
  --muted: #485c55;
  --quiet: #51665e;
  --brand: #a83d2b;
  --brand-deep: #8d3021;
  --brand-light: #f9ebe6;
  --positive: #285f4b;
  --positive-light: #e8f2eb;
  --warning: #795317;
  --warning-light: #fff4de;
  --nav: #142729;
  --nav-text: #f1f6f3;
  --nav-muted: #b6c9c3;
  --nav-line: #35504d;
  --radius: 16px;
  --control-radius: 8px;
  --side-width: 208px;
  --panel-inset: 20px;
  --panel-shadow: 0 1px 2px #1c30240b;
  --sans: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .62; }
button, a, input, textarea, select, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); }
p, h1, h2 { margin: 0; }
code, pre { font-family: var(--mono); }
.icon-library, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.icon { width: 17px; height: 17px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

.sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; width: var(--side-width); display: flex; flex-direction: column; padding: 24px 14px 17px; background: var(--nav); color: var(--nav-text); border-right: 1px solid var(--nav-line); }
.sidebar :focus-visible { outline-color: var(--brand-light); }
.sidebar { overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 1px 4px 0; white-space: nowrap; font-size: 15px; font-weight: 700; letter-spacing: -.025em; }
.brand-name { white-space: normal; word-break: keep-all; line-height: 1.3; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; flex: 0 0 auto; }
.brand-mark span { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #ffdfd4; background: conic-gradient(#fde2d7 0deg 3deg, transparent 3deg 57deg, #fde2d7 57deg 63deg, transparent 63deg 117deg, #fde2d7 117deg 123deg, transparent 123deg 177deg, #fde2d7 177deg 183deg, transparent 183deg 237deg, #fde2d7 237deg 243deg, transparent 243deg 297deg, #fde2d7 297deg 303deg, transparent 303deg 357deg,#fde2d7 357deg); }
.nav-caption { margin: 30px 3px 9px; padding: 13px 8px 0; border-top: 1px solid var(--nav-line); color: var(--nav-muted); font-size: 12px; font-weight: 620; }
.sidebar-nav { display: grid; gap: 5px; }
.sidebar-nav a { min-height: 43px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border: 1px solid transparent; border-radius: var(--control-radius); color: var(--nav-muted); font-weight: 560; font-size: 13px; }
.sidebar-nav a:hover { background: #203a38; color: var(--nav-text); }
.sidebar-nav a.active { color: var(--nav-text); background: #2a4641; border-color: #45625b; box-shadow: inset 3px 0 #ec9e87; font-weight: 690; }
.sidebar-nav a.active .icon { color: #f1a78f; }
.nav-count { margin-left: auto; color: var(--nav-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.sidebar-end { margin-top: auto; display: grid; gap: 12px; }
.docs-link { display: flex; justify-content: space-between; align-items: center; color: var(--nav-muted); font-size: 12px; padding: 8px 9px; border-radius: var(--control-radius); }
.docs-link:hover { background: #203a38; color: var(--nav-text); }
.docs-link .icon { width: 14px; height: 14px; }
.local-status { background: #1d3735; border: 1px solid var(--nav-line); border-radius: var(--control-radius); display: flex; gap: 8px; align-items: center; padding: 10px 8px; font-size: 12px; color: var(--nav-text); }
.local-status:hover { background: #2a4641; }
.local-status .icon { margin-left: auto; width: 13px; height: 13px; }
.dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #9ca7a1; }
.dot.is-real { background: #4b8864; }
.dot.is-warning { background: #bb812c; }
.shell { margin-left: var(--side-width); }
.topbar { height: 54px; padding: 0 30px; display: flex; justify-content: space-between; align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-left { display: flex; gap: 9px; align-items: center; font-size: 12px; font-weight: 640; }
.breadcrumb-root, .breadcrumb-chevron { color: var(--quiet); font-weight: 500; }
.breadcrumb-chevron { width: 12px; height: 12px; }
.top-status { display: inline-flex; align-items: center; gap: 7px; min-height: 29px; padding: 3px 10px; background: var(--surface-quiet); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 650; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.topbar-user { max-width: clamp(74px, 17vw, 185px); color: var(--muted); font-weight: 650; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-quota { padding: 8px 8px 7px; border: 1px solid var(--nav-line); border-radius: var(--control-radius); background: #1d3735; }
.sidebar-quota-heading, .sidebar-quota dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.sidebar-quota-heading { align-items: center; }
.sidebar-quota h2 { font-size: 12px; font-weight: 680; }
.quota-refresh { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; color: var(--nav-muted); border: 1px solid var(--nav-line); border-radius: 6px; background: transparent; }
.quota-refresh:hover:not(:disabled) { color: var(--nav-text); background: #2a4641; }
.quota-refresh .icon { width: 13px; height: 13px; }
.sidebar-quota dl { display: grid; gap: 3px; margin: 5px 0; }
.sidebar-quota :is(dt, p) { color: var(--nav-muted); font-size: 11px; line-height: 1.4; }
.sidebar-quota dd { margin: 0; color: var(--nav-text); font-size: 11px; font-weight: 680; text-align: end; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sidebar-quota dl > div:first-child dd { font-size: 15px; }
#quota-wait { color: #f0cd92; margin-top: 3px; }
.auth-screen { display: grid; place-items: center; min-height: 100dvh; padding: 18px; background: radial-gradient(ellipse at top left, #dce8e1, var(--background) 60%); }
.auth-card { width: min(100%, 410px); display: grid; gap: 11px; padding: clamp(19px, 6vw, 32px); }
.auth-brand { display: flex; align-items: center; gap: 9px; color: var(--positive); font-weight: 680; }
.auth-card h1 { font-size: 25px; font-weight: 720; line-height: 1.25; }
.auth-form { display: grid; gap: 10px; }
.auth-card .button, .auth-form > .button { justify-self: stretch; }
.user-create-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.user-create-form > .field-note { grid-column: 1 / -2; }
.user-create-form > .button { justify-self: end; }
.user-table { min-width: 510px; }
.user-table th:nth-child(1) { width: 31%; }
.user-table .user-name { white-space: normal; overflow-wrap: anywhere; font-weight: 680; }
.user-table .button-group { flex-wrap: wrap; }
.mobile-menu { display: none !important; }
.content { max-width: 1640px; margin: 0 auto; padding: 27px 30px 46px; }
.view { display: grid; gap: 19px; min-width: 0; }
.page-heading { display: flex; gap: 20px; justify-content: space-between; align-items: center; min-width: 0; margin-bottom: 2px; }
.page-heading h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; font-weight: 720; letter-spacing: -.035em; }
.page-heading p { margin-top: 7px; color: var(--muted); font-size: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 7px; min-height: 39px; padding: 7px 13px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 650; white-space: nowrap; transition: background .15s, border-color .15s; }
.button:hover:not(:disabled) { border-color: #b9c9c3; background: var(--surface-quiet); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button .icon, .text-button .icon { width: 15px; height: 15px; }
.button-primary { background: var(--brand); border-color: var(--brand); color: #fff; min-height: 41px; padding-inline: 15px; box-shadow: 0 1px 2px #65352720; }
.button-primary:hover:not(:disabled) { background: var(--brand-deep); border-color: var(--brand-deep); }
.button-primary:disabled { background: var(--line-light); border-color: var(--line); color: var(--quiet); box-shadow: none; opacity: 1; }
.button-small { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.button-group { display: flex; gap: 6px; align-items: center; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--surface); display: inline-grid; place-items: center; color: var(--muted); padding: 0; }
.icon-button:hover { background: var(--background); color: var(--ink); }
.text-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 2px 0; font-weight: 650; }
.text-button:hover { color: var(--brand-deep); text-decoration: underline; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; padding: 17px var(--panel-inset); box-shadow: var(--panel-shadow); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; margin-bottom: 13px; }
.card-heading h2 { color: var(--ink); font-size: 18px; font-weight: 710; line-height: 1.35; }
.card-heading p { margin-top: 4px; }
.heading-icon { color: var(--quiet); }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 var(--result-inset) 12px; }
.metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: start; align-items: start; column-gap: 8px; min-width: 0; padding: 10px 12px; background: var(--surface-quiet); border: 1px solid var(--line); border-radius: 11px; }
.metric p { color: var(--muted); font-weight: 620; font-size: 12px; }
.metric strong { display: block; margin-top: 2px; color: var(--ink); font-size: 27px; font-weight: 710; line-height: 1.16; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric small { grid-column: 1 / -1; color: var(--quiet); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.metric-icon { width: 32px; height: 32px; background: var(--line-light); color: var(--muted); border-radius: var(--control-radius); display: inline-grid; place-items: center; flex: 0 0 auto; }
.metric-icon .icon { width: 16px; height: 16px; }
.metric-green { background: var(--positive-light); color: var(--positive); }
.metric-orange { background: var(--brand-light); color: var(--brand); }
.screen-progress { grid-column: 1 / -1; width: 100%; height: 4px; margin-top: 7px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: #dfeae3; color: var(--positive); }
.screen-progress::-webkit-progress-bar { background: #dfeae3; }
.screen-progress::-webkit-progress-value { background: var(--positive); border-radius: 999px; }
.screen-progress::-moz-progress-bar { background: var(--positive); border-radius: 999px; }

.field, .condition { display: grid; margin: 0; padding: 0; border: 0; min-width: 0; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 660; }
.condition legend { padding: 0 0 5px; color: inherit; font-size: inherit; font-weight: inherit; }
.field input, .field select, .field textarea, .range-pair input { min-width: 0; width: 100%; min-height: 40px; padding: 7px 10px; background: var(--surface); border: 1px solid #bdc9c5; border-radius: var(--control-radius); color: var(--ink); font-weight: 500; font-size: 13px; }
.field input::placeholder, .field textarea::placeholder, .range-pair input::placeholder { color: var(--quiet); opacity: 1; }
.field input:focus, .field textarea:focus, .field select:focus, .range-pair input:focus, .search-control:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); background: var(--surface); }
.field textarea { line-height: 1.6; min-height: 91px; resize: vertical; }
.field-note { color: var(--quiet); font-size: 12px; line-height: 1.5; font-weight: 470; }
.category-filter-heading { align-items: center; flex-wrap: wrap; margin-bottom: 0; }
.category-filter-heading h2 { display: flex; align-items: center; gap: 8px; }
.category-filter-heading h2 .icon { width: 18px; height: 18px; color: var(--positive); }
.category-filter-heading p { margin: 0; }
.category-filters-saved { color: var(--positive); }
.category-filters-edited { color: var(--warning); }
.category-filter-empty h2 { font-size: 15px; margin-bottom: 4px; }
.card-filters { display: grid; gap: 13px; container-type: inline-size; }
.category-filter-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .57fr); gap: 15px 22px; align-items: start; }
.category-filter-section { min-width: 0; }
.category-filter-section h3, .run-filter-summary h3 { margin: 0 0 9px; color: var(--ink); font-size: 13px; font-weight: 700; }
.category-filter-section:not(.traffic-filter-section) { padding-top: 8px; }
.condition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 12px; }
.traffic-filter-section { padding: 11px 13px; border: 1px solid #ebd5cc; border-radius: 11px; background: #fcf5f1; }
.traffic-filter-section h3 { color: var(--brand-deep); }
.market-traffic-filter { display: grid; gap: 8px; }
.percentage-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; position: relative; }
.percentage-field input { grid-area: 1 / 1 / 2 / 3; padding-inline-end: 35px; appearance: textfield; font-variant-numeric: tabular-nums; }
.percentage-field input::-webkit-inner-spin-button, .percentage-field input::-webkit-outer-spin-button { appearance: none; }
.percentage-field > span { grid-area: 1 / 2 / 2 / 3; padding: 0 11px; pointer-events: none; }
.range-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; color: var(--quiet); }
.setup-actions { display: flex; justify-content: flex-end; align-items: center; padding-top: 11px; border-top: 1px solid var(--line-light); }
.category-filter-run-settings { display: flex; align-items: center; gap: 8px 12px; border-top: 1px solid #ebd5cc; padding-top: 8px; }
.category-filter-run-settings .field { flex: 0 0 106px; }
.category-filter-run-settings .field-note { flex: 1 1 auto; }
@container (max-width: 625px) {
  .category-filter-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
}
@container (min-width: 900px) {
  .condition-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.notice { display: block; margin: 0; padding: 9px 12px; border: 1px solid #dfd5cc; border-radius: 7px; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.notice-error { background: #fcefea; border-color: #ecd4cc; color: #8d3b2e; }
.notice-warning { background: var(--warning-light); border-color: #ebdfc0; color: var(--warning); }
.notice a { text-decoration: underline; font-weight: 650; margin-left: 5px; }
.selection-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; justify-content: space-between; padding: 10px var(--panel-inset); background: #eef5f0; border-color: #cddfd3; }
.resume-summary { display: flex; gap: 10px; align-items: center; }
.resume-summary .metric-icon { background: #dfede4; color: var(--positive); }
.resume-summary h3 { margin: 0 0 2px; font-size: 13px; }
#selection-rate-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; }
#selection-rate-wait-countdown { font-weight: 700; font-variant-numeric: tabular-nums; }

.results-card { --result-inset: var(--panel-inset); padding: 0; overflow: hidden; }
.results-heading { padding: 16px var(--result-inset) 0; margin-bottom: 12px; }
.results-heading > div { min-width: 0; }
.run-filter-summary { margin: 0 var(--result-inset) 12px; padding: 9px 12px; border: 1px solid var(--line-light); border-radius: var(--control-radius); background: var(--surface-quiet); }
.run-filter-summary h3 { margin-bottom: 5px; }
.filter-summary-list { display: flex; flex-wrap: wrap; gap: 5px 7px; margin: 0; }
.filter-summary-list > div { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 5px; padding: 3px 7px; border-radius: 5px; background: var(--line-light); font-size: 12px; }
.filter-summary-list dt { color: var(--muted); }
.filter-summary-list dd { margin: 0; font-weight: 640; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.run-filter-summary > .field-note { margin-top: 6px; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 var(--result-inset) 12px; }
.segments { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: var(--control-radius); padding: 2px; background: var(--background); }
.segments button { min-height: 30px; padding: 2px 9px; font-size: 12px; font-weight: 650; color: var(--muted); border: 1px solid transparent; border-radius: 6px; background: none; }
.segments button:hover { color: var(--ink); }
.segments button.is-active { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: 0 1px 2px #17252b12; }
.search-control { min-width: 0; display: inline-flex; gap: 7px; align-items: center; min-height: 37px; padding: 0 9px; border: 1px solid #bdc9c5; border-radius: var(--control-radius); background: var(--surface); color: var(--quiet); }
.search-control .icon { width: 15px; height: 15px; }
.search-control input { min-width: 0; width: 100%; color: var(--ink); border: 0; background: transparent; outline: none; padding: 0; font-size: 13px; }
.search-control input::placeholder { color: var(--quiet); }
.table-scroller { position: relative; overflow-x: auto; min-width: 0; }
.table-scroller:focus-visible { outline-offset: -3px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; font-variant-numeric: tabular-nums; }
.data-table thead { background: #edf3ee; }
.data-table th { color: var(--muted); padding: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 680; white-space: nowrap; font-size: 12px; }
.data-table td { padding: 10px; border-bottom: 1px solid var(--line-light); white-space: nowrap; }
.data-table th[aria-sort='ascending'], .data-table th[aria-sort='descending'] { color: var(--brand-deep); }
.data-table td:first-child, .data-table th:first-child { padding-left: 18px; }
.data-table td:last-child, .data-table th:last-child { padding-right: 18px; }
.data-table th button { border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; }
.data-table th button:hover { color: var(--brand-deep); }
.data-table tbody tr:hover { background: var(--surface-quiet); }
.data-table tbody tr:focus-within { background: var(--surface-quiet); }
.selection-scroll-note { margin: 0 var(--result-inset) 8px; }
.selection-local-filters { display: grid; gap: 7px; min-width: 0; margin: 0 var(--result-inset) 11px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-quiet); container: selection-local-filters / inline-size; }
.selection-local-filters-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 10px; }
.selection-local-filters-heading h3 { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 13px; font-weight: 690; }
.selection-local-filters-heading h3 .icon { width: 14px; height: 14px; color: var(--positive); }
.selection-local-filters-heading .button-group { flex-wrap: wrap; }
.selection-local-filter-count { margin-top: 2px; color: var(--positive); font-variant-numeric: tabular-nums; }
.selection-local-filter-conditions { display: grid; gap: 6px; }
.selection-local-filter-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .7fr) minmax(0, 1.4fr) auto; align-items: center; gap: 6px; }
.selection-local-filter-row :is(.field select, .field input) { min-height: 36px; }
.selection-local-filter-row .icon-button { grid-column: 4; width: 36px; height: 36px; }
.selection-local-filter-values { display: flex; align-items: center; gap: 6px; min-width: 0; }
.selection-local-filter-values .field { flex: 1 1 0; }
.selection-local-filter-row [aria-invalid='true'] { border-color: var(--brand); }
.selection-local-filter-error.is-invalid { color: var(--brand-deep); }
@container selection-local-filters (max-width: 550px) {
  .selection-local-filter-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, .85fr) auto; }
  .selection-local-filter-values { grid-column: 1 / -1; grid-row: 2; }
  .selection-local-filter-row .icon-button { grid-column: 3; grid-row: 1; }
}
@media (max-width: 560px) {
  .selection-local-filter-row :is(.field select, .field input) { min-height: 44px; }
  .selection-local-filter-row .icon-button { width: 44px; height: 44px; }
}
#selection-table-scroll { --selection-check-width: 34px; --selection-product-width: 198px; scroll-padding-inline-start: calc(var(--selection-check-width) + var(--selection-product-width) + 5px); }
.selection-data-table { width: 100%; min-width: 1312px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.selection-data-table th { white-space: normal; line-height: 1.25; }
.selection-data-table th button { display: flex; align-items: center; gap: 2px; }
.selection-data-table th .sort-arrow { flex: 0 0 auto; }
.selection-data-table .metric-column-label { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.selection-data-table tbody tr { background: var(--surface); }
.selection-data-table :is(th, td):is(.batch-checkbox-cell, .selection-product-cell) { position: sticky; z-index: 1; background: inherit; }
.selection-data-table thead :is(.batch-checkbox-cell, .selection-product-cell) { z-index: 2; background: #edf3ee; }
.selection-data-table :is(th, td).batch-checkbox-cell { inset-inline-start: 0; width: var(--selection-check-width); min-width: var(--selection-check-width); padding-inline: 0; }
.selection-data-table .selection-product-cell { inset-inline-start: var(--selection-check-width); width: var(--selection-product-width); min-width: var(--selection-product-width); max-width: var(--selection-product-width); border-inline-end: 1px solid var(--line); }
.selection-product-cell .table-product { min-width: 0; max-width: none; align-items: flex-start; gap: 7px; }
.selection-image-trigger { display: block; flex: 0 0 auto; margin: 0; padding: 0; border: 0; border-radius: var(--control-radius); background: transparent; cursor: zoom-in; }
.selection-product-cell .selection-image-trigger img { display: block; width: 34px; height: 34px; }
.selection-image-trigger:hover img { border-color: var(--positive); }
.selection-product-cell .field-note { white-space: normal; }
.selection-product-facts { display: flex; flex-wrap: wrap; gap: 1px 7px; }
.selection-product-facts > span { white-space: nowrap; }
.selection-product-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.selection-data-table :is(th, td).selection-metric { padding: 7px 4px; font-size: 11.5px; white-space: normal; text-align: center; }
.selection-data-table th.selection-metric { padding-inline: 3px; font-size: 11px; }
.selection-data-table th.selection-metric > button { width: 100%; flex-direction: column; text-align: center; }
.selection-data-table th.selection-metric .sort-arrow { font-size: 10px; line-height: 1; }
.selection-metric-divider { border-inline-start: 1px solid var(--line); }
.selection-metric-period { display: block; color: var(--quiet); font-size: 11px; }
.selection-metric-value, .selection-metric-note { display: block; overflow-wrap: anywhere; }
.selection-metric-note { color: var(--quiet); line-height: 1.3; }
.selection-data-table th:has([data-sort='bsr']) { width: 90px; }
.selection-data-table th.selection-text-metric { width: clamp(104px, 7vw, 132px); }
.selection-data-table :is(th, td).selection-text-metric { text-align: start; }
.selection-data-table td:nth-child(3) { font-weight: 700; }
[data-drag-scroll] td:not(.batch-checkbox-cell) { cursor: grab; }
[data-drag-scroll].is-dragging, [data-drag-scroll].is-dragging * { cursor: grabbing !important; user-select: none; }
#selection-rows tr:has(input[data-batch-select]:checked), #selection-rows tr:has(input[data-batch-select]:checked):hover { background: var(--brand-light); }
.history-card .data-table { min-width: 510px; }
.sort-arrow { color: var(--quiet); font-weight: 500; }
.table-product { display: flex; align-items: center; gap: 10px; min-width: 140px; max-width: 310px; }
.table-product img { width: 40px; height: 40px; border-radius: var(--control-radius); border: 1px solid var(--line); background: var(--surface); object-fit: contain; }
.table-product .product-values { min-width: 0; }
.product-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 590; }
.table-product .product-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; line-height: 1.3; }
.product-asin { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 18px; color: var(--quiet); font-size: 12px; }
.table-footer > div { display: flex; gap: 5px; }
.status-pill { display: inline-flex; align-items: center; width: max-content; padding: 2px 8px; min-height: 22px; border-radius: 999px; background: var(--line-light); color: var(--muted); font-size: 11px; font-weight: 670; white-space: nowrap; }
.status-pill.is-good { background: var(--positive-light); color: var(--positive); }
.status-pill.is-warn { background: var(--warning-light); color: var(--warning); }
.status-pill.is-error { background: var(--brand-light); color: #8f3b2c; }
.empty { min-height: 124px; display: grid; justify-items: center; align-content: center; gap: 5px; padding: 12px; color: var(--muted); text-align: center; }
.empty-icon { border: 1px solid var(--line); background: var(--surface-quiet); border-radius: var(--control-radius); color: var(--muted); display: inline-grid; place-items: center; width: 35px; height: 35px; }
.empty strong { color: var(--ink); font-size: 14px; font-weight: 670; }
.empty p { color: var(--quiet); font-size: 12px; }

.api-grid { display: grid; grid-template-columns: minmax(220px, 285px) minmax(0, 1fr); gap: 14px; align-items: start; }
.endpoint-panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); padding: 15px; display: flex; flex-direction: column; }
.endpoint-search { display: flex; }
.endpoint-list { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; margin: 9px -4px 0; padding: 0 4px; scrollbar-width: thin; }
.endpoint-group { font-size: 11px; color: var(--quiet); font-weight: 670; margin: 6px 4px 0; }
.endpoint { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 6px 5px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; min-height: 34px; gap: 7px; text-align: left; }
.endpoint:hover { background: var(--background); }
.endpoint.selected { background: var(--brand-light); border-color: #f5e0d7; }
.endpoint-name { color: var(--ink); font-size: 11.5px; font-weight: 610; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-empty { padding: 12px 4px; font-size: 12px; color: var(--muted); }
.method-pill { display: inline-flex; align-items: center; justify-content: center; background: #e6f1eb; color: #295e43; border-radius: 4px; font-family: var(--mono); font-weight: 680; font-size: 10px; padding: 2px 4px; line-height: 1.5; min-width: 32px; }
.method-pill.method-post { background: #fbefe2; color: #8c531e; }
.api-content { display: grid; gap: 14px; min-width: 0; }
.api-meta, .response-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 12px; padding: 8px 9px; border-radius: 6px; background: #f4f6f4; color: var(--muted); font-size: 11px; }
.api-meta code { color: var(--ink); overflow-wrap: anywhere; font-size: 11.5px; }
.api-meta > span:last-child { margin-left: auto; }
.api-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 11px; }
.params-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.params-grid .param-wide { grid-column: 1 / -1; }
.param-name { font-family: var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.param-required { color: var(--brand-deep); margin-left: 3px; }
.api-json-field textarea, .param-wide textarea { font-family: var(--mono); }
.api-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.schema-reference { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line-light); }
.schema-reference summary { cursor: pointer; font-size: 12px; font-weight: 640; color: var(--muted); }
.schema-reference h3 { margin: 10px 0 4px; font-size: 12px; }
.schema-reference .data-table td { white-space: normal; vertical-align: top; }
.schema-reference .data-table td:first-child { overflow-wrap: anywhere; }
.api-request .notice, .mysql-card .notice { margin-top: 10px; }
.response-code { overflow: auto; max-height: 65vh; min-height: 104px; background: #f4f6f4; color: #354a3d; padding: 13px; border-radius: 7px; border: 1px solid var(--line); margin: 0; font-size: 11.5px; line-height: 1.55; }
.response-empty { min-height: 110px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-title { display: flex; align-items: center; gap: 8px; }
.connection-list { margin: 0; }
.connection-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding: 9px 0; border-bottom: 1px solid var(--line-light); }
.connection-list > div:last-child { border-bottom: 0; }
.connection-list dt { color: var(--muted); font-size: 12px; }
.connection-list dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.settings-card .notice { margin-top: 10px; }
.mysql-card { max-width: 760px; }
.checkbox-field { display: flex; align-items: end; padding: 8px 0; gap: 6px; color: var(--muted); font-size: 12px; }
.checkbox-field input { accent-color: var(--brand); }
.detail-dialog { width: min(760px, calc(100% - 28px)); max-height: 88dvh; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); padding: 18px 20px; background: var(--surface); overflow: auto; box-shadow: 0 14px 56px #17252b2e; }
.detail-dialog::backdrop { background: #17252b72; }
.selection-image-preview { position: fixed; inset: 0; margin: auto; width: min(720px, calc(100% - 24px)); padding: clamp(10px, 2vw, 18px); }
.selection-image-preview-heading { margin-bottom: 8px; }
.selection-image-preview-heading > .icon-button { flex: 0 0 auto; }
.selection-image-preview-body { display: grid; place-items: center; height: min(68dvh, 620px); text-align: center; }
.selection-image-preview-body img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.detail-body { display: grid; gap: 12px; }
.detail-body .button { justify-self: start; }
.detail-body .notice { margin: 0; }
.detail-body .data-table { border: 1px solid var(--line); }
.detail-body .response-code { margin: 0; }
.toast { position: fixed; z-index: 20; right: 18px; bottom: 18px; max-width: min(430px, calc(100vw - 36px)); padding: 10px 14px; border-radius: var(--control-radius); background: var(--nav); color: var(--nav-text); font-size: 13px; box-shadow: 0 4px 14px #17252b22; }

#view-selection { container: batch-directory / inline-size; }
.batch-list-actions { gap: 9px; }
.batch-list-actions .icon-button { width: 41px; height: 41px; }
.batch-list-card { padding: 0; overflow: hidden; }
.batch-list-card > .notice { margin: 12px var(--panel-inset); }
.batch-list-table { table-layout: fixed; }
.batch-list-table:has(tbody:empty) { display: none; }
.batch-list-table thead th { border-top: 0; }
.batch-list-table thead th:first-child { width: 27%; }
.batch-list-table thead th:nth-child(2) { width: 16%; }
.batch-list-table thead th:nth-child(6) { width: 106px; }
.batch-list-table thead th:last-child { width: 132px; }
.batch-list-table :is(th, td):nth-child(n + 3):nth-child(-n + 6) { text-align: center; }
.batch-list-table tbody tr > :is(th, td) { padding-block: 14px; white-space: normal; overflow-wrap: anywhere; }
.batch-list-table tbody th { color: var(--ink); text-align: start; font: inherit; border-top: 0; border-bottom-color: var(--line-light); }
.batch-list-table tbody tr:last-child > :is(th, td) { border-bottom: 0; }
.batch-list-table tbody tr > :last-child { text-align: end; }
.batch-list-value { display: block; color: var(--ink); font-size: 15px; font-weight: 690; }
.batch-list-value + .field-note { display: block; margin-top: 3px; }
.batch-list-progress { display: grid; gap: 4px; max-width: 210px; }
.batch-list-progress strong { font-weight: 680; }
.batch-list-progress progress { appearance: none; width: 100%; height: 5px; border: 0; border-radius: 999px; background: var(--line-light); }
.batch-list-progress progress::-webkit-progress-bar { border-radius: 999px; background: var(--line-light); }
.batch-list-progress progress::-webkit-progress-value { border-radius: 999px; background: var(--positive); }
.batch-list-progress progress::-moz-progress-bar { border-radius: 999px; background: var(--positive); }
.batch-list-name { display: inline-block; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.35; }
a.batch-list-name:hover { color: var(--brand-deep); text-decoration: underline; }
.batch-list-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; color: var(--quiet); font-size: 12px; }
.batch-list-notes { display: -webkit-box; margin-top: 5px; color: var(--muted); font-size: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.batch-list-mobile-label { display: none; }
.batch-back-link .icon { transform: rotate(180deg); }
.batch-start { min-height: 270px; }
.batch-start .button { margin-top: 8px; }
.batch-start p:empty { display: none; }
.batch-workspace { display: grid; gap: 12px; min-width: 0; }
.batch-overview { display: grid; gap: 0; padding: 0; container: batch-overview / inline-size; }
.batch-overview-top, .batch-overview-title { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.batch-overview-top { justify-content: space-between; padding: 16px var(--panel-inset); border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; background: linear-gradient(108deg, #1c3834, #2b5146); color: var(--nav-text); }
.batch-overview-top :focus-visible { outline-color: #ffd4c5; }
.batch-overview-top .button { background: #f2fbf012; border-color: #99b9aa88; color: var(--nav-text); }
.batch-overview-top .button:hover { background: #f2fbf025; border-color: #a9c5b8; }
.batch-overview-top .status-pill { background: #e4f2e91c; color: var(--nav-text); border: 1px solid #9fbdaf73; }
.batch-overview-info { min-width: 0; }
.batch-overview-title { align-items: center; flex-wrap: wrap; }
.batch-overview-title h2 { font-size: clamp(20px, 2.3vw, 25px); font-weight: 720; line-height: 1.22; overflow-wrap: anywhere; }
.batch-overview-info .field-note { margin-top: 6px; color: #d8e8de; white-space: pre-wrap; overflow-wrap: anywhere; }
.batch-statistics { border-bottom: 1px solid var(--line); background: #f5f8f6; }
.batch-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 8px var(--panel-inset) 5px; }
.batch-stats > div { display: grid; gap: 1px; min-width: 0; padding: 1px 12px; }
.batch-stats > div:first-child { padding-inline-start: 0; }
.batch-stats > div + div { border-inline-start: 1px solid var(--line); }
.batch-stats dt { color: var(--muted); font-size: 12px; }
.batch-stats dd { margin: 0; color: var(--ink); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.batch-stats-note { padding: 0 var(--panel-inset) 8px; }
@container batch-overview (max-width: 680px) {
  .batch-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block-start: 0; }
  .batch-stats > div { padding: 5px 7px; }
  .batch-stats > div:nth-child(3n + 1) { padding-inline-start: 0; border-inline-start: 0; }
  .batch-stats > div:nth-child(n + 4) { border-block-start: 1px solid var(--line); }
  .batch-stats dd { font-size: 16px; }
}
.batch-runs { display: flex; align-items: center; gap: 8px; margin: 0 var(--result-inset) 12px; padding: 8px 10px; border: 1px solid var(--line-light); border-radius: var(--control-radius); }
.batch-runs .field { display: grid; grid-template-columns: auto minmax(0, 1fr); flex: 1 1 280px; max-width: 530px; align-items: center; gap: 5px 10px; }
.batch-runs select { min-height: 35px; text-overflow: ellipsis; }
.batch-screen-panel { display: grid; gap: 12px; min-width: 0; }
.batch-panel-tabs { display: flex; justify-content: flex-start; gap: 15px; padding-inline: 2px; border-bottom: 1px solid #c9d6cf; min-width: 0; }
.batch-panel-tabs > button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 5px 8px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; font-weight: 680; }
.batch-panel-tabs > button:hover { color: var(--ink); }
.batch-panel-tabs > button[aria-selected='true'] { border-bottom-color: var(--brand); color: var(--brand-deep); }
.batch-panel-tabs .icon { width: 14px; height: 14px; }
.batch-hits-heading { align-items: flex-start; }
.batch-hits-heading .field-note { margin-top: 3px; }
.batch-hits-filters { justify-content: flex-start; flex-wrap: wrap; }
.batch-hits-filters .search-control { flex: 1 1 210px; max-width: 330px; }
.batch-hits-filters .field { flex: 0 1 235px; min-width: 145px; grid-template-columns: auto minmax(0, 1fr); gap: 7px; align-items: center; }
.batch-hits-filters .field select { min-width: 0; }
#batch-hits-total { margin-left: auto; }
.batch-hits-table { min-width: 855px; }
.batch-hits-table .table-product { min-width: 135px; max-width: 255px; }
.batch-hit-product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; margin-top: 2px; }
.batch-hit-source-link { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.batch-hit-sources-dialog { max-width: 580px; }
.batch-hit-sources-list { display: grid; gap: 5px; margin-top: 10px; }
.batch-hit-source-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line-light); }
.batch-hit-source-name { min-width: 0; color: var(--ink); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.batch-hit-source-entry .field-note { grid-column: 1; overflow-wrap: anywhere; }
.batch-hit-source-entry > button { grid-column: 2; grid-row: 1 / span 2; }
.batch-selection-actions { margin: 0 var(--result-inset) 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.batch-selection-actions:not(:has(> :not([hidden]))) { display: none; }
.batch-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 7px 12px; flex-wrap: wrap; padding: 8px 11px; background: #edf5f0; border-radius: 10px 10px 0 0; }
.batch-save-bar:not(:has(~ :not([hidden]))) { border-radius: 10px; }
.selection-count { color: var(--positive); font-size: 13px; font-weight: 690; font-variant-numeric: tabular-nums; }
.batch-save-bar:not([hidden]) ~ .batch-enrich-tools { border-top: 1px solid var(--line); }
.batch-save-error { margin: 8px 18px; }
.batch-enrich-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 12px; padding: 9px 11px; }
.batch-enrich-main { display: grid; gap: 5px; }
.batch-enrich-main h3 { margin: 0; font-size: 13px; font-weight: 690; }
.batch-enrich-options { display: flex; flex-wrap: wrap; gap: 5px 16px; }
.batch-enrich-options .checkbox-field { align-items: center; padding: 1px 0; cursor: pointer; }
.batch-enrich-options .checkbox-field:has(input:disabled) { cursor: default; }
.batch-enrich-options input { margin: 0; }
.batch-enrich-cost-warning { color: var(--warning); }
.batch-enrich-actions { justify-content: flex-end; flex-wrap: wrap; align-items: start; }
.batch-enrich-submit-actions { display: grid; gap: 6px; }
.batch-enrich-tools > p { grid-column: 1 / -1; }
#enrich-selection:not(:disabled) { border-color: #e7c2b8; background: var(--brand-light); color: var(--brand-deep); }
#enrich-category:not(:disabled) { border-color: #a9c5b6; color: var(--positive); }
.batch-enrich-category-status { grid-column: 1 / -1; display: grid; gap: 4px; padding: 7px 9px; border: 1px solid var(--line-light); border-radius: var(--control-radius); background: var(--surface-quiet); }
.batch-enrich-category-status .screen-progress { max-width: 360px; }
.batch-enrich-field-progress { color: var(--positive); font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.batch-enrich-recovery { color: var(--positive); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.batch-enrich-recovery.is-warning { color: var(--warning); }
.batch-enrich-timing { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.batch-enrich-timing-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.batch-enrich-timing-row:not(:has(> :not([hidden]))) { display: none; }
.batch-enrich-stop { border-color: #dfbcb3; color: var(--brand-deep); }
.batch-enrich-rate-wait { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; }
.batch-enrich-rate-wait .icon { width: 14px; height: 14px; }
.batch-enrich-rate-countdown { font-weight: 650; font-variant-numeric: tabular-nums; }
.batch-enrich-breakdown { grid-column: 1 / -1; min-width: 0; display: grid; gap: 5px; margin-block: 3px; container: enrichment-breakdown / inline-size; }
.batch-enrich-breakdown h3 { margin: 0; font-size: 13px; font-weight: 690; }
.batch-enrich-breakdown-table { border: 1px solid var(--line); background: var(--surface); }
.batch-enrich-breakdown-table :is(th, td) { padding: 5px 7px; white-space: normal; }
.batch-enrich-breakdown-table :is(th, td):is(:first-child, :last-child) { padding-inline: 7px; }
.batch-enrich-breakdown-table :is(th, td):not(:first-child) { text-align: center; }
.batch-enrich-breakdown-table tbody th { border-top: 0; border-bottom-color: var(--line-light); }
.batch-enrich-breakdown-table strong { font-weight: 680; }
.batch-enrich-breakdown-table .is-available { color: var(--positive); }
.batch-enrich-breakdown-table .is-incomplete { color: var(--warning); }
.batch-enrich-breakdown-table .is-unknown { color: var(--quiet); font-weight: 470; }
.batch-enrich-breakdown-table .batch-enrich-field-link { display: inline-flex; align-items: center; gap: 3px; text-decoration: underline; text-underline-offset: 3px; }
.batch-enrich-breakdown-label { display: none; }
.batch-enrich-field-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px; margin-bottom: 10px; }
#batch-enrich-field-dialog > :is(.notice, .field-note) { margin-bottom: 8px; }
.batch-enrich-field-table td:last-child { white-space: normal; overflow-wrap: anywhere; }
.batch-enrich-field-table .status-pill { max-width: 100%; white-space: normal; }
@container enrichment-breakdown (max-width: 680px) {
  .batch-enrich-breakdown-table { display: block; border: 0; background: transparent; }
  .batch-enrich-breakdown-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .batch-enrich-breakdown-table tbody { display: grid; gap: 6px; }
  .batch-enrich-breakdown-table tbody tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 5px 7px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--surface); }
  .batch-enrich-breakdown-table tbody tr > :is(th, td) { min-width: 0; padding: 3px 4px; border: 0; text-align: start; overflow-wrap: anywhere; }
  .batch-enrich-breakdown-table tbody td:not(:first-child) { text-align: start; }
  .batch-enrich-breakdown-table tbody th { grid-column: 1 / -1; }
  .batch-enrich-breakdown-table .batch-enrich-field-link { min-height: 30px; }
  .batch-enrich-breakdown-label { display: block; color: var(--quiet); font-size: 11px; }
}
@container enrichment-breakdown (max-width: 365px) {
  .batch-enrich-breakdown-table tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.batch-checkbox-cell { width: 36px; min-width: 36px; text-align: center; }
.batch-checkbox-cell input { width: 16px; height: 16px; accent-color: var(--brand); vertical-align: middle; cursor: pointer; }
.batch-checkbox-cell input:disabled { cursor: default; }
.batch-row-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.batch-duplicate { border: 1px solid #f2e6ce; cursor: pointer; }
.batch-duplicate:hover { border-color: #dccaac; }
.batch-create-dialog { max-width: 460px; }
.batch-create-form { display: grid; gap: 12px; }
.batch-create-form .api-actions { margin-top: 0; }
.batch-appearance-list { display: grid; gap: 5px; max-height: min(65vh, 470px); overflow-y: auto; padding: 2px; }
.batch-appearance-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid var(--line-light); }
.batch-appearance-item .text-button { text-align: left; overflow-wrap: anywhere; }
.batch-appearance-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.saved-results-filters { justify-content: flex-start; flex-wrap: wrap; }
.saved-results-filters .search-control { flex: 1 1 225px; max-width: 330px; }
.saved-results-filters .field { flex: 0 1 210px; min-width: 135px; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; }
.saved-results-filters .checkbox-field { white-space: nowrap; align-items: center; padding: 0; }
.saved-results-table { min-width: 1060px; table-layout: fixed; }
.saved-result-check-col { width: 36px; }
.saved-result-product-col { width: clamp(224px, 20vw, 310px); }
.saved-result-source-col { width: 130px; }
.saved-result-traffic-col { width: 112px; }
.saved-result-action-col { width: 66px; }
.saved-results-table :is(th, td) { padding: 7px 8px; white-space: normal; }
.saved-results-table :is(th, td).saved-traffic-check { padding-inline: 4px; text-align: center; }
.saved-results-table tbody tr:nth-child(even) { background: var(--surface-quiet); }
.saved-results-table tbody tr:hover, .saved-results-table tbody tr:focus-within { background: #eef5f0; }
.saved-results-table tbody tr:has([data-traffic-key]:checked) { background: var(--brand-light); }
.saved-result-scroll-note { margin: 0 var(--result-inset) 8px; }
.saved-result-product { min-width: 0; max-width: none; align-items: flex-start; gap: 8px; }
.saved-result-product .product-title { overflow-wrap: anywhere; }
.saved-result-product .selection-image-trigger img, .saved-result-no-image { width: 44px; height: 44px; }
.saved-result-product .selection-image-trigger img { display: block; }
.saved-result-no-image { display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: var(--control-radius); color: var(--quiet); background: var(--surface-quiet); font-size: 10px; }
.saved-result-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; margin-top: 4px; }
.saved-result-identity .status-pill { min-height: 17px; padding: 0 6px; font-size: 10px; }
.saved-result-period { display: block; color: var(--quiet); font-size: 11px; font-weight: 570; }
.saved-results-table .saved-result-metrics { text-align: end; }
.saved-result-stat-line { display: flex; justify-content: flex-end; align-items: baseline; flex-wrap: wrap; gap: 0 4px; min-width: 0; line-height: 1.45; }
.saved-result-stat-label { color: var(--quiet); font-size: 10.5px; }
.saved-result-stat-value { font-size: 12px; font-weight: 620; overflow-wrap: anywhere; }
.saved-result-stat-value.is-emphasis { color: var(--positive); }
.saved-result-source-meta { display: block; margin-top: 3px; }
.saved-result-source-category { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.saved-result-action .text-button { white-space: nowrap; }
.saved-traffic-check input { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--brand); }
.saved-traffic-toolbar { display: grid; gap: 5px; margin: 0 var(--result-inset) 11px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-quiet); }
.saved-traffic-heading, .saved-traffic-job { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.saved-traffic-heading h3 { margin: 0; font-size: 13px; font-weight: 690; }
.saved-traffic-heading .button-group, .saved-traffic-options { display: flex; align-items: center; flex-wrap: wrap; }
.saved-traffic-options { gap: 3px 16px; }
.saved-traffic-options .checkbox-field { align-items: center; padding: 1px 0; cursor: pointer; }
.saved-traffic-options input { margin: 0; }
.saved-traffic-job { padding-top: 6px; border-top: 1px solid var(--line); }
.saved-traffic-estimate, .saved-traffic-job .field-note { font-variant-numeric: tabular-nums; }
.saved-traffic-estimate { color: var(--positive); }
#saved-traffic-wait { color: var(--warning); }
.saved-traffic-cell .text-button { text-decoration: underline; text-underline-offset: 3px; }
.saved-traffic-cell .field-note { display: block; max-width: 180px; white-space: normal; }
.saved-traffic-detail-dialog .table-scroller { margin-block: 9px; }
.saved-traffic-detail-table { min-width: 425px; }
.saved-traffic-detail-table :is(th, td):not(:first-child) { text-align: end; }
.saved-traffic-detail-table tbody th { border-top: 0; border-bottom-color: var(--line-light); }
.saved-traffic-position { display: inline-block; min-width: 30px; color: var(--positive); }
.saved-traffic-period { display: block; white-space: normal; }
.saved-result-source { display: block; max-width: 100%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.batch-category-panel { display: grid; gap: 8px; min-width: 0; padding: 11px var(--panel-inset) 12px; }
.batch-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; }
.batch-category-heading h3 { margin: 0; font-size: 15px; font-weight: 700; }
.batch-category-heading .field-note { margin-top: 2px; }
.batch-amazon-category-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr)); gap: 7px; max-height: 210px; overflow: auto; margin: 0 -3px; padding: 3px; list-style: none; scrollbar-width: thin; }
.batch-amazon-category-list li { min-width: 0; }
.batch-category-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-content: start; align-items: center; width: 100%; min-height: 46px; height: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--surface-quiet); color: var(--ink); text-align: left; }
.batch-category-choice:hover { border-color: #b9c9c3; background: var(--line-light); }
.batch-category-choice[aria-pressed='true'] { border-color: #c6d9ce; background: #edf5f0; box-shadow: inset 3px 0 #54816c; }
.batch-category-choice:focus-visible { outline-offset: 1px; }
.batch-category-choice .batch-category-name { font-size: 13px; font-weight: 690; }
.batch-category-choice .field-note { grid-column: 1 / -1; overflow-wrap: anywhere; }
.batch-category-name, .batch-category-choice .status-pill { overflow-wrap: anywhere; }
.amazon-batch-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; padding-top: 8px; border-top: 1px solid var(--line-light); font-size: 12px; }
.amazon-batch-scope > .icon { color: var(--positive); }
.amazon-scope-path { display: flex; flex: 1 1 245px; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; min-width: 0; }
.amazon-scope-label { color: var(--muted); font-weight: 660; }
#active-batch-amazon-path { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.amazon-batch-scope .text-button { display: inline-flex; gap: 5px; align-items: center; }
.amazon-batch-scope .text-button .icon { width: 13px; height: 13px; }
.batch-overview > .notice { margin: 0 var(--panel-inset) 12px; }
.amazon-bind-dialog { max-width: 560px; }
.amazon-tree { min-width: 0; display: grid; gap: 8px; }
.amazon-tree-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; min-width: 0; padding: 7px 10px; background: #f7f8f6; border: 1px solid var(--line-light); border-radius: 7px; font-size: 11.5px; }
.amazon-tree-nav .text-button { font-size: inherit; overflow-wrap: anywhere; text-align: left; }
.amazon-tree-nav-current { color: var(--ink); font-weight: 660; overflow-wrap: anywhere; }
.amazon-tree-nav .icon { width: 10px; height: 10px; color: var(--quiet); }
.amazon-tree-list { display: grid; min-width: 0; margin: 0; padding: 0 3px; list-style: none; }
.amazon-bind-dialog .amazon-tree-list { max-height: min(29vh, 230px); overflow: auto; }
.amazon-tree-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-width: 0; min-height: 42px; padding: 3px 2px; border-bottom: 1px solid var(--line-light); }
.amazon-tree-entry:last-child { border-bottom: 0; }
.amazon-tree-entry.is-selected { color: var(--brand-deep); background: var(--brand-light); border-radius: 6px; }
.amazon-tree-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; text-align: left; align-items: center; gap: 7px; min-width: 0; min-height: 34px; border: 0; border-radius: 5px; padding: 5px 7px; background: transparent; font-size: 12px; font-weight: 620; }
.amazon-tree-choice:hover { background: #f1f4f0; }
.amazon-tree-entry.is-selected .amazon-tree-choice:hover { background: #fae2d8; }
.amazon-tree-name { overflow-wrap: anywhere; }
.amazon-tree-entry .icon-button, .amazon-tree-expand-spacer { width: 30px; height: 30px; }
.amazon-tree-entry .icon-button .icon { width: 13px; height: 13px; }
.amazon-tree-message { color: var(--muted); padding: 7px 4px; font-size: 12px; }
.amazon-tree-note { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.amazon-tree-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 8px 9px; border: 1px solid var(--line-light); background: #f7f8f6; border-radius: 7px; font-size: 11.5px; }
.amazon-tree-pick strong { overflow-wrap: anywhere; }
.amazon-coverage-filters { display: grid; grid-template-columns: minmax(115px, .75fr) minmax(160px, 1.25fr); gap: 8px; width: min(360px, 100%); }
.amazon-coverage-filter select { text-overflow: ellipsis; }
.amazon-taxonomy-import { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding-block: 10px; }
.amazon-taxonomy-import h2 { margin-bottom: 2px; font-size: 13px; }
.amazon-taxonomy-import:focus-within #amazon-import-control { outline: 2px solid var(--brand); outline-offset: 3px; }
.amazon-taxonomy-import [aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.amazon-taxonomy-import .amazon-import-error { color: var(--brand-deep); }
.amazon-coverage-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(255px, .65fr); gap: 14px; align-items: start; }
.amazon-coverage-detail { min-height: 190px; }
.amazon-coverage-node { display: grid; gap: 7px; padding: 0 0 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line-light); overflow-wrap: anywhere; }
.amazon-coverage-node h3 { margin: 0; font-size: 16px; }
.amazon-coverage-node-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.amazon-coverage-node-meta .text-button { margin-left: auto; }
.amazon-coverage-batches { display: grid; gap: 5px; }
.amazon-coverage-batch { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 8px; padding: 7px 0; border-bottom: 1px solid var(--line-light); }
.amazon-coverage-batch:last-child { border-bottom: 0; }
.amazon-coverage-batch .text-button { text-align: left; overflow-wrap: anywhere; }
.amazon-coverage-batch .field-note { grid-column: 1 / -1; }
.status-pill.amazon-status-running { background: #edf3f9; color: #325a73; }

@media (max-width: 950px) {
  .amazon-coverage-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .amazon-coverage-detail { min-height: 0; }
}

@media (max-width: 700px) {
  #view-categories .page-heading { align-items: stretch; flex-direction: column; gap: 9px; }
  .amazon-coverage-filters { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}

@container batch-directory (max-width: 800px) {
  .batch-list-card:has(tbody:not(:empty)) { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .batch-list-card > .notice { margin-inline: 0; }
  .batch-list-table { display: block; }
  .batch-list-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .batch-list-table tbody { display: grid; gap: 10px; }
  .batch-list-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--panel-shadow); }
  .batch-list-table tbody tr > :is(th, td) { min-width: 0; padding: 0; border: 0; }
  .batch-list-table tbody tr > :is(:first-child, :nth-child(2), :last-child) { grid-column: 1 / -1; }
  .batch-list-table tbody tr > :nth-child(2) { padding-block: 7px 1px; border-top: 1px solid var(--line-light); }
  .batch-list-progress { max-width: none; }
  .batch-list-table tbody tr > :nth-child(n + 3):nth-child(-n + 6) { padding: 6px 9px; border-radius: var(--control-radius); background: var(--surface-quiet); text-align: start; }
  .batch-list-table tbody tr > :last-child { display: flex; justify-content: flex-end; margin-top: 2px; }
  .batch-list-table tbody tr > :last-child .button { min-height: 44px; }
  .batch-list-mobile-label { display: block; margin-bottom: 2px; color: var(--quiet); font-size: 12px; font-weight: 500; }
  .batch-start { min-height: 175px; }
}

@media (max-width: 1170px) {
  :root { --side-width: 194px; }
  .sidebar { padding-inline: 13px; }
  .content, .topbar { padding-inline: 22px; }
}
@media (max-width: 950px) {
  :root { --side-width: 170px; }
  .brand { font-size: 13px; }
  .content, .topbar { padding-inline: 16px; }
}
@media (max-width: 790px) {
  .sidebar { visibility: hidden; transform: translateX(-100%); transition: transform .15s ease; width: min(230px, 80vw); overflow-y: auto; box-shadow: 0 0 22px #17252b40; }
  .sidebar.menu-open { visibility: visible; transform: translateX(0); }
  .shell { margin-left: 0; }
  .mobile-menu { display: inline-grid !important; }
  .topbar { height: 54px; }
  .topbar .top-status { display: none; }
  .user-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-create-form > .field-note { grid-column: 1 / -1; }
  .user-create-form > .button { grid-column: 1 / -1; }
  .content { padding-top: 22px; }
}
@media (max-width: 560px) {
  :root { --panel-inset: 12px; }
  #selection-table-scroll { --selection-check-width: 36px; --selection-product-width: 149px; }
  .selection-data-table .selection-product-cell { padding-inline: 8px; }
  .selection-product-cell .table-product { gap: 6px; }
  .selection-product-cell .selection-image-trigger img { width: 30px; height: 30px; }
  .content, .topbar { padding-inline: 12px; }
  .topbar :is(.breadcrumb-root, .breadcrumb-chevron) { display: none; }
  .topbar-actions .button { padding-inline: 7px; }
  .page-heading { align-items: flex-start; gap: 8px; }
  .page-heading p { font-size: 13px; }
  .page-heading > .button { padding-inline: 9px; }
  .page-heading > .button .icon { width: 14px; height: 14px; }
  .button, .search-control, .field input, .field select, .range-pair input,
  .segments button, .batch-panel-tabs > button { min-height: 44px; }
  .batch-list-actions .icon-button { width: 44px; height: 44px; }
  .mobile-menu { width: 42px; height: 42px; }
  .metric-grid { margin-inline: var(--result-inset); }
  .metric { padding: 8px; gap: 0; grid-template-columns: minmax(0, 1fr); }
  .metric strong { font-size: 22px; }
  .metric small { font-size: 11px; }
  .metric-icon { display: none; }
  .api-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .endpoint-panel { position: static; max-height: 250px; }
  .results-heading { gap: 6px; }
  .results-heading .button { padding-inline: 7px; }
  .results-bar { flex-wrap: wrap; }
  .results-bar .search-control { flex: 1 1 155px; max-width: none; }
  .batch-runs { align-items: flex-end; }
  .batch-runs .field { grid-template-columns: minmax(0, 1fr); }
  .params-grid { grid-template-columns: minmax(0, 1fr); }
  .batch-workspace { gap: 9px; }
  .batch-screen-panel { gap: 9px; }
  .batch-overview-top { flex-wrap: wrap; }
  .batch-save-error { margin-inline: 12px; }
  .batch-enrich-tools { grid-template-columns: minmax(0, 1fr); }
  .batch-enrich-actions { justify-content: flex-start; }
  .batch-enrich-options .checkbox-field { min-height: 32px; }
  .saved-results-filters .search-control { flex: 1 1 100%; max-width: none; }
  .saved-results-filters .field { flex: 1 1 135px; }
  .batch-hits-filters .search-control { flex: 1 1 100%; max-width: none; }
  .batch-hits-filters .field { flex: 1 1 140px; }
}
@container (max-width: 365px) {
  .condition-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
