/* Cockpit styles. Colors come only from theme tokens (themes/*.json -> CSS variables); tints are mixed from them.
   Design system: type scale 12 / 13 / 14 / 16 / 24, spacing in multiples of --space, two elevations, status tones good / watch / poor / neutral. */
* { box-sizing: border-box; }
:root { --shadow-1: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent), 0 1px 1px color-mix(in srgb, var(--text) 3%, transparent);
  --shadow-2: 0 10px 30px color-mix(in srgb, var(--text) 16%, transparent); --header-h: 56px; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 4px 8px; z-index: 20; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* top bar: breadcrumb on the left, search and session controls on the right */
.top { display: flex; align-items: center; gap: var(--space); height: var(--header-h); padding: 0 calc(var(--space) * 2);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; letter-spacing: -.01em; color: var(--sb-hi); white-space: nowrap; padding: 4px 8px 14px; }
.brand:hover { text-decoration: none; }
.logo { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--accent-text); flex: none;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, var(--status-good))); }
.logo svg { width: 16px; height: 16px; stroke-width: 2.4; }
.env { font-size: 11px; color: var(--text-muted); background: var(--surface-alt); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.spacer { flex: 1; }
.search-btn { min-width: 340px; text-align: left; color: var(--text-muted); background: var(--bg); display: flex; justify-content: space-between; align-items: center; border-radius: 999px; padding: 6px 8px 6px 12px; }
.search-btn span { display: flex; align-items: center; gap: 8px; } .search-btn svg { width: 16px; height: 16px; }
.persona { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-color: transparent; background: none; color: var(--text-muted); border-radius: 999px; }
.icon-btn:hover { color: var(--text); }

/* controls */
button, select, input, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; }
button { cursor: pointer; transition: background .12s, border-color .12s, color .12s; font-weight: 500; }
button:hover { background: var(--surface-alt); border-color: color-mix(in srgb, var(--border) 60%, var(--text)); }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
kbd { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; background: var(--surface); }
.bell { position: relative; } .badge { position: absolute; top: 0; right: 0; background: var(--status-poor); color: var(--surface); border-radius: 9px; font-size: 10.5px; font-weight: 700; line-height: 16px; min-width: 16px; padding: 0 4px; }

/* layout and navigation: a dark sidebar with one entry per module (collapsible to an icon rail); the pages of the current module are tabs above the content */
.layout { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.layout.rail { grid-template-columns: 60px 1fr; }
.side { --sb: color-mix(in srgb, var(--text) 93%, var(--accent)); --sb-text: color-mix(in srgb, var(--surface) 72%, var(--sb)); --sb-hi: var(--surface);
  background: var(--sb); color: var(--sb-text); padding: 14px 10px 10px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; }
html[data-theme$="/dark"] .side { --sb: var(--bg); --sb-text: var(--text-muted); --sb-hi: var(--text); border-right: 1px solid var(--border); }
.side .mod { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--sb-text);
  font-size: 13.5px; font-weight: 500; text-align: left; white-space: nowrap; }
.side .mod svg { width: 18px; height: 18px; }
.side .mod:hover { background: color-mix(in srgb, var(--sb-hi) 10%, transparent); color: var(--sb-hi); text-decoration: none; }
.side .mod[aria-current="page"], .nav-g.active > .mod { color: var(--sb-hi); font-weight: 650; background: color-mix(in srgb, var(--sb-hi) 8%, transparent); }
.side .mod[aria-current="page"] svg, .nav-g.active > .mod svg { color: var(--accent-text); background: var(--accent); border-radius: 6px; padding: 4px; width: 26px; height: 26px; margin: -4px; }
.nav-g > a[data-for] { display: none; }
.nav-all { font-size: 12px; display: flex; gap: 8px; align-items: center; padding: 6px 12px; }
.nav-all input { margin: 0; }
.side [hidden] { display: none !important; }
.rail .side span, .rail .nav-all { display: none; }
.rail .side .mod, .rail .brand { justify-content: center; padding-left: 0; padding-right: 0; }
.rail #rail svg { transform: scaleX(-1); }
.col { min-width: 0; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-muted); white-space: nowrap; min-width: 0; overflow: hidden; }
.crumbs b:last-child { overflow: hidden; text-overflow: ellipsis; }
.crumbs span { opacity: .5; } .crumbs b { color: var(--text); font-weight: 650; }
.tabs { display: flex; gap: 4px; padding: 0 calc(var(--space) * 2.5); background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs:empty { display: none; }
.tabs a { padding: 10px 12px 9px; font-size: 13px; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
main { padding: calc(var(--space) * 2) calc(var(--space) * 2.5) calc(var(--space) * 4); min-width: 0; max-width: 1600px; width: 100%; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 calc(var(--space) * .5); }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; margin: calc(var(--space) * 2.5) 0 calc(var(--space) * .75); }
h3 { font-size: 13px; font-weight: 650; margin: 0 0 8px; }
h1 + p.muted { margin-top: 0; max-width: 900px; margin-bottom: calc(var(--space) * 1.5); }
.muted { color: var(--text-muted); }
.empty { padding: calc(var(--space) * .75) 0; font-size: 13px; }
.empty::before { content: "○ "; }

/* cards and KPIs */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: calc(var(--space) * 1.25); align-items: start; grid-auto-flow: dense; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); padding: calc(var(--space) * 1.25); overflow: auto;
  box-shadow: var(--shadow-1); }
