/* ==========================================================================
   juriDict — single stylesheet, loaded by the JuridictPage template only (Styles section of the Layout).
   Everything is a jd- class (or sits under .juridict): nothing touches html, body or the rest of the site, so the order against site.css does not matter.
   Single theme: the site's (RaadVanState, Figma "Conseil d'État") — burgundy, blue, beige, brown;
   Season Mix for headings, Inter for text (fonts loaded by the site).
   Integration setting: --jd-sticky-top (the site header
   is not sticky: 16px is enough).
   1. Tokens and base   2. Shared components   3. Site theme
   4. Displays (stack, steps) and search
   ========================================================================== */

/* 1. Tokens and base ----------------------------------------------------- */

.juridict {
    /* site palette (tailwind.config.js of RaadVanState) */
    --rvs-bordeaux: #880832;
    --rvs-bordeaux-dark: #630524;
    --rvs-blue: #BAD1EB;
    --rvs-blue-dark: #ADC9E8;
    --rvs-beige: #F0EBE5;
    --rvs-beige-dark: #EBE5D8;
    --rvs-brown: #B29161;
    --rvs-brown-light: #C9B290;

    --jd-font-body: Inter, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --jd-font-title: "Season Mix", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --jd-font-mono: Inter, "Segoe UI", sans-serif;   /* aligned digits rather than a monospace font */
    --jd-h2: clamp(1.625rem, 1.3rem + 1.2vw, 2.1875rem);   /* site h2: 26 → 35 px */
    --jd-h3: clamp(1.25rem, 1.2rem + .2vw, 1.375rem);      /* h3: 20 → 22 px */
    --jd-bg: transparent;
    --jd-surface: #FFFFFF;
    --jd-surface-2: var(--rvs-beige);
    --jd-text: #000000;
    --jd-muted: #5F5F5F;
    --jd-border: var(--rvs-beige-dark);
    --jd-accent: var(--rvs-bordeaux);
    --jd-accent-contrast: #FFFFFF;
    --jd-accent-soft: rgba(136, 8, 50, .07);
    --jd-gold: var(--rvs-brown);
    --jd-bar-bg: var(--rvs-bordeaux-dark);
    --jd-bar-text: #FFFFFF;
    --jd-folder: var(--rvs-beige);
    --jd-folder-dark: var(--rvs-brown-light);
    --jd-radius: 0;
    --jd-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(99, 5, 36, .06);
    --jd-focus: 0 0 0 3px var(--rvs-blue-dark), 0 0 0 5px var(--rvs-bordeaux-dark);
    /* distance between the top of the screen and the panels that stay visible while scrolling */
    --jd-sticky-top: 16px;

    box-sizing: border-box;
    background: var(--jd-bg);
    color: var(--jd-text);
    font: 1rem/1.5 var(--jd-font-body);
    -webkit-font-smoothing: antialiased;
}
.juridict *, .juridict *::before, .juridict *::after { box-sizing: inherit; }
.juridict a { color: inherit; text-decoration: none; }
.juridict a:focus-visible { outline: none; box-shadow: var(--jd-focus); border-radius: 4px; }
.juridict h1:focus { outline: none; }
.juridict h1, .juridict h2, .juridict h3 { font-family: var(--jd-font-title); font-weight: 500; line-height: 1.2; margin: 0; }
.juridict ul, .juridict ol { margin: 0; padding: 0; list-style: none; }
.juridict .jd-muted { color: var(--jd-muted); }

/* 2. Shared components --------------------------------------------------- */

.jd-bar {
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
    padding: 12px 28px;
    background: var(--jd-bar-bg); color: var(--jd-bar-text);
}
.jd-switch { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.jd-switch a { padding: 6px 14px; border-radius: 999px; font-size: .88rem; opacity: .78; transition: background .15s, opacity .15s; }
.jd-switch a:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.jd-switch a.is-active { opacity: 1; background: var(--jd-accent); color: var(--jd-accent-contrast); }
.jd-main { padding: 24px 28px 56px; max-width: 1480px; margin: 0 auto; }
.jd-alert { padding: 16px 20px; border-radius: var(--jd-radius); background: var(--jd-accent-soft); border-left: 4px solid var(--jd-accent); }

.jd-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .86rem; color: var(--jd-muted); }
.jd-crumbs li + li::before { content: "›"; margin: 0 8px; opacity: .6; }
.jd-crumbs a:hover { color: var(--jd-accent); text-decoration: underline; text-underline-offset: 3px; }
.jd-crumbs [aria-current] { color: var(--jd-text); font-weight: 600; }
.jd-crumbs.is-inline { margin: 4px 0; }

.jd-counts { display: inline-flex; gap: 6px; flex-wrap: wrap; font-size: .78rem; }
.jd-count { padding: 2px 8px; border-radius: 999px; background: var(--jd-surface-2); color: var(--jd-muted); white-space: nowrap; }
.jd-count b { color: var(--jd-text); font-weight: 600; }
.jd-count.is-judgments { background: var(--jd-accent-soft); }
.jd-count.is-judgments b { color: var(--jd-accent); }
.jd-count.is-empty { font-style: italic; opacity: .75; }

