/* ===================================================================================================================
   GRC Owl theme: navy / rust / cream, taken from the logo (public/assets/img/logo-mark.png, logo-stacked.png).
   Two accent roles, used consistently everywhere below:
     - NAVY (--ink)  = primary actions, headings, links, the sidebar.       (the owl's dominant colour)
     - RUST (--rust) = "this is active / selected / hovered" - a highlight, never a primary action.  (the owl's body)
   Bootstrap 5.3 is loaded from a CDN with no build step, so it is retinted here by overriding the CSS custom
   properties it already exposes on :root and on its own component classes - never by fighting its !important rules.
   =================================================================================================================== */
:root {
  /* brand palette, sampled from the logo */
  --ink: #0b2545;          /* navy: headings, primary buttons, links, sidebar */
  --ink-2: #1f2a3d;        /* a touch softer - body text */
  --ink-dark: #071a30;     /* hover/active shade of navy */
  --ink-soft: #4a6483;     /* a mid step of navy, for things that need to read as "brand" but lighter */
  --rust: #8a4627;         /* the owl's rust: hover links, active chips/tabs, the instance badge */
  --rust-dark: #6e3720;
  --rust-tint: #f7e9e0;    /* rust at ~12% - soft chip backgrounds */
  --rust-tint-strong: #f0d6c5;
  --cream: #ece9de;        /* the logo's paper - the navbar */
  --cream-deep: #d9d3c2;   /* a hairline border on cream */
  --cream-soft: #f7f5ef;   /* a barely-there paper tint for subtle panels/sticky headers */

  /* legacy names some rules below still read - point them at the new palette */
  --brand: var(--ink);
  --brand-dark: var(--ink-dark);
  --sidebar-bg: var(--ink);
  --sidebar-fg: #b9c3d4;

  /* Bootstrap's own tokens: these ARE consumed via var() throughout bootstrap.min.css, so overriding them
     here retints body text, links, borders, radii and focus rings everywhere without touching Bootstrap's file. */
  /* typefaces (self-hosted, see fonts.css): sans for the interface and data, serif for page titles, mono for IDs/keys */
  --font-sans: 'Source Sans 3', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, "Times New Roman", serif;
  --font-mono: 'Source Code Pro', ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --bs-body-font-family: var(--font-sans);
  --bs-font-monospace: var(--font-mono);

  /* risk heat bands (score <=4, <=9, <=15, >15) - views use class heat-1..4, charts read these; theme-light.css retints */
  --heat-1: #2fa66c; --heat-2: #f2c94c; --heat-3: #f2a65a; --heat-4: #d5495a;
  --heat-1-ink: #fff; --heat-2-ink: #3d2f00; --heat-3-ink: #3d1f00; --heat-4-ink: #fff;
  --heat-1-fill: var(--heat-1); --heat-2-fill: var(--heat-2); --heat-3-fill: var(--heat-3); --heat-4-fill: var(--heat-4);
  --bs-body-bg: #fbfaf7;
  --bs-body-color: var(--ink-2);
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: #6b6259;
  --bs-link-color: var(--ink);
  --bs-link-color-rgb: 11, 37, 69;
  --bs-link-hover-color: var(--rust);
  --bs-link-hover-color-rgb: 138, 70, 39;
  --bs-border-color: #e3ded0;
  --bs-border-radius: 0.5rem;
  --bs-border-radius-sm: 0.4rem;
  --bs-border-radius-lg: 0.75rem;
  --bs-focus-ring-color: rgba(11, 37, 69, 0.22);
}

body {
  background: var(--bs-body-bg);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--ink); }
.app-main h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em; }
/* pills inside a page title stay in the interface face; a record ID set as muted text in the title becomes mono */
.app-main h3 .badge, .app-main h3 .cs-badge { font-family: var(--font-sans); letter-spacing: 0.01em; vertical-align: 0.2em; }
.app-main h3 > .text-muted { font-family: var(--font-mono); font-size: 0.62em; font-weight: 500 !important; letter-spacing: 0; vertical-align: 0.2em; }

/* ---------- interactions: consistent, modest motion instead of instant snaps ---------- */
a, .btn, .nav-link, .dropdown-item, .cl-chip, .catalogue-table tbody tr, .card, .form-control, .form-select {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
::selection { background: rgba(138, 70, 39, 0.22); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cream-deep); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c2b9a2; }

/* ---------- buttons, form controls, nav components: Bootstrap sets these as custom properties on the same
   selector rather than reading the :root ones above, so they are redeclared here (this file loads last and wins). ---------- */
.btn-primary {
  --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink);
  --bs-btn-hover-bg: var(--ink-dark); --bs-btn-hover-border-color: var(--ink-dark);
  --bs-btn-active-bg: var(--ink-dark); --bs-btn-active-border-color: var(--ink-dark);
  --bs-btn-disabled-bg: var(--ink); --bs-btn-disabled-border-color: var(--ink);
  --bs-btn-focus-shadow-rgb: 11, 37, 69;
}