.card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.card .tw { border: none; box-shadow: none; border-radius: 0; margin-bottom: 0; }
.card .tfilter { margin-top: 0; }
.card.stub { background: var(--surface-alt); box-shadow: none; }
.kpis { display: flex; gap: var(--space); flex-wrap: wrap; }
.kpi { flex: 1 1 140px; background: var(--surface-alt); border-radius: var(--radius); padding: 10px 14px; font-size: 12px; color: var(--text-muted); }
.kpi b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.3; }

/* tables: header labels are raw names capitalised here; numbers right aligned and never wrapped; sortable headers; long tables scroll with a sticky header */
.tw { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow-1); margin-bottom: var(--space); }
.tw.long { max-height: 70vh; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
thead th { background: var(--surface-alt); color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
thead th:not(.verbatim)::first-letter { text-transform: uppercase; }
.tw thead th[tabindex] { cursor: pointer; user-select: none; }
.tw thead th[tabindex]:hover { color: var(--text); }
.tw thead th[tabindex]::after { content: "↕"; margin-left: 4px; opacity: 0; font-size: 11px; }
.tw thead th[tabindex]:hover::after { opacity: .5; }
.tw thead th[aria-sort="ascending"]::after { content: "↑"; opacity: 1; } .tw thead th[aria-sort="descending"]::after { content: "↓"; opacity: 1; }
.tw thead th[aria-sort] { color: var(--accent); }
tbody th { font-weight: 600; text-align: left; min-width: 200px; }
main > table, section > table { display: block; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); }
tbody tr:hover td:not(.hm) { background: color-mix(in srgb, var(--accent) 4%, transparent); }
td.nw { white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td a { font-weight: 500; } td:first-child > a { white-space: nowrap; }
.tfilter { display: block; width: min(320px, 100%); margin: 0 0 8px; font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--surface); }

/* status: pills on spans, plain colour elsewhere (table cells) */
.band { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; } .band-good { color: var(--status-good); } .band-watch { color: var(--status-watch); } .band-poor { color: var(--status-poor); }
.band-nm { color: var(--text-muted); font-style: italic; font-weight: 400; }
.status-blocked, .status-fail, .status-break { color: var(--status-poor); font-weight: 600; }
.status-warn { color: var(--status-watch); font-weight: 600; } .status-published, .status-pass { color: var(--status-good); }
.status-awaiting_approval, .status-publish_requested { color: var(--status-watch); font-weight: 600; } .status-rejected { color: var(--status-poor); }
span[class^="status-"], b[class^="status-"] { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, currentColor 11%, transparent); }
:where(span, b):where([class^="status-"]) { color: var(--text-muted); }   /* neutral tone for statuses without a colour rule */
span[class^="status-"]::before, b[class^="status-"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kpi b[class^="status-"] { display: inline-flex; font-size: 14px; margin: 6px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 180px; } .chips span { display: inline-block; background: var(--surface-alt); border-radius: 999px; padding: 1px 9px; margin: 0 4px 4px 0; font-size: 12px; white-space: nowrap; }
.path { font-family: var(--font-mono); font-size: 12px; }
code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-alt); padding: 1px 5px; border-radius: 4px; }
.caveats { background: color-mix(in srgb, var(--status-watch) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--status-watch) 30%, var(--border));
  border-radius: calc(var(--radius) * 1.5); padding: var(--space) calc(var(--space) * 1.25); }