/* compact counts: ▤ sub-rubrics · § direct judgments · Σ judgments in total */
.jd-counts.is-compact { display: flex; gap: 4px; margin-top: 3px; font-size: .68rem; }
.jd-counts.is-compact .jd-count { padding: 0 6px; line-height: 1.6; font-family: var(--jd-font-mono); }
.jd-counts.is-compact .jd-count b { font-weight: 600; }
.jd-count-icon { margin-right: 3px; opacity: .65; }
.jd-count.is-total { background: var(--jd-surface-2); box-shadow: inset 0 0 0 1px var(--jd-border); }
.jd-count.is-total b { color: var(--jd-text); }
.jd-counts.is-empty .jd-count { opacity: .6; }
.jd-stack-item.is-selected .jd-count { background: rgba(255, 255, 255, .16); color: inherit; box-shadow: none; }
.jd-stack-item.is-selected .jd-count b { color: inherit; }
.jd-stack-item .jd-counts { display: flex; }
.jd-step-box .jd-counts { margin-top: 6px; }
.jd-step-box.is-current .jd-count { background: rgba(255, 255, 255, .14); color: #FFFFFF; box-shadow: none; }
.jd-step-box.is-current .jd-count b { color: #fff; }
.jd-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .72rem; font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase; background: var(--jd-gold); color: #1E1714; }
.jd-total { font: 600 .85rem var(--jd-font-mono); padding: 2px 10px; border-radius: 999px; background: var(--jd-accent); color: var(--jd-accent-contrast); }

.jd-lps-head { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; }
.jd-lps-head h2 { font-size: 1.15rem; }
.jd-lps-items { display: flex; flex-direction: column; gap: 10px; }
.jd-lp { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--jd-radius);
    background: var(--jd-surface); border: 1px solid var(--jd-border); transition: border-color .15s, transform .15s, box-shadow .15s; }
.jd-lp:hover { border-color: var(--jd-accent); box-shadow: var(--jd-shadow); }
.jd-lp[aria-current] { border-color: var(--jd-accent); box-shadow: inset 4px 0 0 var(--jd-accent); }
.jd-lp-head { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; color: var(--jd-muted); }
.jd-lp-num { font: 600 .82rem var(--jd-font-mono); color: var(--jd-accent); }
.jd-lp-applicant { font-size: .875rem; font-weight: 400; color: var(--jd-text); }
.jd-lp-label { margin-right: 4px; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--jd-muted); }
.jd-lp-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.jd-lp.is-compact .jd-lp-text { -webkit-line-clamp: 3; font-size: .9rem; }
.jd-lp .jd-badge { align-self: flex-start; }

/* pagination (above and below the lists): range, numbered pages, number per page */
.jd-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px;
    margin: 4px 0 12px; font-size: .85rem; color: var(--jd-muted); }
.jd-pager.is-bottom { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--jd-border); }
.jd-pager-range { font-variant-numeric: tabular-nums; }
.jd-pager-pages { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.jd-pager-page, .jd-pager-step { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center;
    border-radius: 8px; border: 1px solid var(--jd-border); background: var(--jd-surface); color: var(--jd-text);
    font-variant-numeric: tabular-nums; text-decoration: none; }
.jd-pager a.jd-pager-page:hover, .jd-pager a.jd-pager-step:hover { border-color: var(--jd-accent); color: var(--jd-accent); }
.jd-pager-page.is-current { background: var(--jd-accent); border-color: var(--jd-accent); color: var(--jd-accent-contrast); font-weight: 700; }
.jd-pager-step { font-size: 1.1rem; line-height: 1; }
.jd-pager-step.is-disabled { opacity: .35; }
.jd-pager-gap { padding: 0 2px; }
.jd-pager-size { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--jd-surface-2); }
.jd-pager-size-label { padding: 0 8px 0 6px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.jd-pager-size-option { min-width: 34px; padding: 3px 9px; border-radius: 999px; text-align: center; color: var(--jd-text); text-decoration: none; }
.jd-pager a.jd-pager-size-option:hover { background: var(--jd-surface); color: var(--jd-accent); }
.jd-pager-size-option.is-current { background: var(--jd-accent); color: var(--jd-accent-contrast); font-weight: 700; }

.jd-detail { position: relative; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 16px; }
.jd-detail h2:focus { outline: none; }
.jd-detail-head { display: flex; flex-direction: column; gap: 2px; padding-right: 44px; }
.jd-kicker { margin: 0; font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--jd-accent); }
.jd-detail-head h2 { font-size: 1.55rem; }
.jd-close { position: absolute; top: 0; right: 0; width: 34px; height: 34px; display: grid; place-items: center;
    border-radius: 50%; border: 1px solid var(--jd-border); color: var(--jd-muted); background: var(--jd-surface); }
.jd-close:hover { color: var(--jd-accent); border-color: var(--jd-accent); }
.jd-detail-text { margin: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--jd-gold);
    font: 1.08rem/1.7 var(--jd-font-title); white-space: pre-line; }
.jd-note { margin: 0; font-style: italic; color: var(--jd-muted); }
.jd-prose { margin: 0; white-space: pre-line; }
.jd-judgment { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 20px; margin: 0;
    padding: 16px 18px; border-radius: var(--jd-radius); background: var(--jd-surface-2); }
.jd-judgment div { min-width: 0; }
.jd-judgment dt { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--jd-muted); }
.jd-judgment dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.jd-judgment-id dd { font-family: var(--jd-font-mono); color: var(--jd-accent); }
.jd-judgment-decision, .jd-judgment-applicant { grid-column: 1 / -1; }
.jd-judgment .jd-badge { align-self: center; justify-self: start; }
.jd-pdf { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
    background: var(--jd-accent); color: var(--jd-accent-contrast) !important; font-weight: 600; font-size: .9rem; }
