/* One interaction language, with category-specific priorities. */
.cx-enabled { --cx-accent:#0877b3;--cx-soft:#edf6fc;--cx-ink:#123c56; }
.cx-enabled[data-cx="property"] { --cx-accent:#207365;--cx-soft:#edf7f3;--cx-ink:#174e44; }
.cx-enabled[data-cx="electronics"] { --cx-accent:#6551aa;--cx-soft:#f3f0fb;--cx-ink:#4d3e7f; }
.cx-enabled :is(button,a,input,select):focus-visible { outline:3px solid #1694cf;outline-offset:3px; }
.cx-enabled #marketQuickFilters { display:none!important; }
.cx-enabled .market-home { align-items:start; }
.cx-enabled #browseNavigation { margin-bottom:16px; }
.cx-enabled .market-side { position:sticky;top:16px; }
.cx-enabled #marketCategories { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px; }
.cx-enabled #marketCategories .cx-home-category { display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:6px;height:auto;min-height:103px;padding:10px 4px;border:1px solid transparent;border-radius:13px;background:#f5f7fa;font-size:12px;font-weight:600;text-align:center;color:#283747;white-space:normal;line-height:1.3; }
.cx-enabled #marketCategories .cx-home-category:hover { border-color:#bdcede;background:#eef4f8;transform:translateY(-1px); }
.cx-home-art { display:grid;place-items:center;width:72px;height:52px; }
.cx-home-art svg { width:72px;height:52px; }
.cx-enabled #marketCategories .cx-home-all { display:none; }
.cx-enabled #marketCategories [data-cx-color="real-estate"] { background:#edf5f0; }
.cx-enabled #marketCategories [data-cx-color="electronics"] { background:#f2eff8; }
.cx-enabled #marketCategories [data-cx-color="transport"] { background:#eaf4fb; }
.cx-path { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.cx-path button { display:flex;align-items:center;gap:6px;border:0;background:none;color:#607182;min-height:44px;padding:0;font-size:12px; }
.cx-path button:first-child { color:#354657; }
.cx-path button>span { font-size:24px;line-height:1; }
.cx-path .ui-icon { width:15px;height:15px; }
.cx-title { display:flex;align-items:center;justify-content:space-between;gap:15px;margin:1px 0 14px; }
.cx-title p { margin:0 0 5px;font-size:11px;letter-spacing:.035em;color:var(--cx-accent);font-weight:650; }
.cx-title .browse-current { margin:0;font-size:30px;line-height:1.15;letter-spacing:-.8px;font-weight:750; }
.cx-heading-art { width:92px;height:62px;display:grid;place-items:center;border-radius:15px;background:var(--cx-soft);flex-shrink:0; }
.cx-heading-art svg { width:82px;height:56px; }
.cx-branches { display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:12px 0; }
.cx-branches button,.cx-extras button { min-height:40px;padding:8px 13px;border:1px solid #e0e6eb;border-radius:9px;background:#fff;color:#425364;font-size:12px;line-height:1.25; }
.cx-branches button[aria-pressed="true"],.cx-extras .is-set { border-color:var(--cx-accent);color:var(--cx-ink);background:var(--cx-soft);font-weight:650; }
.cx-branches .cx-branch-more { background:transparent; }
.cx-deals { display:flex;width:max-content;max-width:100%;padding:4px;border:1px solid #dbe8e2;background:#eef4f1;border-radius:10px; }
.cx-deals button { min-height:38px;min-width:90px;padding:7px 20px;border:0;border-radius:7px;color:#4a645e;background:transparent;font-weight:600; }
.cx-deals button[aria-pressed="true"] { background:#fff;color:#175e50;box-shadow:0 1px 4px #163c2020; }
.cx-primary { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:1px solid #d9e3eb;border-radius:13px;background:#fff;overflow:hidden; }
.cx-primary[data-count="2"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
.cx-primary[data-count="3"] { grid-template-columns:repeat(3,minmax(0,1fr)); }
.cx-field { display:flex;align-items:center;gap:10px;min-width:0;min-height:74px;padding:13px 15px;border:0;border-right:1px solid #e4eaf0;background:transparent;color:#687b8c;text-align:left; }
.cx-field:last-child { border-right:0; }
.cx-field:hover { background:#f7fafc; }
.cx-field>.ui-icon { width:20px;height:20px;flex:0 0 20px;color:var(--cx-accent); }
.cx-field>span { flex:1;min-width:0; }
.cx-field small { display:block;color:#647484;font-size:11px;line-height:1.3;margin-bottom:5px; }
.cx-field strong { display:block;font-size:14px;line-height:1.3;font-weight:600;color:#263949;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.cx-field.is-set strong { color:var(--cx-accent); }
.cx-field>b { font-size:14px;font-weight:400; }
.cx-extras { display:flex;flex-wrap:wrap;gap:6px;margin-top:9px; }
.cx-extras button { font-size:12px;min-height:36px;background:transparent; }
.cx-prompt { margin:8px 0;color:#627080;font-size:13px;line-height:1.5; }
.cx-rhd-note { margin:8px 0 0;color:#687c8c;font-size:11px;line-height:1.45; }
.cx-enabled .market-controls { background:transparent;border:0;padding:0;gap:7px; }
.cx-enabled .browse-current:focus { outline:0; }
.cx-enabled #marketResults { margin-top:10px;margin-bottom:6px; }
.cx-enabled #browseStatus { font-size:12px;color:#657687; }
.cx-enabled #uiAppliedFilters { display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:10px 0; }
.cx-enabled #uiAppliedFilters:empty { display:none; }
.cx-token,.cx-clear { display:flex;align-items:center;gap:10px;min-height:36px;max-width:100%;border:1px solid #cbdbe7;background:#eef5fa;color:#24516d;border-radius:8px;padding:6px 10px;font-size:12px;line-height:1.3;overflow-wrap:anywhere; }
.cx-token>span { font-size:18px;line-height:1; }
.cx-clear { background:none;border-color:transparent;text-decoration:underline;color:#657687; }
.cx-enabled.browse-category .market-controls #marketBudget { display:none; }
.cx-enabled #marketResults #marketViews button { min-height:44px;min-width:44px; }
.cx-enabled .favorite-button { min-height:44px!important;min-width:44px!important; }
.cx-modal { width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:28px;overscroll-behavior:contain; }
.cx-modal #modalContent { max-height:calc(100dvh - 100px);overflow-y:auto;overflow-x:hidden;padding-right:3px; }
.cx-modal h2 { padding-right:30px;margin:0 0 18px;font-size:24px;letter-spacing:-.55px;line-height:1.2; }
.cx-modal .form-field { min-width:0; }
.cx-modal .form-field :is(input,select) { min-height:48px;font-size:16px;border-color:#d4dee7;border-radius:8px;background:#fff; }
.cx-modal .catalog-range input { min-width:0; }
.cx-modal .form-field label { font-size:13px;color:#526575; }
.cx-modal .form-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
.cx-form-context { margin:-8px 0 20px!important;color:#6c7d8a;font-size:12px; }
.cx-actions { position:sticky;bottom:0;z-index:2;display:flex;align-items:center;gap:12px;margin:22px 0 0;padding:14px 0;background:#fff;border-top:1px solid #e5ebf0; }
.cx-actions>button { min-height:48px;border:0; }
.cx-actions>button:not(.primary-button) { color:#617488;background:transparent;padding:8px 12px;font-size:13px; }
.cx-actions>.primary-button { flex:1;border-radius:9px;background:var(--cx-accent);font-size:14px;font-weight:650; }
.cx-filter-section { padding:4px 0 18px;margin-bottom:12px;border-bottom:1px solid #e4eaf0; }
.cx-filter-section>h3,.cx-filter-section>summary { margin:0 0 16px;font-size:15px;font-weight:650; }
.cx-filter-section>summary { min-height:44px;display:list-item;cursor:pointer;padding:12px 0;margin:0;color:#35495b; }
.cx-filter-section[open]>summary { margin-bottom:12px; }
.cx-filter-section:last-of-type { border-bottom:0; }
.cx-filter-section .catalog-checklist { grid-column:1 / -1; }
.cx-filter-section input[type=checkbox] { width:20px;height:20px;min-height:20px;accent-color:var(--cx-accent); }
.cx-search { display:flex;align-items:center;gap:10px;padding:0 13px;background:#f4f7fa;border:1px solid #d5e0e8;border-radius:10px;margin:10px 0 14px; }
.cx-search>.ui-icon { width:20px;height:20px;color:#728696;flex-shrink:0; }
.cx-search input { width:100%;min-width:0;min-height:48px;border:0;background:transparent;font-size:16px;outline:0; }
.cx-search:focus-within { outline:2px solid #1686b7;outline-offset:2px; }
.cx-picker-heading { display:flex;gap:10px;align-items:center;margin:16px 0 8px; }
.cx-picker-heading>button { height:44px;min-width:44px;border:1px solid #dae3e9;background:#fff;border-radius:9px;font-size:24px;color:#536a7a; }
.cx-picker-heading h3 { margin:0;font-size:17px; }
.cx-picker-any { display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:48px;padding:12px;border:0;border-radius:9px;background:var(--cx-soft);color:var(--cx-ink);font-size:14px;text-align:left; }
.cx-choice-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:12px; }
.cx-choice-grid button { display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:48px;padding:12px;border:1px solid #e2e8ed;border-radius:8px;background:#fff;color:#263b4c;text-align:left;font-size:14px;overflow-wrap:anywhere; }
.cx-choice-grid button[aria-pressed=true] { border-color:var(--cx-accent);background:var(--cx-soft); }
.cx-choice-grid button span { color:#8ba0ae; }
.cx-presets { display:flex;flex-wrap:wrap;gap:7px;margin-top:16px; }
.cx-presets button { min-height:44px;border:1px solid #dbe5ec;border-radius:8px;padding:9px 12px;background:#fff;color:#425a6d; }
.cx-presets button.is-set { background:var(--cx-soft);border-color:var(--cx-accent); }
.cx-directory-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px; }
.cx-directory-row { display:flex;min-width:0;border:1px solid #e3eaf0;border-radius:10px;background:#fff;overflow:hidden; }
.cx-directory-row>button { display:flex;align-items:center;min-width:0;min-height:56px;gap:9px;padding:10px;border:0;background:transparent;color:#253e50;text-align:left;font-size:14px; }
.cx-directory-row>button:first-child { flex:1; }
.cx-directory-row>button:last-child:not(:first-child) { min-width:44px;justify-content:center;padding:10px 8px;color:#7d92a1;border-left:1px solid #eef2f5;font-size:23px; }
.cx-directory-row>button:hover { background:#f5f8fa; }
.cx-directory-row small { display:block;font-size:11px;color:#728595;line-height:1.4;margin-top:4px; }
.cx-directory-art { flex-shrink:0;width:47px;height:42px; }
.cx-directory-art svg { width:47px;height:42px; }
.cx-catalog .category-result { min-height:52px;font-size:14px;color:#314b5d; }
.cx-catalog .category-result small { font-size:11px; }
.cx-enabled .listing-grid.list-view .listing-card { padding:16px 0;grid-template-columns:220px 1fr;gap:20px; }
.cx-enabled .listing-grid.list-view .listing-image { height:auto;min-height:150px;aspect-ratio:4/3;border-radius:10px; }
.cx-enabled .market-facts span { line-height:1.5; }
.cx-enabled .market-facts .market-steering { color:var(--cx-accent);font-weight:650; }
@media(max-width:900px) and (min-width:651px){
 .cx-enabled #marketCategories { grid-template-columns:repeat(4,minmax(0,1fr)); }
 .cx-primary { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .cx-field:nth-child(2n) { border-right:0; }
 .cx-field:nth-child(n+3) { border-top:1px solid #e4eaf0; }
}
@media(max-width:650px){
 .cx-enabled { background:#f7f9fb; }
 .cx-enabled main { padding-left:12px;padding-right:12px; }
 .cx-enabled .market-home { padding-top:4px; }
 .cx-enabled #marketCategories { grid-template-columns:repeat(4,minmax(0,1fr));gap:6px; }
 .cx-enabled #marketCategories .cx-home-category { min-height:76px;height:auto;gap:3px;padding:6px 3px;border-radius:10px;font-size:10px;line-height:1.2;background:#fff;border:1px solid #e9eef2; }
 .cx-enabled #marketCategories .cx-home-category:nth-child(n+8):not(.cx-home-all) { display:none; }
 .cx-enabled #marketCategories .cx-home-category.cx-home-all { display:flex;background:#eef4f8; }
 .cx-home-all .cx-home-art svg { width:25px;height:25px;color:#52728b; }
 .cx-home-art,.cx-home-art svg { width:52px;height:39px; }
 .cx-enabled .market-discovery { margin:8px 0 18px; }
 .cx-path { margin:0; }
 .cx-path button { font-size:11px; }
 .cx-title { margin:1px 0 11px;gap:9px; }
 .cx-title p { font-size:10px;margin-bottom:5px; }
 .cx-title .browse-current { font-size:25px;letter-spacing:-.6px;line-height:1.2; }
 .cx-heading-art { width:72px;height:52px;border-radius:12px; }
 .cx-heading-art svg { width:67px;height:48px; }
 .cx-branches { flex-wrap:nowrap;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:none;gap:6px;margin:10px -12px 12px;padding:0 12px; }
 .cx-branches>button { flex:0 0 auto;min-height:42px;padding:9px 12px;font-size:12px;white-space:nowrap; }
 .cx-deals { width:100%;margin-bottom:8px; }
 .cx-deals button { flex:1;min-height:40px;min-width:0;font-size:13px; }
 .cx-primary { grid-template-columns:repeat(2,minmax(0,1fr));border-radius:12px; }
 .cx-primary[data-count="3"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .cx-primary[data-count="3"] .cx-field:last-child { grid-column:1 / -1; }
 .cx-field { min-height:67px;padding:10px 11px;gap:8px; }
 .cx-field>.ui-icon { width:18px;height:18px;flex-basis:18px; }
 .cx-field:nth-child(2n) { border-right:0; }
 .cx-field:nth-child(n+3) { border-top:1px solid #e4eaf0; }
 .cx-field small { font-size:10px;margin-bottom:4px; }
 .cx-field strong { font-size:13px; }
 .cx-extras { flex-wrap:nowrap;overflow:auto;scrollbar-width:none; }
 .cx-extras button { white-space:nowrap;min-height:40px;flex:1 0 auto;padding:7px 10px;font-size:11px; }
 .cx-enabled #browseNavigation { margin-bottom:10px; }
 .cx-enabled #marketResults { margin:4px 0; }
 .cx-enabled.browse-category .market-controls { position:sticky;top:0;z-index:5;background:#f7f9fb;padding:7px 0;border-bottom:1px solid #e6edf2; }
 .cx-enabled.browse-category .market-controls #regionFilter { display:none; }
 .cx-enabled.browse-category .market-controls #moreFilters { display:flex;flex:1;background:#fff;border:1px solid #d3dfe8;color:#334e64;font-size:13px;justify-content:center; }
 .cx-enabled .market-controls #sortButton { width:auto;min-width:44px; }
 .cx-enabled .market-controls #marketMore { min-width:44px; }
 .cx-enabled #uiAppliedFilters { flex-wrap:nowrap;overflow:auto;scrollbar-width:none;padding:2px 0;margin:8px 0; }
 .cx-token,.cx-clear { flex-shrink:0;min-height:40px;max-width:85%;font-size:11px; }
 .cx-enabled .market-home .listing-grid.list-view .listing-card { grid-template-columns:38% minmax(0,1fr);gap:12px;background:transparent;padding:14px 0;border-radius:0; }
 .cx-enabled .market-home .listing-grid.list-view .listing-image { min-height:112px;height:auto;aspect-ratio:4/3;align-self:start; }
 .cx-enabled .market-home .listing-grid.list-view .listing-title { font-size:14px;line-height:1.35;font-weight:650; }
 .cx-enabled .market-home .listing-grid.list-view .listing-price { font-size:19px;line-height:1.4;color:#152f45; }
 .cx-enabled .market-home .market-facts span { font-size:11px;color:#546b7d; }
 .cx-enabled[data-cx="property"] .market-home .listing-grid.list-view { gap:12px; }
 .cx-enabled[data-cx="property"] .market-home .listing-grid.list-view .listing-card { display:flex;flex-direction:column;gap:0;background:#fff;border:1px solid #e1e8ed;border-radius:12px;overflow:hidden;padding:0; }
 .cx-enabled[data-cx="property"] .market-home .listing-grid.list-view .listing-image { width:100%;aspect-ratio:16/9;min-height:0;height:auto;border-radius:0; }
 .cx-enabled[data-cx="property"] .market-home .listing-grid.list-view .listing-info { padding:12px 14px; }
 .cx-enabled[data-cx="property"] .market-home .listing-grid.list-view .listing-price { color:#1f5b4f;font-size:22px; }
 .cx-enabled[data-cx="electronics"] .market-home .listing-grid.list-view .listing-image { aspect-ratio:1; }
 .cx-enabled .listing-info { min-width:0; }
 .modal-backdrop:has(.cx-modal) { padding:0;align-items:flex-end; }
 .modal.cx-modal { width:100%;max-width:none;max-height:94dvh;border-radius:20px 20px 0 0;padding:24px 16px 18px;box-shadow:0 -8px 40px #172d3d24; }
 .cx-modal #modalContent { max-height:calc(94dvh - 44px); }
 .cx-modal h2 { font-size:22px; }
 .cx-modal .cx-actions { bottom:0;margin:20px 0 0;padding:12px 0 calc(12px + env(safe-area-inset-bottom,0px)); }
 .cx-modal .modal-close { top:14px;right:12px;width:40px;height:40px; }
 .cx-modal .form-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
 .cx-modal .form-field:has(.catalog-range),.cx-modal .catalog-checklist { grid-column:1 / -1; }
 .cx-modal .form-field label { font-size:12px; }
 .cx-modal .catalog-range { gap:10px; }
 .cx-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .cx-directory-grid { grid-template-columns:1fr;gap:7px; }
 .cx-directory-row>button { min-height:62px; }
 .cx-enabled .empty-state:not(.hidden) { padding:22px 16px; }
}
@media(max-width:360px){
 .cx-field { gap:6px;padding:10px 8px; }
 .cx-field>.ui-icon { display:none; }
 .cx-title .browse-current { font-size:23px; }
 .cx-title p { max-width:210px; }
 .cx-enabled #marketCategories .cx-home-category { font-size:9.5px; }
}
@media(prefers-reduced-motion:reduce){.cx-enabled #marketCategories .cx-home-category:hover{transform:none;}.cx-enabled *{scroll-behavior:auto!important;}}

/* One catalogue entry, with inline disclosure instead of accidental navigation. */
.cx-enabled main>[data-market-block="categories"] { display:none; }
.cx-catalog-hint { margin:-7px 0 16px; }
.cx-tree-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
.cx-tree-grid[hidden],.cx-tree-children[hidden] { display:none; }
.cx-tree-root { min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--theme-surface,#fff);overflow:hidden; }
.cx-tree-root.is-open { grid-column:1/-1; }
.cx-tree-choice { display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:12px;border:0;background:transparent;color:var(--ink);text-align:left;font:inherit;font-size:14px;line-height:1.4;cursor:pointer; }
.cx-tree-choice:hover { background:var(--theme-raised,#f3f6f9); }
.cx-tree-choice:focus-visible { outline-offset:-3px; }
.cx-tree-label { flex:1;min-width:0;overflow-wrap:anywhere; }
.cx-tree-label small { display:block;margin-top:3px;color:var(--muted);font-size:11px;line-height:1.5; }
.cx-tree-chevron { flex:0 0 18px;text-align:center;color:var(--muted);font-size:18px; }
.cx-tree-choice[aria-expanded="true"]>.cx-tree-chevron { transform:rotate(180deg); }
.cx-tree-root>.cx-tree-choice { font-weight:650; }
.cx-tree-root>.cx-tree-choice[aria-expanded="true"] { background:var(--theme-raised,#f3f6f9); }
.cx-tree-children { margin:0 12px 12px;padding:4px 0 0 12px;border-left:1px solid var(--line); }
.cx-tree-list>.cx-tree-node+.cx-tree-node { border-top:1px solid var(--line); }
.cx-tree-list .cx-tree-choice { min-height:44px;padding:10px 8px;font-size:13px; }
.cx-tree-list .cx-tree-children { margin-right:0; }
.cx-tree-all { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;width:100%;padding:10px 8px;border:0;border-radius:7px;background:transparent;color:var(--storefront-accent-ink,#126b9d);font:inherit;font-size:12px;font-weight:650;text-align:left;cursor:pointer; }
.cx-tree-all:hover { background:var(--theme-raised,#f3f6f9); }
@media(min-width:651px) {
 .cx-enabled .market-discovery { display:block;margin-bottom:24px; }
 .cx-enabled .market-discovery-head { position:static;width:auto;height:auto;margin:0 0 12px;padding:0;overflow:visible;clip-path:none; }
 .cx-enabled .market-discovery-head h2 { margin:0;color:var(--ink);font-size:17px;letter-spacing:-.3px; }
 .cx-enabled .market-discovery-head button { display:none; }
}
@media(max-width:650px) {
 .cx-tree-grid { grid-template-columns:1fr;gap:7px; }
 .cx-tree-choice { min-height:58px;gap:10px; }
 .cx-tree-root.is-open { grid-column:auto; }
 .cx-tree-children { margin-inline:10px;padding-left:10px; }
 .cx-tree-list .cx-tree-choice { font-size:13px; }
}

/* The open path and the applied category have distinct, visible states. */
.cx-catalog-position { position:sticky;top:0;z-index:3;margin:0 0 12px;padding:10px 12px;border:1px solid var(--cx-accent);border-radius:10px;background:var(--theme-surface,#fff);box-shadow:0 4px 12px #00000008; }
.cx-catalog-position[hidden] { display:none; }
.cx-catalog-position>small { display:block;margin-bottom:4px;font-size:11px;color:var(--muted); }
.cx-catalog-trail { display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-size:13px;line-height:1.5;color:var(--cx-ink); }
.cx-catalog-trail button { min-height:28px;padding:0;border:0;background:transparent;font:inherit;color:var(--cx-accent);text-decoration:underline;text-underline-offset:3px;cursor:pointer; }
.cx-catalog-trail>span { color:var(--muted);font-size:18px; }
.cx-catalog .cx-tree-choice.is-onpath { background:var(--cx-soft);box-shadow:inset 3px 0 var(--cx-accent);color:var(--cx-ink); }
.cx-catalog .cx-tree-choice.is-current { background:var(--cx-soft);box-shadow:inset 0 0 0 1px var(--cx-accent),inset 4px 0 var(--cx-accent);border-radius:8px;font-weight:700; }
.cx-catalog .cx-tree-choice.is-selected { background:var(--cx-soft);color:var(--cx-ink);font-weight:700;box-shadow:inset 4px 0 var(--cx-accent); }
.cx-tree-state { display:none;flex:0 0 auto;padding:3px 6px;border-radius:5px;background:var(--cx-accent);color:#fff;font-size:10px;font-weight:650;white-space:nowrap; }
.cx-tree-choice:is(.is-current,.is-selected)>.cx-tree-state { display:inline-block; }
html[data-theme="dark"] .cx-tree-state { color:#102433; }
.cx-catalog .cx-tree-chevron { display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border:1px solid var(--line);border-radius:7px;background:var(--theme-raised,#f3f6f9);color:var(--ink); }
.cx-tree-chevron svg { width:16px;height:16px; }
.cx-catalog .cx-tree-choice[aria-expanded="true"]>.cx-tree-chevron { transform:none;background:var(--cx-accent);color:#fff;border-color:transparent; }
.cx-tree-choice[aria-expanded="true"]>.cx-tree-chevron svg { transform:rotate(180deg); }
html[data-theme="dark"] .cx-catalog .cx-tree-choice[aria-expanded="true"]>.cx-tree-chevron { color:#102433; }
.cx-catalog .cx-tree-node.is-open>.cx-tree-children { border-left-color:var(--cx-accent); }

/* Keep the catalogue centred, with one scroll area for the category list. */
.modal-backdrop:has(.cx-catalog-modal) { padding:16px;place-items:center; }
.modal.cx-catalog-modal { box-sizing:border-box;display:flex;flex-direction:column;width:min(760px,100%);height:min(760px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);padding:24px;border-radius:16px;overflow:hidden; }
.cx-catalog-modal #modalContent { display:flex;flex:1;min-width:0;min-height:0;max-height:none;padding:0;overflow:hidden; }
.cx-catalog-modal .cx-catalog { display:flex;flex:1;flex-direction:column;min-width:0;min-height:0; }
.cx-catalog-modal .cx-catalog>:is(h2,.cx-catalog-hint,.cx-search,.cx-catalog-position) { flex-shrink:0; }
.cx-catalog-modal .cx-catalog-position { position:static; }
.cx-catalog-modal :is(#cxDirectory,#cxCategoryMatches) { flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-behavior:auto;padding:2px 4px 8px 2px; }
.cx-catalog-modal #cxDirectory { grid-auto-rows:max-content;align-content:start;align-items:start; }
.cx-catalog-modal #cxCategoryMatches[hidden] { display:none; }
@media(max-width:650px) {
 .modal-backdrop:has(.cx-catalog-modal) { padding:12px; }
 .modal.cx-catalog-modal { width:100%;height:min(760px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:22px 16px 16px;border-radius:16px; }
 .cx-catalog-modal .modal-close { top:10px;right:10px; }
 .cx-catalog-modal .cx-tree-root>.cx-tree-choice { display:grid;grid-template-columns:40px minmax(0,1fr) 28px;gap:4px 8px; }
 .cx-catalog-modal .cx-tree-root>.cx-tree-choice>.cx-directory-art { grid-column:1;grid-row:1 / span 2;align-self:center;width:40px;height:36px; }
 .cx-catalog-modal .cx-directory-art svg { width:40px;height:36px; }
 .cx-catalog-modal .cx-tree-root>.cx-tree-choice>.cx-tree-label { grid-column:2;grid-row:1; }
 .cx-catalog-modal .cx-tree-root>.cx-tree-choice .cx-tree-label small { display:none; }
 .cx-catalog-modal .cx-tree-root>.cx-tree-choice>.cx-tree-state { grid-column:2;grid-row:2;justify-self:start; }
 .cx-catalog-modal .cx-tree-root>.cx-tree-choice>.cx-tree-chevron { grid-column:3;grid-row:1 / span 2;align-self:center; }
}
@media(max-width:650px) {
 .cx-catalog .cx-tree-choice { gap:7px; }
 .cx-tree-state { padding:3px 5px;font-size:9px; }
 .cx-catalog-trail { font-size:12px;gap:3px 6px; }
}
