/* SSbD evidence views (src/ssbd/*, layouts/ssbd.njk).
 *
 * Visual vocabulary is shared with the cross-project Explore section
 * (assets/css/enm-explore.css) so the two read as one system once the branches
 * merge: #1a1d26 ink, #5b5b5b muted, #9aa3b2 faint, #dde1e9 hairline,
 * #f0f2f5 tint, #f7f8fa table head, #2f4a8c link. System font, no webfont of
 * its own.
 *
 * Everything is scoped under .ssbd-* and the .ssbd-container so nothing here
 * reaches jToxKit (.jtox-*), DataTables or jQuery-UI subtrees elsewhere.
 */

/* --- title band: one line, the breadcrumb doubles as the h1 -------------- */
.ssbd-head {
	background: #fff;
	border-bottom: 1px solid #dde1e9;
	padding: 10px 0;
}
.ssbd-crumb { font-size: 12px; color: #5b5b5b; }
.ssbd-crumb a { color: #2f4a8c; text-decoration: none; }
.ssbd-crumb a:hover { text-decoration: underline; }
.ssbd-crumb span[aria-hidden] { margin: 0 6px; color: #9aa3b2; }
/* The final crumb IS the page's <h1> -- same size/weight as the rest of the
   trail, just semantically a heading instead of a second, bigger title line. */
.ssbd-crumb-h1 {
	display: inline;
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	color: #1a1d26;
}
/* The front-matter "description" is long-form (a paragraph, not a dek) --
   it lives behind this icon's tooltip instead of growing the title band. */
.ssbd-info-ic {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-left: 2px;
	padding: 0;
	border: none;
	background: none;
	color: #9aa3b2;
	font-size: 15px;
	line-height: 1;
	cursor: help;
	vertical-align: -2px;
}
.ssbd-info-ic:hover, .ssbd-info-ic:focus-visible {
	color: #2f4a8c;
}

.ssbd-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1a1d26;
	padding-top: 20px;
	padding-bottom: 48px;
}
.ssbd-container a { color: #2f4a8c; }

/* --- loading / error / empty (mirror of .exp-*) ----------------------- */
.ssbd-status { padding: 2rem 1rem; text-align: center; color: #5b6b7d; }
.ssbd-error {
	margin: 12px 0;
	padding: 9px 12px;
	color: #8a2f22;
	background: #fbeeec;
	border-left: 3px solid #8a2f22;
	border-radius: 0 4px 4px 0;
	font-size: 13px;
}
.ssbd-error button {
	margin-left: 8px;
	font: inherit;
	font-size: 12px;
	border: 1px solid #8a2f22;
	background: none;
	color: #8a2f22;
	border-radius: 4px;
	padding: 2px 9px;
	cursor: pointer;
}
.ssbd-empty { color: #5b5b5b; font-style: italic; margin: 12px 0; }

/* --- section label --------------------------------------------------- */
.ssbd-sectlabel {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #5b5b5b;
	margin: 24px 0 12px;
}
.ssbd-sectlabel:first-child { margin-top: 4px; }

/* --- headline stat tiles (mirror of .exp-stats) --------------------- */
.ssbd-stats {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
}
@media (max-width: 900px) { .ssbd-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ssbd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ssbd-stat {
	border: 1px solid #dde1e9;
	border-radius: 6px;
	background: #fff;
	padding: 12px 14px;
}
.ssbd-stat b {
	display: block;
	font-size: 22px;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}
.ssbd-stat span {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #5b5b5b;
	margin-top: 2px;
}
.ssbd-stat.is-loading b { color: #9aa3b2; }

/* --- entry tiles (landing) ----------------------------------------- */
.ssbd-entries {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}
@media (max-width: 900px) { .ssbd-entries { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ssbd-entries { grid-template-columns: 1fr; } }
.ssbd-entry {
	display: flex;
	gap: 12px;
	border: 1px solid #dde1e9;
	border-radius: 8px;
	background: #fff;
	padding: 14px;
	align-items: flex-start;
	text-decoration: none;
	color: #1a1d26;
}
.ssbd-entry:hover { border-color: #9aa3b2; background: #f7f8fa; text-decoration: none; }
.ssbd-entry h2 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.ssbd-entry p { margin: 0; font-size: 12.5px; color: #5b5b5b; }

/* --- layer / view tabs ------------------------------------------------ */
.ssbd-tabs {
	display: flex;
	align-items: center;
	gap: 2px;
	border-bottom: 1px solid #dde1e9;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
/* a view's own right-aligned controls, appended into the same tabs row
   (e.g. the coverage view's row-granularity pills) instead of a second
   toolbar line underneath. */
.ssbd-tabs-tools {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 0;
	font-size: 12px;
	color: #5b5b5b;
}
.ssbd-tab {
	padding: 8px 14px;
	font-size: 13px;
	color: #5b5b5b;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	display: inline-flex;
	align-items: center;
	gap: 7px;
}
.ssbd-tab:hover { color: #1a1d26; text-decoration: none; }
.ssbd-tab.is-active { color: #1a1d26; font-weight: 600; border-bottom-color: #2f4a8c; }
.ssbd-tab .ssbd-tab-tag {
	font-size: 10px;
	letter-spacing: 0.04em;
	color: #9aa3b2;
	font-variant-numeric: tabular-nums;
}
.ssbd-tab .ssbd-dot {
	width: 8px; height: 8px; border-radius: 2px; display: inline-block;
}

/* --- toolbar (scope, filters) -------------------------------------- */
.ssbd-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 4px 0 14px;
	font-size: 12px;
	color: #5b5b5b;
}
.ssbd-toolbar select,
.ssbd-toolbar input[type="search"] {
	font: inherit;
	font-size: 12px;
	border: 1px solid #dde1e9;
	border-radius: 4px;
	padding: 4px 8px;
	color: #1a1d26;
	background: #fff;
}
.ssbd-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border: 1px solid #dde1e9;
	border-radius: 3px;
	padding: 3px 9px;
	background: #fff;
	font-size: 11px;
	color: #1a1d26;
}
.ssbd-pill.is-warn { border-color: #e3c7c1; background: #fbeeec; color: #8a2f22; }

/* --- the coverage matrix ----------------------------------------------
 * Requirement rows (dimension > aspect > indicator) x subject columns,
 * cells filled from the sparse coverage index. CSS grid with a frozen
 * first column; the whole thing scrolls inside .ssbd-matrix-wrap.
 */
.ssbd-matrix-wrap {
	border: 1px solid #dde1e9;
	border-radius: 6px;
	overflow: auto;
	background: #fff;
	max-height: 68vh;
}
.ssbd-matrix {
	display: grid;
	/* grid-template-columns set inline by the view: first col fixed, rest 1fr */
	font-size: 12px;
	min-width: 640px;
}
.ssbd-matrix > div { border-bottom: 1px solid #f0f2f5; }

.ssbd-mx-corner,
.ssbd-mx-colhead {
	position: sticky;
	top: 0;
	z-index: 3;
	background: #f7f8fa;
	border-bottom: 1px solid #dde1e9;
	padding: 8px 10px;
}
.ssbd-mx-corner { left: 0; z-index: 4; }
.ssbd-mx-colhead {
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 1.25;
}
.ssbd-mx-colhead code { font-size: 10px; color: #9aa3b2; }
.ssbd-mx-colhead .ssbd-status-tag {
	align-self: flex-start;
	font-size: 10px;
	border-radius: 2px;
	padding: 0 5px;
	color: #fff;
}

/* row-label cells (first column), frozen */
.ssbd-mx-rowhead {
	position: sticky;
	left: 0;
	z-index: 2;
	background: #fff;
	padding: 6px 10px;
	border-right: 1px solid #dde1e9;
	display: flex;
	align-items: center;
	gap: 7px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ssbd-mx-rowhead.is-indicator { padding-left: 30px; }
.ssbd-mx-rowhead code { font-size: 10px; color: #9aa3b2; }
.ssbd-mx-req {
	font-size: 9px;
	color: #8a2f22;
	border: 1px solid #e3c7c1;
	border-radius: 2px;
	padding: 0 4px;
}

/* dimension / aspect group rows span all columns */
.ssbd-mx-group {
	grid-column: 1 / -1;
	position: sticky;
	left: 0;
	background: #f0f2f5;
	padding: 6px 12px;
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #1a1d26;
	display: flex;
	align-items: center;
	gap: 9px;
}
.ssbd-mx-group.is-aspect {
	background: #fafbfc;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
	color: #5b5b5b;
	padding-left: 30px;
}
.ssbd-mx-group .ssbd-mx-count { font-weight: 400; color: #9aa3b2; font-size: 10px; }

/* value cells */
.ssbd-mx-cell {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 4px 6px;
	min-height: 30px;
}
.ssbd-mx-cell.is-alt { background: #fbfcfd; }

/* cell state glyphs -- the five states from the mockup legend */
.ssbd-glyph {
	width: 18px; height: 18px;
	border-radius: 3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}
.ssbd-glyph svg { width: 11px; height: 11px; }
.ssbd-glyph.is-pass   { background: #2f7d55; color: #fff; }          /* consolidated, meets acceptance */
.ssbd-glyph.is-fail   { background: #8a2f22; color: #fff; font-weight: 700; }  /* consolidated, fails */
.ssbd-glyph.is-raw    { background: #2f4a8c; color: #fff; }          /* raw evidence, not consolidated */
.ssbd-glyph.is-todo   { border: 1.5px solid #b7c0cf; background: #fff; }       /* required, no evidence */
.ssbd-glyph.is-planned{ border: 1.5px dashed #b7c0cf; background: #fff; }      /* planned, not started */
.ssbd-mx-oos { width: 14px; height: 2px; background: #dde1e9; }      /* out of scope (applies_to) */

.ssbd-mx-cp {
	font-size: 10px;
	font-variant-numeric: tabular-nums;
	border-radius: 2px;
	padding: 1px 5px;
	color: #fff;
}
.ssbd-mx-cp.cp1, .ssbd-mx-cp.cp2 { background: #b06a1f; }
.ssbd-mx-cp.cp3 { background: #7f9a4e; }
.ssbd-mx-cp.cp4, .ssbd-mx-cp.cp5 { background: #2f7d55; }
.ssbd-mx-val { font-variant-numeric: tabular-nums; color: #1a1d26; }

/* roll-up progress bar (aspect / dimension granularity) */
.ssbd-bar {
	width: 40px; height: 6px;
	background: #e9edf2;
	border-radius: 3px;
	overflow: hidden;
	flex: 0 0 auto;
}
.ssbd-bar > i { display: block; height: 100%; background: #2f7d55; }
.ssbd-bar.is-fail > i { background: #8a2f22; }
.ssbd-bar.is-partial > i { background: #b06a1f; }
.ssbd-mx-ratio { font-size: 10px; color: #5b5b5b; font-variant-numeric: tabular-nums; }

/* selected row / cell echo */
.ssbd-matrix > .is-sel { background: #eef2fb; box-shadow: inset 3px 0 0 #2f4a8c; }
.ssbd-mx-cell.is-sel { outline: 2px solid #2f4a8c; outline-offset: -2px; background: #eef2fb; }

/* --- legend --------------------------------------------------------- */
.ssbd-legend {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 12px;
	font-size: 11px;
	color: #5b5b5b;
}
.ssbd-legend .ssbd-li { display: inline-flex; align-items: center; gap: 6px; }
.ssbd-legend .ssbd-sw {
	width: 14px; height: 14px; border-radius: 3px; display: inline-block;
}

/* --- detail panel (right rail) ------------------------------------- */
.ssbd-split { display: flex; gap: 16px; align-items: flex-start; }
.ssbd-split > .ssbd-main { flex: 1 1 auto; min-width: 0; }
.ssbd-split > .ssbd-rail {
	flex: 0 0 340px;
	border: 1px solid #dde1e9;
	border-radius: 6px;
	background: #fff;
	padding: 14px;
	font-size: 12.5px;
}
@media (max-width: 1100px) { .ssbd-split { flex-direction: column; } .ssbd-split > .ssbd-rail { flex-basis: auto; width: 100%; } }
.ssbd-rail h3 { margin: 0 0 4px; font-size: 14px; }
.ssbd-rail dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; margin: 8px 0; }
.ssbd-rail dt { color: #9aa3b2; }
.ssbd-rail dd { margin: 0; }
.ssbd-rail code { font-size: 11px; color: #5b5b5b; }

/* ============================================================= polish pass
 * Brings the coverage view closer to the design mockups while staying inside
 * the Explore-section visual system (light ground, #2f4a8c link, no dark bar).
 */

/* two-column working layout: filter rail + matrix (+ optional detail rail) */
.ssbd-work { display: flex; gap: 16px; align-items: flex-start; }
/* One rail, switched between Columns (assessment scope) and Rows (dimension
   filter) -- see ssbd-coverage.js combinedRail(). Was two rails side by side. */
.ssbd-work > .ssbd-rail-left {
	flex: 0 0 230px;
	border: 1px solid #dde1e9;
	border-radius: 6px;
	background: #fafbfc;
	display: flex;
	flex-direction: column;
	max-height: 640px;
	font-size: 12px;
	overflow: hidden;
}
.ssbd-work > .ssbd-canvas { flex: 1 1 auto; min-width: 0; }
@media (max-width: 900px) {
	.ssbd-work { flex-direction: column; }
	.ssbd-work > .ssbd-rail-left { flex-basis: auto; width: 100%; max-height: none; }
	.ssbd-work > .ssbd-rail-resizer { display: none; }
}

/* drag handle between the rail and the matrix -- see ssbd-coverage.js
   wireRailResizer(). A few px of hit area, a thin visible line at rest. */
.ssbd-work > .ssbd-rail-resizer {
	flex: 0 0 9px;
	align-self: stretch;
	cursor: col-resize;
	position: relative;
	touch-action: none;
}
.ssbd-work > .ssbd-rail-resizer::after {
	content: "";
	position: absolute;
	top: 0; bottom: 0; left: 4px;
	width: 1px;
	background: #dde1e9;
}
.ssbd-work > .ssbd-rail-resizer:hover::after { background: #2f4a8c; width: 2px; left: 3.5px; }

.ssbd-rail-switch { flex: 0 0 auto; display: flex; border-bottom: 1px solid #dde1e9; }
.ssbd-rail-switch .ssbd-pill {
	flex: 1 1 50%;
	justify-content: center;
	border: 0;
	border-radius: 0;
	background: #fafbfc;
	color: #5b5b5b;
	cursor: pointer;
	padding: 8px 6px;
}
.ssbd-rail-switch .ssbd-pill:first-child { border-right: 1px solid #dde1e9; }
.ssbd-rail-switch .ssbd-pill.is-on {
	background: #fff;
	color: #1a1d26;
	font-weight: 600;
	box-shadow: inset 0 -2px 0 #2f4a8c;
}

.ssbd-rail-body {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 12px;
	overflow-y: auto;
}

.ssbd-rail-grp { margin-bottom: 16px; }
.ssbd-rail-grp:last-child { margin-bottom: 0; }
.ssbd-rail-grp > h4 {
	margin: 0 0 8px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #7b8494;
}
.ssbd-check {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 3px 0;
	cursor: pointer;
	color: #1a1d26;
}
.ssbd-check input { margin: 0; }
.ssbd-check .ssbd-sw { width: 11px; height: 11px; border-radius: 2px; flex: 0 0 auto; }
.ssbd-check .ssbd-ct { margin-left: auto; color: #9aa3b2; font-variant-numeric: tabular-nums; font-size: 10px; }
.ssbd-check.is-off { color: #9aa3b2; }

.ssbd-meter { margin-top: 4px; }
.ssbd-meter b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ssbd-meter b i { font-style: normal; font-size: 12px; color: #7b8494; }
.ssbd-meter .ssbd-track { height: 5px; background: #e9edf2; border-radius: 3px; margin: 5px 0 4px; overflow: hidden; }
.ssbd-meter .ssbd-track > i { display: block; height: 100%; background: #2f4a8c; }
.ssbd-meter small { color: #7b8494; line-height: 1.35; display: block; }

/* view tabs -- dot + count treatment from the mockup */
.ssbd-tabs { gap: 0; }
.ssbd-tab { padding: 9px 14px; }
.ssbd-tab .ssbd-tab-ct {
	font-size: 10px; color: #9aa3b2; font-variant-numeric: tabular-nums;
}

/* matrix: group rows get a marker; column heads get the status pill */
.ssbd-mx-group::before {
	content: "";
	width: 0; height: 0;
	border-style: solid;
	border-width: 5px 0 5px 7px;
	border-color: transparent transparent transparent #7b8494;
	flex: 0 0 auto;
}
.ssbd-mx-group.is-aspect::before {
	border-width: 4px 4px 0 4px;
	border-color: #b7c0cf transparent transparent transparent;
}
.ssbd-mx-group code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ssbd-mx-colhead { min-height: 52px; justify-content: flex-start; }
.ssbd-mx-colhead > span:first-of-type { font-weight: 600; }
.ssbd-status-tag.keep            { background: #2f7d55; }
.ssbd-status-tag.for-comparison  { background: #6b4a8a; }
.ssbd-status-tag.under-review    { background: #8a8f9c; }
.ssbd-status-tag.discard         { background: #8a2f22; }

/* glyphs: tighten to the mockup's rounded-square set */
.ssbd-glyph { border-radius: 3px; }
.ssbd-glyph.is-pass  svg { stroke-width: 3.5; }
.ssbd-glyph.is-fail  { font-size: 12px; line-height: 1; }
.ssbd-glyph.is-raw::after {
	content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff;
}
.ssbd-glyph.is-todo::after {
	content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid #b7c0cf;
}
.ssbd-mx-cell { cursor: default; }
.ssbd-mx-cell.has-cell { cursor: pointer; }
.ssbd-mx-cell.has-cell:hover { background: #eef2fb; }

/* the L2 -> L3 -> L1 detail rail for a clicked cell */
.ssbd-detail {
	flex: 0 0 340px;
	border: 1px solid #dde1e9;
	border-radius: 6px;
	background: #fff;
	font-size: 12.5px;
	align-self: stretch;
	overflow: auto;
	max-height: 68vh;
}
@media (max-width: 1200px) { .ssbd-detail { flex-basis: 300px; } }
@media (max-width: 900px) { .ssbd-detail { flex-basis: auto; width: 100%; max-height: none; } }
.ssbd-detail-hd {
	padding: 12px 14px;
	border-bottom: 1px solid #dde1e9;
	background: #f7f8fa;
}
.ssbd-detail-hd h3 { margin: 0 0 3px; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.ssbd-detail-hd code { font-size: 11px; color: #7b8494; }
.ssbd-detail-sec { padding: 12px 14px; border-bottom: 1px solid #f0f2f5; }
.ssbd-detail-sec:last-child { border-bottom: 0; }
.ssbd-detail-sec > h4 {
	margin: 0 0 8px;
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
	display: flex; align-items: center; gap: 7px;
}
.ssbd-detail-sec dl { display: grid; grid-template-columns: 92px 1fr; gap: 5px 10px; margin: 0; }
.ssbd-detail-sec dt { color: #9aa3b2; }
.ssbd-detail-sec dd { margin: 0; }
.ssbd-chain { display: flex; flex-direction: column; gap: 0; }
.ssbd-chain-node {
	display: flex; align-items: center; gap: 8px;
	padding: 5px 9px;
	border: 1px solid #dde1e9;
	border-radius: 3px;
	background: #fff;
}
.ssbd-chain-node.is-head { background: #f7f8fa; }
.ssbd-chain-node code { font-size: 10px; color: #9aa3b2; }
.ssbd-chain-node .ssbd-chain-cat { margin-left: auto; color: #7b8494; font-size: 10px; }
.ssbd-chain-rel {
	padding-left: 16px; font-size: 10px; color: #9aa3b2;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	line-height: 20px;
}
.ssbd-detail-empty { padding: 16px 14px; color: #9aa3b2; font-style: italic; }

/* ===================================================== views: shared table
 * design-space / requirements / evidence / decisions / report all render a
 * plain data table inside .ssbd-matrix-wrap.
 */
.ssbd-tbl {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}
.ssbd-tbl thead th {
	position: sticky; top: 0; z-index: 2;
	background: #f7f8fa;
	border-bottom: 1px solid #dde1e9;
	padding: 8px 10px;
	text-align: left;
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
	color: #7b8494;
	white-space: nowrap;
}
.ssbd-tbl tbody td {
	padding: 7px 10px;
	border-bottom: 1px solid #f0f2f5;
	vertical-align: top;
}
.ssbd-tbl tbody tr:hover { background: #fbfcfd; }
.ssbd-tbl tbody tr.is-sel { background: #eef2fb; box-shadow: inset 3px 0 0 #2f4a8c; }
.ssbd-tbl tbody tr { cursor: pointer; }
.ssbd-tbl code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.ssbd-tbl td .ssbd-mx-count { display: inline; font-size: 10px; }
.ssbd-tbl .c-ind { min-width: 190px; }
.ssbd-tbl .c-m { color: #13807f; }

.ssbd-ref {
	display: inline-block;
	background: #eef1f7;
	border-radius: 2px;
	padding: 1px 5px;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 10px;
	color: #2d3666;
	margin: 1px 2px 1px 0;
}

/* group rows inside a data table (requirements) */
.ssbd-tbl tr.grp td {
	background: #f0f2f5;
	font-size: 11px;
	padding: 6px 10px;
}
.ssbd-tbl tr.grp.a td { background: #fafbfc; padding-left: 24px; }
.ssbd-tbl tr.grp strong { text-transform: none; }
.ssbd-tbl tr.grp.d strong { text-transform: uppercase; letter-spacing: 0.05em; }
.ssbd-tbl tr.grp:hover { background: inherit; }
.ssbd-tbl tr.grp { cursor: default; }

/* ===================================================== requirements: model banner */
.ssbd-model {
	display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
	background: #faf8fc;
	border: 1px solid #e6ddf0;
	border-radius: 6px;
	padding: 10px 13px;
	margin-bottom: 14px;
	font-size: 12px;
}
.ssbd-model-lbl {
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
	color: #6b4a8a;
}
.ssbd-chip {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 11px;
	border-radius: 3px;
	padding: 3px 10px;
}
.ssbd-chip.d { background: #6b4a8a; color: #fff; border-color: #6b4a8a; }
.ssbd-chip.a, .ssbd-chip.i { background: #f2effd; color: #6b4a8a; border: 1px solid #ded5fa; }
.ssbd-chip.m { background: #e7f5f4; color: #13807f; border: 1px solid #cfe4e3; }
.ssbd-arrow { color: #b7a6d0; font-weight: 700; }

/* the same d/a/i/m chips, as a clickable granularity selector (coverage's
   row-granularity control) -- full colour = selected, faded = not. */
.ssbd-chip-btn { cursor: pointer; border-width: 1px; border-style: solid; font: inherit; font-size: 11px; }
.ssbd-chip-btn.is-off { opacity: 0.45; }
.ssbd-chip-btn:not(.is-off):hover { opacity: 0.85; }
.ssbd-model-note { color: #5b5b5b; margin-left: 6px; }

.ssbd-methods { margin-top: 14px; }
.ssbd-methods > h4 {
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
	color: #13807f; margin: 0 0 8px;
}
.ssbd-method-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ssbd-method {
	font-size: 10px;
	border: 1px solid #dde1e9;
	border-radius: 3px;
	padding: 3px 8px;
	background: #fff;
}
.ssbd-method.has-et { color: #13807f; background: #e7f5f4; border-color: #cfe4e3; }
.ssbd-method .ssbd-mx-count { color: #7b8494; }

/* ===================================================== evidence: consolidation boxes */
.ssbd-ir {
	border: 1px solid #cfe4e3;
	border-radius: 4px;
	background: #fff;
	padding: 9px 11px;
	margin-bottom: 8px;
}
.ssbd-ir.is-open { border-color: #e6d3a3; background: #fffdf5; }
.ssbd-ir-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ssbd-ir dl { display: grid; grid-template-columns: 92px 1fr; gap: 3px 10px; margin: 0; font-size: 11.5px; }
.ssbd-ir dt { color: #9aa3b2; }
.ssbd-ir dd { margin: 0; }
.ssbd-ir-note { font-size: 10.5px; color: #7b8494; margin: 6px 0 0; border-top: 1px solid #eef1f7; padding-top: 5px; }

/* ===================================================== decisions */
.ssbd-declog {
	display: block; width: 100%; text-align: left;
	border: 1px solid #dde1e9; border-radius: 4px;
	background: #fff; padding: 8px 10px; margin-bottom: 6px;
	font: inherit; font-size: 11.5px; cursor: pointer;
}
.ssbd-declog:hover { border-color: #9aa3b2; }
.ssbd-declog.is-sel { border-color: #2f4a8c; background: #eef2fb; }
.ssbd-declog code { font-size: 10px; color: #7b8494; }
.ssbd-declog-meta { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.ssbd-scope-changed {
	font-size: 10.5px; color: #6b4a8a; background: #f6f2ff;
	border-radius: 3px; padding: 5px 7px; margin: 0 0 6px; line-height: 1.35;
}
.ssbd-dec-hd h2 { margin: 0 0 3px; font-size: 17px; }
.ssbd-dec-hd h2 code { font-size: 11px; color: #6b4a8a; background: #f2effd; border: 1px solid #ded5fa; border-radius: 2px; padding: 2px 7px; }
.ssbd-dec-hd p { margin: 0 0 12px; }
.ssbd-rules {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	background: #f7f8fa; border: 1px solid #dde1e9; border-radius: 6px;
	padding: 9px 12px; margin-bottom: 12px; font-size: 11px;
}
.ssbd-tradeoff {
	border: 1px solid #e3c7c1; background: #fbeeec; border-radius: 6px;
	padding: 12px 14px; margin-top: 12px;
}
.ssbd-tradeoff h4 { margin: 0 0 6px; font-size: 12.5px; color: #8a2f22; }
.ssbd-tradeoff p { margin: 0; font-size: 12px; color: #7a4a41; line-height: 1.5; }
.ssbd-waiting { margin: 6px 0 0; padding-left: 18px; font-size: 11.5px; color: #5b5b5b; }
.ssbd-waiting li { margin-bottom: 3px; }

/* ===================================================== report */
.ssbd-rep-sec { border: 1px solid #dde1e9; border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.ssbd-rep-sec-hd { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 7px; }
.ssbd-rep-sec-hd code { background: #1a1d26; color: #fff; border-radius: 3px; padding: 1px 7px; font-size: 11px; }
.ssbd-rep-elems { list-style: none; margin: 8px 0 0; padding: 0; font-size: 11.5px; }
.ssbd-rep-elems li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: #5b5b5b; }
.ssbd-rep-elems li.is-miss { color: #8a2f22; }
.ssbd-rep-elems .ssbd-mx-count { margin-left: auto; }
.ssbd-t21 td { font-size: 11px; }
.ssbd-t21 td:first-child { color: #5b5b5b; }

/* --- "Columns" rail body: search + collapsible, grouped checkbox picker --
 * (the subject scope that becomes the matrix columns). Lives inside
 * .ssbd-rail-body next to the "Rows" body -- see ssbd-coverage.js
 * scopeRailBody() / combinedRail(). */
.ssbd-scope-hd { flex: 0 0 auto; padding-bottom: 10px; border-bottom: 1px solid #dde1e9; margin-bottom: 10px; }
.ssbd-scope-hd h4 {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	color: #1a1d26;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ssbd-scope-badge {
	font-variant-numeric: tabular-nums;
	font-size: 11px;
	color: #fff;
	background: #2f4a8c;
	border-radius: 10px;
	padding: 1px 8px;
}
.ssbd-scope-hd p { margin: 6px 0 0; color: #5b5b5b; font-size: 11px; line-height: 1.4; }

.ssbd-scope-search {
	flex: 0 0 auto;
	margin-bottom: 10px;
	font: inherit;
	font-size: 12px;
	border: 1px solid #dde1e9;
	border-radius: 4px;
	padding: 5px 9px;
	color: #1a1d26;
	background: #fff;
}

/* bleeds to the rail's edge (the tinted group headers read better full-width);
   group / item content restores the 12px inset with its own padding. */
.ssbd-scope-lists { flex: 1 1 auto; overflow-y: auto; min-height: 0; margin: 0 -12px; }

/* category groups are collapsible <details> -- "materials", "processes" etc.
   fold away once you've made your picks in them. */
.ssbd-scope-grp { border-bottom: 1px solid #dde1e9; }
.ssbd-scope-grp > summary {
	list-style: none;
	cursor: pointer;
	padding: 6px 12px;
	background: #eef1f7;
	border-top: 1px solid #dde1e9;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #5b5b5b;
}
.ssbd-scope-grp > summary::-webkit-details-marker { display: none; }
.ssbd-scope-grp > summary::before {
	content: "\25b8"; /* ▸ */
	margin-right: 6px;
	color: #9aa3b2;
	font-size: 9px;
}
.ssbd-scope-grp[open] > summary::before { content: "\25be"; /* ▾ */ }
.ssbd-scope-count { font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; color: #7b8494; }
.ssbd-scope-list { max-height: 220px; overflow-y: auto; }
.ssbd-scope-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px;
	cursor: pointer;
	color: #5b5b5b;
	border-bottom: 1px solid #f3f6fa;
}
.ssbd-scope-item:hover { background: #f3f6fa; }
.ssbd-scope-item.is-on { color: #1a1d26; }
.ssbd-scope-item input { margin: 0; flex: 0 0 auto; }
.ssbd-scope-item span { flex: 1 1 auto; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ssbd-scope-item code { flex: 0 0 auto; font-size: 9.5px; color: #9aa3b2; }
.ssbd-scope-none { margin: 6px 12px; color: #9aa3b2; font-style: italic; font-size: 11px; }

/* elab (electronic lab notebook) reference icon -- shared by every SSbD view
   via ssbd-core.js elabIcon(); render it inline next to a resource reference
   wherever one is shown (scope picker, tables, detail panels). */
.ssbd-elab-ic {
	display: inline-flex;
	flex: 0 0 auto;
	color: #9aa3b2;
	padding: 2px;
	margin: 0 2px;
	border-radius: 3px;
	vertical-align: -2px;
}
.ssbd-elab-ic:hover { color: #2f4a8c; background: #eef2fb; }
.ssbd-elab-ic svg { width: 12px; height: 12px; display: block; }
.ssbd-scope-note { margin: 6px 12px; color: #7b8494; font-size: 10.5px; line-height: 1.4; }
.ssbd-scope-item.is-disabled { color: #c2c8d2; cursor: not-allowed; }
.ssbd-scope-item.is-disabled code { color: #c2c8d2; }

.ssbd-scope-foot {
	flex: 0 0 auto;
	border-top: 1px solid #dde1e9;
	margin-top: 10px;
	padding-top: 10px;
	display: flex;
	gap: 8px;
}
.ssbd-scope-save {
	font: inherit;
	font-size: 12px;
	font-weight: 500;
	color: #fff;
	background: #2d3666;
	border: 0;
	border-radius: 3px;
	padding: 6px 12px;
	cursor: pointer;
}
.ssbd-scope-reset {
	font: inherit;
	font-size: 12px;
	color: #2f4a8c;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 6px 4px;
}

/* --- filter-first empty-scope prompt (mirrors .exp-prompt) ------------- */
.ssbd-prompt {
	border: 1px dashed #dde1e9;
	border-radius: 8px;
	background: #fff;
	padding: 34px 24px;
	text-align: center;
}
.ssbd-prompt h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: #1a1d26; }
.ssbd-prompt p { color: #5b5b5b; font-size: 13px; margin: 0 auto; max-width: 60ch; }