.jd-pdf::before { content: ""; width: 14px; height: 16px; border: 2px solid currentColor; border-radius: 2px; }
.jd-pdf:hover { filter: brightness(1.1); }
.jd-detail-section h3 { font-size: 1rem; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--jd-border); }
.jd-concordant > li, .jd-related > li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px dashed var(--jd-border); }
.jd-concordant small, .jd-related small { color: var(--jd-muted); font-size: .8rem; }
.jd-concordant-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.jd-concordant-ref { font-weight: 600; color: var(--jd-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.jd-concordant-ref::after { content: " ↗"; font-size: .8em; }
.jd-concordant-open { font-size: .8rem; white-space: nowrap; color: var(--jd-muted); }
.jd-concordant-open:hover, .jd-concordant-ref:hover { color: var(--jd-accent); }
/* "Requérant VAN DOORE": name in bold */
.jd-parties-label { color: var(--jd-muted); }
.jd-parties strong { font-weight: 700; color: var(--jd-text); }
.jd-related > li { gap: 6px; }
.jd-related-paths { display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 2px solid var(--jd-border); }
.jd-related-paths .jd-crumbs.is-inline { margin: 0; padding: 3px 0 3px 14px; position: relative; }
.jd-related-paths .jd-crumbs.is-inline::before { content: "▸"; position: absolute; left: 0; top: 3px; font-size: .72rem; color: var(--jd-accent); }
.jd-related-paths .jd-crumbs + .jd-crumbs { border-top: 1px dotted var(--jd-border); }
.jd-related-paths .jd-crumbs ol { font-size: .78rem; }
.jd-related-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.jd-related-text:hover { color: var(--jd-accent); }

/* 3. Site theme ----------------------------------------------------------------
   Follows the RaadVanState components: btn-primary (burgundy pill), o-card (light beige),
   c-search-filters (light blue), c-pagination (round brown badges, burgundy text for AA contrast),
   blue mark. */

.juridict .jd-bar { padding: 0; margin-bottom: 24px; gap: 16px 24px; background: none; color: var(--jd-text); }
.juridict .jd-main { padding: 0 0 64px; max-width: none; }

/* display switch: toggle between the two versions */
.juridict .jd-switch { margin-left: auto; gap: 0; padding: 3px; border-radius: 999px; background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--rvs-bordeaux); }
.juridict .jd-switch a { padding: 8px 18px; border-radius: 999px; font-size: .875rem; font-weight: 500; opacity: 1; color: var(--rvs-bordeaux); }
.juridict .jd-switch a:hover { background: var(--jd-accent-soft); }
.juridict .jd-switch a.is-active { background: var(--rvs-bordeaux); color: #FFFFFF; }

/* search field: like the site's (white, grey border, burgundy button) */
.juridict .jd-search-bar { flex: 1 1 320px; max-width: 560px; height: 48px; padding: 0 4px 0 16px; border-radius: 8px;
    background: #FFFFFF; border: 1px solid #ADADAD; }
.juridict .jd-search-bar:focus-within { background: #FFFFFF; border-color: var(--rvs-bordeaux); box-shadow: var(--jd-focus); }
.juridict .jd-search-bar-input { color: var(--jd-text); font-size: 1rem; }
.juridict .jd-search-bar-input::placeholder { color: #6B6B6B; opacity: 1; }
.juridict .jd-search-bar button { width: 40px; height: 40px; border-radius: 6px; background: var(--rvs-bordeaux); color: #FFFFFF; }
.juridict .jd-search-bar button:hover { background: var(--rvs-bordeaux-dark); }
.juridict .jd-search-bar-adv { border: 0; background: var(--rvs-blue); color: var(--rvs-bordeaux-dark); }
.juridict .jd-search-bar-adv:hover { background: var(--rvs-blue-dark); }

/* buttons: the site's btn-primary */
.juridict .jd-button { padding: 12px 24px; font: 600 1rem var(--jd-font-body); background: var(--rvs-bordeaux); }
.juridict .jd-button:hover { filter: none; background: var(--rvs-bordeaux-dark); }
.juridict .jd-button.is-ghost { background: #FFFFFF; color: var(--rvs-bordeaux); box-shadow: inset 0 0 0 2px var(--rvs-bordeaux); }
.juridict .jd-button.is-ghost:hover { background: var(--rvs-bordeaux); color: #FFFFFF; }
.juridict .jd-pdf { padding: 12px 24px; font-size: 1rem; background: var(--rvs-bordeaux); }
.juridict .jd-pdf:hover { filter: none; background: var(--rvs-bordeaux-dark); }

/* legal point cards: the site's o-card */
.juridict .jd-lp { padding: 20px 24px; background: var(--rvs-beige); border: 0; border-left: 4px solid transparent; }
.juridict .jd-lp:hover { box-shadow: none; border-left-color: var(--rvs-brown); }
.juridict .jd-lp[aria-current] { box-shadow: none; border-left-color: var(--rvs-bordeaux); }
.juridict .jd-lp-num { font: 500 1.25rem/1.2 var(--jd-font-title); color: var(--jd-text); }
.juridict .jd-lp.is-compact { padding: 14px 18px; }
.juridict .jd-lp.is-compact .jd-lp-num { font-size: 1.05rem; }
.juridict .jd-badge { border-radius: 0; padding: 0; background: none; color: var(--rvs-bordeaux); font-size: .875rem; font-weight: 400;
    letter-spacing: 0; text-transform: none; }
.juridict .jd-kicker { font-size: .875rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--rvs-bordeaux); }
.juridict .jd-detail-head h2 { font-size: var(--jd-h2); }
.juridict .jd-detail-text { border-left: 4px solid var(--rvs-brown); font: 1.125rem/1.6 var(--jd-font-body); }
.juridict .jd-judgment { background: var(--rvs-beige); }
.juridict .jd-judgment dt { font-size: .875rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--jd-text); }
.juridict .jd-detail-section h3 { font-size: var(--jd-h3); border-bottom-color: var(--rvs-beige-dark); }
.juridict .jd-close { border-radius: 50%; border: 0; background: var(--rvs-brown); color: #FFFFFF; }
.juridict .jd-close:hover { background: var(--rvs-bordeaux); color: #FFFFFF; }
.juridict .jd-concordant-ref, .juridict .jd-crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.juridict .jd-crumbs a { color: var(--rvs-bordeaux); }
.juridict .jd-crumbs [aria-current] { font-weight: 500; }

/* counts: plain, like those of the site's filters */
.juridict .jd-count { border-radius: 999px; background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--rvs-beige-dark); }
.juridict .jd-count.is-judgments { background: var(--rvs-blue); box-shadow: none; }
.juridict .jd-count.is-judgments b { color: var(--rvs-bordeaux-dark); }
.juridict .jd-count.is-total { background: var(--rvs-beige-dark); box-shadow: none; }

/* pagination: the site's c-pagination */
.juridict .jd-pager-page, .juridict .jd-pager-step { min-width: 40px; height: 40px; border-radius: 50%; border: 0;
    background: var(--rvs-brown-light); color: var(--rvs-bordeaux-dark); font-weight: 500; }
.juridict .jd-pager a.jd-pager-page:hover, .juridict .jd-pager a.jd-pager-step:hover { background: var(--rvs-brown); color: var(--rvs-bordeaux-dark); }
.juridict .jd-pager-page.is-current { background: var(--rvs-brown); color: #000000; font-weight: 700; }
.juridict .jd-pager-size { background: var(--rvs-beige); }
.juridict .jd-pager-size-option.is-current { background: var(--rvs-bordeaux); }
.juridict .jd-pager.is-bottom { border-top: 0; justify-content: center; }

/* search: form and found rubrics in the blue of c-search-filters */
.juridict .jd-search-form { border: 0; border-radius: 0; box-shadow: none; background: var(--rvs-blue); }
.juridict .jd-search-form .jd-input { border-color: #FFFFFF; }
.juridict .jd-search-adv { border-top-color: rgba(99, 5, 36, .25); }
.juridict .jd-search-adv summary, .juridict .jd-search-grid > label, .juridict .jd-search-kinds legend { color: var(--rvs-bordeaux-dark); }
.juridict .jd-search-grid > label, .juridict .jd-search-kinds legend { font-size: .875rem; letter-spacing: 0; text-transform: none; }
.juridict .jd-search-kinds { border-color: rgba(99, 5, 36, .25); }
.juridict .jd-chip { border-radius: 999px; background: var(--rvs-blue); color: var(--rvs-bordeaux-dark); }
/* understood search, in plain words: exclusion stands out (struck through in burgundy), the others stay blue */
.juridict .jd-chip.is-none { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--rvs-bordeaux); color: var(--rvs-bordeaux); }
.juridict .jd-chip.is-any, .juridict .jd-chip.is-exact, .juridict .jd-chip.is-starts { font-weight: 500; }
.juridict .jd-chip.is-filter:hover, .juridict .jd-chip.is-filter:focus-visible { background: var(--rvs-bordeaux); color: #FFFFFF; }

/* guided search: one field per combination, label + tooltip on the left, field on the right */
.jd-guide { margin: 16px 0 0; padding: 14px 16px; background: rgba(255, 255, 255, .45); }
/* section title: fold button, rotating chevron (same chevron as the site menu) */
.juridict .jd-guide > summary { width: auto; }
.jd-guide > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none;
    font: 600 1rem var(--jd-font-body); color: var(--rvs-bordeaux-dark); }
.jd-guide > summary::-webkit-details-marker { display: none; }
.jd-guide > summary::after { content: ""; flex: none; width: 14px; height: 8px; background: currentColor; transition: transform .15s;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8'%3E%3Cpath d='M1.67 1.17 7 6.5l5.33-5.33' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8'%3E%3Cpath d='M1.67 1.17 7 6.5l5.33-5.33' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat; }
.jd-guide[open] > summary::after { transform: rotate(180deg); }
.jd-guide > summary:focus-visible { outline: none; box-shadow: var(--jd-focus); border-radius: 4px; }
.jd-guide-fields { margin: 12px 0 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.juridict .jd-search-grid > legend { float: left; width: 100%; margin: 0 0 4px; padding: 0;
    font: 600 1rem var(--jd-font-body); color: var(--rvs-bordeaux-dark); }
.jd-guide-row { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 6px 16px; align-items: center; }
.jd-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jd-field-label { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--rvs-bordeaux-dark); }
.juridict .jd-search-grid { margin-top: 16px; padding: 14px 16px 16px; border: 0; background: rgba(255, 255, 255, .45); }
.juridict .jd-search-grid > legend { float: none; grid-column: 1 / -1; padding-top: 14px; }
.juridict .jd-search-grid { padding-top: 0; }
.juridict .jd-search-kinds legend .jd-field-label { font-size: .875rem; }

/* "ⓘ" tooltip: on hover, keyboard focus, or opened by touch (is-open class set by juridict.js) */
.jd-tip { position: relative; display: inline-flex; }
.jd-tip-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
    background: none; color: var(--rvs-bordeaux-dark); cursor: help; }
.jd-tip-btn:hover, .jd-tip.is-open .jd-tip-btn { background: rgba(255, 255, 255, .7); }
.jd-tip-btn:focus-visible { outline: none; box-shadow: var(--jd-focus); }
.jd-tip-text { position: absolute; z-index: 40; left: -8px; bottom: calc(100% + 8px); width: max-content; max-width: min(300px, calc(100vw - 48px));
    padding: 8px 12px; border-radius: 6px; background: var(--rvs-bordeaux-dark); color: #FFFFFF;
    font: 400 .8125rem/1.45 var(--jd-font-body); letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
    box-shadow: 0 8px 24px rgba(40, 3, 16, .25); display: none; pointer-events: none; }
/* closed, the bubble takes no space (no horizontal scroll); near the right edge it opens to the left (juridict.js) */
.jd-tip-text.is-flip { left: auto; right: -8px; }
.jd-tip-text.is-flip::after { left: auto; right: 14px; }
.jd-tip-text::after { content: ""; position: absolute; left: 14px; top: 100%; border: 6px solid transparent; border-top-color: var(--rvs-bordeaux-dark); }
.jd-tip:hover .jd-tip-text, .jd-tip-btn:focus-visible + .jd-tip-text, .jd-tip.is-open .jd-tip-text { display: block; animation: jd-tip-in .12s ease-out; }
@keyframes jd-tip-in { from { opacity: 0; transform: translateY(4px); } }
.jd-search-main .jd-tip { align-self: center; }
/* tooltip of the free field: on the right of the screen, it opens to the left */
.jd-search-main .jd-tip-text { left: auto; right: -8px; }
.jd-search-main .jd-tip-text::after { left: auto; right: 14px; }
/* search help: the site's "ⓘ Aide" / "Zoektips" (underlined burgundy link, beige panel, examples as code) */
.jd-help { font-size: .875rem; }
.juridict .jd-search-form .jd-help { margin-top: 12px; }
.jd-help summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; width: max-content;
    color: var(--rvs-bordeaux-dark); text-decoration: underline; text-underline-offset: 3px; }
.jd-help summary::-webkit-details-marker { display: none; }
.jd-help summary:hover { text-decoration: none; }
.jd-help summary:focus-visible { outline: none; box-shadow: var(--jd-focus); border-radius: 4px; }
.jd-help-body { margin-top: 10px; max-width: 48rem; padding: 16px; border-radius: 8px; background: var(--rvs-beige); color: var(--jd-text); }
.jd-help-body p { margin: 0 0 8px; }
.jd-help-body ul { display: flex; flex-direction: column; gap: 4px; }
.jd-help-body li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.jd-help-example { padding: 0; border: 0; background: none; cursor: pointer; }
.jd-help-example code { display: inline-block; padding: 0 6px; border: 1px solid #E5E7EB; border-radius: 4px; background: #FFFFFF;
    font: .75rem/1.25rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--jd-text); }
.jd-help-example:hover code, .jd-help-example:focus-visible code { border-color: var(--rvs-bordeaux); color: var(--rvs-bordeaux); }
.jd-help-example:focus-visible { outline: none; }
/* in the bar: icon only next to the magnifier, floating panel */
.jd-help.is-popover { position: relative; align-self: center; margin-left: -12px; }
.jd-help.is-popover summary { width: 36px; height: 36px; justify-content: center; border-radius: 50%; text-decoration: none; }
.jd-help.is-popover summary:hover, .jd-help.is-popover[open] summary { background: var(--rvs-beige); }
.jd-help.is-popover summary svg { width: 20px; height: 20px; }
.jd-help.is-popover .jd-help-body { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(380px, calc(100vw - 32px));
    margin: 0; box-shadow: 0 12px 32px rgba(40, 3, 16, .18); }
.jd-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.juridict .jd-hit-text mark, .juridict .jd-detail-text mark { background: var(--rvs-blue-dark); box-shadow: none; border-radius: 0; }

/* Stack: the menus are beige folders; the tab uses the site's dark burgundy */
.juridict .jd-stack-col { border-radius: 0; border-color: var(--rvs-brown-light); }
.juridict .jd-stack-item.is-selected { background: var(--rvs-bordeaux); color: #FFFFFF; }
.juridict .jd-stack-item.is-selected::before { background: var(--rvs-brown); }
.juridict .jd-stack-item.is-selected::after { color: #FFFFFF; }
.juridict .jd-stack-details { border: 0; border-radius: 0; background: var(--rvs-beige); box-shadow: none; }
.juridict .jd-stack-head { border-bottom-color: var(--rvs-brown); }
.juridict .jd-stack-head h2 { font-size: var(--jd-h3); }
.juridict .jd-stack-details .jd-lp { background: #FFFFFF; }
/* chosen rubric (burgundy background): counts in translucent white, readable whatever their type */
.juridict .jd-stack-item.is-selected .jd-count { background: rgba(255, 255, 255, .18); box-shadow: none; color: #FFFFFF; }
.juridict .jd-stack-item.is-selected .jd-count b { color: #FFFFFF; }

/* "Expanded" mode: menus + content box in a modal window, full page width with a margin on each side */
.jd-stack-tools { display: flex; justify-content: flex-end; margin: -8px -8px 0 0; }
.juridict .jd-expand { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 0; border-radius: 999px; cursor: pointer;
    font: 500 .875rem var(--jd-font-body); background: #FFFFFF; color: var(--rvs-bordeaux); box-shadow: inset 0 0 0 1px var(--rvs-bordeaux); }
.juridict .jd-expand:hover { background: var(--rvs-bordeaux); color: #FFFFFF; }
.juridict .jd-expand:focus-visible { outline: none; box-shadow: var(--jd-focus); }
.jd-expand-close, .jd-stack-layout.is-expanded .jd-expand-open { display: none; }
.jd-stack-layout.is-expanded .jd-expand-close { display: inline; }
.jd-stack-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(40, 3, 16, .45); }
.jd-stack-backdrop[hidden] { display: none; }
.juridict .jd-stack-layout.is-expanded {
    --jd-bleed: clamp(16px, 2.5vw, 40px);
    position: fixed; z-index: 1001; inset: var(--jd-bleed); padding: clamp(16px, 2vw, 28px);
    align-items: stretch; background: #FFFFFF;
    box-shadow: 0 24px 64px rgba(40, 3, 16, .35); animation: jd-expand .18s ease-out both; }
/* in the window: menus and box take the full height, only the box scrolls */
.jd-stack-layout.is-expanded .jd-stack { height: auto; min-height: 0; }
.jd-stack-layout.is-expanded .jd-stack-details { max-height: none; }
.jd-stack-layout.is-expanded .jd-stack-tools { position: sticky; top: -24px; z-index: 2; }
@keyframes jd-expand { from { opacity: 0; transform: scale(.98); } }
/* page behind the window: frozen while it is open (class set by juridict.js) */
html.jd-modal-open { overflow: hidden; }

/* small uppercase headings (menu tabs, "Sub-rubrics"): Inter, like the site's labels */
.juridict .jd-stack-tab, .juridict .jd-step-subs h2 { font-family: var(--jd-font-body); font-weight: 600; }
/* menu with menus open to its right: clickable (title underlined on hover), goes back to that level */
.jd-stack-col[data-jd-level] { cursor: pointer; }
.juridict .jd-stack-tab-link { color: inherit; text-decoration: none; }
.juridict .jd-stack-tab-link:hover, .juridict .jd-stack-tab-link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* Steps */
.juridict .jd-step-box { border-radius: 0; border-color: var(--rvs-beige-dark); border-left-color: var(--rvs-brown); box-shadow: none; }
.juridict .jd-step-box.is-current { background: var(--rvs-bordeaux-dark); border-color: var(--rvs-bordeaux-dark); border-left-color: var(--rvs-brown); }
.juridict .jd-step-box.is-current .jd-step-level { color: var(--rvs-brown-light); }
.juridict .jd-step-box.is-current .jd-count { background: rgba(255, 255, 255, .16); color: #FFFFFF; box-shadow: none; }
.juridict .jd-step-box.is-current .jd-count b { color: #FFFFFF; }
.juridict .jd-step-subs { border: 0; border-radius: 0; background: var(--rvs-blue); }
.juridict .jd-step-subs h2 { color: var(--rvs-bordeaux-dark); }
.juridict .jd-step-sub { border-radius: 0; background: #FFFFFF; }
.juridict .jd-steps-main { border: 0; border-radius: 0; box-shadow: none; background: var(--rvs-beige); }
.juridict .jd-steps-main .jd-lp { background: #FFFFFF; }


/* 4. Displays -------------------------------------------------------------- */

/* 4.1 Landing of a display (no rubric chosen) */
.jd-folio { text-align: center; padding: 60px 20px; display: grid; justify-items: center; gap: 10px; }
.jd-folio h2 { font-size: var(--jd-h2); }

/* 4.2 Stack (original navigation): offset floating menus that overlap */
.jd-stack-layout { display: flex; gap: 24px; align-items: flex-start; }
/* The menus take the room they need (one menu + one offset per open level), the record takes the rest:
   it widens when a domain is closed, narrows when one is opened. */
.jd-stack { position: relative; height: calc(100vh - var(--jd-sticky-top) - 48px); min-height: 460px;
    flex: none; width: calc(var(--jd-col) + (var(--n) - 1) * 64px); max-width: 62%;
    --jd-col: 280px;
    --jd-step: min(64px, calc((100% - var(--jd-col)) / max(calc(var(--n) - 1), 1))); }
.jd-stack-col {
    position: absolute; top: 0; bottom: 0; left: calc(var(--i) * var(--jd-step)); width: var(--jd-col);
    z-index: calc(var(--i) + 1); overflow-y: auto; overflow-x: hidden;
    /* the older the menu, the darker the folder (position() of cols_obj.js) */
    background: color-mix(in oklab, var(--jd-folder) calc(100% - var(--d) * 9%), var(--jd-folder-dark));
    border: 1px solid var(--jd-folder-dark); border-radius: 2px 10px 4px 4px;
    box-shadow: -6px 0 14px rgba(99, 5, 36, .18);
    transition: background .15s, box-shadow .15s, transform .15s;
    animation: jd-drop .2s ease-out both;
}
.jd-stack-col:last-child { background: var(--jd-surface); }
.jd-stack-col.is-front { z-index: 99; background: var(--jd-surface); box-shadow: 0 10px 30px rgba(99, 5, 36, .35); transform: translateY(-2px); }
@keyframes jd-drop { from { opacity: 0; transform: translateX(-12px); } }
.jd-stack-tab { position: sticky; top: 0; z-index: 1; margin: 0; padding: 10px 14px 8px;
    font: 600 .78rem/1.3 var(--jd-font-body); letter-spacing: .08em; text-transform: uppercase;
    color: var(--jd-bar-text); background: var(--jd-bar-bg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jd-stack-col ul { padding: 4px 0; }
.jd-stack-col { --jd-scroll-size: 8px; scrollbar-gutter: stable; }
.jd-stack-item { display: block; position: relative; padding: 7px 26px 7px 12px; font-size: .9rem; border-bottom: 1px dashed var(--jd-border); }
.jd-stack-item:hover { background: rgba(136, 8, 50, .08); }
.jd-stack-item.has-children::after { content: "›"; position: absolute; right: 10px; top: 50%; transform: translateY(-52%); font-size: 1.2rem; color: var(--jd-muted); }
.jd-stack-item.is-selected { background: var(--jd-text); color: var(--jd-surface); }
.jd-stack-item.is-selected::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--jd-accent); }
.jd-stack-item.is-selected::after { color: var(--jd-gold); }
.jd-stack-item.is-empty { color: #999; }
.jd-stack-details { flex: 1 1 0; min-width: 0; max-height: calc(100vh - var(--jd-sticky-top) - 48px); overflow-y: auto; padding: 24px 28px;
    background: var(--jd-surface); border: 1px solid var(--jd-border); border-radius: var(--jd-radius);
    box-shadow: 4px 4px 0 var(--jd-folder-dark); display: flex; flex-direction: column; gap: 16px; }
.jd-stack-head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 2px solid var(--jd-accent); }
.jd-stack-head h1 { font-size: 1.6rem; }

/* 4.3 Steps: boxes of the chosen rubrics, sub-rubrics below, path top right */
.jd-steps { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
.jd-steps-side { display: flex; flex-direction: column; gap: 18px; }
.jd-step-boxes { display: flex; flex-direction: column; gap: 8px; }
.jd-step-box { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 44px 12px 16px;
    margin-left: calc(var(--i) * 10px);
    background: var(--jd-surface); border: 1px solid var(--jd-border); border-left: 4px solid var(--rvs-bordeaux); border-radius: var(--jd-radius);
    box-shadow: 0 1px 2px rgba(99, 5, 36, .06); animation: jd-drop .2s ease-out both; }
.jd-step-box.is-current { background: var(--jd-text); color: #FFFFFF; border-color: var(--jd-text); border-left-color: var(--jd-gold);
    box-shadow: 0 8px 22px rgba(99, 5, 36, .25); }
.jd-step-level { font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--jd-muted); }
.jd-step-box.is-current .jd-step-level { color: var(--jd-gold); }
/* Season Mix only exists in Regular and Medium: never above 500, or the browser fakes a blurry bold */
.jd-step-name { font: 500 1.05rem/1.3 var(--jd-font-title); }
a.jd-step-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.jd-step-close { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; display: grid; place-items: center;
    border-radius: 50%; font-size: .8rem; color: var(--jd-muted); border: 1px solid var(--jd-border); background: var(--jd-surface); }
.jd-step-close:hover { color: #FFFFFF; background: var(--rvs-bordeaux); border-color: var(--rvs-bordeaux); }
.jd-step-box.is-current .jd-step-close { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .35); }
.jd-step-subs { padding: 16px; background: var(--jd-surface-2); border-radius: var(--jd-radius); border: 1px dashed var(--jd-gold); }
.jd-step-subs h2 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--jd-muted); font-family: var(--jd-font-body); margin-bottom: 10px; }
.jd-step-subs ul { display: flex; flex-direction: column; gap: 6px; }
.jd-step-sub { display: flex; flex-direction: column; gap: 4px; padding: 9px 12px; border-radius: 8px; background: var(--jd-surface); border: 1px solid transparent; }
.jd-step-sub:hover { border-color: var(--rvs-bordeaux); box-shadow: 0 4px 12px rgba(99, 5, 36, .1); }
.jd-step-sub.is-empty { opacity: .5; }
.jd-steps-main { min-width: 0; padding: 22px 30px 30px; background: var(--jd-surface); border-radius: var(--jd-radius);
    border: 1px solid var(--jd-border); box-shadow: 0 12px 34px rgba(99, 5, 36, .08); display: flex; flex-direction: column; gap: 18px; }
.jd-steps-path { padding-bottom: 12px; border-bottom: 1px solid var(--jd-border); }
.jd-steps-path ol { font-size: .95rem; }
.jd-steps-path a { color: var(--rvs-bordeaux); }

/* 4.4 Search: bar field, advanced form, results  */
.jd-search-bar { display: flex; align-items: center; flex: 1 1 220px; max-width: 360px; height: 36px; padding: 0 4px 0 14px;
    border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); transition: background .15s, border-color .15s; }
.jd-search-bar:focus-within { background: rgba(255, 255, 255, .18); border-color: var(--jd-gold); }
.jd-search-bar-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--jd-bar-text); font: inherit; font-size: .9rem; }
.jd-search-bar-input::placeholder { color: var(--jd-bar-text); opacity: .6; }
.jd-search-bar button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%;
    background: var(--jd-accent); color: var(--jd-accent-contrast); cursor: pointer; }
.jd-search-bar-adv { width: 30px; height: 30px; margin-left: 4px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: var(--jd-bar-text); transition: background .15s, border-color .15s; }
.jd-search-bar-adv:hover { background: rgba(255, 255, 255, .15); border-color: var(--jd-gold); }

.jd-search-view { display: flex; flex-direction: column; gap: 16px; }
.jd-search-form { padding: 18px 20px; border-radius: var(--jd-radius); background: var(--jd-surface); border: 1px solid var(--jd-border); box-shadow: var(--jd-shadow); }
.jd-search-main { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.jd-input { font: inherit; font-size: .95rem; color: var(--jd-text); background: var(--jd-surface); border: 1px solid var(--jd-border);
    border-radius: calc(var(--jd-radius) * .7 + 2px); padding: 8px 12px; min-width: 0; }
.jd-input:focus { outline: none; border-color: var(--jd-accent); box-shadow: var(--jd-focus); }
.jd-search-q { flex: 1 1 320px; font-size: 1.05rem; padding: 11px 16px; }
.jd-button { font: 600 .92rem var(--jd-font-body); padding: 10px 20px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--jd-accent); color: var(--jd-accent-contrast); }
.jd-button:hover { filter: brightness(1.1); }
/* secondary button: outline in the accent colour, filled on hover */
.jd-button.is-ghost { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--jd-accent);
    box-shadow: inset 0 0 0 2px var(--jd-accent); text-decoration: none; }
.jd-button.is-ghost:hover { filter: none; background: var(--jd-accent); color: var(--jd-accent-contrast); }
.jd-button.is-ghost span { font-size: .8rem; }
.jd-search-reset { font-size: .86rem; color: var(--jd-muted); text-decoration: underline; text-underline-offset: 3px; }
.jd-search-adv { margin-top: 14px; border-top: 1px dashed var(--jd-border); padding-top: 10px; }
.jd-search-adv summary { cursor: pointer; font-weight: 600; color: var(--jd-accent); width: max-content; }
.jd-search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; margin-top: 14px; min-width: 0; }
.jd-search-grid > label { display: flex; flex-direction: column; gap: 4px; font-size: .74rem; font-weight: 600; letter-spacing: .06em;
    text-transform: uppercase; color: var(--jd-muted); }
.jd-search-grid > label .jd-input { text-transform: none; letter-spacing: 0; font-weight: 400; }
.jd-search-kinds { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 10px 12px;
    border: 1px solid var(--jd-border); border-radius: calc(var(--jd-radius) * .7 + 2px); }
.jd-search-kinds legend { padding: 0 6px; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--jd-muted); }
.jd-check { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; }
.jd-check input { accent-color: var(--jd-accent); width: 16px; height: 16px; }
.jd-search-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.jd-search-understood { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: .85rem; color: var(--jd-muted); }
.jd-chip { padding: 2px 10px; border-radius: 999px; background: var(--jd-accent-soft); color: var(--jd-text); font-weight: 600; }
.jd-chip.is-number { font-family: var(--jd-font-mono); }
/* active filters, the rubric included: each chip removes its filter */
.jd-search-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; font-size: .85rem; color: var(--jd-muted); }
.jd-chip.is-filter { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.jd-chip.is-filter span { font-size: .75em; opacity: .7; }
.jd-chip.is-filter:hover span, .jd-chip.is-filter:focus-visible span { opacity: 1; }
/* refine by rubric: path of the rubric chosen, above its sub-rubrics */
.jd-search-rubric-path { margin: 0 0 10px; }
.jd-search-rubric-path ol { font-size: .8rem; }
.jd-search-domains.is-stack .jd-search-rubric-path { margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--jd-border); }
.jd-search-rubric-empty { padding: 8px 12px; font-size: .85rem; }
/* sort bar (criteria of the old juriDict: Number, Date, Applicant, Chamber, Decision) */
.jd-sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0; padding: 10px 16px; background: var(--rvs-beige-dark); }
.jd-sortbar-label { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--rvs-bordeaux-dark); }
.jd-sortbar ul { display: flex; flex-wrap: wrap; gap: 6px; }
.juridict .jd-sortbar-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: .875rem;
    background: #FFFFFF; color: var(--rvs-bordeaux-dark); box-shadow: inset 0 0 0 1px rgba(99, 5, 36, .2); }
.juridict .jd-sortbar-item:hover { box-shadow: inset 0 0 0 1px var(--rvs-bordeaux); }
.juridict .jd-sortbar-item.is-active { background: var(--rvs-bordeaux); color: #FFFFFF; box-shadow: none; font-weight: 600; }
.juridict .jd-sortbar-item:focus-visible { outline: none; box-shadow: var(--jd-focus); }
/* double arrow (inactive criterion), single up or down arrow (active criterion) */
.jd-sort-icon { width: 8px; height: 12px; flex: none; background: currentColor; opacity: .55;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 0 8 5H0zM4 12 0 7h8z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 0 8 5H0zM4 12 0 7h8z'/%3E%3C/svg%3E") center / contain no-repeat; }
.jd-sort-icon.is-asc, .jd-sort-icon.is-desc { opacity: 1; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 2 8 8H0z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M4 2 8 8H0z'/%3E%3C/svg%3E"); }
.jd-sort-icon.is-desc { transform: rotate(180deg); }

/* legal point opened from the results: back link, record on a beige background */
.juridict .jd-back-results { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-weight: 600;
    color: var(--rvs-bordeaux); text-decoration: underline; text-underline-offset: 3px; }
.juridict .jd-back-results:hover { text-decoration: none; }
.juridict .jd-back-results { scroll-margin-top: 16px; }
.juridict .jd-search-detail { padding: 24px 28px; background: var(--rvs-beige); }
.juridict .jd-search-detail .jd-close { top: 24px; right: 28px; }
/* viewed result: marked on return (#jd-hit-… anchor) */
.jd-hits li:target .jd-lp { border-left-color: var(--rvs-bordeaux); }
.jd-hits li { scroll-margin-top: 16px; }

/* search: the domains on the left (navigation menu), then the understood search and the results */
.jd-search-layout { display: grid; grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); gap: 24px; align-items: start; }
.jd-search-body { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.jd-search-domains { position: sticky; top: var(--jd-sticky-top); max-height: calc(100vh - var(--jd-sticky-top) - 16px); overflow-y: auto;
    padding: 16px; background: var(--rvs-blue); }
/* old version: the first floating menu of juridict.php, without the blue panel */
.jd-search-domains.is-stack { padding: 0; background: none; overflow: visible; max-height: none; }
.jd-search-domains.is-stack .jd-stack { height: calc(100vh - var(--jd-sticky-top) - 32px); min-height: 420px; width: 100%; max-width: none; --jd-col: 100%; }
.jd-search-domains.is-stack .jd-stack-col { position: absolute; inset: 0; width: auto; }
.jd-search-domains.is-stack h2.jd-stack-tab { margin: 0; padding: 10px 14px 8px; letter-spacing: .08em; color: var(--jd-bar-text); background: var(--jd-bar-bg); }
.jd-search-domains h2 { margin-bottom: 10px; font: 600 .78rem var(--jd-font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--rvs-bordeaux-dark); }
.jd-search-domains ul { display: flex; flex-direction: column; gap: 6px; }
.jd-search-domains .jd-step-sub { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; background: #FFFFFF; font-size: .9rem; border-left: 3px solid transparent; }
.jd-search-domains .jd-step-sub:hover { border-left-color: var(--rvs-bordeaux); }
.jd-search-domains .jd-step-sub.is-current { border-left-color: var(--rvs-bordeaux); font-weight: 600; }
.jd-search-domains .jd-step-sub.is-empty { opacity: .5; }
/* empty rubric: shown greyed out, without link or hover effect */
span.jd-step-sub.is-empty, span.jd-stack-item.is-empty { cursor: default; }
.juridict span.jd-step-sub.is-empty:hover, .juridict span.jd-stack-item.is-empty:hover { border-color: transparent; box-shadow: none; }
.jd-search-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.jd-hits { counter-reset: jd-hit; }
.jd-hit-text { line-height: 1.6; }
.jd-hit-text mark, .jd-detail-text mark { background: color-mix(in oklab, var(--jd-gold) 45%, transparent); color: inherit;
    padding: 0 2px; border-radius: 3px; box-shadow: inset 0 -2px 0 var(--jd-accent); }
.jd-hit-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .8rem; color: var(--jd-muted); }

/* Scrollbars ----------------------------------------------------------------
   The site's brown and beige; the page scrollbar is only styled in the standalone prototype
   (html.jd-host, absent from Umbraco). */

.juridict, html.jd-host {
    --jd-scroll-size: 10px;
    --jd-scroll-track: #F0EBE5;
    --jd-scroll-thumb: #C9B290;
    --jd-scroll-thumb-hover: #880832;
}

/* Chrome, Edge, Safari: rounded thumb, inset from the track, no arrows */
.juridict ::-webkit-scrollbar, html.jd-host::-webkit-scrollbar { width: var(--jd-scroll-size); height: var(--jd-scroll-size); }
.juridict ::-webkit-scrollbar-track, html.jd-host::-webkit-scrollbar-track { background: var(--jd-scroll-track); border-radius: 999px; }
.juridict ::-webkit-scrollbar-thumb, html.jd-host::-webkit-scrollbar-thumb {
    background: var(--jd-scroll-thumb); border-radius: 999px;
    border: 2px solid transparent; background-clip: padding-box; }
.juridict ::-webkit-scrollbar-thumb:hover, html.jd-host::-webkit-scrollbar-thumb:hover {
    background: var(--jd-scroll-thumb-hover); background-clip: padding-box; }
.juridict ::-webkit-scrollbar-button, html.jd-host::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.juridict ::-webkit-scrollbar-corner, html.jd-host::-webkit-scrollbar-corner { background: transparent; }

/* Firefox: only thinness and plain colours can be set */
@supports (-moz-appearance: none) {
    .juridict *, html.jd-host { scrollbar-width: thin; scrollbar-color: #C9B290 #F0EBE5; }
}

/* Narrow screens -------------------------------------------------------------- */

@media (max-width: 900px) {
    .juridict .jd-bar { gap: 12px; }
    .juridict .jd-switch { order: 3; margin-left: 0; width: 100%; justify-content: space-between; }
    .juridict .jd-switch a { flex: 1; text-align: center; padding: 8px 6px; }
    .jd-steps { grid-template-columns: 1fr; }
    .jd-stack-layout { flex-direction: column; align-items: stretch; }
    .jd-stack { height: 60vh; width: auto; max-width: none; }
    .jd-stack-details { flex: none; }
    .juridict .jd-stack-layout.is-expanded { overflow-y: auto; }
    .jd-stack-layout.is-expanded .jd-stack { height: 60vh; flex: none; }
    .juridict .jd-search-bar { order: 2; max-width: none; flex-basis: 100%; }
    .jd-guide-row { grid-template-columns: 1fr; }
    /* narrow screens: the bubble aligns with the field's row (not the icon) to stay on screen */
    .jd-tip { position: static; }
    .jd-guide-row, .jd-field, .jd-search-kinds, .jd-search-main { position: relative; }
    .jd-tip-text, .jd-search-main .jd-tip-text { left: 0; right: auto; max-width: 100%; }
    .jd-tip-text::after { display: none; }
    /* bar help: the window spans between the screen margins */
    .jd-help.is-popover { position: static; order: 2; margin-left: 0; }
    .juridict .jd-search-bar { order: 1; flex: 1 1 0; min-width: 0; }
    .jd-help.is-popover .jd-help-body { left: 16px; right: 16px; width: auto; }
    .jd-bar { position: relative; }
    /* phone: results first, then the domains */
    .jd-search-layout { grid-template-columns: 1fr; }
    .jd-search-domains { order: 2; position: static; max-height: none; }
    .jd-stack-details { max-height: none; }
    .jd-step-box { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .juridict * { transition: none !important; scroll-behavior: auto !important; }
}