.btn-outline-primary {
  --bs-btn-color: var(--ink); --bs-btn-border-color: var(--ink);
  --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink);
  --bs-btn-active-bg: var(--ink); --bs-btn-active-border-color: var(--ink);
  --bs-btn-focus-shadow-rgb: 11, 37, 69;
}
.btn-link { --bs-btn-color: var(--ink); --bs-btn-hover-color: var(--rust); }
.form-control:focus, .form-select:focus { border-color: var(--ink-soft); }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.form-check-input:focus { border-color: var(--ink-soft); }
.form-switch .form-check-input:checked { background-color: var(--ink); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--ink); }
.pagination { --bs-pagination-active-bg: var(--ink); --bs-pagination-active-border-color: var(--ink); --bs-pagination-color: var(--ink); --bs-pagination-hover-color: var(--ink-dark); --bs-pagination-focus-color: var(--ink); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--ink); box-shadow: 0 10px 30px rgba(11, 37, 69, 0.12); border-color: var(--bs-border-color); }
.card { border: 1px solid var(--bs-border-color); box-shadow: none; border-radius: 0.5rem; }
.btn { font-weight: 600; }
body { font-size: 0.9375rem; }
.table, .kpi-value, .viz-tile-value, .viz-hero, .viz-row-value, .upc-when, .upc-day { font-variant-numeric: tabular-nums; }
code, kbd, .upc-code { font-family: var(--font-mono); }
/* risk heat bands: badges, heatmap cells */
.heat-1 { background-color: var(--heat-1) !important; color: var(--heat-1-ink) !important; }
.heat-2 { background-color: var(--heat-2) !important; color: var(--heat-2-ink) !important; }
.heat-3 { background-color: var(--heat-3) !important; color: var(--heat-3-ink) !important; }
.heat-4 { background-color: var(--heat-4) !important; color: var(--heat-4-ink) !important; }