.caveats li { margin-bottom: 4px; }
details.why summary { cursor: pointer; color: var(--accent); }
details > summary { cursor: pointer; color: var(--accent); font-weight: 500; margin: var(--space) 0; }
.sc td { white-space: nowrap; } .sc .lvl-zone td { background: var(--surface-alt); } .sc .lvl-zone td:first-child { font-weight: 700; }
.sc .lvl-domain td:first-child { padding-left: 20px; font-weight: 600; }
.sc .lvl-dataset td:first-child { padding-left: 32px; } .sc .lvl-cde td:first-child { padding-left: 48px; color: var(--text-muted); }
.sc button.cell { border: none; background: none; padding: 0; color: inherit; }
svg.spark { vertical-align: middle; } svg.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.toolbar { display: flex; gap: var(--space); align-items: center; flex-wrap: wrap; margin-bottom: var(--space); padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); }
.panel { position: fixed; right: 12px; top: 60px; width: 380px; max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5); padding: var(--space); z-index: 10; box-shadow: 0 12px 32px color-mix(in srgb, var(--text) 18%, transparent); }
.panel li.unread { font-weight: 600; }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: calc(var(--radius) * 2); width: min(680px, 92vw);
  box-shadow: 0 24px 48px color-mix(in srgb, var(--text) 25%, transparent); }
dialog::backdrop { background: var(--text); opacity: .35; }
#search-q { width: 100%; font-size: 16px; padding: 10px 12px; } #search-results { list-style: none; padding: 0; max-height: 50vh; overflow: auto; }
#search-results li { padding: 6px 4px; border-bottom: 1px solid var(--border); }
.kind { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-right: 6px; }
.error { color: var(--status-poor); }
form.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; } form.inline label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-muted); }
pre { font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; background: var(--surface-alt); padding: 10px 12px; border-radius: var(--radius); }
section { margin-top: calc(var(--space) * 1.5); }
@media (max-width: 860px) { .search-btn { min-width: 0; } .search-btn kbd, .env, .persona > span { display: none; } .grid { grid-template-columns: 1fr; } }
@media print { .tabs, .top, .side, .toolbar, .no-print { display: none !important; } .layout { display: block; } body { background: var(--surface); } .tw { box-shadow: none; } }
.status-blocking, .status-critical, .status-high { color: var(--status-poor); font-weight: 600; }
.status-warning, .status-open, .status-pending, .status-submitted, .status-acknowledged, .status-medium { color: var(--status-watch); font-weight: 600; }
.status-red, .status-not_effective { color: var(--status-poor); font-weight: 600; } .status-partially_effective, .status-partially_controlled { color: var(--status-watch); font-weight: 600; } .status-amber { color: var(--status-watch); font-weight: 600; } .status-green, .status-resolved, .status-closed, .status-done, .status-success, .status-effective { color: var(--status-good); }
/* R4: limits, change workflow */
.status-breach, .status-rejected, .status-denied, .status-ci_failed, .status-test_failed { color: var(--status-poor); font-weight: 600; }
.status-early_warning, .status-in_review, .status-awaiting_promotion { color: var(--status-watch); font-weight: 600; }
.status-ok, .status-approved, .status-allowed, .status-promoted, .status-effective, .status-merged { color: var(--status-good); }
pre.diff span.add { color: var(--status-good); } pre.diff span.del { color: var(--status-poor); text-decoration: line-through; }
/* catalog graphical view: layer cards, domains, ER model */
.layers { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space); }
.layer-card { display: block; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5);
  padding: var(--space); box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent); }
