/* Scope level badges (requirement-structure-lib.js), shared by the Requirements Library, Source documents and the
   regulatory matrix "Document hierarchy" tab. Colours pair with text at 4.5:1 or better in light and dark. */
.req-badge.req-lvl,.rh-doc .req-badge{display:inline-block;border-radius:20px;font-size:.73rem;padding:.2rem .6rem;font-weight:650;line-height:1.4}
.req-lvl-international{background:#ece9fb;color:#3d2f86}.req-lvl-regional_law{background:#dce8fa;color:#173f73}.req-lvl-regional_guidance{background:#e8f1fb;color:#1d4a7f;box-shadow:inset 0 0 0 1px #b9cfe9}.req-lvl-national_law{background:#dff0ee;color:#0f5a55}.req-lvl-national_guidance{background:#e6f3e4;color:#2c5a24}.req-lvl-loc_operational{background:#fbefd9;color:#734d07}.req-badge.req-lvl-none{background:transparent;color:#55666f;border:1px dashed #9fb0b6}
/* Document hierarchy tab */
.rh-root{display:grid;gap:14px;margin-top:6px}
.rh-toolbar{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center}
.rh-seg{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0;border:1px solid var(--line,#d5e0e3);border-radius:10px;overflow:hidden;background:var(--panel,#fff)}
.rh-seg-label{font-size:11px;font-weight:700;color:var(--muted,#5a6b72);padding:0 10px;text-transform:uppercase;letter-spacing:.06em}
.rh-seg button{border:0;border-left:1px solid var(--line,#d5e0e3);background:transparent;color:var(--ink,#1c2b33);font:inherit;font-size:13px;padding:8px 13px;cursor:pointer;min-height:40px}
.rh-seg button[aria-pressed=true]{background:var(--brand,#127c79);color:var(--panel,#fff);font-weight:700}
.rh-seg button:focus-visible{outline:3px solid #e6a329;outline-offset:-3px}
.rh-agency{display:grid;gap:4px;font-size:12px;font-weight:700;color:var(--muted,#5a6b72);max-width:280px}
.rh-agency select{padding:8px;border:1px solid var(--line,#c9d5d8);border-radius:8px;background:var(--panel,#fff);color:inherit;font:inherit;font-weight:400}
.rh-lede{margin:0;max-width:90ch;line-height:1.6}
.rh-ladder,.rh-layers{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.rh-tier,.rh-layer{border:1px solid var(--line,#d5e0e3);border-radius:12px;background:var(--panel,#fff);padding:12px 14px}
.rh-ladder,.rh-layers{position:relative}.rh-ladder::before,.rh-layers::before{content:"";position:absolute;left:28px;top:14px;bottom:14px;width:2px;background:var(--line,#cfdcdf);z-index:0}.rh-tier,.rh-layer{position:relative;z-index:1}
.rh-layer-inherited,.rh-layer-international,.rh-layer-regional{background:var(--brand-soft,#f1f7f6)}
.rh-layer-head{display:flex;gap:12px;align-items:flex-start}
.rh-layer-head h3{margin:0;font-size:16px;display:flex;gap:8px;align-items:center}
.rh-layer-head p{margin:2px 0 0;font-size:12.5px}
.rh-step{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--brand,#127c79);color:var(--panel,#fff);font-weight:700;font-size:13px}
.rh-count{font-size:12px;font-weight:700;border-radius:10px;padding:1px 8px;background:var(--line,#e3eaec);color:var(--ink,#1c2b33)}
.rh-docs{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:8px}
.rh-doc{border-top:1px solid var(--line,#e3eaec);padding-top:8px}
.rh-doc-title{font-weight:650;line-height:1.4;overflow-wrap:anywhere}
.rh-doc-meta{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;font-size:12.5px;color:var(--muted,#5a6b72);margin-top:3px}
.rh-doc .req-badge{font-size:12px}.rh-doc .dc-badge{display:inline-block;font-size:12px;font-weight:700;border-radius:10px;padding:2px 8px;white-space:nowrap}
.rh-doc .dc-verified{background:#dcf3e4;color:#14532d}.rh-doc .dc-corrected{background:#e3eefc;color:#1e3a8a}.rh-doc .dc-verify{background:#fdf0d5;color:#6b4708}
.rh-none{margin:8px 0 0 40px;font-size:13px;color:var(--muted,#5a6b72)}
.rh-empty{border:1px dashed var(--line,#c9d5d8);border-radius:12px;padding:18px}
.rh-empty h2{margin:0 0 6px;font-size:18px}
.rh-quick{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.rh-foot{font-size:12px}
@media(max-width:700px){.rh-ladder::before,.rh-layers::before{left:27px}.rh-seg{width:100%}.rh-seg button{flex:1 1 auto;min-width:0;white-space:normal;line-height:1.25;padding:8px 4px;overflow-wrap:anywhere;hyphens:auto}.rh-seg button:first-of-type{border-left:0}.rh-seg-label{width:100%;padding:6px 10px 2px}.rh-none{margin-left:0}}
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */:where([data-theme="dark"]) .req-lvl-international{background:#2c2753;color:#dcd6fb}:where([data-theme="dark"]) .req-lvl-regional_law{background:#1d3350;color:#cfe2f8}:where([data-theme="dark"]) .req-lvl-regional_guidance{background:#18283d;color:#cfe2f8;box-shadow:inset 0 0 0 1px #3a5679}:where([data-theme="dark"]) .req-lvl-national_law{background:#123a38;color:#c7ece8}:where([data-theme="dark"]) .req-lvl-national_guidance{background:#1f3a1c;color:#d3edcd}:where([data-theme="dark"]) .req-lvl-loc_operational{background:#43320f;color:#f6e0b4}:where([data-theme="dark"]) .req-badge.req-lvl-none{color:#b5c3c8;border-color:#5d6e74}
 :where([data-theme="dark"]) .rh-doc .dc-verified{background:#173d26;color:#bff0cf}:where([data-theme="dark"]) .rh-doc .dc-corrected{background:#1d2f52;color:#cfe0ff}:where([data-theme="dark"]) .rh-doc .dc-verify{background:#45330d;color:#f8e2b2}@media (prefers-color-scheme: dark){:where(:not([data-theme])) .req-lvl-international{background:#2c2753;color:#dcd6fb}:where(:not([data-theme])) .req-lvl-regional_law{background:#1d3350;color:#cfe2f8}:where(:not([data-theme])) .req-lvl-regional_guidance{background:#18283d;color:#cfe2f8;box-shadow:inset 0 0 0 1px #3a5679}:where(:not([data-theme])) .req-lvl-national_law{background:#123a38;color:#c7ece8}:where(:not([data-theme])) .req-lvl-national_guidance{background:#1f3a1c;color:#d3edcd}:where(:not([data-theme])) .req-lvl-loc_operational{background:#43320f;color:#f6e0b4}:where(:not([data-theme])) .req-badge.req-lvl-none{color:#b5c3c8;border-color:#5d6e74}
 :where(:not([data-theme])) .rh-doc .dc-verified{background:#173d26;color:#bff0cf}:where(:not([data-theme])) .rh-doc .dc-corrected{background:#1d2f52;color:#cfe0ff}:where(:not([data-theme])) .rh-doc .dc-verify{background:#45330d;color:#f8e2b2}}

.req-change-tag{display:inline-block;font-size:11px;font-weight:700;border-radius:6px;padding:1px 6px;margin-right:6px;vertical-align:1px;background:#e3f1ef;color:#0f5a55}.req-change-curation .req-change-tag{background:#f4ecd4;color:#5c4a0c}
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */:where([data-theme="dark"]) .req-change-tag{background:#123a38;color:#c7ece8}:where([data-theme="dark"]) .req-change-curation .req-change-tag{background:#3d3210;color:#f1e1ad}@media (prefers-color-scheme: dark){:where(:not([data-theme])) .req-change-tag{background:#123a38;color:#c7ece8}:where(:not([data-theme])) .req-change-curation .req-change-tag{background:#3d3210;color:#f1e1ad}}
/* Requirement domains: only non-core-PV rows carry a badge. Adjacent = dashed outline (outside core PV); out of scope = plain grey, so it does not look like the dashed "Not classified yet" scope badge. 12px/600 per ui-scale chip token. */
.req-badge.req-dom{display:inline-block;border-radius:999px;font-size:12px;padding:2px 8px;font-weight:600;line-height:16px}
.req-dom-core_pv_clinical{background:#e4f0fb;color:#16416e}.req-dom-adj_privacy{background:#fff;color:#6b3a07;border:1px dashed #c98a3d}.req-dom-adj_gcp_clinical{background:#fff;color:#4a3b6b;border:1px dashed #9a88c4}.req-dom-out_of_scope{background:#eef0f1;color:#4d5a60}
.req-badge.req-facet{background:#f1f3f4;color:#3d4a50}
:where([data-theme="dark"]) .req-dom-core_pv_clinical{background:#18304d;color:#cfe2f8}:where([data-theme="dark"]) .req-dom-adj_privacy{background:transparent;color:#f3cf9c;border-color:#a4702f}:where([data-theme="dark"]) .req-dom-adj_gcp_clinical{background:transparent;color:#d9ccf6;border-color:#7b6aa8}:where([data-theme="dark"]) .req-dom-out_of_scope{background:#263236;color:#cfd8db}:where([data-theme="dark"]) .req-badge.req-facet{background:#263236;color:#cfd8db}
@media (prefers-color-scheme: dark){:where(:not([data-theme])) .req-dom-core_pv_clinical{background:#18304d;color:#cfe2f8}:where(:not([data-theme])) .req-dom-adj_privacy{background:transparent;color:#f3cf9c;border-color:#a4702f}:where(:not([data-theme])) .req-dom-adj_gcp_clinical{background:transparent;color:#d9ccf6;border-color:#7b6aa8}:where(:not([data-theme])) .req-dom-out_of_scope{background:#263236;color:#cfd8db}:where(:not([data-theme])) .req-badge.req-facet{background:#263236;color:#cfd8db}}
