/* CogStack Network brochure site. Bootstrap does the layout; this file only sets the brand. */
:root {
  --cs-navy: #000235;
  --cs-cyan: #00a9ce;
  --cs-purple: #330072;
  --cs-magenta: #ae2573;
  --cs-gradient: linear-gradient(135deg, var(--cs-cyan) 0%, var(--cs-purple) 51%, var(--cs-magenta) 100%);
  --bs-primary: var(--cs-navy);
  --bs-primary-rgb: 0, 2, 53;
  --bs-link-color: var(--cs-purple);
  --bs-link-color-rgb: 51, 0, 114;
  --bs-link-hover-color: var(--cs-magenta);
  --bs-link-hover-color-rgb: 174, 37, 115;
  --bs-body-color: #1c1c28;
  --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.btn-primary { --bs-btn-bg: var(--cs-navy); --bs-btn-border-color: var(--cs-navy); --bs-btn-hover-bg: var(--cs-purple); --bs-btn-hover-border-color: var(--cs-purple); --bs-btn-active-bg: var(--cs-purple); --bs-btn-active-border-color: var(--cs-purple); }
.btn-outline-primary { --bs-btn-color: var(--cs-navy); --bs-btn-border-color: var(--cs-navy); --bs-btn-hover-bg: var(--cs-navy); --bs-btn-hover-border-color: var(--cs-navy); --bs-btn-active-bg: var(--cs-navy); }
.text-navy { color: var(--cs-navy); }
.bg-navy { background: var(--cs-navy); color: #fff; }
.bg-navy a { color: #cfe9f3; }
.brand-mark { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--cs-gradient); display: inline-block; vertical-align: -0.35rem; position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0.55rem; height: 0.55rem; background: #fff; border-radius: 50%; }
.accent-bar { height: 4px; width: 3rem; background: var(--cs-gradient); border-radius: 2px; }
.eyebrow { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cs-magenta); font-weight: 600; }
.hero h1 { font-weight: 700; letter-spacing: -.02em; }
.lead { color: #40405a; }
.card { border-color: #e6e6ef; }
.card-hover:hover { border-color: var(--cs-cyan); box-shadow: 0 .25rem 1rem rgba(0, 2, 53, .06); }
.badge-soft { background: #eef3fb; color: var(--cs-navy); font-weight: 500; }
.badge-fit-direct, .badge-fit-strong { background: #e3f6fa; color: #065a6e; }
.badge-fit-partial { background: #f3eefb; color: var(--cs-purple); }
.badge-fit-weak { background: #f1f1f4; color: #55556a; }
.status-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #c6c6d2; margin-right: .35rem; }
.status-live { background: #1c9b5e; }
.status-pilot { background: var(--cs-cyan); }
.status-validation { background: #b7a3d8; }
.facet-group summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.facet-group .form-check { font-size: .875rem; }
.facet-count { color: #8a8a9a; font-size: .75rem; }
.doc-nav .nav-link { color: #40405a; font-size: .9rem; padding: .25rem .5rem; }
.doc-nav .nav-link.active { color: var(--cs-navy); font-weight: 600; border-left: 3px solid var(--cs-magenta); background: transparent; }
.prose { max-width: 48rem; }
.prose h1 { font-weight: 700; letter-spacing: -.02em; }
.prose h2 { margin-top: 2.5rem; font-weight: 600; }
.prose h3 { margin-top: 1.75rem; font-size: 1.15rem; font-weight: 600; }
.prose pre { background: #f6f6fa; border: 1px solid #e6e6ef; border-radius: .375rem; padding: 1rem; font-size: .85rem; overflow: auto; }
.prose code { color: var(--cs-purple); }
.prose pre code { color: inherit; }
.prose table { width: 100%; margin: 1.25rem 0; font-size: .92rem; }
.prose table th, .prose table td { border-bottom: 1px solid #e6e6ef; padding: .5rem .6rem; vertical-align: top; }
.prose table th { background: #f6f6fa; text-align: left; }
.prose blockquote { border-left: 3px solid var(--cs-cyan); padding-left: 1rem; color: #40405a; }
.prose img { max-width: 100%; }
dl.kv dt { font-weight: 600; color: #40405a; font-size: .85rem; }
dl.kv dd { margin-bottom: .75rem; }
.quote { border-left: 3px solid var(--cs-cyan); padding-left: .75rem; color: #40405a; font-style: italic; }
.sticky-side { position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow: auto; }
footer { font-size: .9rem; }

/* ── Dashboards (D3). Colour roles were checked with the dataviz palette validator on a white surface. ── */
:root {
  --viz-1: #0a93b5; --viz-2: #ae2573; --viz-3: #eda100; --viz-4: #008300; --viz-5: #6250d6; --viz-6: #eb6834; --viz-7: #2a78d6; --viz-8: #e34948;
  --viz-other: #898781; --viz-grid: #e6e6ef; --viz-axis: #c3c2b7; --viz-muted: #8a8a9a; --viz-secondary: #40405a; --viz-ink: #1c1c28; --viz-surface: #ffffff; --viz-empty: #f1f1f4;
}
.viz-filters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end; }
.viz-filters label { font-size: .75rem; color: var(--viz-secondary); margin-bottom: .15rem; display: block; }
.viz-filters .form-select, .viz-filters .form-check { font-size: .875rem; }
.viz-card { border: 1px solid var(--viz-grid); border-radius: .5rem; background: var(--viz-surface); padding: 1rem 1.25rem 1.1rem; height: 100%; display: flex; flex-direction: column; }
.viz-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .5rem; }
.viz-title { font-weight: 600; font-size: .95rem; margin: 0; color: var(--viz-ink); }
.viz-sub { color: var(--viz-muted); font-size: .78rem; margin: .1rem 0 0; }
.viz-toggle .btn { --bs-btn-padding-y: .1rem; --bs-btn-padding-x: .45rem; --bs-btn-font-size: .72rem; }
.viz-plot svg { display: block; width: 100%; height: auto; font-family: var(--bs-font-sans-serif); font-size: 12px; }
.viz-plot text { fill: var(--viz-secondary); }
.viz-plot .axis text { fill: var(--viz-muted); font-size: 11px; }
.viz-plot .axis line, .viz-plot .axis path { stroke: var(--viz-axis); shape-rendering: crispEdges; }
.viz-plot .grid line { stroke: var(--viz-grid); shape-rendering: crispEdges; }
.viz-plot .value { fill: var(--viz-ink); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-plot .cat { fill: var(--viz-secondary); font-size: 12px; }
.viz-plot .mark { transition: filter .12s; }
.viz-plot .mark:hover, .viz-plot .mark:focus { filter: brightness(1.15); outline: none; }
.viz-plot .clickable { cursor: pointer; }
.viz-plot .endlabel { font-size: 11px; fill: var(--viz-secondary); }
.viz-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .78rem; color: var(--viz-secondary); margin: .25rem 0 .5rem; }
.viz-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.viz-swatch.line { width: 14px; height: 2px; border-radius: 1px; vertical-align: 3px; }
.viz-scale { display: flex; align-items: center; gap: .5rem; font-size: .72rem; color: var(--viz-muted); margin-top: .5rem; }
.viz-scale .ramp { flex: 0 0 120px; height: 8px; border-radius: 4px; }
.viz-tip { position: fixed; pointer-events: none; background: var(--viz-ink); color: #fff; padding: .45rem .65rem; border-radius: .375rem; font-size: .78rem; z-index: 1080; max-width: 20rem; box-shadow: 0 .25rem .75rem rgba(0, 2, 53, .2); display: none; }
.viz-tip .t { color: #cfd0dc; margin-bottom: .2rem; }
.viz-tip .row-k { display: flex; justify-content: space-between; gap: 1rem; }
.viz-tip .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.viz-tip .k { color: #cfd0dc; }
.viz-tip .key { display: inline-block; width: 12px; height: 2px; vertical-align: 3px; margin-right: .35rem; border-radius: 1px; }
.viz-table { font-size: .82rem; margin: 0; }
.viz-table th { font-weight: 600; color: var(--viz-secondary); border-bottom-color: var(--viz-axis); }
.viz-table td.num, .viz-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.viz-table-wrap { max-height: 24rem; overflow: auto; }
.tile { border: 1px solid var(--viz-grid); border-radius: .5rem; padding: .85rem 1rem; height: 100%; background: var(--viz-surface); }
.tile .value { font-size: 1.85rem; font-weight: 600; color: var(--cs-navy); line-height: 1.1; }
.tile .label { font-size: .8rem; color: var(--viz-secondary); margin-top: .15rem; }
.tile .note { font-size: .72rem; color: var(--viz-muted); margin-top: .25rem; }
.segbar { display: flex; height: 28px; gap: 2px; }
.segbar .seg { border-radius: 4px; color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; padding-left: 6px; overflow: visible; white-space: nowrap; cursor: pointer; transition: filter .12s; }
.segbar .seg:hover { filter: brightness(1.15); }
.segbar .seg.dark-text { color: var(--viz-ink); }
.drill-bar { border: 1px solid var(--cs-cyan); background: #f0fafc; border-radius: .5rem; padding: .6rem 1rem; }
.view-tabs .nav-link { color: var(--viz-secondary); font-weight: 500; }
.view-tabs .nav-link.active { background: var(--cs-navy); }
.viz-empty { color: var(--viz-muted); font-size: .85rem; padding: 2rem 0; text-align: center; }
/* Export mode: one bare figure for print-to-pdf (see js/dashboards.js). */
body.viz-export { margin: 0; background: #fff; }
.viz-export #site-header, .viz-export #site-footer, .viz-export #filters, .viz-export #views, .viz-export #view-intro, .viz-export #tiles, .viz-export #built, .viz-export .viz-head, .viz-export #drill, .viz-export #drill-list, .viz-export main > .container > .mb-4:first-child { display: none !important; }
.viz-export main > .container { max-width: none; width: var(--export-w, 900px); padding: 0 !important; margin: 0; }
.viz-export #charts { --bs-gutter-x: 0; --bs-gutter-y: 0; margin: 0; }
.viz-export .viz-card { border: none; border-radius: 0; padding: 4px 2px 2px; }
.bg-navy .btn-light { color: var(--cs-navy); }
.bg-navy .btn-light:hover { color: var(--cs-purple); }
