.product-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; padding:.55rem 1rem; background:#171717; border-bottom:1px solid #303030; flex-shrink:0; }
.product-secondary-button,.product-help-button {border:1px solid #525252;border-radius:.5rem;padding:.5rem .7rem;font-size:.8rem;line-height:1.3;color:inherit;cursor:pointer;}
.product-help-button {margin-right:.6rem;}
.product-secondary-button:hover,.product-help-button:hover {border-color:#22c55e;}
.product-secondary-button[aria-pressed=true] {background:#102015;border-color:#22c55e;color:#86efac;}
.product-primary-button {border-radius:.5rem;padding:.7rem 1rem;background:#166534;color:#fff;font-weight:600;font-size:.875rem;cursor:pointer;}
.product-help-dialog {margin:auto;width:min(38rem,calc(100vw - 2rem));max-height:calc(100dvh - 2rem);overflow-y:auto;border:0;border-radius:1.2rem;padding:2rem;background:#fbfaf7;color:#1d1b16;box-shadow:0 24px 80px #0008;}
.product-help-dialog::backdrop {background:#0a0a0ac9;}
/* Form inputs show focus through the action-green border, like every other input (docs/theme.md). */
.product-action-dialog input:focus,.product-action-dialog textarea:focus {outline:none;border-color:#166534;}
.product-action-dialog label {display:block;font-size:.85rem;margin-top:1rem;margin-bottom:.4rem;}
.product-action-dialog input,.product-action-dialog textarea {display:block;width:100%;min-width:0;background:white;border:1px solid #d6d3d1;border-radius:.5rem;padding:.65rem;font:inherit;color:#1d1b16;margin-bottom:1rem;}
.product-action-dialog textarea {resize:vertical;max-height:40dvh;}
.product-action-dialog .product-action-status {margin:1rem 0;}
/* Feedback result uses the shared success/error roles from docs/theme.md. */
.product-action-dialog .product-action-status[data-state] {padding:.75rem 1rem;border:1px solid;border-radius:.5rem;}
.product-action-dialog .product-action-status[data-state=success] {background:#eef5f0;border-color:#cfdcc9;color:#14532d;}
.product-action-dialog .product-action-status[data-state=error] {background:#fef2f2;border-color:#fca5a5;color:#991b1b;}
.product-action-dialog button:disabled {opacity:.5;cursor:wait;}
.product-help-dialog h2 {font-size:1.7rem;line-height:1.2;font-weight:650;margin:.5rem 1rem .85rem 0;}
.product-help-dialog p {font-size:.9rem;line-height:1.55;}
.product-help-dialog h3 {font-size:.95rem;font-weight:600;margin:1.5rem 0 .65rem;}
.product-help-dialog .product-help-eyebrow {font-size:.68rem;letter-spacing:.15em;color:#71685e;font-weight:700;}
.product-primary-button:hover {background:#14532d;}
.product-help-dialog .product-secondary-button {border-color:#166534;color:#166534;}
.product-help-dialog .product-secondary-button:hover {border-color:#14532d;background:#f4f1e8;}
.product-help-close {position:absolute;right:1rem;top:.65rem;font-size:1.8rem;cursor:pointer;padding:.15rem .5rem;}
.product-help-start {display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.1rem;}
.product-help-chapters {display:grid;gap:.4rem;}
.product-help-chapters button {display:flex;justify-content:space-between;gap:1rem;text-align:left;align-items:center;padding:.7rem .8rem;border:1px solid #ddd4c3;border-radius:.5rem;cursor:pointer;font-size:.875rem;}
.product-help-chapters button:hover {background:#f4f1e8;border-color:#166534;}
.product-help-chapters small {font-size:.7rem;color:#71685e;white-space:nowrap;}
.product-help-dialog .product-help-footnote {margin-top:1rem;font-size:.75rem;color:#71685e;}
.product-help-dialog .product-help-footnote a {color:#166534;text-decoration:underline;}
.product-help-dialog .product-help-footnote a:hover {color:#14532d;}
.product-help-link {font-size:.8rem;color:#166534;text-decoration:underline;display:inline-block;margin:.65rem 1rem 0 0;}
.product-help-notice:empty {display:none;}
.product-help-notice {padding:.65rem;background:#fffbeb;border:1px solid #fde68a;color:#92400e;margin-top:.7rem;border-radius:.4rem;}
.criterion-range summary {display:flex;justify-content:space-between;gap:.5rem;cursor:pointer;font-size:.7rem;color:#a3a3a3;padding:.3rem 0;}
.criterion-range summary::before {content:'▸';}
.criterion-range[open] summary::before {content:'▾';}
.criterion-range summary span {margin-left:auto;font-variant-numeric:tabular-nums;}
.product-map-legend {position:absolute;top:.7rem;left:3.8rem;z-index:800;display:flex;align-items:center;gap:.35rem;background:#171717e8;color:#ddd;padding:.3rem .5rem;border-radius:.4rem;font-size:.62rem;pointer-events:none;}
.product-legend-gradient {width:3rem;height:.4rem;background:linear-gradient(90deg,#ef4444,#eab308,#22c55e);border-radius:.3rem;}
.product-legend-missing {width:.5rem;height:.5rem;background:#374151;margin-left:.25rem;}
.driver-popover.wz-tour {font-family:inherit;background:#fbfaf7;color:#1d1b16;border-radius:.85rem;max-width:min(340px,calc(100vw - 24px));padding:1.1rem;box-shadow:0 10px 45px #0006;}
.wz-tour .driver-popover-title {font-size:1.05rem;line-height:1.3;font-weight:650;}
.wz-tour .driver-popover-description {font-size:.875rem;line-height:1.5;margin-top:.55rem;}
.wz-tour .driver-popover-footer button {font-family:inherit;text-shadow:none;border-radius:.4rem;padding:.5rem .65rem;}
.wz-tour .driver-popover-next-btn {background:#166534;color:white;border-color:#166534;}
/* driver.css gives every footer button a near-white hover; keep the action colours instead. */
.wz-tour .driver-popover-next-btn:hover,.wz-tour .driver-popover-next-btn:focus {background:#14532d;border-color:#14532d;color:#fff;}
.wz-tour .driver-popover-prev-btn {background:transparent;color:#166534;border:1px solid #166534;}
.wz-tour .driver-popover-prev-btn:hover,.wz-tour .driver-popover-prev-btn:focus {background:#f4f1e8;color:#14532d;border-color:#14532d;}
.wz-tour .driver-popover-close-btn {color:#71685e;}
.wz-tour .driver-popover-close-btn:hover,.wz-tour .driver-popover-close-btn:focus {color:#1d1b16;}
.wz-tour .driver-popover-progress-text {font-size:.68rem;color:#71685e;}
.wz-tour .driver-popover-arrow-side-left {border-left-color:#fbfaf7;}
.wz-tour .driver-popover-arrow-side-right {border-right-color:#fbfaf7;}
.wz-tour .driver-popover-arrow-side-top {border-top-color:#fbfaf7;}
.wz-tour .driver-popover-arrow-side-bottom {border-bottom-color:#fbfaf7;}
.wz-tour .tour-chapters-link {border:0;background:none;color:#166534;cursor:pointer;text-decoration:underline;font-size:.75rem;margin-top:.75rem;}
.wz-tour .tour-step-status {font-size:.75rem;color:#71685e;margin-top:.65rem;}
.driver-active .cat-tooltip-portal {z-index:1000000001;pointer-events:auto;}
.driver-active .cat-tooltip-portal * {pointer-events:auto;}
.tour-accent {outline:3px solid #4ade80;outline-offset:-3px;}
.product-result-count {font-size:.75rem;white-space:nowrap;color:#d4d4d4;}
.wz-tour .tour-chapters-link + .tour-chapters-link {margin-left:1rem;}
.product-help-dialog :focus-visible,.wz-tour :focus-visible {outline:2px solid #166534;outline-offset:2px;}
.product-toolbar :focus-visible {outline:2px solid #4ade80;outline-offset:2px;}
@media(max-width:767px) {
 [data-sidebar-inline-toggle="true"] {display:none;}
 .product-toolbar {padding:.45rem .6rem;gap:.4rem;}
 .product-toolbar [data-tour=saved] {margin-left:auto;}
 .product-map-legend {font-size:.55rem;max-width:calc(100% - 4.2rem);flex-wrap:wrap;}
 .tour-selecting-region [data-tour="region-detail"] {display:none;}
 .tour-showing-detail [data-tour="region-detail"] {padding-bottom:calc(var(--tour-popover-height, 20rem) + 1rem);}
 .product-help-dialog {padding:1.3rem;}
 .product-help-dialog h2 {font-size:1.4rem;}
 .wz-tour .driver-popover-description {font-size:.8rem;}
}
@media(prefers-reduced-motion:reduce) {.driver-active * {scroll-behavior:auto!important;}}

/* Keep autocomplete inside Driver's highlighted rectangle, including pointer targets. */
.driver-active [data-tour="search"] {display:block;}
.driver-active [data-search-target="results"] {position:relative;top:auto;max-height:10rem;}

.driver-active * {scroll-behavior:auto!important;}

/* Driver enables pointer events on all highlighted descendants. Decorative
   Leaflet canvases must stay transparent to clicks on the region canvas below. */
.driver-active .leaflet-state-boundaries-pane,
.driver-active .leaflet-state-boundaries-pane *,
.driver-active .leaflet-selection-outline-pane,
.driver-active .leaflet-selection-outline-pane * {pointer-events:none!important;}

/* Everyday product controls share layout, but do not depend on the tour. */
.product-filter-section {margin-top:1rem;padding-top:1rem;border-top:1px solid #303030;}
.product-section-title {display:flex;align-items:flex-start;gap:.5rem;font-size:.875rem;font-weight:600;line-height:1.4;margin-bottom:.9rem;}
.product-section-title > span {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.3rem;height:1.3rem;border-radius:50%;background:#262626;color:#e5e5e5;font-size:.75rem;}
.product-criterion-actions {display:flex;justify-content:flex-end;align-items:center;gap:.65rem;margin-bottom:.6rem;font-size:.75rem;color:#b8b8b8;}
.product-criterion-actions button,.product-criterion-actions summary {cursor:pointer;padding:.35rem;}
.product-criterion-actions details {position:relative;}
.product-criterion-actions summary {list-style:none;}
.product-criterion-actions details > div {position:absolute;z-index:20;right:0;min-width:10rem;background:#222;border:1px solid #525252;border-radius:.4rem;padding:.3rem;}
.product-reset-button {display:block;margin-top:1rem;padding:.5rem 0;font-size:.8rem;color:#d4d4d4;cursor:pointer;text-decoration:underline;text-underline-offset:3px;}
.criterion-range[hidden] {display:none;}
.criterion-range {margin:.35rem 0 .6rem;}
.criterion-range summary {flex-wrap:wrap;font-size:.75rem;align-items:center;}
.criterion-range summary span {text-align:right;}
.range-endpoints {display:flex;justify-content:space-between;gap:.5rem;margin-top:.7rem;font-size:.7rem;font-variant-numeric:tabular-nums;color:#d4d4d4;}
.range-endpoints > :last-child {text-align:right;}
.range-explanation {font-size:.75rem;line-height:1.5;color:#d4d4d4;margin:.3rem 0;}
.range-help {font-size:.7rem;line-height:1.5;color:#a3a3a3;}
.product-filter-chips {display:flex;flex:1;min-width:0;flex-wrap:wrap;gap:.4rem;color:#b8b8b8;font-size:.75rem;}
.product-filter-chip {display:inline-flex;max-width:100%;border:1px solid #454545;border-radius:.45rem;background:#1f1f1f;color:#e5e5e5;}
.product-filter-chip button {cursor:pointer;padding:.45rem .55rem;font-size:.75rem;line-height:1.3;}
.product-filter-chip button:first-child {text-align:left;overflow-wrap:anywhere;min-width:0;}
.product-filter-chip button:last-child {flex-shrink:0;border-left:1px solid #454545;min-width:2rem;}
.product-filter-chip button:hover {background:#2a2a2a;}
.product-more-filters {cursor:pointer;font-size:.75rem;text-decoration:underline;text-underline-offset:3px;color:#d4d4d4;}
.product-table-toolbar {display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-shrink:0;padding:.55rem 1rem;background:#171717;border-top:1px solid #303030;}
.product-table-toolbar h2 {font-size:.875rem;font-weight:600;}
.product-map-hint {position:absolute;bottom:1.8rem;right:.75rem;z-index:800;pointer-events:none;max-width:calc(100% - 9rem);padding:.4rem .6rem;border:1px solid #404040;border-radius:.4rem;background:#171717ed;color:#d4d4d4;font-size:.7rem;}
[data-tour="sidebar"] [data-filter-target="category"] {margin-bottom:.6rem;}
[data-tour="sidebar"] :focus-visible {outline:2px solid #4ade80;outline-offset:2px;}
@media(max-width:767px) {
 .product-filter-chips {order:3;flex-basis:100%;}
 .product-more-filters {order:4;padding:.3rem 0;}
 .product-filter-chip button {padding:.6rem .5rem;}
 .product-toolbar .product-result-count {margin-left:auto;}
 .product-toolbar [data-tour="saved"] {margin-left:0;}
 .product-table-toolbar {display:none;}
 .product-map-hint {font-size:.65rem;bottom:4.5rem;max-width:calc(100% - 1.5rem);}
}

.product-filter-chips.is-expanded {max-height:min(30vh,16rem);overflow-y:auto;}

/* Explicit WebKit scrollbar dimensions keep the table rails visible on macOS,
   rather than relying on the system's temporary overlay scrollbars. */
.product-table-scroll {scrollbar-gutter:stable;scrollbar-width:auto;}
.product-table-scroll::-webkit-scrollbar {width:14px;height:14px;}
.product-table-scroll::-webkit-scrollbar-track {background:#202020;}
.product-table-scroll::-webkit-scrollbar-thumb {background:#8a8a8a;border:3px solid #202020;border-radius:7px;}
.product-table-scroll::-webkit-scrollbar-thumb:hover {background:#b3b3b3;}
.product-table-scroll::-webkit-scrollbar-corner {background:#202020;}
@supports not selector(::-webkit-scrollbar) {
 .product-table-scroll {scrollbar-color:#8a8a8a #202020;}
}