.layer-card:hover { text-decoration: none; border-color: var(--accent); }
.layer-card[aria-current="page"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.layer-card b { font-size: 15px; } .layer-card p { margin: 2px 0 10px; font-size: 12px; color: var(--text-muted); }
.layer-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 0; font-size: 12px; color: var(--text-muted); }
.layer-card dd { margin: 0; font-size: 18px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.layer-card.serving { border-style: dashed; background: var(--surface-alt); }
.domains { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space); }
.domains ul { list-style: none; padding: 0; margin: 0; } .domains li { padding: 3px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.domains li:last-child { border-bottom: none; } .domains button { border: none; background: none; padding: 0; color: var(--accent); font-family: var(--font-mono); font-size: 12px; }
.er { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space); } /* minmax(0, ...): the graph canvas cannot widen its own track */
.er #cy, .er #pl-cy { height: 72vh; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.er aside { max-height: 72vh; overflow: auto; } .er aside table { font-size: 12px; } .er aside td, .er aside th { padding: 4px 6px; }
@media (max-width: 1100px) { .er { grid-template-columns: 1fr; } }
.er aside code { word-break: break-all; }
/* home: hero, attention strip, widgets, quiet list */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: calc(var(--space) * 2); flex-wrap: wrap; margin-bottom: calc(var(--space) * 1.5); }
.hero h1 { font-size: 28px; margin: 0; } .eyebrow { margin: 0; font-size: 13px; }
.role-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.role-chips span { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); font-weight: 600; }
.shortcuts { display: flex; flex-wrap: wrap; gap: 8px; }
.shortcuts a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-1); }
.shortcuts a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.attention { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space); margin-bottom: calc(var(--space) * 1.5); }
.att { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: calc(var(--radius) * 1.5); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.att b { font-size: 26px; font-weight: 700; color: var(--tone); font-variant-numeric: tabular-nums; line-height: 1; min-width: 32px; }
.att span { font-size: 13px; line-height: 1.35; }
.tone-poor { --tone: var(--status-poor); } .tone-watch { --tone: var(--status-watch); } .tone-good { --tone: var(--status-good); }
.all-clear { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-radius: calc(var(--radius) * 1.5); color: var(--status-good); font-weight: 600;
  background: color-mix(in srgb, var(--status-good) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--status-good) 30%, var(--border)); }
.all-clear::before { content: "✔ "; }
.quiet h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.quiet-list { display: flex; flex-wrap: wrap; gap: 8px; }
.quiet-list div { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--surface-alt); color: var(--text-muted); }
.quiet-list div::before { content: "✔ "; color: var(--status-good); }
/* RDARR heatmap: cell background carries the effectiveness, the badge keeps icon and text for colour blind readers */
table.heat td.hm { min-width: 100px; } table.heat tbody th { min-width: 190px; } table.heat .band { white-space: normal; }
.hm-good { background: color-mix(in srgb, var(--status-good) 13%, var(--surface)); }
.hm-watch { background: color-mix(in srgb, var(--status-watch) 13%, var(--surface)); }
.hm-poor { background: color-mix(in srgb, var(--status-poor) 15%, var(--surface)); }
.hm-nm { background: var(--surface-alt); }
table.heat td.hm { border-left: 2px solid var(--surface); }
table.heat tbody tr:hover td.hm { filter: brightness(.97); }
.legend { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.legend span { padding: 1px 10px; border-radius: 999px; color: var(--text); }
/* report page: summary tiles and section jump bar */
.toc { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: calc(var(--header-h) + 4px); z-index: 3; padding: 6px; margin-bottom: var(--space);
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); border-radius: 999px; width: fit-content; }
.toc button { border-radius: 999px; font-size: 12.5px; padding: 4px 12px; }
[id^="s-"] { scroll-margin-top: calc(var(--header-h) + 56px); }
.sc td[data-band="good"] { background: color-mix(in srgb, var(--status-good) 8%, var(--surface)); }
.sc td[data-band="watch"] { background: color-mix(in srgb, var(--status-watch) 12%, var(--surface)); }
.sc td[data-band="poor"] { background: color-mix(in srgb, var(--status-poor) 12%, var(--surface)); }
.sc .lvl-zone td { font-weight: 700; } .sc tbody tr:hover td { filter: brightness(.97); }
.caveats h2 { margin-top: 0; }

/* lineage explorer: cards in columns, curves behind them. The left edge of a card carries the colour of its layer. */
.ln { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space); align-items: start; }
@media (max-width: 1100px) { .ln { grid-template-columns: minmax(0, 1fr); } }
.ln aside { max-height: max(420px, calc(100vh - 262px)); overflow: auto; position: sticky; top: calc(var(--header-h) + 8px); } .ln aside table { font-size: 12px; } .ln aside td, .ln aside th { padding: 4px 6px; }
.ln-view { position: relative; height: max(420px, calc(100vh - 262px)); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); background: var(--bg)
  radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px) 0 0 / 18px 18px; }