/* ---------- top navigation bar: deep navy (same as the sidebar), the owl on a cream chip so its dark strokes stay readable ---------- */
.app-navbar {
  background: linear-gradient(90deg, var(--ink-dark), var(--ink));
  border-bottom: 3px solid var(--rust);
  box-shadow: 0 2px 6px rgba(7, 26, 48, 0.25);
  color: #fff;
  padding: 0.5rem 1rem;
  min-height: 72px;
}
.app-navbar .navbar-brand { color: #fff; font-size: 1.25rem; letter-spacing: 0.01em; }
.app-navbar .navbar-brand:hover { color: #fff; }
.app-navbar .navbar-toggler { border-color: rgba(255, 255, 255, 0.4); }
.app-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
/* the notification bell and the account menu button, on the navy bar */
.btn-navbar-icon {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
.btn-navbar-icon:hover, .btn-navbar-icon:focus, .btn-navbar-icon.show { color: #fff; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.55); }

/* global search box in the title bar, with its live results panel */
.app-search { position: relative; flex: 1 1 320px; max-width: 460px; margin-left: 1.25rem; }
.app-search-icon { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.7); pointer-events: none; }
.app-search-input.form-control {
  padding-left: 2.1rem; color: #fff; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
}
.app-search-input.form-control::placeholder { color: rgba(255, 255, 255, 0.7); }
.app-search-input.form-control:focus { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.7); box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15); color: #fff; }
.app-search-panel {
  position: absolute; top: calc(100% + 0.4rem); left: 0; right: 0; z-index: 1080; max-height: 70vh; overflow-y: auto;
  background: #fff; color: var(--bs-body-color); border: 1px solid var(--bs-border-color); border-radius: 0.6rem; box-shadow: 0 10px 30px rgba(11, 37, 69, 0.2);
}
.app-search-panel[hidden] { display: none; }
.app-search-group { padding: 0.45rem 0.9rem 0.2rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #6c757d; }
.app-search-item { display: block; padding: 0.4rem 0.9rem; color: inherit; text-decoration: none; }
.app-search-item:hover, .app-search-item.active { background: var(--rust-tint, #f3e9e4); color: inherit; }
.app-search-item small { display: block; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-search-item span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-search-empty, .app-search-all { padding: 0.6rem 0.9rem; font-size: 0.875rem; color: #6c757d; }
.app-search-all { display: block; border-top: 1px solid var(--bs-border-color); font-weight: 500; text-decoration: none; color: var(--ink); }
@media (max-width: 575.98px) { .app-search { order: 10; flex-basis: 100%; max-width: none; margin: 0.5rem 0 0; } }

/* Brand mark: larger, sitting on a cream rounded chip (the logo was drawn on paper, not on navy). */
.brand-chip {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 56px; height: 56px; padding: 4px; background: var(--cream); border-radius: 14px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.brand-chip img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* the instance name: a soft rust tag rather than a solid loud badge */
.instance-badge {
  background: var(--rust-tint) !important;
  color: var(--rust-dark) !important;
  border: 1px solid var(--rust-tint-strong);
  border-radius: 999px !important;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

/* Sign-in page: the full lockup (owl, name, tagline), or the owl and the instance's own name. */
.auth-logo { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto; }
.auth-mark { width: 72px; height: 72px; }

.app-shell {
  display: flex;
  min-height: calc(100vh - 75px);
}

/* ---------- sidebar: navy, the owl's dominant colour - rust marks the current page ---------- */
.app-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
}
.sidebar-inner { padding: 1rem 0; }
.sidebar-group { margin-bottom: 1rem; }
.sidebar-group-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: #7688a3;
  padding: 0.25rem 1.25rem;
}
.app-sidebar .nav-link {
  color: var(--sidebar-fg);
  padding: 0.5rem 1.25rem;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.app-sidebar .nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.app-sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-left-color: var(--rust);
  font-weight: 600;
}

.app-main { flex-grow: 1; min-width: 0; }

/* ---------- desktop: the title bar is fixed, and the sidebar and the page scroll independently of each other ---------- */
@media (min-width: 992px) {
  body.app-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
  body.app-body > .app-navbar { flex: 0 0 auto; }
  body.app-body .app-shell { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  body.app-body .app-sidebar { overflow-y: auto; overscroll-behavior: contain; }
  body.app-body .app-main { overflow-y: auto; overscroll-behavior: contain; }
  /* minimized: the sidebar shrinks to a slim strip holding only the ">>>" button */
  body.sidebar-collapsed .app-sidebar { width: 64px; }
  /* ...and the page icons stay as clickable items: labels and group headings hide, a divider marks each group */
  body.sidebar-collapsed .sidebar-group-label { display: none; }
  body.sidebar-collapsed .sidebar-group { margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(127, 139, 171, 0.25); }
  body.sidebar-collapsed .sidebar-group:last-child { border-bottom: 0; }
  body.sidebar-collapsed .app-sidebar .nav-link { justify-content: center; padding-left: 0; padding-right: 0; gap: 0; }
  body.sidebar-collapsed .app-sidebar .nav-link > span { display: none; }
  body.sidebar-collapsed .app-sidebar .nav-link .bi { font-size: 1.25rem; }
}
/* the sidebar still scrolls (wheel, touch, keyboard) but shows no scrollbar */
.app-sidebar { scrollbar-width: none; -ms-overflow-style: none; }
.app-sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* minimize / maximize: a round button sitting on the line between the sidebar and the page, level with Dashboard (placed by app.js) */
.sidebar-edge-toggle {
  position: fixed; left: 235px; top: 100px; width: 30px; height: 30px; z-index: 40; padding: 0;
  align-items: center; justify-content: center; border-radius: 50%;
  background: #fff; color: #0b2545; border: 1px solid #d5dbe8; box-shadow: 0 1px 4px rgba(11, 37, 69, 0.25); font-size: 0.8rem; line-height: 1;
}
.sidebar-edge-toggle:hover { background: #f3f6ff; color: var(--rust); }

/* ---------- dashboard KPI tiles: navy / amber-rust / deep rust / teal - one brand family, four readable hues ---------- */
.kpi-card { border-radius: 0.75rem; color: #fff; }
.kpi-card .kpi-value { font-size: 2rem; font-weight: 700; }
.kpi-card .kpi-label { opacity: 0.88; font-size: 0.85rem; }
.kpi-bg-1 { background: linear-gradient(135deg, var(--ink), #274972); }
.kpi-bg-2 { background: linear-gradient(135deg, #a8632f, #c98c4c); }
.kpi-bg-3 { background: linear-gradient(135deg, var(--rust-dark), var(--rust)); }
.kpi-bg-4 { background: linear-gradient(135deg, #1f7a63, #2fa688); }

.heatmap-table { border-collapse: separate; border-spacing: 4px; }
.heatmap-cell {
  width: 64px; height: 44px; text-align: center; vertical-align: middle;
  border-radius: 6px; font-weight: 600; font-size: 0.85rem;
}

/* ---------- sign-in page: a deep navy field around the white card, like the logo's paper under studio light ---------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(135deg, #061422, var(--ink) 65%, var(--ink-soft));
}
.auth-card { max-width: 420px; width: 100%; border-radius: 0.85rem; border: 1px solid rgba(255, 255, 255, 0.5); }

.table-actions a, .table-actions button { margin-right: 0.25rem; }

.required-mark { color: #d5495a; }

/* Grouped, filterable checklist (e.g. Annex A mapping) */
.checklist-scroll { max-height: 300px; overflow-y: auto; }
.picker-group-label {
  position: sticky; top: 0; z-index: 1; background: #fff;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: #6c757d; padding: 0.35rem 0 0.2rem; margin-top: 0.4rem;
}
.picker-item .form-check-label { font-size: 0.875rem; }

/* ===================================================================================================================
   Audit progress (External Audits): status pills, stat tiles, meters and stacked bars - plain HTML/CSS, no chart library.
   Colours: every control status has its own hue (Open gray-blue, In Progress blue, Pending Auditor Review amber,
   Clarification Requested red, Closed green, Not Applicable gray-cream = left out of progress). Colour never
   carries the meaning alone: every mark has a label, a legend entry and a table view.
   =================================================================================================================== */
:root {
  --cs-open: #8b98a9;
  --cs-in_progress: #2f7fd1;
  --cs-pending_auditor_review: #e0a100;
  --cs-clarification_requested: #d9534f;
  --cs-closed: #2e9e5b;
  --cs-not_applicable: #c3c2b7;
  --cs-overdue: #d9534f;
  --viz-track: #dce3ea;
  --viz-ink: var(--ink);
  --viz-ink-2: #52514e;
  --viz-muted: #898781;
  --viz-hairline: #e1e0d9;
}

/* status pill: swatch + label */
.cs-badge {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.6rem;
  border: 1px solid var(--viz-hairline); border-radius: 999px; background: #fff;
  color: var(--viz-ink); font-size: 0.8rem; line-height: 1.3; white-space: nowrap;
}
.cs-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--viz-muted); flex: none; }
.cs-open .cs-dot { background: var(--cs-open); }
.cs-in_progress .cs-dot { background: var(--cs-in_progress); }
.cs-pending_auditor_review .cs-dot { background: var(--cs-pending_auditor_review); }
.cs-clarification_requested .cs-dot { background: var(--cs-clarification_requested); }
.cs-closed .cs-dot { background: var(--cs-closed); }
.cs-not_applicable .cs-dot { background: var(--cs-not_applicable); }
.cs-overdue .cs-dot { background: var(--cs-overdue); }

/* the panel */
.viz-title { font-size: 0.95rem; font-weight: 600; color: var(--viz-ink); margin: 0; }
.viz-caption { color: var(--viz-ink-2); font-size: 0.85rem; }
.viz-hero { font-size: 3rem; font-weight: 600; line-height: 1; color: var(--viz-ink); }
.viz-hero .viz-unit { font-size: 1.4rem; font-weight: 500; color: var(--viz-ink-2); margin-left: 0.1rem; }
.viz-tile { border: 1px solid var(--viz-hairline); border-radius: 0.6rem; padding: 0.65rem 0.85rem; background: #fff; height: 100%; }
.viz-tile-label { display: flex; align-items: center; gap: 0.4rem; color: var(--viz-ink-2); font-size: 0.8rem; }
.viz-tile-value { font-size: 1.6rem; font-weight: 600; line-height: 1.25; color: var(--viz-ink); }
.viz-swatch { width: 0.65rem; height: 0.65rem; border-radius: 2px; flex: none; display: inline-block; }
.viz-swatch.seg-na { background: transparent; border: 1.5px solid var(--cs-not_applicable); }

/* meter: one ratio against its limit */
.viz-meter { height: 12px; background: var(--viz-track); border-radius: 4px; overflow: hidden; }
.viz-meter-fill { height: 100%; background: var(--cs-closed); border-radius: 0 4px 4px 0; }
.viz-meter-fill.is-evidence { background: #7a5cc7; }

/* stacked bars: 14px thick, 2px gaps, a 4px round only on the data end, a tooltip on every segment */
.viz-stack { display: flex; gap: 2px; height: 14px; }
.viz-stack.viz-stack-sm { height: 8px; }
.viz-seg { position: relative; flex-basis: 0; min-width: 3px; outline: none; }
.viz-seg:last-child { border-radius: 0 4px 4px 0; }
.viz-seg::before { content: ""; position: absolute; inset: -7px 0; }      /* the hit area is bigger than the mark */
.viz-seg::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: var(--viz-ink); color: #fff; padding: 0.25rem 0.55rem; border-radius: 4px; font-size: 0.75rem; font-weight: 500;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.12s; z-index: 30;
}
.viz-seg.tip-start::after { left: 0; transform: none; }               /* near the bar's ends: keep the tooltip inside the card */
.viz-seg.tip-end::after { left: auto; right: 0; transform: none; }
.viz-seg:hover::after, .viz-seg:focus-visible::after { opacity: 1; }
.viz-seg:hover, .viz-seg:focus-visible { filter: brightness(1.1); }
.viz-seg:focus-visible { outline: 2px solid var(--viz-ink); outline-offset: 2px; }
.seg-closed { background: var(--cs-closed); }
.seg-in_progress { background: var(--cs-in_progress); }
.seg-open { background: var(--cs-open); }
.seg-pending_auditor_review { background: var(--cs-pending_auditor_review); }
.seg-clarification_requested { background: var(--cs-clarification_requested); }
.seg-overdue { background: var(--cs-overdue); }
.viz-stack-none { height: 14px; border-radius: 4px; background: var(--viz-hairline); }
.viz-stack-sm.viz-stack-none { height: 8px; }

.viz-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin: 0.65rem 0 0; padding: 0; list-style: none; font-size: 0.85rem; color: var(--viz-ink-2); }
.viz-legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.viz-legend strong { color: var(--viz-ink); font-weight: 600; }

.viz-rows { display: grid; gap: 0.85rem; }
.viz-row { display: grid; grid-template-columns: minmax(6.5rem, 9rem) 1fr auto; align-items: center; gap: 0.75rem; }
.viz-row-label { color: var(--viz-ink-2); font-size: 0.85rem; }
.viz-row-value { color: var(--viz-ink); font-size: 0.85rem; white-space: nowrap; min-width: 8.5rem; text-align: right; }
@media (max-width: 575.98px) {
  .viz-row { grid-template-columns: 1fr auto; }
  .viz-row .viz-stack { grid-column: 1 / -1; order: 3; }
  .viz-row-value { min-width: 0; }
}

.viz-table-toggle > summary { cursor: pointer; color: var(--ink); font-size: 0.85rem; width: fit-content; }
.viz-table th, .viz-table td { font-size: 0.85rem; }

.viz-schedule { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--viz-ink); }
.viz-schedule .bi { font-size: 1rem; }
.viz-schedule.is-overdue .bi { color: #d03b3b; }
.viz-schedule.is-soon .bi { color: #c98500; }
.viz-schedule.is-done .bi { color: #0ca30c; }
.viz-schedule.is-ok .bi { color: var(--viz-muted); }

/* the list page's progress cell */
.progress-cell { min-width: 9rem; }
.progress-cell .progress-text { font-size: 0.78rem; color: var(--viz-ink-2); margin-top: 0.3rem; white-space: nowrap; }

@media (forced-colors: active) {
  .viz-seg, .viz-meter-fill { forced-color-adjust: none; border: 1px solid CanvasText; }
}

/* ---------- checklist filter chips and the catalogue picker: rust marks "selected", navy hover is neutral ---------- */
.cl-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.7rem; cursor: pointer;
  border: 1px solid var(--viz-hairline); border-radius: 999px; background: #fff; color: var(--viz-ink-2); font-size: 0.8rem;
}
.cl-chip:hover { background: var(--cream-soft); }
.cl-chip.is-active { background: var(--rust); border-color: var(--rust); color: #fff; }
.cl-chip .cl-chip-count { font-weight: 600; }

.catalogue-scroll { max-height: 26rem; overflow: auto; border: 1px solid var(--viz-hairline); border-radius: 0.4rem; background: #fff; }
.catalogue-table { margin: 0; }
/* every list/table: header cells sit vertically centred (Bootstrap's default is bottom) and left-aligned */
.table > thead > tr > th, .table > thead > tr > td { vertical-align: middle; text-align: left; }
.catalogue-table thead th { position: sticky; top: 0; z-index: 2; background: var(--cream-soft); box-shadow: 0 1px 0 var(--viz-hairline); font-size: 0.8rem; }
.catalogue-table tbody tr { cursor: pointer; }
.catalogue-table tbody tr:hover { background: var(--cream-soft); }
.catalogue-table tbody tr.is-selected { background: var(--rust-tint); }
.catalogue-table td { vertical-align: top; font-size: 0.875rem; }
.catalogue-table .cat-desc { color: var(--viz-ink-2); }

/* ---------- tag picker: "type @ then a name" (risk register access lists) ---------- */
.tagpicker { position: relative; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); padding: 0.4rem; background: #fff; }
.tagpicker-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.3rem; }
.tagpicker-chips:empty { margin-bottom: 0; }
.tagpicker-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.4rem 0.15rem 0.6rem;
  background: var(--rust-tint); color: var(--rust-dark); border-radius: 999px; font-size: 0.82rem; font-weight: 500;
}
.tagpicker-chip button {
  border: none; background: none; color: var(--rust-dark); opacity: 0.7; line-height: 1; padding: 0 0.1rem; font-size: 1rem; cursor: pointer;
}
.tagpicker-chip button:hover { opacity: 1; }
.tagpicker [data-tagpicker-input] { border: none; padding: 0.2rem 0.1rem; box-shadow: none !important; }
.tagpicker-menu, .richtext-mention-menu {
  position: absolute; z-index: 40; left: 0; right: 0; top: 100%; margin-top: 0.2rem;
  background: #fff; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius);
  box-shadow: 0 10px 30px rgba(11, 37, 69, 0.14); max-height: 14rem; overflow-y: auto; padding: 0.25rem;
}
.richtext-mention-menu { left: auto; right: auto; top: auto; width: 15rem; }
.tagpicker-menu-item {
  display: block; width: 100%; text-align: left; border: none; background: none; padding: 0.35rem 0.6rem;
  border-radius: 0.35rem; font-size: 0.85rem; color: var(--ink-2);
}
.tagpicker-menu-item.is-active, .tagpicker-menu-item:hover { background: var(--cream-soft); color: var(--ink); }

/* ---------- rich text with @mentions (risk comments, treatment plan) ---------- */
.richtext { position: relative; }
.richtext-toolbar { display: flex; gap: 0.25rem; margin-bottom: 0.35rem; }
.richtext-toolbar .btn { padding: 0.15rem 0.5rem; line-height: 1.4; }
.richtext-editor {
  min-height: 5rem; padding: 0.5rem 0.75rem; overflow-y: auto;
}
.richtext-editor:empty::before { content: attr(data-placeholder); color: var(--bs-secondary-color); }
.richtext-editor p { margin: 0 0 0.5rem; }
.richtext-editor p:last-child { margin-bottom: 0; }
.richtext-editor ul, .richtext-editor ol { margin: 0 0 0.5rem 1.2rem; padding: 0; }
.mention {
  display: inline-block; background: var(--rust-tint); color: var(--rust-dark); border-radius: 0.3rem;
  padding: 0.05rem 0.35rem; font-weight: 600; font-size: 0.92em;
}
.richtext-view .mention { background: var(--rust-tint); color: var(--rust-dark); border-radius: 0.3rem; padding: 0.05rem 0.35rem; font-weight: 600; }
.richtext-view p { margin: 0 0 0.5rem; }
.richtext-view p:last-child, .richtext-view :last-child { margin-bottom: 0; }

/* ---------- risk list: sortable column headers, filter bar ---------- */
.risk-sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.25rem; }
.risk-sort-link:hover { color: var(--ink); }
.risk-sort-link .bi { font-size: 0.75rem; color: var(--rust); }
.filter-bar { font-size: 0.85rem; }
.filter-bar label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--viz-ink-2); margin-bottom: 0.15rem; }

/* ---------- profile photo ---------- */
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--cream-soft); border: 1px solid var(--bs-border-color);
}
.profile-avatar-placeholder {
  display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 1.75rem;
}
.navbar-avatar {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; margin-right: 0.25rem; vertical-align: -4px;
}

/* ---------- file drop (risk comment attachments) ---------- */
.filedrop-zone {
  border: 1px dashed var(--bs-border-color); border-radius: var(--bs-border-radius); padding: 0.6rem 0.75rem;
  font-size: 0.85rem; color: var(--ink-2); cursor: pointer; text-align: center; background: var(--cream-soft);
}
.filedrop-zone:hover, .filedrop-zone:focus-visible { border-color: var(--rust); color: var(--ink); }
.filedrop-zone.is-dragover { border-color: var(--rust); background: var(--rust-tint); color: var(--ink); }
.filedrop-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.filedrop-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; background: var(--cream-soft); border: 1px solid var(--bs-border-color);
  border-radius: 999px; padding: 0.15rem 0.35rem 0.15rem 0.6rem; font-size: 0.78rem;
}
.filedrop-chip button { border: none; background: none; line-height: 1; font-size: 1rem; color: var(--ink-2); padding: 0 0.2rem; }
.filedrop-chip button:hover { color: var(--rust-dark); }



/* ---------- profile photo cropper ---------- */
.cropper { border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); padding: 1rem; background: var(--cream-soft); }
.cropper-stage {
  position: relative; width: 280px; height: 280px; max-width: 100%; overflow: hidden; cursor: grab; touch-action: none;
  background: #222; border-radius: 4px; outline: 2px solid var(--ink);
}
.cropper-stage:active { cursor: grabbing; }
.cropper-stage img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; transform-origin: 0 0; }
.cropper-stage::after { /* thirds grid, so the square reads as a selection box */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
}
.cropper-preview { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--bs-border-color); background-repeat: no-repeat; background-color: #ddd; }

/* the row an audit-page link jumps to (#control-N) flashes briefly */
tr:target > td { animation: targetflash 3s ease-out; }
@keyframes targetflash { from { background-color: var(--rust-tint-strong); } to { background-color: transparent; } }


/* ---------- lists: column chooser + draggable column edges (app.js: initGrid) ---------- */
.grid-col-hidden { display: none !important; }
/* Every list heading keeps a readable minimum width, so a header can never be squeezed to nothing on load. */
.table > thead > tr > th { min-width: 4.5rem; }
.table > thead > tr > th:last-child:empty { min-width: 0; }
/* the record's title (a cell holding just its link) gets room, so lists don't stack titles three lines deep;
   cells holding a single pill or date never wrap */
.table > tbody > tr > td:not(.text-nowrap):has(> a:only-child) { min-width: 13rem; }
.table > tbody > tr > td:has(> .badge:only-child), .table > tbody > tr > td:has(> .cs-badge:only-child) { white-space: nowrap; }
table.grid-fixed { table-layout: fixed; max-width: none; }
table.grid-fixed th, table.grid-fixed td { overflow-wrap: anywhere; }
/* once widths are pinned nothing may spill into the next column: headings wrap (sort arrow included) and a pill
   wider than its column is cut with an ellipsis - status_badge() puts the full label in its title */
table.grid-fixed > thead > tr > th { white-space: normal !important; overflow: hidden; }
table.grid-fixed .risk-sort-link { display: inline; }
table.grid-fixed td .badge, table.grid-fixed td .cs-badge { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.grid-resizer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 9px; cursor: col-resize; user-select: none; touch-action: none; z-index: 3;
}
.grid-resizer::after { content: ""; position: absolute; top: 25%; bottom: 25%; right: 3px; width: 2px; background: var(--cream-deep); border-radius: 2px; }
th:hover > .grid-resizer::after, .grid-resizer.is-active::after { background: var(--rust); }
.grid-menu { min-width: 14rem; max-height: 22rem; overflow-y: auto; }

/* Risk Register: the Risk Treatment Plan card stands out from the neutral cards around it. */
.card-treatment { background: var(--rust-tint); border-color: var(--rust-tint-strong); border-left: 4px solid var(--rust); }
.card-treatment .table { --bs-table-bg: transparent; }
.card-treatment .card-title { color: var(--rust-dark); }

/* Owl: the floating assistant (bottom right of every signed-in page). Sits under Bootstrap's modals (1055) and above the page. */
.owl-widget { position: fixed; right: 20px; bottom: 20px; z-index: 1045; font-size: 0.9rem; }
.owl-fab {
  width: 62px; height: 62px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 6px 18px rgba(11, 37, 69, 0.28);
  display: flex; align-items: center; justify-content: center; transition: transform .15s ease, box-shadow .15s ease;
}
.owl-fab:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(11, 37, 69, 0.34); border-color: var(--rust); }
.owl-fab:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
.owl-fab img { width: 42px; height: 42px; object-fit: contain; }
.owl-widget.open .owl-fab { display: none; }
.owl-panel {
  position: absolute; right: 0; bottom: 0; width: 380px; height: min(560px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--cream-deep); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(11, 37, 69, 0.28); overflow: hidden;
}
.owl-panel[hidden] { display: none; }
.owl-head { display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; background: var(--ink); color: #fff; }
.owl-head-img { background: var(--cream); border-radius: 50%; padding: 3px; object-fit: contain; flex: none; }
.owl-head-text { flex: 1; min-width: 0; line-height: 1.2; }
.owl-head-text small { display: block; color: #b9c3d4; font-size: .72rem; }
.owl-icon-btn { background: transparent; border: 0; color: #dfe6f1; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; }
.owl-icon-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.owl-log { flex: 1; overflow-y: auto; padding: .8rem; background: var(--cream-soft); display: flex; flex-direction: column; gap: .55rem; }
.owl-msg { max-width: 92%; padding: .5rem .7rem; border-radius: 12px; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.4; }
.owl-msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 3px; }
.owl-msg.owl { align-self: flex-start; background: #fff; border: 1px solid var(--cream-deep); color: #2b2b2b; border-bottom-left-radius: 3px; }
.owl-items { align-self: stretch; display: flex; flex-direction: column; gap: .3rem; }
.owl-item {
  display: block; padding: .4rem .6rem; background: #fff; border: 1px solid var(--cream-deep); border-left: 3px solid var(--rust);
  border-radius: 6px; text-decoration: none; color: var(--ink); overflow-wrap: anywhere;
}
.owl-item:hover { background: var(--rust-tint); color: var(--ink); }
.owl-item .t { display: block; font-weight: 600; font-size: .84rem; }
.owl-item small { display: block; color: #6b6259; font-size: .74rem; }
.owl-chips { align-self: stretch; display: flex; flex-wrap: wrap; gap: .35rem; }
.owl-chip {
  background: #fff; border: 1px solid var(--ink-soft); color: var(--ink); border-radius: 999px; padding: .2rem .65rem;
  font-size: .78rem; cursor: pointer;
}
.owl-chip:hover { background: var(--ink); color: #fff; }
.owl-typing { align-self: flex-start; color: #6b6259; font-size: .8rem; padding-left: .3rem; }
.owl-ai-note { align-self: flex-start; color: #6b6259; font-size: .7rem; margin-top: -.3rem; padding-left: .3rem; }
.owl-page-hint { align-self: flex-start; color: #6b6259; font-size: .78rem; margin-top: .4rem; padding-left: .3rem; }
.owl-form { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--cream-deep); background: #fff; }
.owl-input { flex: 1; min-width: 0; border: 1px solid var(--cream-deep); border-radius: 999px; padding: .4rem .85rem; font-size: .9rem; }
.owl-input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11, 37, 69, .15); }
.owl-send { flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; }
.owl-send:hover { background: var(--ink-dark); }
.owl-send:disabled { opacity: .5; cursor: default; }
@media (max-width: 575.98px) {
  .owl-widget { right: 12px; bottom: 12px; }
  .owl-panel { position: fixed; right: 8px; left: 8px; bottom: 8px; width: auto; height: min(78vh, 560px); }
}
@media print { .owl-widget { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .owl-fab { transition: none; } }

/* Dashboard KPI icon badge (Dark theme: frosted circle on the coloured tile; theme-light.css restyles it). */
.kpi-card { position: relative; padding-right: 4.5rem !important; }
.kpi-ico { display: flex; align-items: center; justify-content: center; position: absolute; top: 1rem; right: 1.1rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #fff; font-size: 1.25rem; }

/* Dashboard > custom graphs (builder modal + saved graph cards) */
.custom-chart-box { position: relative; height: 280px; }
.custom-chart-box.cc-preview-box { height: 320px; }
.custom-chart-number { text-align: center; padding: 1.25rem 0; }
.custom-chart-number-value { font-size: 3rem; font-weight: 600; line-height: 1.1; color: var(--viz-ink); }
.custom-chart-number-label { color: var(--viz-ink-2); font-size: .85rem; }
.custom-chart-card .min-w-0 { min-width: 0; }
.custom-chart-card .flex-none { flex: none; }
#chartBuilder .cc-step { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--viz-ink-2); margin-bottom: .5rem; }
#chartBuilder .cc-filter-row { border: 1px solid var(--viz-hairline); border-radius: .5rem; padding: .5rem; margin-bottom: .5rem; }
#chartBuilder .cc-preview { position: sticky; top: 0; }

/* Dashboard layout: draggable graph cards */
.dash-card { position: relative; }
.dash-grip {
  position: absolute; top: 2px; left: 50%; transform: translateX(-50%); z-index: 2; border: 0; background: transparent;
  color: var(--viz-ink-2); cursor: grab; padding: 0 .75rem; line-height: 1; font-size: 1.1rem; opacity: .35; border-radius: .4rem;
}
.dash-card:hover .dash-grip, .dash-grip:focus-visible { opacity: 1; }
.dash-grip:active { cursor: grabbing; }
.dash-dragging { opacity: .45; }
@media (hover: none) { .dash-grip { opacity: .7; } }

/* Posted comments: avatar + bubble */
.comment-thread { padding: 0; }
.comment-item { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .85rem; }
.comment-item:last-child { margin-bottom: 0; }
.comment-avatar { flex: 0 0 2rem; width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; background: var(--rust-tint); color: var(--rust-dark); }
.comment-main { flex: 1 1 auto; min-width: 0; background: rgba(127,127,127,.08); border: 1px solid rgba(127,127,127,.18); border-radius: .25rem .75rem .75rem .75rem; padding: .55rem .85rem; }
.comment-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .2rem; }
.comment-head strong { font-size: .9rem; }
.comment-date { font-size: .75rem; opacity: .65; }

/* Dashboard: My Upcoming Action Items - date tile, title + meta line, relative due chip, priority/status badge. */
.upc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.9rem; }
.upc-count {
  display: inline-block; min-width: 1.5rem; padding: 0.05rem 0.5rem; margin-left: 0.35rem; border-radius: 999px;
  background: var(--rust-tint); color: var(--rust-dark); font-size: 0.75rem; font-weight: 600; text-align: center; vertical-align: 0.1em;
}
.upc-actions { display: flex; align-items: center; gap: 0.75rem; }
.upc-toggle { line-height: 1; padding: 0.25rem 0.45rem; }
.upc-all { font-size: 0.85rem; font-weight: 500; white-space: nowrap; text-decoration: none; }
.upc-all i { transition: transform 0.15s ease; display: inline-block; }
.upc-all:hover i { transform: translateX(3px); }
.upc-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--viz-hairline); border-radius: 0.75rem; overflow: hidden; }
.upc-list li + li { border-top: 1px solid var(--viz-hairline); }
.upc-row {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 1rem; color: inherit; text-decoration: none;
  background: transparent; transition: background-color 0.15s ease;
}
.upc-row:hover, .upc-row:focus-visible { background: var(--cream-soft, #f7f7f4); color: inherit; }
.upc-row:hover .upc-title { color: var(--rust); }
.upc-date {
  flex: none; width: 2.9rem; height: 2.9rem; border-radius: 0.6rem; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1; background: var(--viz-track); color: var(--viz-ink);
}
.upc-day { font-size: 1.05rem; font-weight: 650; }
.upc-mon { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.18rem; opacity: 0.75; }
.upc-date.upc-today { background: #fde8ea; color: #b4232f; }
.upc-date.upc-soon { background: #fff3dc; color: #9a6200; }
.upc-date.upc-later { background: var(--rust-tint); color: var(--rust-dark); }
.upc-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.upc-title { font-weight: 550; color: var(--viz-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.15s ease; }
.upc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.55rem; font-size: 0.78rem; color: var(--viz-muted, #898781); }
.upc-meta i { margin-right: 0.3rem; }
.upc-meta > span + span::before { content: "\00b7"; margin-right: 0.55rem; }
.upc-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.74rem; letter-spacing: 0.02em; }
.upc-detail { min-width: 0; max-width: 28rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upc-side { flex: none; display: flex; align-items: center; gap: 0.6rem; }
.upc-side .badge { min-width: 4.6rem; text-align: center; }
.upc-when { font-size: 0.78rem; font-weight: 500; color: var(--viz-ink-2); min-width: 4.6rem; text-align: right; }
.upc-when.upc-today { color: #b4232f; }
.upc-when.upc-soon { color: #9a6200; }
.upc-empty { display: flex; align-items: center; gap: 0.6rem; padding: 1rem; border: 1px dashed var(--viz-hairline); border-radius: 0.75rem; color: var(--viz-ink-2); }
.upc-empty i { font-size: 1.3rem; color: #2f9e6e; }
@media (max-width: 575.98px) {
  .upc-head { flex-direction: column; gap: 0.4rem; }
  .upc-row { align-items: flex-start; }
  .upc-side { flex-direction: column; align-items: flex-end; gap: 0.3rem; }
  .upc-title { white-space: normal; }
}

/* Back-to-list arrow button (colours come from btn-primary) */
.btn-back { display: inline-flex; align-items: center; justify-content: center; width: 34px; vertical-align: middle; }

/* Third-Party Risk Management icon: a mask so it takes the text colour like the Bootstrap Icons glyphs */
.bi.bi-tprm { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; background-color: currentColor; -webkit-mask: url("../img/icon-tprm.png") center / contain no-repeat; mask: url("../img/icon-tprm.png") center / contain no-repeat; }
.bi.bi-tprm::before { content: none; }

/* Dashboard > Reports: editor blocks and the report page */
.rb-block .card-header { background: transparent; }
.rb-badge { font-weight: 600; letter-spacing: .02em; }
.rb-badge-text { background: var(--viz-hairline, #e3e6ea); color: var(--viz-ink, #1f2933); }
.rb-badge-chart { background: #2f7fd1; color: #fff; }
.rb-badge-page_break { background: #8b98a9; color: #fff; }
.report-sheet .report-block { margin-bottom: 1.75rem; }
.report-sheet .report-block:last-child { margin-bottom: 0; }
.report-sheet .report-heading { font-weight: 600; border-bottom: 1px solid var(--viz-hairline, #e3e6ea); padding-bottom: .35rem; margin-bottom: .75rem; }
.report-sheet .report-chart-box { height: 320px; }
.report-sheet .report-data-table { max-width: 40rem; font-size: .85rem; }
.report-page-break { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0; color: var(--viz-ink-2, #6b7280); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.report-page-break::before, .report-page-break::after { content: ""; flex: 1; border-top: 1px dashed var(--viz-hairline, #c8ccd2); }

/* Graph builder: colour pickers */
.cc-swatches { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.cc-swatch { position: relative; display: inline-flex; }
.cc-swatch input[type=color] { width: 2.25rem; height: 2.25rem; padding: 2px; border: 1px solid var(--viz-hairline, #c8ccd2); border-radius: .4rem; background: transparent; cursor: pointer; }
.cc-swatch-x { position: absolute; top: -.45rem; right: -.45rem; width: 1.05rem; height: 1.05rem; line-height: .9rem; padding: 0; border-radius: 50%; border: 1px solid var(--viz-hairline, #c8ccd2); background: #fff; color: #444; font-size: .8rem; cursor: pointer; }
.cc-swatch:not(:hover):not(:focus-within) .cc-swatch-x { opacity: 0; }
.cc-swatch-add { width: 2.25rem; height: 2.25rem; padding: 0; }
@media (hover: none) { .cc-swatch:not(:hover):not(:focus-within) .cc-swatch-x { opacity: .8; } }

/* Documentation (/help) */
.docs-hero { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; }
.docs-search { position: relative; flex: 0 1 26rem; width: 100%; }
.docs-search > .bi-search { position: absolute; left: .75rem; top: .6rem; color: var(--bs-secondary-color); }
.docs-search input { padding-left: 2.2rem; }
.docs-toc { position: sticky; top: 1rem; max-height: calc(100vh - 6rem); overflow-y: auto; }
.docs-toc-group { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); padding: .6rem .6rem .2rem; }
.docs-toc-link { display: block; padding: .3rem .6rem; border-radius: .35rem; color: var(--bs-body-color); text-decoration: none; font-size: .875rem; }
.docs-toc-link .bi { width: 1.1rem; display: inline-block; color: var(--bs-secondary-color); }
.docs-toc-link:hover { background: var(--bs-tertiary-bg); }
.docs-toc-link.active { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-weight: 600; }
.docs-section { margin-bottom: 1.25rem; scroll-margin-top: 1rem; }
.docs-section .card-body { padding: 1.5rem; }
.docs-h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: .75rem; }
.docs-h2 .bi { color: var(--brand, var(--bs-primary)); margin-right: .25rem; }
.docs-topic { margin-top: 1.1rem; }
.docs-topic h5 { font-size: 1rem; font-weight: 600; margin-bottom: .4rem; }
.docs-topic p:last-child, .docs-topic ul:last-child, .docs-topic ol:last-child { margin-bottom: 0; }
.docs-who { font-size: .875rem; color: var(--bs-secondary-color); border-left: 3px solid var(--bs-border-color); padding-left: .6rem; }
.docs-chips { display: inline-flex; flex-wrap: wrap; gap: .3rem; vertical-align: middle; }
.docs-chip { display: inline-block; font-size: .78rem; padding: .1rem .5rem; border-radius: 1rem; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); }
.docs-table { font-size: .9rem; }
.docs-glossary dt { font-weight: 600; }
.docs-glossary dd { margin-bottom: 0; }
.docs-glossary .docs-topic { margin-top: .6rem; }
