.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; transform: translateY(-160%); padding: 10px 14px; border-radius: 10px; color: #fff; background: var(--text-strong); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); white-space: nowrap; }
.workbench-toolbar { display: grid; gap: 18px; margin-bottom: 28px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel-solid); }
.capability-search { position: relative; }
.capability-search input { width: 100%; min-height: 50px; padding: 0 48px 0 44px; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--text); background: var(--bg-elevated); outline: none; }
.capability-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.capability-search::before { position: absolute; top: 14px; left: 16px; color: var(--muted-2); content: "⌕"; font-size: 22px; }
.capability-filters { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; }
.capability-filter { flex: 0 0 auto; min-height: 40px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--bg-elevated); cursor: pointer; }
.capability-filter.active { border-color: var(--text); color: var(--bg-elevated); background: var(--text); }
.catalog-summary { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px; }
.ai-workbench-summary { display: grid; gap: 12px; margin: 0 0 20px; padding: 16px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--panel-solid), var(--accent-soft)); }
.ai-workbench-summary__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ai-workbench-summary__head span, .ai-workbench-summary__category span { color: var(--muted); font-size: 12px; }
.ai-workbench-summary__categories { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ai-workbench-summary__category { display: grid; gap: 5px; min-width: 0; padding: 12px; border-radius: var(--radius-md); background: var(--bg-elevated); }
.ai-workbench-summary__category strong { color: var(--text-strong); }
.tool-readiness { color: var(--muted-2); }
.tool-readiness.ready { color: var(--green); font-weight: 800; }
.catalog-section { scroll-margin-top: 96px; }
.tool-card { align-items: stretch; min-height: 218px; flex-direction: column; text-align: left; }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-favorite { position: relative; z-index: 1; min-width: 40px; min-height: 40px; border: 0; border-radius: 10px; color: var(--muted-2); background: var(--bg-soft); cursor: pointer; }
.tool-favorite.active { color: var(--accent); background: var(--accent-soft); }
.tool-channel { display: inline-flex; width: fit-content; margin-top: auto; padding: 5px 8px; border-radius: 7px; color: var(--muted); background: var(--bg-soft); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.tool-open { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--bg-elevated); cursor: pointer; font-weight: 800; }
.tool-open:hover, .tool-open:focus-visible { border-color: var(--accent); color: var(--accent); }
.delivery-state { display: grid; justify-items: start; gap: 8px; padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); background: var(--panel-solid); }
.delivery-state strong { color: var(--text); font-size: 18px; }
.delivery-state p { margin: 0; }
.delivery-state--error { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.delivery-state__action { min-height: 40px; margin-top: 8px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: var(--bg-elevated); cursor: pointer; }
.catalog-section[hidden] { display: none; }
.catalog-delivery-projection { display: grid; gap: 12px; margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel-solid); }
.catalog-delivery-projection__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.catalog-delivery-projection__head span, .catalog-delivery-projection__item small { color: var(--muted); }
.catalog-delivery-projection__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.catalog-delivery-projection__item { display: grid; gap: 4px; min-width: 0; padding: 12px; border-radius: var(--radius-md); background: var(--bg-elevated); }
.catalog-delivery-projection__item span { color: var(--accent); font-size: 12px; }
.service-market-content { display: grid; gap: 20px; padding-bottom: 48px; }
.service-market-page { min-width: 0; }
.service-market-page__notice:empty { display: none; }
.service-market-page__notice { margin-bottom: 14px; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; color: var(--text); background: var(--accent-soft); }
.service-market-workspace { display: grid; grid-template-columns: minmax(170px, 210px) minmax(0, 1fr) minmax(190px, 230px); gap: 18px; align-items: start; }
.service-market-catalog { display: grid; min-width: 0; gap: 20px; margin: 0; width: auto; }
.service-market-rail, .service-market-account-panel { position: sticky; top: 76px; display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); box-shadow: var(--shadow-soft); }
.service-market-rail__label, .service-market-account-panel__label { margin: 0; color: var(--muted-2); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.service-market-rail__list, .service-market-account-panel__actions { display: grid; gap: 6px; }
.service-market-rail__item, .service-market-account-panel__action { min-height: 40px; padding: 8px 10px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.service-market-rail__item:hover, .service-market-rail__item:focus-visible, .service-market-account-panel__action:hover, .service-market-account-panel__action:focus-visible { color: var(--text-strong); background: var(--bg-soft); outline: none; }
.service-market-rail__item.active { color: #fff; background: var(--text-strong); font-weight: 800; }
.service-market-account-panel__title { color: var(--text-strong); font-size: 18px; }
.service-market-account-panel small, .service-market-account-panel__notice { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.service-market-account-panel__notice { padding-top: 10px; border-top: 1px solid var(--line); }
.service-market-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(135deg, var(--panel-solid), var(--bg-soft)); }
.service-market-head h1 { margin: 0; color: var(--text-strong); font-size: clamp(28px, 4vw, 44px); letter-spacing: -.04em; }
.service-market-head p { margin: 8px 0 0; color: var(--muted); }
.service-market-head__source { padding: 7px 10px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 850; white-space: nowrap; }
.service-market-controls { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel-solid); }
.service-market-controls input { min-height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: var(--bg-elevated); outline: none; }
.service-market-controls input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.service-market-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.service-market-category { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--bg-elevated); cursor: pointer; }
.service-market-category.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.service-market-summary { color: var(--muted); font-size: 13px; }
.service-market-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.service-market-card { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); box-shadow: var(--shadow-soft); }
.service-market-card__media { display: grid; min-height: 150px; place-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--bg-soft)); }
.service-market-card__media img { width: 100%; height: 150px; object-fit: cover; }
.service-market-card__fallback { color: var(--accent); font-size: 28px; font-weight: 900; letter-spacing: .08em; }
.service-market-card__body { display: grid; gap: 8px; padding: 16px; }
.service-market-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.service-market-card__favorite { min-width: 34px; min-height: 34px; border: 0; border-radius: 9px; color: var(--muted-2); background: var(--bg-soft); cursor: pointer; }
.service-market-card__favorite.active { color: var(--accent); background: var(--accent-soft); }
.service-market-card__body h3 { margin: 0; color: var(--text-strong); font-size: 17px; }
.service-market-card__body p { min-height: 40px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.service-market-card__eyebrow, .service-market-card__body small { color: var(--muted-2); font-size: 11px; }
.service-market-card__price { color: var(--accent); font-size: 18px; }
.service-market-card__action, .service-market-reload { min-height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: var(--bg-elevated); cursor: pointer; font-weight: 800; }
.service-market-card__action:hover, .service-market-card__action:focus-visible, .service-market-reload:hover, .service-market-reload:focus-visible { border-color: var(--accent); color: var(--accent); }
.service-market-reload { justify-self: start; padding: 0 16px; }
.service-market-detail { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel-solid); box-shadow: var(--shadow-soft); }
.service-market-detail__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.service-market-detail__head h2 { margin: 0; color: var(--text-strong); font-size: 24px; }
.service-market-detail__close { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--bg-elevated); cursor: pointer; }
.service-market-detail__description, .service-market-detail__meta, .service-market-detail__status, .service-market-detail__risk, .service-market-detail__blocked, .service-market-detail__empty { margin: 0; color: var(--muted); line-height: 1.6; }
.service-market-detail__risk { color: var(--warning, #a15c00); }
.service-market-detail__status { padding-top: 4px; font-size: 13px; }
.service-market-detail__form { display: grid; gap: 14px; }
.service-market-detail__field { display: grid; gap: 7px; color: var(--text-strong); font-weight: 700; }
.service-market-detail__field input, .service-market-detail__field select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: var(--bg-elevated); }
.service-market-detail__field input[type="checkbox"] { width: 22px; min-height: 22px; padding: 0; }
.service-market-detail__field input:focus, .service-market-detail__field select:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.service-market-detail__errors { display: grid; gap: 4px; color: #b42318; }
.service-market-detail__errors p { margin: 0; font-size: 13px; }
.service-market-detail__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.service-market-detail__cart { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: var(--bg-elevated); cursor: pointer; font-weight: 850; }
.service-market-detail__save { min-height: 44px; border: 1px solid var(--accent); border-radius: 10px; color: var(--panel-solid); background: var(--accent); cursor: pointer; font-weight: 850; }
.service-market-cart-panel, .service-market-orders, .service-market-order-detail { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); }
.service-market-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.service-market-section-head h2 { margin: 0; color: var(--text-strong); font-size: 18px; }
.service-market-section-head span { color: var(--muted); font-size: 12px; }
.service-market-cart-list, .service-market-order-list { display: grid; gap: 8px; }
.service-market-cart-row, .service-market-order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px; border-radius: 12px; background: var(--bg-soft); }
.service-market-cart-row > div, .service-market-order-row { min-width: 0; }
.service-market-cart-row strong, .service-market-cart-row small, .service-market-order-row strong, .service-market-order-row span, .service-market-order-row small { display: block; overflow-wrap: anywhere; }
.service-market-cart-row small, .service-market-order-row span, .service-market-order-row small, .service-market-cart-panel__note { color: var(--muted); font-size: 12px; }
.service-market-cart-row__remove, .service-market-cart-row__checkout { align-self: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--bg-elevated); cursor: pointer; }
.service-market-cart-row__checkout { border-color: var(--accent); color: #fff; background: var(--accent); }
.service-market-order-row__detail, .service-market-order-detail__close { min-height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--bg-elevated); cursor: pointer; font-weight: 750; }
.service-market-order-row__detail { grid-column: 2; justify-self: end; }
.service-market-order-detail__facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 14px; border-radius: 12px; background: var(--bg-soft); }
.service-market-order-detail__facts p, .service-market-order-detail__facts small { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.service-market-order-detail__facts span { color: var(--accent); font-weight: 800; }
.service-market-order-detail__result { padding: 12px; border-radius: 10px; color: var(--text) !important; background: var(--panel-solid); overflow-wrap: anywhere; }
.service-market-order-detail__timeline { grid-column: 1 / -1; display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.service-market-order-detail__refund-reason { grid-column: 1 / -1; min-height: 88px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--panel-solid); resize: vertical; }
.service-market-order-detail__refund { grid-column: 1 / -1; min-height: 38px; border: 1px solid var(--accent); border-radius: 9px; color: #fff; background: var(--accent); cursor: pointer; font-weight: 750; }
.service-market-cart-panel__note { margin: 0; }
.service-market-workspace .service-market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .service-market-workspace { grid-template-columns: minmax(160px, 190px) minmax(0, 1fr); }
  .service-market-account-panel { position: static; grid-column: 1 / -1; }
  .service-market-account-panel__actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service-market-workspace .service-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.xhs-report-list { grid-column: 1 / -1; }
.xhs-report-list-items { display: grid; gap: 10px; }
.xhs-report-list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 18px; width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--text); background: var(--bg-soft); text-align: left; cursor: pointer; }
.xhs-report-list-item strong { overflow-wrap: anywhere; color: var(--text-strong); }
.xhs-report-list-item small { color: var(--muted); }
.xhs-report-list-item span { grid-row: span 2; align-self: center; color: var(--accent); font-size: 13px; font-weight: 800; }
.xhs-report-list-item:hover, .xhs-report-list-item:focus-visible { border-color: var(--accent); outline: none; }
.xhs-report-content { padding-top: 18px; }
.xhs-report-progress { display: grid; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-solid); }
.xhs-report-progress > p { margin: 0; color: var(--muted); line-height: 1.6; }
.xhs-report-progress > h1 { margin: 0; color: var(--text-strong); font-size: 28px; }
.xhs-report-progress-collector { padding: 16px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 12px; background: var(--accent-soft); }
.xhs-report-progress-collector h2 { margin: 0; color: var(--text-strong); font-size: 16px; }
.xhs-report-progress-collector p { margin: 8px 0 0; color: var(--muted); }
.xhs-report-progress-node-list { display: grid; gap: 6px; margin: 14px 0 0; padding: 12px 0 0 20px; border-top: 1px solid var(--line); color: var(--muted); }
.xhs-report-progress-error { color: var(--accent) !important; font-weight: 800; }
.xhs-report-progress-limitations { color: var(--gold) !important; }
.xhs-report-header { display: grid; gap: 8px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.xhs-report-header p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.xhs-report-header h1 { margin: 0; color: var(--text-strong); font-size: 30px; }
.xhs-report-back { justify-self: start; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--bg-elevated); cursor: pointer; }
.xhs-report-layout { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.xhs-report-nav { display: grid; align-content: start; gap: 8px; }
.xhs-report-nav-item { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--bg-elevated); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.xhs-report-nav-item.active, .xhs-report-nav-item:hover, .xhs-report-nav-item:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.xhs-report-detail-root, .xhs-report-state, .xhs-report-detail { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-solid); }
.xhs-report-loading, .xhs-report-empty { padding: 26px; color: var(--muted); }
.xhs-report-state { margin-top: 20px; }
.xhs-report-state h2, .xhs-report-detail h2, .xhs-report-refs h3, .xhs-report-payload h3 { margin: 0; color: var(--text-strong); font-size: 18px; }
.xhs-report-state p, .xhs-report-refs p { color: var(--muted); line-height: 1.6; }
.xhs-report-meta { display: grid; grid-template-columns: minmax(100px, 180px) minmax(0, 1fr); gap: 0; margin: 18px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.xhs-report-meta dt, .xhs-report-meta dd { min-width: 0; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.xhs-report-meta dt { background: var(--bg-soft); color: var(--muted); }
.xhs-report-meta dd { color: var(--text); }
.xhs-report-meta dt:last-of-type, .xhs-report-meta dd:last-child { border-bottom: 0; }
.xhs-report-payload, .xhs-report-refs { margin-top: 20px; }
.xhs-report-payload-map { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 3fr); gap: 0; margin: 12px 0 0; }
.xhs-report-payload-map dt, .xhs-report-payload-map dd { min-width: 0; margin: 0; padding: 9px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.xhs-report-payload-map dt { color: var(--muted); background: var(--bg-soft); }
.xhs-report-payload-list, .xhs-report-refs ul { display: grid; gap: 6px; margin: 12px 0 0; padding-left: 22px; color: var(--muted); overflow-wrap: anywhere; }
.xhs-report-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.xhs-report-evidence-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elevated); }
.xhs-report-evidence-card--wide { grid-column: 1 / -1; }
.xhs-report-evidence-card h3 { margin: 0 0 12px; color: var(--text-strong); font-size: 15px; }
.xhs-report-readable-rows { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 1fr); gap: 0; margin: 0; }
.xhs-report-readable-rows dt, .xhs-report-readable-rows dd { min-width: 0; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.xhs-report-readable-rows dt { color: var(--muted); }
.xhs-report-readable-rows dd { color: var(--text-strong); font-weight: 750; text-align: right; }
.xhs-report-readable-rows dt:last-of-type, .xhs-report-readable-rows dd:last-child { border-bottom: 0; }
.xhs-report-insufficient { margin: 0; color: var(--muted); line-height: 1.6; }
.xhs-report-evidence-card > .xhs-report-payload-list, .xhs-report-evidence-card > .xhs-report-payload-map { margin-top: 0; }
.xhs-report-business { display: grid; gap: 14px; margin-top: 14px; }
.xhs-report-account-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, var(--panel-solid), var(--bg-soft)); }
.xhs-report-account-avatar { width: 82px; height: 82px; border-radius: 24px; object-fit: cover; border: 1px solid var(--line-strong); }
.xhs-report-kicker { margin: 0 0 6px; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.xhs-report-account-hero h3 { margin: 0 0 10px; color: var(--text-strong); font-size: 26px; letter-spacing: -.03em; }
.xhs-report-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.xhs-report-metric-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elevated); }
.xhs-report-metric-card span:first-child { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.xhs-report-metric-card strong { display: block; margin-top: 8px; color: var(--text-strong); font-size: 24px; overflow-wrap: anywhere; }
.xhs-report-data-badge { display: inline-flex; width: fit-content; margin-top: 10px; padding: 4px 8px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 850; }
.xhs-report-compact-rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 12px; margin: 0; }
.xhs-report-compact-rows dt, .xhs-report-compact-rows dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.xhs-report-compact-rows dt { color: var(--muted); }
.xhs-report-compact-rows dd { color: var(--text); }
.xhs-report-row-table, .xhs-report-diagnostic-grid { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) minmax(130px, 1.2fr); margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.xhs-report-row-table > *, .xhs-report-diagnostic-grid > * { min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.xhs-report-row-table strong, .xhs-report-diagnostic-grid strong { color: var(--muted); background: var(--bg-soft); font-size: 12px; }
.xhs-report-row-table span, .xhs-report-diagnostic-grid span { color: var(--text); }
.xhs-report-emphasis { color: var(--accent) !important; font-weight: 900; }
.xhs-report-warning { color: var(--gold) !important; font-weight: 900; }
.xhs-report-dimension-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.xhs-report-dimension-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); }
.xhs-report-dimension-card span:first-child { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.xhs-report-dimension-card strong { display: block; margin-top: 8px; color: var(--accent); font-size: 22px; }
.xhs-report-note-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.xhs-report-note-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.xhs-report-note-card strong, .xhs-report-note-card span { display: block; overflow-wrap: anywhere; }
.xhs-report-note-card strong { color: var(--text-strong); }
.xhs-report-note-card span { margin-top: 6px; color: var(--muted); font-size: 12px; }
.xhs-report-deep-section { position: relative; overflow: hidden; }
.xhs-report-deep-section::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--accent), var(--gold)); content: ""; }
.xhs-report-deep-summary { margin: 0 0 14px; color: var(--text); font-size: 16px; font-weight: 750; line-height: 1.65; }
.xhs-report-deep-meta { margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.xhs-report-deep-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.xhs-report-deep-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); }
.xhs-report-deep-card strong { display: block; color: var(--text-strong); overflow-wrap: anywhere; }
.xhs-report-deep-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.xhs-report-deep-card small, .xhs-report-deep-evidence { display: block; margin-top: 10px; color: var(--muted-2); font-size: 12px; overflow-wrap: anywhere; }
.xhs-report-deep-tags, .xhs-report-limitation-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.xhs-report-deep-tags span, .xhs-report-limitation-chips span { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.xhs-report-deep-tags span { color: var(--accent); background: var(--accent-soft); }
.xhs-report-limitation-chips span { color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.xhs-optimization-workbench { display: grid; gap: 18px; padding-bottom: 42px; }
.xhs-optimization-header { display: grid; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-solid); box-shadow: var(--shadow-soft); }
.xhs-optimization-header h1 { margin: 0; color: var(--text-strong); font-size: clamp(26px, 4vw, 42px); letter-spacing: -.04em; }
.xhs-optimization-header p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.7; }
.xhs-optimization-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xhs-optimization-summary span, .xhs-optimization-metrics span { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elevated); }
.xhs-optimization-summary b, .xhs-optimization-metrics b { display: block; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 850; }
.xhs-optimization-summary em, .xhs-optimization-metrics em { display: block; margin-top: 6px; color: var(--text-strong); font-style: normal; font-weight: 950; overflow-wrap: anywhere; }
.xhs-optimization-toolbar { position: sticky; z-index: 5; top: 82px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--bg-elevated) 88%, transparent); backdrop-filter: blur(18px); }
.xhs-optimization-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.xhs-optimization-mode { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--bg-elevated); cursor: pointer; }
.xhs-optimization-mode.active, .xhs-optimization-mode:hover, .xhs-optimization-mode:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); outline: none; }
.xhs-optimization-list { display: grid; gap: 14px; }
.xhs-optimization-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-solid); box-shadow: var(--shadow-soft); }
.xhs-optimization-cover { overflow: hidden; display: grid; place-items: center; min-height: 180px; border-radius: 18px; color: var(--muted); background: var(--bg-soft); }
.xhs-optimization-cover img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; }
.xhs-optimization-body { min-width: 0; display: grid; gap: 12px; }
.xhs-optimization-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.xhs-optimization-card-head h2 { margin: 0; color: var(--text-strong); font-size: 21px; line-height: 1.35; overflow-wrap: anywhere; }
.xhs-optimization-status { display: inline-flex; width: fit-content; padding: 5px 10px; border-radius: 999px; color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); font-size: 12px; font-weight: 900; white-space: nowrap; }
.xhs-optimization-risk, .xhs-optimization-help, .xhs-optimization-version { margin: 0; color: var(--muted); line-height: 1.6; }
.xhs-optimization-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.xhs-optimization-draft { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.xhs-optimization-draft dt, .xhs-optimization-draft dd { min-width: 0; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.xhs-optimization-draft dt { color: var(--muted); background: var(--bg-soft); font-weight: 850; }
.xhs-optimization-draft dd { color: var(--text); line-height: 1.65; }
.xhs-optimization-draft dt:last-of-type, .xhs-optimization-draft dd:last-child { border-bottom: 0; }
.xhs-optimization-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.xhs-optimization-tags span { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); font-size: 12px; font-weight: 850; }
.xhs-optimization-tags span[data-source="user_custom"] { color: var(--accent); background: var(--accent-soft); }
.xhs-optimization-tags small { color: var(--muted); }
.xhs-optimization-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.xhs-optimization-actions .primary, .xhs-optimization-actions .secondary, .xhs-optimization-toolbar .primary, .xhs-optimization-toolbar .secondary { min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; }
.xhs-optimization-state { display: grid; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-solid); }
.xhs-optimization-state h1 { margin: 0; color: var(--text-strong); }
.xhs-optimization-state p { margin: 0; color: var(--muted); line-height: 1.7; }
.xhs-research-hub { display: grid; gap: 18px; padding-bottom: 42px; }
.xhs-research-header, .xhs-research-section, .xhs-research-state { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-solid); box-shadow: var(--shadow-soft); }
.xhs-research-header h1, .xhs-research-state h1 { margin: 0; color: var(--text-strong); font-size: clamp(26px, 4vw, 42px); letter-spacing: -.04em; }
.xhs-research-header p:not(.eyebrow), .xhs-research-state p, .xhs-research-empty { margin: 0; color: var(--muted); line-height: 1.7; }
.xhs-research-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.xhs-research-summary span { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elevated); }
.xhs-research-summary b { display: block; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 850; }
.xhs-research-summary em { display: block; margin-top: 6px; color: var(--text-strong); font-style: normal; font-weight: 950; overflow-wrap: anywhere; }
.xhs-research-summary small { display: block; margin-top: 4px; color: var(--muted-2); }
.xhs-research-warning { padding: 12px; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: 14px; color: var(--gold) !important; background: color-mix(in srgb, var(--gold) 10%, transparent); font-weight: 800; }
.xhs-research-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xhs-research-section-head h2 { margin: 0; color: var(--text-strong); font-size: 22px; }
.xhs-research-section-head span { color: var(--muted); font-size: 13px; font-weight: 850; }
.xhs-research-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.xhs-research-card { min-width: 0; display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elevated); }
.xhs-research-card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.xhs-research-card-head h3 { margin: 0; color: var(--text-strong); font-size: 18px; overflow-wrap: anywhere; }
.xhs-research-card-head span { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 900; }
.xhs-research-rows { display: grid; grid-template-columns: minmax(88px, .5fr) minmax(0, 1fr); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.xhs-research-rows dt, .xhs-research-rows dd { min-width: 0; margin: 0; padding: 9px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.xhs-research-rows dt { color: var(--muted); background: var(--bg-soft); font-weight: 850; }
.xhs-research-rows dd { color: var(--text); }
.xhs-research-rows dt:last-of-type, .xhs-research-rows dd:last-child { border-bottom: 0; }
.xhs-research-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.xhs-research-actions .secondary, .xhs-research-actions .primary, .xhs-research-state .primary, .xhs-research-state .secondary { min-height: 38px; padding: 0 13px; border-radius: 999px; cursor: pointer; }
.xhs-research-action-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elevated); }
.xhs-research-action-form label { color: var(--muted); font-size: 13px; font-weight: 800; }
.xhs-research-action-form input { min-height: 38px; min-width: 0; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: var(--bg-soft); outline: none; }
.xhs-research-action-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.xhs-compare { display: grid; gap: 18px; padding-bottom: 42px; }
.xhs-compare-form, .xhs-compare-header, .xhs-compare-panel, .xhs-compare-state { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-solid); box-shadow: var(--shadow-soft); }
.xhs-compare-form h1, .xhs-compare-header h1, .xhs-compare-state h2 { margin: 0; color: var(--text-strong); }
.xhs-compare-header h1 { font-size: clamp(26px, 4vw, 42px); letter-spacing: -.04em; }
.xhs-compare-header p:not(.eyebrow), .xhs-compare-state p, .xhs-compare-empty { margin: 0; color: var(--muted); line-height: 1.7; }
.xhs-compare-field { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 850; }
.xhs-compare-field input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: var(--bg-elevated); }
.xhs-compare-accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.xhs-compare-account-card, .xhs-compare-card { min-width: 0; display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elevated); }
.xhs-compare-account-card span, .xhs-compare-card span { color: var(--accent); font-size: 12px; font-weight: 900; }
.xhs-compare-account-card h2, .xhs-compare-card h3, .xhs-compare-panel h2 { margin: 0; color: var(--text-strong); }
.xhs-compare-account-card p, .xhs-compare-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.xhs-compare-account-card small, .xhs-compare-card small { color: var(--muted-2); overflow-wrap: anywhere; }
.xhs-compare-table { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr) minmax(100px, 1fr) minmax(140px, 1.5fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.xhs-compare-table > * { min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.xhs-compare-table strong { color: var(--muted); background: var(--bg-soft); }
.xhs-compare-table span { color: var(--text); }
.xhs-compare-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.xhs-compare-card-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xhs-compare-list { display: grid; gap: 8px; margin: 0; padding-left: 22px; color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .workbench-toolbar { position: sticky; z-index: 12; top: 64px; margin-inline: -14px; padding: 14px; border-radius: 0 0 18px 18px; }
  .catalog-summary { align-items: flex-start; flex-direction: column; }
  .ai-workbench-summary__head { align-items: flex-start; flex-direction: column; }
  .ai-workbench-summary__categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-delivery-projection__head { align-items: flex-start; flex-direction: column; }
  .catalog-delivery-projection__list { grid-template-columns: 1fr; }
  .service-market-head { align-items: flex-start; flex-direction: column; }
  .service-market-grid { grid-template-columns: 1fr; }
  .service-market-workspace { grid-template-columns: 1fr; }
  .service-market-rail, .service-market-account-panel { position: static; }
  .service-market-rail__list { grid-auto-flow: column; grid-auto-columns: minmax(140px, 70%); overflow-x: auto; }
  .service-market-workspace .service-market-grid { grid-template-columns: 1fr; }
  .service-market-account-panel { grid-column: auto; }
  .service-market-account-panel__actions { grid-template-columns: 1fr 1fr; }
  .service-market-detail__actions { grid-template-columns: 1fr; }
  .xhs-report-layout { grid-template-columns: 1fr; }
  .xhs-report-nav { grid-auto-flow: column; grid-auto-columns: minmax(144px, 75%); overflow-x: auto; padding-bottom: 4px; }
  .xhs-report-meta, .xhs-report-payload-map { grid-template-columns: 1fr; }
  .xhs-report-meta dt, .xhs-report-payload-map dt { border-bottom: 0; }
  .xhs-report-list-item { grid-template-columns: minmax(0, 1fr); }
  .xhs-report-list-item span { grid-row: auto; }
  .xhs-report-detail-root, .xhs-report-state, .xhs-report-detail { padding: 16px; }
  .xhs-report-evidence-grid { grid-template-columns: 1fr; }
  .xhs-report-evidence-card--wide { grid-column: auto; }
  .xhs-report-readable-rows { grid-template-columns: minmax(0, 1fr) auto; }
  .xhs-report-account-hero { grid-template-columns: minmax(0, 1fr); }
  .xhs-report-metric-grid, .xhs-report-dimension-grid, .xhs-report-note-strip { grid-template-columns: 1fr; }
  .xhs-report-deep-grid { grid-template-columns: 1fr; }
  .xhs-report-row-table, .xhs-report-diagnostic-grid { grid-template-columns: 1fr; }
  .xhs-optimization-summary, .xhs-optimization-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xhs-optimization-toolbar, .xhs-optimization-card { grid-template-columns: 1fr; }
  .xhs-optimization-toolbar { position: static; }
  .xhs-optimization-draft { grid-template-columns: 1fr; }
  .xhs-optimization-draft dt { border-bottom: 0; }
  .xhs-research-summary, .xhs-research-grid { grid-template-columns: 1fr; }
  .xhs-research-action-form { grid-template-columns: 1fr; align-items: stretch; }
  .xhs-research-rows { grid-template-columns: 1fr; }
  .xhs-research-rows dt { border-bottom: 0; }
  .xhs-compare-accounts, .xhs-compare-table, .xhs-compare-card-grid, .xhs-compare-card-grid.compact { grid-template-columns: 1fr; }
}