.ln-view:fullscreen { height: 100vh; border: 0; }
.ln-scroll { height: 100%; overflow: auto; cursor: grab; border-radius: inherit; }
.ln-size { margin: 12px; }
.ln-stage { position: relative; display: flex; gap: 72px; align-items: center; width: max-content; padding: 48px 20px 56px; transform-origin: 0 0; }
.ln-col { display: flex; flex-direction: column; gap: 14px; }
.ln-edges { position: absolute; inset: 0; width: auto; height: auto; pointer-events: none; stroke-width: 1.4; color: color-mix(in srgb, var(--text-muted) 55%, var(--bg)); }
.ln-edges path.declared { stroke-dasharray: 5 4; } .ln-edges path.faded { opacity: .15; } .ln-edges path.hl { color: var(--accent); stroke: var(--accent); stroke-width: 2.4; }
.ln-card { --lc: var(--text-muted); position: relative; width: 224px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--lc); border-radius: 8px;
  padding: 8px 10px; box-shadow: var(--shadow-1); cursor: pointer; transition: opacity .15s, box-shadow .15s; }
.ln-card:hover { box-shadow: var(--shadow-2); } .ln-card.faded { opacity: .28; }
.ln-card.sel { outline: 2px solid var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent); }
.ln-card.ln-risk { border-color: var(--status-poor); border-left-color: var(--status-poor); }
.ln-bronze { --lc: color-mix(in srgb, var(--status-watch) 55%, var(--status-poor)); } .ln-silver { --lc: color-mix(in srgb, var(--accent) 45%, var(--text-muted)); }
.ln-gold { --lc: var(--status-watch); } .ln-gold_dp { --lc: color-mix(in srgb, var(--accent) 55%, var(--status-good)); } .ln-cde, .ln-metric, .ln-term { --lc: var(--status-good); } .ln-incident { --lc: var(--status-poor); } .ln-report { --lc: var(--accent); } .ln-euc, .ln-euc_raw, .ln-dataiku { --lc: color-mix(in srgb, var(--accent) 50%, var(--status-poor)); }
.ln-head { display: flex; gap: 10px; align-items: center; min-width: 0; } .ln-head > div { min-width: 0; display: grid; }
.ln-head b { font-size: 13px; line-height: 1.3; overflow-wrap: break-word; } .ln-type { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-tile { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; flex: none; color: var(--lc, var(--text-muted)); background: color-mix(in srgb, var(--lc, var(--text-muted)) 13%, var(--surface)); }
.ln-tile svg { width: 16px; height: 16px; }
.ln-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 6px; font-size: 11px; }
.ln-tag { background: var(--surface-alt); border-radius: 999px; padding: 0 8px; color: var(--text-muted); } .ln-gap { color: var(--status-watch); }
.ln-cols-b { margin-left: auto; padding: 0 6px; font-size: 11px; border: 0; background: none; color: var(--accent); }
.ln-cols { list-style: none; margin: 8px -10px -8px; padding: 4px 0; border-top: 1px solid var(--border); font-size: 12px; }
.ln-cols li { display: flex; gap: 6px; align-items: center; padding: 2px 10px; } .ln-cols li span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ln-cols i { font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.ln-cols i.cde { color: var(--accent); border-color: var(--accent); } .ln-cols button { border: 0; background: none; padding: 0; font-size: 11px; color: var(--accent); }
.ln-x { position: absolute; top: 18px; width: 20px; height: 20px; padding: 0; border-radius: 50%; line-height: 1; font-weight: 700; font-size: 13px; z-index: 1;
  background: var(--surface); color: var(--text-muted); opacity: 0; }
.ln-x.up { left: -13px; } .ln-x.down { right: -11px; }
.ln-x.more { opacity: 1; background: var(--accent); color: var(--accent-text); border-color: var(--accent); } .ln-card:hover .ln-x, .ln-card:focus-within .ln-x, .ln-card.sel .ln-x { opacity: 1; }
.ln-tools, .ln-legend { position: absolute; left: 12px; bottom: 12px; display: inline-flex; gap: 4px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 4px; box-shadow: var(--shadow-1); font-size: 12px; z-index: 2; }
.ln-tools button { padding: 3px 9px; font-size: 12px; border-color: transparent; } .ln-tools output { min-width: 40px; text-align: center; color: var(--text-muted); }
.ln-legend { left: auto; right: 12px; bottom: auto; top: 12px; padding: 4px 10px; gap: 12px; color: var(--text-muted); } .ln-l { display: inline-block; width: 22px; border-top: 2px solid var(--text-muted); vertical-align: middle; } .ln-l.declared { border-top-style: dashed; }
.ln-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 12px 0; } .ln-facts dt { font-size: 11px; color: var(--text-muted); } .ln-facts dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.ln-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* ---------- object page (type tile, name, attribute strip, tabs) and two pane screen (tree of the objects on the left) */
.md { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: calc(var(--space) * 1.5); align-items: start; }
.md-tree { position: sticky; top: var(--space); max-height: calc(100vh - 150px); padding: 8px; font-size: 13px; }
.md-tree input { width: 100%; margin-bottom: 6px; } .md-tree details details { margin-left: 14px; } .md-tree details details summary { font-weight: 500; }
.md-switch { display: flex; gap: 4px; margin-bottom: 8px; padding: 3px; background: var(--surface-alt); border-radius: 8px; }
.md-switch a { flex: 1; text-align: center; white-space: nowrap; padding: 4px 6px; border-radius: 6px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.md-switch a:hover { text-decoration: none; color: var(--text); } .md-switch a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.md-tree summary { cursor: pointer; padding: 5px 6px; font-weight: 600; border-radius: 6px; } .md-tree summary .muted { font-weight: 400; font-size: 11px; }
.md-tree a { display: block; padding: 4px 8px 4px 22px; border-radius: 6px; color: var(--text); overflow-wrap: anywhere; }
.md-tree a:hover { background: var(--surface-alt); text-decoration: none; }
.md-tree a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); font-weight: 600; }
.obj-head { display: flex; gap: 12px; align-items: center; } .obj-head > div { min-width: 0; display: grid; } .obj-head h1 { margin: 0; overflow-wrap: anywhere; }
.obj-head .ln-tile { width: 44px; height: 44px; border-radius: 10px; } .obj-head .ln-tile svg { width: 22px; height: 22px; } .obj-head .ln-type { font-size: 12px; }
.obj-text { max-width: 900px; margin: 10px 0 0; }
.obj-attrs { display: flex; flex-wrap: wrap; gap: 10px 0; margin: var(--space) 0; padding: 10px 0; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); }
.obj-attrs > div { padding: 0 16px; border-right: 1px solid var(--border); } .obj-attrs > div:last-child { border-right: 0; }
.obj-attrs dt { font-size: 11px; color: var(--text-muted); } .obj-attrs dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; } .obj-attrs .chips { min-width: 0; } .obj-attrs .chips span { margin-bottom: 0; }
.obj-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: var(--space); overflow-x: auto; scrollbar-width: none; }
.obj-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; box-shadow: none; padding: 8px 12px; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.obj-tabs button:hover { color: var(--text); } .obj-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.obj-tabs button span { font-size: 11px; font-weight: 400; background: var(--surface-alt); border-radius: 999px; padding: 0 6px; margin-left: 2px; }
.obj-links { list-style: none; padding: 0; margin: 0 0 var(--space); display: flex; flex-wrap: wrap; gap: 6px; }
.obj-links li { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: 13px; }
[data-panel] > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: var(--space) 0 6px; }
/* the lineage explorer drawn in a tab: no title, no choice of the start, the details of the selected object under the graph */
[data-panel] > h1, [data-panel] > h1 + p.muted, [data-panel] > #lin-f > label:first-child, [data-panel] > #lin-f > a { display: none; }
[data-panel] > .ln { grid-template-columns: minmax(0, 1fr); } [data-panel] > .ln > .ln-view { height: max(420px, calc(100vh - 330px)); }
.md-tree details { margin: 0; border: 0; padding: 0; background: none; } .md-tree summary { color: var(--text); margin: 0; }
.dq-bar { display: inline-flex; width: 52px; height: 6px; border-radius: 3px; overflow: hidden; vertical-align: middle; background: var(--surface-alt); }
.dq-bar .pass { background: var(--status-good); } .dq-bar .warn { background: var(--status-watch); } .dq-bar .fail { background: var(--status-poor); } .dq-bar .none { background: var(--border); }
.ln-edges path.biz { color: color-mix(in srgb, var(--status-good) 65%, var(--bg)); } .ln-l.biz { border-color: var(--status-good); }
#lin-sel .obj-tabs button { padding: 6px 8px; }
@media (max-width: 860px) { .md { grid-template-columns: minmax(0, 1fr); } .md-tree { position: static; max-height: 220px; } }

/* lot 3: search on the home page, results page, filters of the marketplace */
.home-search { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 0 calc(var(--space) * 1.5); padding: 4px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-1); }
.home-search:focus-within { border-color: var(--accent); } .home-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; }
.home-search input { flex: 1; min-width: 0; border: 0; background: none; font-size: 16px; padding: 10px 0; outline: none; }
.search-form { display: flex; gap: 8px; max-width: 760px; margin-bottom: var(--space); } .search-form input { flex: 1; min-width: 0; font-size: 16px; padding: 8px 12px; }
.chat { list-style: none; margin: 0 0 var(--space); padding: 0; max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.chat li { padding: 10px 14px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; } .chat small { display: block; margin-top: 6px; }
.chat-user { align-self: flex-end; background: var(--surface-alt); } .chat-assistant { background: var(--surface); border: 1px solid var(--border); }
.results { list-style: none; margin: 0; padding: 0; max-width: 900px; } .results li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.results li > div { min-width: 0; } .results a { font-weight: 600; } .results p { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; } .results .muted { font-size: 12px; }
.results .ln-tile { flex: none; width: 32px; height: 32px; border-radius: 8px; } #search-results .more { border: 0; padding-top: 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: var(--space); } .filters input { min-width: 220px; margin-right: 6px; }
.filters button { border-radius: 999px; padding: 4px 12px; font-size: 13px; } .filters button span { color: var(--text-muted); font-size: 11px; }
.filters button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: var(--accent); color: var(--accent); }

/* preview panel: the header of an object, on the right of a list */
.peek-btn { border: 0; background: none; padding: 2px; margin-left: 4px; border-radius: 6px; color: var(--text-muted); vertical-align: middle; opacity: .45; cursor: pointer; line-height: 0; }
.peek-btn svg { width: 15px; height: 15px; } tr:hover .peek-btn, li:hover .peek-btn, .peek-btn:hover, .peek-btn:focus-visible { opacity: 1; color: var(--accent); }
.peek { position: fixed; top: var(--header-h); right: 0; bottom: 0; width: min(460px, 94vw); z-index: 6; overflow: auto; padding: var(--space) calc(var(--space) * 1.5);
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-2); }
.peek-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space); } .peek-bar a { font-weight: 600; }
.peek-body .md { display: block; } .peek-body .md-tree, .peek-body [data-tabs] { display: none; } .peek-body .obj-head h1 { font-size: 20px; }
.peek-body .obj-attrs { flex-direction: column; gap: 0; padding: 0; } .peek-body .obj-attrs > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
.peek-body .obj-attrs > div:last-child { border-bottom: 0; } .peek-body .obj-attrs dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
@media print { .peek, .peek-btn { display: none; } }

/* column lineage: a column of boxes per layer, curves between them */
.cl { position: relative; display: flex; gap: 40px; overflow: auto; padding: 4px 4px 12px; }
.cl-links { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.cl-links path { fill: none; stroke: color-mix(in srgb, var(--text-muted) 55%, transparent); stroke-width: 1.4; }
.cl-links path.declared { stroke-dasharray: 5 4; } .cl-links path.report { stroke: var(--accent); }
.cl-col { position: relative; display: flex; flex-direction: column; gap: 8px; flex: none; width: 190px; } .cl-col h4 { margin: 0 0 2px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.cl-node { display: grid; text-align: left; gap: 1px; padding: 6px 10px; border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
.cl-node small { font-weight: 400; font-size: 11px; color: var(--text-muted); } .cl-node.cde, .cl-key .cde { border-left-color: var(--status-good); } .cl-node.start { background: color-mix(in srgb, var(--status-good) 8%, var(--surface)); }
.cl-key .cde { display: inline-block; width: 10px; height: 12px; border: 1px solid var(--border); border-left: 3px solid var(--status-good); border-radius: 3px; vertical-align: middle; margin-left: 6px; }
.cl.trace .cl-node:not(.on), .cl.trace path:not(.on) { opacity: .2; } .cl.trace path.on { stroke: var(--accent); stroke-width: 2; } .cl-node.on { border-color: var(--accent); }

/* lot 4: CDE lifecycle statuses, identification grid, campaign phases */
.status-proposed, .status-enriched, .status-enrich, .status-validate, .status-certify { color: var(--status-watch); font-weight: 600; }
.status-validated, .status-certified { color: var(--status-good); font-weight: 600; } .status-decommissioned { color: var(--text-muted); text-decoration: line-through; }
.grid-total { font-size: 15px; } .grid-total b { font-size: 20px; }
.phases { display: flex; gap: 0; list-style: none; margin: 0 0 12px; padding: 0; counter-reset: ph; }
.phases li { flex: 1; padding: 8px 12px; border: 1px solid var(--border); background: var(--surface-alt); font-weight: 600; display: grid; counter-increment: ph; }
.phases li::before { content: counter(ph); font-size: 11px; color: var(--text-muted); } .phases li small { font-weight: 400; color: var(--text-muted); }
.phases li:first-child { border-radius: 8px 0 0 8px; } .phases li:last-child { border-radius: 0 8px 8px 0; } .phases li + li { border-left: 0; }
.phases li.on { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: var(--accent); color: var(--accent); }
.phases li.done { background: color-mix(in srgb, var(--status-good) 10%, var(--surface)); }
#camp-new fieldset { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; } #camp-new legend { font-weight: 600; margin-bottom: 4px; }
button:disabled, button:disabled:hover { opacity: .5; cursor: not-allowed; }

/* data products (docs/data-products): proposed products, measured SLOs */
.status-met, .status-kept { color: var(--status-good); } .status-missed, .status-broken { color: var(--status-poor); font-weight: 600; }
a.button { display: inline-block; padding: .4em .9em; border: 1px solid var(--accent); border-radius: 6px; text-decoration: none; } a.button.primary { background: var(--accent); color: var(--accent-text); }

/* Pipeline steps (pipeline page and run page): one card per step in run order, coloured by its outcome */
.pipe { list-style: none; display: flex; flex-wrap: wrap; gap: calc(var(--space) * .5); padding: 0; margin: 0 0 var(--space); counter-reset: pipe; }
.pipe-step { counter-increment: pipe; position: relative; flex: 0 1 11rem; display: flex; flex-direction: column; gap: 2px; padding: calc(var(--space) * .6);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius); font-size: 12px; }
.pipe-step b::before { content: counter(pipe) ". "; color: var(--text-muted); font-weight: 400; }
.pipe-def .pipe-step { flex-basis: 13rem; }
.pipe-bronze { border-left-color: color-mix(in srgb, var(--status-watch) 55%, var(--status-poor)); } .pipe-silver { border-left-color: color-mix(in srgb, var(--accent) 45%, var(--text-muted)); } .pipe-gold { border-left-color: var(--status-watch); }
.pipe-gate { border-style: dashed; border-left: 4px solid var(--text-muted); }
.pipe-pass { border-left-color: var(--status-good); } .pipe-warn { border-left-color: var(--status-watch); } .pipe-fail { border-left-color: var(--status-poor); }
.pipe-skipped { border-left-color: var(--border); opacity: .6; }
.status-error, .status-runtime_error { color: var(--status-poor); font-weight: 600; } .status-not_run, .status-skipped { color: var(--text-muted); }
pre.code { max-height: 32rem; overflow: auto; padding: var(--space); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; white-space: pre; }
.logmsg { white-space: pre-wrap; word-break: break-word; }

/* user menu (header) */
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 999px; border-color: var(--border); background: var(--surface); font-size: 13px; font-weight: 500; }
.user-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--accent); color: var(--surface); font-size: 11px; font-weight: 700; }
.user-panel { width: 300px; display: grid; gap: 10px; }
.user-panel .role-chips { margin: 6px 0 0; }
.user-panel .persona select { flex: 1; min-width: 0; }
.user-links { display: grid; } .user-links hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; width: 100%; }
.user-links a { padding: 6px 8px; border-radius: var(--radius); color: var(--text); font-size: 13px; }
.user-links a:hover { background: var(--surface-alt); text-decoration: none; }
@media (max-width: 860px) { #user-name { display: none; } }

/* My cockpit: key figures of the platform */
.hero .home-search { flex: 1 1 360px; margin: 0; }
.figs-title { font-size: 15px; margin: 0 0 8px; }
.figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space); margin-bottom: calc(var(--space) * 1.5); }
.fig { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5); color: var(--text); box-shadow: var(--shadow-1); }
.fig:hover { border-color: var(--accent); text-decoration: none; }
.fig span { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.fig b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; color: var(--tone, var(--text)); }
.fig b.word { font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
.fig { min-width: 0; }
.fig small { font-size: 12px; color: var(--text-muted); }
.user-panel[hidden] { display: none; }
