/* AUTO-GENERATED from forge.css — Plan 758: CSS modularisation.
 * Edit this file directly; forge.css @imports all partials.
 * -----------------------------------------------------------------------
 * layout.css — layout primitives: sidebar, topbar, app shell, dashboard grid.
 */
/* Status dot utility classes */
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  background-color: var(--text-muted);
}
.dot-green {
  background-color: var(--brand-green);
}
.dot-amber {
  background-color: var(--text-primary);
}
.dot-red {
  background-color: var(--text-primary);
}
.dot-blue {
  background-color: var(--brand-blue);
}
.dot-slate {
  background-color: var(--text-muted);
}

/* Card utility */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  transition:
    box-shadow 0.15s cubic-bezier(0.25, 0, 0, 1),
    transform 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.card:active {
  background: var(--bg-hover);
  transform: none;
  box-shadow: var(--shadow-sm);
}
.card-red {
  background: var(--tint-red);
}
.card-amber {
  background: var(--tint-amber);
}
.card-green {
  background: var(--tint-green);
}
.card-blue {
  background: var(--tint-blue);
}

/* Progress bar utility */
.progress-bar {
  background: var(--border);
  border-radius: var(--radius-xs);
  height: 8px;
  width: 100%;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  width: 100%;
  border-radius: var(--radius-xs);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.25, 0, 0, 1);
}
.fill-green {
  background: var(--brand-green);
}
.fill-amber {
  background: var(--brand-amber-bright);
}
.fill-red {
  background: var(--brand-red);
}

/* ---- Inline progress wrapper (progress_html in shared.py) ---- */
.progress-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.progress-inline .progress-bar {
  width: 80px;
}
.progress-inline-pct {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- Status cell labels (dopc_cell / epd_cell in shared.py) ---- */
.cell-label {
  font-size: var(--text-sm);
}
.cell-subreason {
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin-left: 4px;
}

/* ---- Product header metadata (products.py) ---- */
.product-brand-legal {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.product-annual-revenue {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.product-meta-value {
  color: var(--text-primary);
  font-weight: 600;
}
.product-meta-missing {
  color: var(--text-muted);
  font-style: italic;
}
.product-meta-block {
  min-width: 0;
  margin-bottom: 16px;
}
.product-meta-eyebrow {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 6px;
}
.product-meta-facts {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.fill-blue {
  background: var(--brand-blue);
}

/* Badge utility */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-red {
  background: color-mix(in srgb, var(--tint-red) 70%, var(--bg-card));
  color: var(--text-primary);
}
.badge-amber {
  background: color-mix(in srgb, var(--tint-amber) 70%, var(--bg-card));
  color: var(--text-primary);
}
.badge-green {
  background: color-mix(in srgb, var(--tint-green) 70%, var(--bg-card));
  color: var(--brand-green);
}
.badge-blue {
  background: var(--tint-blue);
  color: var(--brand-blue);
}
/* Plan 70: neutral info badge — non-violet blue, distinct from the AI accent. */
.badge-info {
  background: var(--tint-info);
  color: var(--brand-info);
}
.badge-slate {
  background: var(--tint-slate);
  color: var(--text-secondary);
}

/* Dismissable variant: badge carries a small × button. Added in Plan 29
 * so chip-style badges (e.g. applied regulations on the product header)
 * can be removed without inventing a one-off chip primitive. */
.badge--dismissable {
  gap: 4px;
  padding-right: 4px;
}
.badge-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  border-radius: 50%;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  transition:
    background 80ms ease-out,
    opacity 80ms ease-out;
}
.badge-dismiss:hover {
  background: rgba(var(--navy-rgb), 0.08);
  opacity: 1;
}

/* Filled count badge — used by proposals tab flash indicator */
.proposals-tab-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--brand-blue);
  color: var(--text-on-dark);
  vertical-align: middle;
}

/* Tag utility */
.tag {
  display: inline-flex;
  align-items: center;
  background: var(--tint-slate);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-right: 4px;
  margin-bottom: 4px;
}
.tag-blue {
  background: var(--tint-blue);
  color: var(--brand-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.tag-green {
  background: var(--tint-green);
  color: var(--brand-green);
}

/* Section header */
.section-header {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand-blue);
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Section label (inline variant) */
.section-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------
 * Osperan hero stat — canonical page-anchor metric.
 * Floats directly on --bg-page; no card border, no shadow, no stripe.
 * Use this for the ONE number that anchors a page (e.g. portfolio
 * compliance %, compliance roadmap countdown). Distinct from .kpi-tile
 * which is for scannable grid metrics.
 * ------------------------------------------------------------------ */
.forge-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 0 8px 0;
}
.forge-hero-stat__value {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--font-weight-display);
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.forge-hero-stat__value--red {
  color: var(--text-primary);
}
.forge-hero-stat__value--amber {
  color: var(--text-primary);
}
.forge-hero-stat__value--green {
  color: var(--brand-green);
}
.forge-hero-stat__label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.forge-hero-stat__sublabel {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ------------------------------------------------------------------
 * .forge-hero-compliance: Dashboard V2 above-the-fold hero card.
 *
 * Single focal block carrying the portfolio compliance %, an inline
 * sparkline + delta pill, and a peer-benchmark caption. Card chrome
 * (background + border + radius) anchors the hero so it reads as a
 * deliberate panel rather than a floating number.
 * ------------------------------------------------------------------ */
.forge-hero-compliance {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-sizing: border-box;
}
.forge-hero-compliance__main {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.forge-hero-compliance__primary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.forge-hero-compliance__value {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--font-weight-display);
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.forge-hero-compliance__value--na {
  color: var(--text-muted);
  font-size: var(--text-xl);
}
.forge-hero-compliance__label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}
.forge-hero-compliance__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.forge-hero-compliance__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.forge-hero-compliance__delta {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--brand-green);
  letter-spacing: 0.01em;
}
.forge-hero-compliance__delta--down {
  color: var(--text-primary);
}
.forge-hero-compliance__delta--flat {
  color: var(--text-muted);
}
.forge-hero-compliance__composition {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}
.forge-hero-compliance__composition-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.forge-hero-compliance__composition-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
}
.forge-hero-compliance__composition-swatch--compliant {
  background: var(--brand-green);
}
.forge-hero-compliance__composition-swatch--missing {
  background: var(--brand-red);
}
.forge-hero-compliance__composition-swatch--update {
  background: var(--brand-amber);
}
.forge-hero-compliance__composition-value {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: right;
}
.forge-hero-compliance__composition-label {
  color: var(--text-secondary);
}
.forge-hero-compliance__peer {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 4px;
  padding-top: 0;
}
.forge-hero-compliance__peer-source {
  color: var(--text-muted);
  margin-right: 4px;
}
.forge-hero-compliance__peer-quartile {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-page);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* Metric mini card */
.metric-mini {
  flex: 1;
  min-width: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition:
    box-shadow 0.15s cubic-bezier(0.25, 0, 0, 1),
    transform 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.metric-mini:hover {
  background: var(--tint-slate);
}
.metric-mini .mm-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.metric-mini .mm-label {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Certification tracker card */
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.15s cubic-bezier(0.25, 0, 0, 1),
    transform 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.cert-card:hover {
  background: var(--tint-slate);
}
.cert-card .cert-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-blue);
  margin-bottom: 10px;
}
.cert-card .cert-counts {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}
.cert-card .cert-count-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: 500;
}
.cert-card .cert-count-item .num {
  font-size: var(--text-lg);
  font-weight: 700;
}
.cert-card .cert-count-item .lbl {
  color: var(--text-secondary);
}

/* Stacked bar */
.stacked-bar {
  display: flex;
  height: 8px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--tint-slate);
}
.stacked-bar .seg {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.25, 0, 0, 1);
}
.stacked-bar .seg-green {
  background: var(--brand-green);
}
.stacked-bar .seg-amber {
  background: var(--brand-amber-bright);
}
.stacked-bar .seg-red {
  background: var(--brand-red);
}

/* Regulatory sidebar card */
.reg-sidebar-card {
  background: var(--tint-red);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 10px;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: background 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.reg-sidebar-card:hover {
  background: color-mix(in srgb, var(--tint-red) 70%, var(--bg-card));
}
.reg-sidebar-card[role="button"]:hover {
  background: color-mix(in srgb, var(--tint-red) 60%, var(--bg-card));
}
.reg-sidebar-card[role="button"]:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Provenance badge on work-queue rows */
.provenance-badge {
  border: 1px solid var(--border-cool);
  transition:
    background 0.15s cubic-bezier(0.25, 0, 0, 1),
    color 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.provenance-badge:hover {
  background: var(--brand-blue) !important;
  color: var(--text-on-dark) !important;
}

/* Extraction spotlight card */
/* Intentionally instant (no transition on this rule) — see Plan 484.
   If animation is added later, prefer filter: drop-shadow() over box-shadow for GPU compositing. */
.xray-spotlight:hover {
  box-shadow: 0 6px 16px rgba(var(--navy-rgb), 0.08);
  transform: translateY(-1px);
}
.xray-spotlight:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Command palette (Cmd+K) */
.cmdk-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(var(--navy-rgb), 0.45);
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.cmdk-panel {
  width: min(640px, 92vw);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 20px 60px rgba(var(--navy-rgb), 0.25);
  overflow: hidden;
  animation: cmdk-pop 0.14s ease-out;
}
@keyframes cmdk-pop {
  from {
    transform: translateY(-6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.cmdk-input {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
}
.cmdk-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cmdk-list {
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.cmdk-item:hover,
.cmdk-item.active {
  background: var(--tint-info);
}
.cmdk-title {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.cmdk-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.cmdk-badge {
  margin-left: auto;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--brand-blue);
  background: var(--tint-blue);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.cmdk-hint {
  padding: 8px 14px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cmdk-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.cmdk-empty-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.cmdk-empty-hint {
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.45;
}
/* Ask Osperan entry: visually elevates the synthetic AI hit so the user
 * notices it ahead of plain search results. The badge uses the shared
 * AI accent role instead of a one-off search color. */
.cmdk-item-qa {
  background: var(--brand-ai-tint);
  border: 1px solid color-mix(in srgb, var(--brand-ai) 18%, transparent);
  box-shadow: inset 2px 0 0 0 var(--brand-ai);
}
.cmdk-item-qa:hover,
.cmdk-item-qa.active {
  background: color-mix(in srgb, var(--brand-ai) 14%, transparent);
}
.cmdk-item-qa .cmdk-title {
  color: var(--brand-ai);
}
.cmdk-item-qa .cmdk-badge {
  color: var(--color-white);
  background: var(--brand-ai);
}
@media (prefers-reduced-motion: reduce) {
  .cmdk-panel {
    animation: none;
  }
  /* Suppress hover-triggered transform lifts for vestibular safety (Plan 480) */
  .card,
  .kpi-tile,
  .metric-mini,
  .cert-card,
  .forge-oblig-tab,
  .xray-spotlight {
    transform: none !important;
  }
  .card:hover,
  .kpi-tile.clickable:hover,
  .metric-mini:hover,
  .cert-card:hover,
  .forge-oblig-tab.is-clickable:hover,
  .xray-spotlight:hover {
    transform: none;
    transition: background 0.15s cubic-bezier(0.25, 0, 0, 1);
  }
}
.reg-sidebar-card .reg-title {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 4px;
}
.reg-sidebar-card .reg-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 6px;
}
.reg-sidebar-card .reg-action {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Dashboard grid */
.dash-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 24px;
  margin-bottom: 16px;
  align-items: start;
}
@media (max-width: 1100px) {
  .dash-grid {
    grid-template-columns: 2fr 1fr;
  }
}
@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}
.dash-grid-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Manager dashboard body (portfolio.py build_body) ---- */
.dashboard-body {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 24px;
  align-items: start;
  width: 100%;
  min-width: 0;
}
.dashboard-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dashboard-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 1100px) {
  .dashboard-body {
    grid-template-columns: 2fr 1fr;
  }
}
@media (max-width: 900px) {
  .dashboard-body {
    grid-template-columns: 1fr;
  }
}
.dash-hero-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 640px) {
  .dash-hero-row {
    flex-direction: column;
  }
}
.dash-hero-row .countdown-wrap {
  flex: 1;
}
.cert-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.cert-cards-row > .cert-card {
  min-width: 0;
  max-width: 420px;
  margin-bottom: 0;
}
.metrics-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Alert strip */
.alert-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--tint-amber);
  border: 1px solid var(--kpi-border-amber);
  border-radius: var(--radius-card);
  margin-bottom: 16px;
}
.alert-strip-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 20px 0;
}
.section-divider .section-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.section-divider .section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Step indicator */
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.step.done {
  color: var(--brand-green);
  font-weight: 500;
}
.step.active {
  color: var(--brand-blue);
  font-weight: 500;
}
.step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
  transition:
    background 0.15s cubic-bezier(0.25, 0, 0, 1),
    color 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.step-icon.pending {
  background: var(--tint-slate);
  color: var(--text-muted);
}
.step-icon.done {
  background: var(--tint-green);
  color: var(--brand-green);
}
.step-icon.active {
  background: var(--tint-blue);
  color: var(--brand-blue);
}
table tbody tr {
  border-bottom: 1px solid var(--tint-slate);
}

/* Focus visible ring is defined near the top of this file via :focus-visible. */

/* Timeline styling */
.timeline-marker {
  text-align: center;
}
.timeline-date {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 auto 6px auto;
}
.timeline-label {
  font-size: var(--text-xs);
}
.dot-today {
  background: var(--brand-blue);
  box-shadow: 0 0 0 2px var(--brand-blue);
}

/* ======================================================================
 * Dashboard redesign (Phase 1)
 * ====================================================================== */

/* Shared Osperan layout primitives. These are intentionally small:
 * page-specific views still own their data/rendering, but repeated
 * chrome now has one visual contract. */
.forge-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}
.forge-section-eyebrow {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  color: var(--brand-blue);
}
.forge-section-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.forge-section-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.forge-section-meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
}
.forge-card-header,
.forge-stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.forge-card-header-copy,
.forge-stage-header-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.forge-card-header-title,
.forge-stage-header-title {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.35;
}
.forge-card-header-title {
  font-size: var(--text-base);
}
.forge-stage-header-title {
  font-size: var(--text-md);
}
.forge-card-header-helper,
.forge-stage-header-helper {
  color: var(--text-muted);
  line-height: 1.35;
}
.forge-card-header-helper {
  font-size: var(--text-sm);
}
.forge-stage-header-helper {
  font-size: var(--text-sm);
}
.forge-card-header-meta,
.forge-stage-header-meta {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.forge-content-box {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: none;
  padding: 20px 24px;
}
.forge-content-box--summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.forge-content-box--filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Filter toolbars are navigation chrome, not content objects.
     * Remove the card surface so they float on --bg-page rather
     * than competing visually with the data surfaces below them. */
  background: transparent;
  border: none;
  box-shadow: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}
/* Stage content anatomy — card section, field group, section actions.
 * Used inside product deep-dive stage tabs to standardize the sub-section
 * header → field group → action row pattern. See forge-ui.mdc. */
.forge-card-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
}
.forge-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 540px;
  width: 100%;
}
.forge-section-actions {
  display: flex;
  justify-content: flex-end;
  max-width: 540px;
  width: 100%;
  padding-top: 4px;
}
.forge-stage-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex: none;
}
.forge-stage-attention {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-soft);
  padding: 12px 14px;
  box-sizing: border-box;
}
.forge-stage-attention--blue {
  background: var(--tint-blue);
}
.forge-stage-attention--amber {
  background: var(--tint-amber);
}
.forge-stage-attention--red {
  background: var(--tint-red);
}
.forge-stage-attention--green {
  background: var(--tint-green);
}
.forge-stage-attention--slate {
  background: var(--tint-slate);
}
.forge-stage-attention-icon {
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  margin-top: 1px;
}
.forge-stage-attention-title {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 750;
  line-height: 1.35;
}
.forge-stage-attention-detail {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.45;
  margin-top: 2px;
}
.forge-stage-attention-copy {
  flex: 1;
  min-width: 0;
}
.forge-stage-attention-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
@media (max-width: 900px) {
  .forge-stage-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
  }
  .forge-stage-attention {
    flex-wrap: wrap;
  }
  .forge-stage-attention-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
.forge-stage-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-top: 4px;
}
.forge-stage-action-row--start {
  justify-content: flex-start;
}
.forge-stage-action-row--end {
  justify-content: flex-end;
}
/* Plan 75: passive content plate for stage bodies. Unlike .forge-card it
 * never lifts on hover — it is a static surface (border, radius, bg-card,
 * padding). accent-* adds a coloured left border (Sign status); tint-*
 * washes the background (Data / Gaps section panels). The canonical
 * border/radius/bg string lives here so stage files never hand-roll it
 * (enforced by tests/test_stage_anatomy_ratchet.py). */
.forge-stage-surface {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-card);
  padding: 20px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}
/* Sources library surface: keep intake / annex inside the plate. */
.forge-product-sources-library {
  overflow-x: clip;
}
/* Title + helper share the white stage box (2026-09-25 chat lock). */
.forge-stage-surface .forge-stage-header,
.forge-stage-surface .forge-stage-header-row {
  width: 100%;
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  box-sizing: border-box;
}
.forge-stage-surface .forge-stage-header-row {
  margin-bottom: 0;
}
.forge-stage-surface--compact {
  gap: 12px;
  padding: 14px 16px;
}
.forge-stage-surface--scroll {
  max-height: 320px;
  overflow-y: auto;
}
.forge-stage-surface--centered {
  align-items: center;
  text-align: center;
}
.forge-stage-surface--reissue {
  background: var(--tint-blue);
}
.forge-stage-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-page);
  padding: 10px 12px;
}
.forge-stage-item--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.forge-stage-item--compact {
  gap: 4px;
  padding: 8px 10px;
}
.forge-stage-item--muted {
  background: var(--bg-soft);
}
.forge-stage-item--selected {
  border-left: 3px solid var(--brand-green);
  background: var(--bg-card);
}
.scope-obligation-list {
  gap: 8px;
  margin-top: 8px;
  border-left: 3px solid var(--brand-blue);
  padding-left: 12px;
}
.scope-obligation-section__heading {
  margin: 10px 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scope-obligation-section__heading:first-child {
  margin-top: 0;
}
.scope-obligation-section__items {
  gap: 8px;
}
.scope-obligation-row__main {
  min-width: 0;
  flex: 1;
}
.scope-obligation-row__title {
  font-weight: 700;
  color: var(--text-primary);
}
.scope-obligation-row__meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.scope-obligation-row__source {
  color: var(--text-secondary);
}
.scope-obligation-row__hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 52ch;
}
.scope-obligation-trace {
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.scope-obligation-trace__summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  list-style: none;
}
.scope-obligation-trace__summary::-webkit-details-marker {
  display: none;
}
.scope-obligation-trace__body {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg-soft);
  line-height: 1.45;
}
.forge-stage-item--divider {
  border-style: dashed;
}
.forge-stage-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  flex: none;
}
.forge-stage-divider--sm {
  margin: 8px 0;
}
.forge-stage-divider--md {
  margin: 14px 0;
}
.forge-stage-divider--lg {
  margin: 20px 0;
}
.forge-stage-surface--accent-red {
  border-left: 3px solid var(--brand-red);
}
.forge-stage-surface--accent-amber {
  border-left: 3px solid var(--brand-amber);
}
.forge-stage-surface--accent-green {
  border-left: 3px solid var(--brand-green);
}
.forge-stage-surface--accent-blue {
  border-left: 3px solid var(--brand-blue);
}
.forge-stage-surface--accent-slate {
  border-left: 3px solid var(--border);
}
.forge-stage-surface--tint-red {
  background: var(--tint-red);
}
.forge-stage-surface--tint-amber {
  background: var(--tint-amber);
}
.forge-stage-surface--tint-green {
  background: var(--tint-green);
}
.forge-stage-surface--tint-blue {
  background: var(--tint-blue);
}
.forge-stage-surface--tint-slate {
  background: var(--tint-slate);
}
.forge-kpi-pane {
  width: 100%;
}
.forge-page-grid {
  --page-grid-gap: 12px;
  --page-grid-section-gap: 16px;
  --page-grid-card-min: 260px;
  --page-grid-card-max: 380px;
  gap: var(--page-grid-section-gap);
}
.forge-page-grid--inventory,
.forge-page-grid--dashboard,
.forge-page-grid--workspace,
.forge-page-grid--detail,
.forge-page-grid--settings {
  width: 100%;
}
.forge-page-grid__region {
  width: 100%;
  min-width: 0;
}
.forge-page-grid__region--summary,
.forge-page-grid__region--toolbar,
.forge-page-grid__region--content,
.forge-page-grid__region--metric,
.forge-page-grid__region--detail,
.forge-page-grid__region--actions {
  display: block;
}
.forge-page-grid__region--content {
  margin-top: 0;
}
.forge-inventory-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  width: 100%;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.forge-inventory-status-row__item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}
.forge-inventory-status-row__label {
  color: var(--text-muted);
  font-weight: 700;
}
.forge-inventory-status-row__value {
  color: var(--text-primary);
  font-weight: 700;
}
.forge-inventory-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--page-grid-card-min)), var(--page-grid-card-max)));
  gap: var(--page-grid-gap);
  align-items: stretch;
  justify-content: start;
  width: 100%;
}
.forge-inventory-card-grid > .product-card {
  width: 100%;
}
.forge-page-grid--inventory .forge-fbar {
  margin-bottom: 0;
}
.forge-execution-tabs {
  margin-bottom: 12px;
}
.forge-execution-panels {
  margin-top: 0;
}
.forge-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.forge-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1 1 360px;
  min-width: 260px;
}
.forge-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.forge-filter-control {
  flex: 0 1 190px;
  min-width: 170px;
  max-width: 260px;
}
.forge-filter-control--compact {
  flex-basis: 160px;
  min-width: 150px;
  max-width: 210px;
}
.forge-filter-control--wide {
  flex-basis: 240px;
  min-width: 220px;
  max-width: 320px;
}
.forge-filter-control--search {
  flex: 1 1 280px;
  min-width: 240px;
  max-width: 420px;
}
/* ---- Mobile hamburger toggle (hidden on desktop) ---- */
.forge-mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.forge-mobile-menu-btn:hover {
  background: var(--tint-slate);
}

/* ---- Mobile sidebar overlay/backdrop ---- */
.forge-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(var(--navy-rgb), 0.45);
  z-index: 499;
  cursor: pointer;
}

@media (max-width: 640px) {
  .forge-shell {
    --forge-sidebar-width: 0px;
    background: var(--bg-page);
  }

  /* Show the hamburger button on mobile */
  .forge-mobile-menu-btn {
    display: inline-flex;
  }

  .forge-collapse-btn {
    display: none;
  }

  /* Sidebar becomes a fixed off-canvas drawer */
  .forge-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    flex: 0 0 0;
    width: min(82vw, 260px);
    height: 100dvh;
    z-index: 500;
    transform: translateX(-100%);
    transition: transform 0.2s cubic-bezier(0.25, 0, 0, 1);
    box-shadow: 2px 0 24px rgba(var(--navy-rgb), 0.25);
    overflow-y: auto;
  }
  html[data-mobile-sidebar="open"] .forge-sidebar {
    transform: translateX(0);
  }
  html[data-mobile-sidebar="open"] .forge-mobile-overlay {
    display: block;
  }

  /* Content fills the full width on mobile */
  .forge-content {
    flex: 1 1 100%;
    max-width: 100vw;
    min-width: 0;
    width: 100%;
  }

  /* Fluid page padding */
  .forge-page {
    padding: clamp(12px, 4vw, 24px) clamp(12px, 5vw, 32px) 40px;
  }

  /* Filter bar: stack controls */
  .forge-filter-bar,
  .forge-filter-actions {
    width: 100%;
  }
  .forge-filter-control,
  .forge-filter-control--compact,
  .forge-filter-control--wide,
  .forge-filter-control--search {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }

  /* KPI strip single-column at 375px */
  .kpi-strip {
    --kpi-strip-columns: 1 !important;
    gap: 8px;
  }

  /* Category risk grid single column */
  .category-risk-grid {
    grid-template-columns: 1fr;
  }

  /* Product cards stack */
  .product-card-grid,
  .forge-inventory-card-grid,
  .forge-product-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .forge-page {
    padding: 16px 20px 40px;
  }
}

/* Product card keyboard and focus accessibility (Plan 555) */
.product-card:focus {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}
.product-card:hover .forge-product-delete-btn,
.product-card:focus-within .forge-product-delete-btn {
  opacity: 1;
}

/* Canonical bulk-action-bar (Plan 556).
   Usage: wrap any bulk-select bar in .forge-bulk-bar.
   Forbidden: inline background colors, non-sticky position, underline-text clear button.
   Child classes: __count, __select-all, __btn, __btn--danger, __close.
   Show "Select all N" link by adding .forge-bulk-bar--offer-all to the container. */
.forge-bulk-bar {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(var(--navy-rgb), 0.12);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.forge-bulk-bar__count {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
}
.forge-bulk-bar__select-all {
  display: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand-blue);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.forge-bulk-bar--offer-all .forge-bulk-bar__select-all {
  display: inline;
}
.forge-bulk-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.forge-bulk-bar__btn--danger {
  border-color: var(--text-primary);
  color: var(--text-primary);
}
.forge-bulk-bar__btn--primary {
  border-color: var(--button-primary-border);
  color: var(--button-primary-text);
  background: var(--button-primary-bg);
}
.forge-bulk-bar__close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px 6px;
}
.forge-content-box .kpi-strip,
.forge-content-box .stage-kpi-strip,
.forge-kpi-pane .kpi-strip,
.forge-kpi-pane .stage-kpi-strip {
  margin-bottom: 0;
}
.forge-filter-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}
.forge-filter-summary-count {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 700;
}
.forge-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-size: var(--text-xs);
  color: var(--text-primary);
}
.forge-filter-chip-label {
  color: var(--text-muted);
  font-weight: 600;
}
.forge-filter-chip-value {
  color: var(--text-primary);
  font-weight: 700;
}
.forge-filter-clear {
  font-size: var(--text-xs);
  color: var(--brand-blue);
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.forge-empty-state--compact {
  padding: 24px 18px;
  margin-top: 4px;
}
.forge-empty-state--compact .forge-empty-title {
  font-size: var(--text-sm);
}
.forge-empty-state--compact .forge-empty-hint {
  font-size: var(--text-sm);
}
.forge-empty-state--inline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  justify-content: stretch;
  gap: 2px 14px;
  padding: 12px 14px;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.forge-empty-state--inline .forge-empty-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
  font-size: 24px;
}
.forge-empty-state--inline .forge-empty-title {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
}
.forge-empty-state--inline .forge-empty-hint {
  grid-column: 2;
  grid-row: 2;
  max-width: none;
  margin: 0;
}
.forge-empty-state--inline .forge-empty-cta {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: center;
  margin: 0;
}
@media (max-width: 720px) {
  .forge-empty-state--inline {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .forge-empty-state--inline .forge-empty-icon {
    grid-row: 1 / span 2;
  }

  .forge-empty-state--inline .forge-empty-cta {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    margin-top: 8px;
  }
}
.forge-empty-icon {
  font-size: 32px;
  line-height: 1;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.forge-empty-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
}
.forge-empty-hint {
  margin: 6px 0 0 0;
  max-width: 520px;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-secondary);
}
/* KPI strip defaults to the 6-tile Portfolio dashboard layout. Other
 * pages can set --kpi-strip-columns via kpi_strip_html(columns=...) so
 * the grid does not reserve empty tracks for tiles that are not rendered.
 */
.kpi-strip {
  --kpi-strip-columns: 6;
  display: grid;
  grid-template-columns: repeat(var(--kpi-strip-columns), minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

/* Hero layout: one dominant stat above a row of smaller supporting tiles */
.kpi-strip-hero-layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.kpi-strip-hero-layout .kpi-strip--supporting {
  margin-bottom: 0;
}
/* Supporting strip tiles render at slightly smaller value type */
.kpi-strip--supporting .kpi-value {
  font-size: var(--text-xl);
}
/* forge-hero-stat--featured: clickable affordance */
.forge-hero-stat--featured.cursor-pointer {
  cursor: pointer;
}
.forge-hero-stat--featured.cursor-pointer:hover .forge-hero-stat__value {
  opacity: 0.85;
}
@media (max-width: 1400px) {
  .kpi-strip:not([data-kpi-columns]) {
    --kpi-strip-columns: 3;
  }
}
@media (max-width: 768px) {
  .kpi-strip {
    --kpi-strip-columns: 2 !important;
  }
}
@supports (container-type: inline-size) {
  @container forge-page (max-width: 1100px) {
    .kpi-strip:not([data-kpi-columns]) {
      --kpi-strip-columns: 3;
    }
  }
  @container forge-page (max-width: 600px) {
    .kpi-strip {
      --kpi-strip-columns: 2 !important;
    }
    .forge-oblig-tabs {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
  }
  @container forge-page (max-width: 400px) {
    .category-risk-grid {
      grid-template-columns: 1fr;
    }
  }
}
.kpi-tile {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.15s cubic-bezier(0.25, 0, 0, 1),
    transform 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.kpi-tile.clickable {
  cursor: pointer;
}
.kpi-tile.clickable:hover,
.kpi-tile.clickable:focus-visible {
  background: var(--tint-slate);
  box-shadow: var(--focus-ring), var(--shadow-md);
  transform: translateY(-1px);
  outline: none;
}
/* Toned clickable tiles darken their own tint on hover instead of going slate */
.kpi-tile.kpi-amber.clickable:hover,
.kpi-tile.kpi-amber.clickable:focus-visible {
  background: color-mix(in srgb, var(--tint-amber) 80%, var(--bg-card));
}
.kpi-tile.kpi-red.clickable:hover,
.kpi-tile.kpi-red.clickable:focus-visible {
  background: color-mix(in srgb, var(--tint-red) 80%, var(--bg-card));
}
.kpi-tile.kpi-green.clickable:hover,
.kpi-tile.kpi-green.clickable:focus-visible {
  background: color-mix(in srgb, var(--tint-green) 80%, var(--bg-card));
}
.kpi-tile.stage-kpi.active {
  background: var(--tint-blue);
  box-shadow:
    0 0 0 2px var(--brand-blue),
    var(--shadow-sm);
  outline: none;
}
/* Left-bar accent — full-height 3px stripe keyed to tone.
 * Only shown on status-bearing tones (red/amber/green/violet).
 * Blue and slate are informational; their tinted bg is the signal. */
.kpi-tile .kpi-tile-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: 3px 0 0 3px;
  background: var(--brand-blue);
}
.kpi-tile.kpi-red .kpi-tile-bar {
  background: var(--brand-red);
}
.kpi-tile.kpi-amber .kpi-tile-bar {
  background: var(--brand-amber-bright);
}
.kpi-tile.kpi-green .kpi-tile-bar {
  background: var(--brand-green);
}
.kpi-tile.kpi-violet .kpi-tile-bar {
  background: var(--brand-ai);
}
.kpi-tile.kpi-slate .kpi-tile-bar {
  background: var(--text-secondary);
}
/* Blue and slate tiles: hide stripe — background tint is sufficient signal */
.kpi-tile.kpi-blue .kpi-tile-bar,
.kpi-tile.kpi-slate .kpi-tile-bar {
  display: none;
}
/* Tinted backgrounds per tone — blue and slate stay neutral/white */
.kpi-tile.kpi-amber {
  background: var(--tint-amber);
  border-color: var(--kpi-border-amber);
}
.kpi-tile.kpi-red {
  background: var(--tint-red);
  border-color: var(--kpi-border-red);
}
.kpi-tile.kpi-green {
  background: var(--tint-green);
  border-color: var(--kpi-border-green);
}
.kpi-tile.kpi-violet {
  background: var(--brand-ai-tint);
  border-color: color-mix(in srgb, var(--brand-ai) 20%, transparent);
}
.kpi-tile .kpi-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.kpi-tile.kpi-red .kpi-value {
  color: var(--text-primary);
}
.kpi-tile.kpi-amber .kpi-value {
  color: var(--text-primary);
}
.kpi-tile.kpi-green .kpi-value {
  color: var(--brand-green);
}
.kpi-tile.kpi-violet .kpi-value {
  color: var(--brand-ai);
}
.kpi-tile.kpi-slate .kpi-value {
  color: var(--text-secondary);
}
.kpi-tile .kpi-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.kpi-tile .kpi-sublabel {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.3;
  /* Six tiles in a row means each sublabel is tight. Truncate
     * overflowing sublabels so a long bucket breakdown never
     * pushes a tile taller than its siblings. Title tooltip on
     * the tile itself still reveals the full string on hover. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* KPI delta pill — good/bad/neutral tones without inline hex. */
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-xs);
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.kpi-delta--good {
  color: var(--brand-green);
  background: color-mix(in srgb, var(--status-success) 10%, transparent);
}
.kpi-delta--bad {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--status-danger) 10%, transparent);
}
.kpi-delta--neutral {
  color: var(--text-muted);
  background: color-mix(in srgb, var(--brand-slate) 12%, transparent);
}

/* Product detail overview card: one composed white surface for
 * status, owner workflow, KPIs, and obligation selection. */
.forge-product-overview-card {
  --oblig-red: var(--brand-red);
  --oblig-amber: var(--brand-amber);
  --oblig-blue: var(--brand-blue);
  --oblig-green: var(--brand-green);
  --oblig-slate: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px 16px 20px;
  margin: 4px 0 12px 0;
  box-shadow: var(--shadow-sm);
  gap: 14px;
}
.forge-product-overview-headrow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.forge-product-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 8px;
  box-shadow: var(--shadow-sm);
}
.forge-product-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 10px);
  box-sizing: border-box;
  overflow: hidden;
}

/* Product body row — flex row holding the rail + main content column.
   Layout driven inline in shell.py; this class is the stable DOM scope
   selector used by JS (querySelectorAll + --cert-accent custom property). */
.forge-product-body {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: nowrap;
  width: 100%;
}

/* Shared product chrome column — full page_root content width (Plan 86).
 * Do not add horizontal padding here: .forge-page already provides the
 * page gutter, and .forge-page-header-zone re-pads to the same edges.
 * Extra inset here makes readiness/banner narrower than the title. */
.forge-product-column-gutter {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Main content column, right of the rail */
.forge-product-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
  padding-top: 16px;
  padding-bottom: 16px;
}

/* Stage nav sits above main; horizontal inset from .forge-product-column-gutter */
.forge-product-stage-nav {
  margin-top: 10px;
}

/* AI-generated status summary block.
   Dynamic accent border-left applied inline (color varies by tone).
   Static chrome lives here so the class is always CSS-backed. */
.forge-product-summary {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 12px 16px;
  margin: 10px 0 6px;
}

/* Bulk-review modal lanes */
.forge-review-lane {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  flex: 1;
}
.forge-review-lane--accept {
  background: var(--tint-green);
  border: 1px solid var(--brand-green);
  --lane-color: var(--brand-green);
  --lane-fg: var(--brand-green-dark);
  --lane-border-row: var(--brand-green);
}
.forge-review-lane--edit {
  background: var(--tint-blue);
  border: 1px solid var(--brand-blue-bright);
  --lane-color: var(--brand-blue-bright);
  --lane-fg: var(--brand-blue);
  --lane-border-row: var(--brand-blue-bright);
}
.forge-review-lane--escalate {
  background: var(--tint-amber);
  border: 1px solid var(--brand-amber-bright);
  --lane-color: var(--text-primary);
  --lane-fg: var(--brand-amber);
  --lane-border-row: var(--brand-amber-bright);
}
.forge-review-lane-row {
  border-bottom: 1px solid var(--lane-border-row);
  padding: 4px 0;
  gap: 8px;
}
.forge-product-overview-heading {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-blue);
  padding-top: 4px;
}
.forge-product-overview-status {
  border-left: 4px solid var(--overview-accent, var(--brand-blue));
  background: var(--bg-page);
  border-radius: var(--radius-card);
  padding: 12px 14px;
}
.forge-product-overview-status-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.forge-product-overview-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.forge-product-overview-headline {
  font-size: var(--text-base);
  font-weight: var(--font-weight-display);
  color: var(--text-primary);
}
.forge-product-overview-body {
  margin-top: 4px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.45;
}
.forge-product-overview-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}
.forge-product-overview-owner {
  justify-content: flex-end;
  min-width: 0;
}
.forge-owner-feedback {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 4px solid var(--brand-green);
  border-radius: var(--radius-lg);
  background: var(--tint-green);
}
.forge-owner-feedback-title {
  font-weight: var(--font-weight-display);
  color: var(--text-primary);
}
.forge-owner-feedback-body {
  margin-top: 2px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.forge-product-overview-card .kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
  gap: 12px;
}
.forge-product-overview-card .kpi-tile {
  padding: 18px 18px 16px 20px;
}
.forge-product-overview-card .kpi-tile .kpi-value {
  font-size: var(--text-2xl);
}
/* Regulation accordion — matched regulations inside the product overview card */
.forge-regulation-accordion {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: 8px;
  overflow: hidden;
}
.forge-regulation-accordion-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  user-select: none;
}
.forge-regulation-accordion-summary::-webkit-details-marker {
  display: none;
}
.forge-regulation-accordion-summary .forge-reg-icon {
  font-size: var(--text-base);
  color: var(--text-secondary);
}
.forge-regulation-accordion-body {
  border-top: 1px solid var(--border);
  padding: 4px 0;
}
.forge-regulation-accordion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border);
}
.forge-regulation-accordion-row:last-child {
  border-bottom: none;
}
.forge-reg-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
/* Workspace /settings — one interactive row per regulation profile (Plan 1833). */
.settings-track-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
}
.settings-track-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(250px, 0.9fr) auto;
  grid-template-areas: "copy chips actions";
  align-items: center;
  column-gap: 18px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  box-sizing: border-box;
}
.settings-track-row:last-child {
  border-bottom: none;
}
.settings-track-row--tracked {
  box-shadow: inset 3px 0 0 var(--brand-green);
  background: color-mix(in srgb, var(--tint-green) 12%, var(--bg-card));
}
.settings-track-row--unavailable {
  background: color-mix(in srgb, var(--tint-slate) 24%, var(--bg-card));
}
.settings-track-row__copy {
  grid-area: copy;
  min-width: 0;
  gap: 1px;
}
.settings-track-row__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-track-row__meta {
  min-width: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-track-row__chips {
  grid-area: chips;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}
.settings-status-chip,
.scope-refresh-chip {
  min-height: 20px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0;
}
.settings-status-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border: 1px solid transparent;
}
.settings-status-chip--green {
  background: transparent;
  border-color: color-mix(in srgb, var(--brand-green) 18%, transparent);
  color: var(--brand-green);
}
.settings-status-chip--amber {
  background: transparent;
  border-color: color-mix(in srgb, var(--brand-amber) 20%, transparent);
  color: var(--text-primary);
}
.settings-status-chip--red {
  background: transparent;
  border-color: color-mix(in srgb, var(--brand-red) 18%, transparent);
  color: var(--text-primary);
}
.settings-status-chip--slate {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}
.settings-status-chip--blue {
  background: transparent;
  border-color: color-mix(in srgb, var(--brand-blue) 18%, transparent);
  color: var(--brand-blue);
}
.settings-track-row__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.settings-track-toggle {
  min-width: 88px;
  justify-content: center;
}
.settings-track-toggle--tracked {
  color: var(--brand-green);
  border-color: color-mix(in srgb, var(--brand-green) 26%, var(--border-subtle));
  background: color-mix(in srgb, var(--tint-green) 16%, transparent);
}
/* Workspace /settings — scan defaults use full section width (Plan 1953). */
.settings-scope-fields {
  max-width: none;
}
.settings-field-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.25;
  padding-left: 2px;
}
.settings-scope-actions {
  padding-top: 8px;
}
@media (max-width: 900px) {
  .settings-track-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "chips"
      "actions";
    align-items: flex-start;
  }
  .settings-track-row__chips,
  .settings-track-row__actions {
    justify-content: flex-start;
    margin-left: 0;
  }
}
@media (max-width: 560px) {
  .settings-track-row {
    padding: 12px;
  }
}
.forge-reg-title {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forge-reg-urgency-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-on-dark);
  white-space: nowrap;
  flex-shrink: 0;
}
.forge-reg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}
.forge-reg-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--brand-blue);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: background 0.1s;
}
.forge-reg-chip:hover {
  background: var(--bg-hover);
}
/* Plan 817: AI-match provenance badge for review_required / uncertain regulation matches */
.forge-reg-ai-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--tint-amber);
  color: var(--brand-amber-text);
  border: 1px solid var(--kpi-border-amber);
  white-space: nowrap;
  flex-shrink: 0;
}

.forge-product-overview-obligations {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.forge-oblig-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
}
.forge-oblig-tabs > * {
  flex: 1 1 0;
  min-width: 0;
}
/* Overflow strip — first cut for products carrying 6+ obligations.
 * Switches the row from wrapping grid to a single-row horizontal
 * scroller so the stage rail below doesn't get pushed down by a
 * second pill row. Per the TODO note: horizontal scroll is the
 * cheapest first cut; a chevron / overflow menu is the next step. */
.forge-oblig-tabs.is-overflow {
  display: flex;
  flex-wrap: nowrap;
  grid-template-columns: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  /* Right-edge fade hints "more pills exist past the right margin"
     * without painting a visible scrollbar at all times. */
  mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(
    to right,
    #000 calc(100% - 24px),
    transparent
  );
  /* Reserve room for the fade so the right-most pill is never
     * fully washed out at rest. */
  padding-right: 24px;
}
.forge-oblig-tabs.is-overflow .forge-oblig-tab {
  flex: 0 0 220px;
  min-width: 220px;
  scroll-snap-align: start;
}
.forge-oblig-tabs.is-overflow .forge-oblig-na {
  flex: 0 0 auto;
  scroll-snap-align: end;
}

/* ── Regulation-grouped obligations layout ──────────────────────────── */

/* Outer flex row: one column per regulation */
.forge-oblig-grouped {
  display: flex;
  gap: 0;
  align-items: flex-start;
  width: 100%;
}

/* One regulation column */
.forge-oblig-reg-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 16px;
}
/* First group has no left padding; last group has no right padding so
 * the pill edges align with the page margins. */
.forge-oblig-reg-group:first-child {
  padding-left: 0;
}
.forge-oblig-reg-group:last-child {
  padding-right: 0;
}

/* Subtle vertical divider between groups */
.forge-oblig-reg-group + .forge-oblig-reg-group {
  border-left: 1px solid var(--border);
}

/* Section header: pill badge + extending hairline */
.forge-oblig-reg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

/* Current / Upcoming timeline section divider */
.forge-oblig-timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
}
.forge-oblig-timeline-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}
.forge-oblig-timeline-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0.6;
}

/* Inline Current/Upcoming divider — sits between pills in the flex row */
.forge-oblig-divider {
  flex: 0 0 auto;
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 4px 6px;
  position: relative;
}
.forge-oblig-divider-label {
  position: absolute;
  top: -1.4em;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}

/* Regulation badge pill */
.forge-oblig-reg-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 7px;
  border-radius: var(--radius-pill, 9999px);
  border: 1px solid var(--border);
  background: var(--bg-page);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  user-select: none;
  /* Subtle lift so the badge reads above the hairline */
  box-shadow: 0 1px 2px rgba(var(--navy-rgb), 0.04);
}

/* Small accent dot inside the badge */
.forge-oblig-reg-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-blue);
  flex-shrink: 0;
}

/* "Upcoming" label shown next to the regulation badge when every
 * obligation in the group has is_upcoming=True. Amber tint keeps it
 * visually distinct from the slate regulation badge without competing
 * with the obligation pill status colours. */
.forge-oblig-reg-upcoming-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-amber-text);
  background: var(--tint-amber);
  border: 1px solid color-mix(in srgb, var(--status-warning) 18%, transparent);
  border-radius: var(--radius-pill, 9999px);
  padding: 1px 7px;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

/* Hairline rule extending from badge to group right edge */
.forge-oblig-reg-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 8px;
}

/* Pills row within a regulation group — flex nowrap so pills always
 * share one row regardless of container width, shrinking proportionally
 * rather than wrapping. The is-overflow modifier (6+ pills) is the only
 * path that scrolls horizontally. */
.forge-oblig-reg-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: stretch;
}
.forge-oblig-reg-pills > * {
  flex: 1 1 0;
  min-width: 0;
}

/* Active-filter chip — shown above the obligations row when a KPI
 * tile click has narrowed the visible pills (TODO.md: Certs KPI
 * tile click-to-filter). Slate styling to keep the chip quiet; the
 * tabs row underneath remains the operator's primary surface. */
.forge-oblig-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 12px;
  align-self: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--tint-slate);
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.2;
  cursor: pointer;
}
.forge-oblig-filter-eyebrow {
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--text-xs);
}
.forge-oblig-filter-label {
  font-weight: 700;
  color: var(--text-primary);
}
.forge-oblig-filter-meta {
  color: var(--text-secondary);
  font-size: var(--text-xs);
}
.forge-oblig-filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  margin-left: 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
}
.forge-oblig-filter-clear:hover,
.forge-oblig-filter-clear:focus-visible {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  box-shadow: var(--focus-ring);
  outline: none;
}
.forge-oblig-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 78px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--oblig-accent, var(--brand-blue));
  border-radius: var(--radius-card);
  background: var(--bg-card);
  color: var(--text-primary);
  transition:
    background 0.15s cubic-bezier(0.25, 0, 0, 1),
    box-shadow 0.15s cubic-bezier(0.25, 0, 0, 1),
    transform 0.15s cubic-bezier(0.25, 0, 0, 1),
    border-color 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.forge-oblig-tab.is-clickable {
  cursor: pointer;
}
.forge-oblig-tab.is-clickable:hover,
.forge-oblig-tab.is-clickable:focus-visible {
  box-shadow: var(--focus-ring), 0 4px 12px rgba(var(--navy-rgb), 0.08);
  transform: translateY(-1px);
  outline: none;
}
.forge-oblig-tab.is-focused {
  border-color: var(--oblig-accent, var(--brand-blue));
  border-width: 2px;
  background: color-mix(
    in srgb,
    var(--oblig-accent, var(--brand-blue)) 11%,
    var(--bg-card)
  );
  box-shadow:
    0 0 0 3px
      color-mix(
        in srgb,
        var(--oblig-accent, var(--brand-blue)) 24%,
        transparent
      ),
    0 8px 18px rgba(var(--navy-rgb), 0.1);
  transform: translateY(-2px);
}
.forge-oblig-tab.is-focused::after {
  content: "Selected";
  position: absolute;
  top: 9px;
  right: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: color-mix(
    in srgb,
    var(--oblig-accent, var(--brand-blue)) 14%,
    var(--bg-card)
  );
  color: var(--oblig-accent, var(--brand-blue));
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}
.forge-oblig-tab.is-focused .forge-oblig-tab-label,
.forge-oblig-tab.is-focused .forge-oblig-tab-status,
.forge-oblig-tab.is-focused .forge-oblig-tab-reason {
  padding-right: 74px;
}
.forge-oblig-tab-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.forge-oblig-tab-status {
  font-size: var(--text-base);
  line-height: 1.1;
  font-weight: var(--font-weight-display);
  color: var(--oblig-accent, var(--brand-blue));
}
.forge-oblig-tab-reason {
  font-size: var(--text-xs);
  line-height: 1.25;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Unverified badge — amber pill shown on obligation tabs and panel chrome
   when no confirmed regulation backs the cert (has_active_regulation=false). */
.forge-oblig-unverified-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--brand-amber) 14%, var(--bg-card));
  color: color-mix(in srgb, var(--brand-amber) 90%, var(--text-primary));
  border: 1px solid color-mix(in srgb, var(--brand-amber) 30%, transparent);
  cursor: default;
}
.forge-oblig-unverified-na {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.forge-oblig-unverified-na:hover {
  color: var(--text-primary);
}
.manager-workstation-queue {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  padding-top: 12px;
}
.manager-workstation-stages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.manager-workstation-queue .forge-oblig-tabs {
  gap: 14px;
}
.manager-workstation-queue .forge-oblig-tab {
  min-height: 96px;
  padding: 16px 18px 15px 18px;
}
.manager-workstation-queue .forge-oblig-tab-status {
  font-size: var(--text-md);
}
.manager-workstation-queue .forge-oblig-tab-reason {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
/* Workstation fill-gaps strip: 4 tabs, fill the panel width.
 * Targets the wrapper emitted by workstation_fill_gaps.tabs_html only,
 * so the obligations strip (obligations_row.py) keeps its 260px cap. */
[data-forge-fill-gaps-tabs] .forge-oblig-tab {
  max-width: none;
  flex-basis: 0;
}
@media (max-width: 1100px) {
  .forge-product-overview-owner {
    justify-content: flex-start;
  }
  .forge-product-overview-card .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Context band — trajectory + AI insights, 50 / 50 on wide screens */
.context-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}
@media (max-width: 1100px) {
  .context-band {
    grid-template-columns: 1fr;
  }
}

/* Category risk row — hero cards above the detailed heatmap
 * disclosure. One card per category; cards self-size via grid and
 * wrap naturally when we run out of width.
 */
.category-risk-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.category-risk-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.category-risk-row-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
}
.category-risk-row-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.category-risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  width: 100%;
}
.category-risk-card {
  position: relative;
  display: flex;
  flex-direction: row;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  overflow: hidden;
  transition:
    box-shadow 0.15s cubic-bezier(0.25, 0, 0, 1),
    transform 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.category-risk-card:hover,
.category-risk-card:focus-visible {
  box-shadow: var(--focus-ring), 0 4px 14px rgba(var(--navy-rgb), 0.08);
  transform: translateY(-1px);
  outline: none;
}
.category-risk-card .cat-card-bar {
  width: 4px;
  flex-shrink: 0;
}
.category-risk-card .cat-card-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.category-risk-card .cat-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.category-risk-card .cat-card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.category-risk-card .cat-card-tier {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.category-risk-card .cat-card-pct {
  display: flex;
  align-items: baseline;
}
.category-risk-card .cat-card-pct-value {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-display);
  line-height: 1;
  letter-spacing: -0.02em;
}
.category-risk-card .cat-card-meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.category-risk-card .cat-card-meta-sep {
  color: var(--text-muted);
}
/* Plan 63 — distribution mini-bar.
 * Shows where the per-SKU readiness scores cluster within the category:
 * a thin track spans 0-100, a tinted segment marks the interquartile
 * range (p25..p75) and a vertical tick lands on the median. The mean
 * itself is already the headline percentage above; the mini-bar adds
 * the spread the single number can't convey. */
.category-risk-card .cat-card-distribution {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}
.category-risk-card .cat-card-distribution-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.category-risk-card .cat-card-distribution-bar {
  position: relative;
  height: 8px;
  border-radius: var(--radius-pill);
  overflow: visible;
}
.category-risk-card .cat-card-distribution-track {
  position: absolute;
  inset: 0;
  background: rgba(var(--navy-rgb), 0.08);
  border-radius: var(--radius-pill);
}
.category-risk-card .cat-card-distribution-range {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: var(--radius-pill);
  opacity: 0.55;
  min-width: 4px;
}
.category-risk-card .cat-card-distribution-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  border-radius: var(--radius-xs);
  transform: translateX(-1px);
}

/* Matrix expansion on the main column.
 * Visually lighter than the queue card it replaced, so the
 * category risk cards stay the hero. */
.matrix-expansion.q-expansion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.matrix-expansion .q-item {
  min-height: 44px;
  font-weight: 600;
  color: var(--text-primary);
}
.cat-table tbody tr:last-child td {
  border-bottom: none;
}
.cat-table-category-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}
.cat-table-category-link:hover .cat-table-category-name,
.cat-table-category-link:focus-visible .cat-table-category-name {
  text-decoration: underline;
}
.cat-table-products-count {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.1;
}
.cat-table-atrisk-count {
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: 2px;
}
.cat-table-atrisk-ok {
  color: var(--text-muted);
  font-weight: 500;
}/* Readiness bar cell — used for the regulation,
evidence {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.cat-table-bar-head {
  display: flex;
  justify-content: flex-start;
}
.cat-table-bar-label {
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: -0.01em;
}
.cat-table-bar-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.2;
}
.cat-table-trend-empty,
.cat-table-trend-flat {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Top-risks event list — tidy row spacing + hover affordance in the
 * RHS rail.
 */
.top-risks-events-card,
.top-risks-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  width: 100%;
  box-sizing: border-box;
}
.top-risks-events-card__label,
.top-risks-card__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 700;
}
.top-risks-events-card__empty,
.top-risks-card__empty {
  font-size: 0.88rem;
  color: var(--text-primary);
}
.top-risks-events-card .top-risks-evt-row {
  transition: background 0.12s cubic-bezier(0.25, 0, 0, 1);
}
.top-risks-events-card a.top-risks-evt-row:hover,
.top-risks-events-card a.top-risks-evt-row:focus-visible {
  background: var(--bg-page);
  box-shadow: var(--focus-ring);
  outline: none;
}

/* Two-column dashboard body */
.dashboard-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  width: 100%;
}
@media (max-width: 1100px) {
  .dashboard-body {
    grid-template-columns: 1fr;
  }
}
.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  position: sticky;
  top: 16px;
  min-height: 100%;
}
@media (max-width: 1100px) {
  .dashboard-side {
    position: static;
    min-height: 0;
  }
}

/* Employee My Work: simple focus dashboard */
.my-work-section-heading {
  margin: 20px 0 8px 0;
}
.dashboard-main > .my-work-section-heading:first-child,
.dashboard-side > .my-work-section-heading:first-child {
  margin-top: 0;
}
.my-work-card,
.my-work-focus-card,
.my-work-summary-card,
.my-work-clear-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}
.my-work-focus-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 20px;
  margin-bottom: 12px;
  border-left: 4px solid var(--brand-green);
}
.my-work-focus-card--blue {
  border-left-color: var(--brand-blue);
}
.my-work-focus-card--red {
  border-left-color: var(--text-primary);
}
.my-work-focus-card--amber {
  border-left-color: var(--text-primary);
}
.my-work-focus-card--green {
  border-left-color: var(--brand-green);
}
.my-work-focus-copy {
  min-width: 260px;
  flex: 1 1 360px;
}
.my-work-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-blue);
  margin-bottom: 4px;
}
.my-work-focus-title {
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-display);
  line-height: 1.25;
}
.my-work-focus-body {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.45;
  margin-top: 6px;
}
.my-work-ai-reason {
  align-items: flex-start;
  background: var(--tint-blue);
  border: 1px solid var(--border-cool);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  display: flex;
  gap: 8px;
  line-height: 1.45;
  margin-top: 12px;
  padding: 8px 12px;
}
.my-work-ai-reason .material-icons {
  color: var(--brand-blue);
  flex: none;
  font-size: var(--text-md);
  margin-top: 1px;
}
.my-work-ai-reason span:last-child {
  font-size: var(--text-sm);
}
.my-work-assist-line {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  gap: 6px;
  line-height: 1.35;
  margin-top: 8px;
}
.my-work-assist-line .material-icons {
  color: var(--brand-blue);
  font-size: var(--text-base);
}
.my-work-assist-line strong {
  color: var(--text-primary);
}
.my-work-focus-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.my-work-btn,
.my-work-link,
.my-work-card-footer a,
.my-work-due-more {
  text-decoration: none;
  font-weight: 700;
}
.my-work-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  padding: 8px 12px;
}
.my-work-btn--primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
}
.my-work-btn--secondary {
  border: 1px solid var(--border);
  color: var(--text-primary);
  background: var(--bg-card);
}
.my-work-link,
.my-work-card-footer a,
.my-work-due-more {
  color: var(--brand-blue);
  font-size: var(--text-sm);
}
.my-work-summary-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.my-work-summary-card > .material-icons {
  color: var(--brand-blue);
  font-size: var(--text-lg);
  margin-top: 1px;
}
.my-work-summary-copy {
  min-width: 0;
  flex: 1;
}
.my-work-summary-text {
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.my-work-ai-proof {
  background: var(--bg-card);
  border: 1px solid var(--border-cool);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  margin-bottom: 12px;
  padding: 15px 16px;
}
.my-work-ai-proof-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}
.my-work-ai-proof-head > .material-icons {
  color: var(--brand-blue);
  font-size: var(--text-xl);
  margin-top: 1px;
}
.my-work-ai-proof-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.my-work-ai-proof-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.my-work-ai-proof-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
}
.my-work-ai-proof-tile strong {
  color: var(--text-primary);
  display: block;
  font-size: var(--text-md);
  font-weight: var(--font-weight-display);
  line-height: 1;
}
.my-work-ai-proof-tile span {
  color: var(--text-secondary);
  display: block;
  font-size: var(--text-xs);
  line-height: 1.25;
  margin-top: 4px;
}
.my-work-clear-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  background: var(--tint-green);
  border-left: 4px solid var(--brand-green);
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.my-work-clear-card > .material-icons {
  color: var(--brand-green);
  font-size: var(--text-lg);
  flex: none;
}
.my-work-empty {
}
.my-work-list-card {
  padding: 0;
  overflow: hidden;
}
.my-work-list-card--alert {
  border-left: 4px solid var(--brand-red);
}
.my-work-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background 0.12s cubic-bezier(0.25, 0, 0, 1);
}
.my-work-row:last-child {
  border-bottom: 0;
}
.my-work-row:hover,
.my-work-row:focus-visible {
  background: var(--tint-slate);
  box-shadow: var(--focus-ring);
  outline: none;
}
.my-work-row:active {
  background: var(--tint-blue);
}
.my-work-task-row {
  align-items: flex-start;
}
.my-work-product-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 0.9fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
}
.my-work-row-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.my-work-row-copy {
  min-width: 0;
  flex: 1;
}
.my-work-row-title {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}
.my-work-row-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.35;
  margin-top: 3px;
}
.my-work-task-ai-reason {
  color: var(--brand-blue);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
  margin-top: 6px;
  /*
     * AI rationale strings ("Osperan needs your judgement: …") can run
     * 200+ chars and pushed task rows to ~3-4 lines tall, eroding the
     * scannability of the My Work list. Clamp to two lines; the full
     * sentence is always reachable via the row's title= tooltip and on
     * the task's detail page.
     */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-work-row-icon {
  color: var(--text-primary);
  font-size: var(--text-md);
  flex: none;
}
.my-work-row-chevron {
  color: var(--text-muted);
  font-size: var(--text-md);
  flex: none;
}
.my-work-row-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-align: right;
}
.my-work-pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 0;
}
.my-work-product-status {
  min-width: 0;
}
.my-work-product-status-label {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.my-work-assessment-line {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  gap: 8px;
  line-height: 1.35;
  margin-bottom: 8px;
}
.my-work-assessment-pill {
  border-radius: var(--radius-pill);
  display: inline-flex;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  letter-spacing: 0.05em;
  padding: 2px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}
.my-work-assessment-pill--red {
  background: var(--tint-red);
  color: var(--text-primary);
}
.my-work-assessment-pill--amber {
  background: var(--tint-amber);
  color: var(--text-primary);
}
.my-work-assessment-pill--green {
  background: var(--tint-green);
  color: var(--brand-green);
}
.my-work-assessment-pill--blue {
  background: var(--tint-blue);
  color: var(--brand-blue);
}
.my-work-product-open {
  align-items: center;
  background: var(--tint-blue);
  border: 1px solid var(--border-cool);
  border-radius: var(--radius-pill);
  color: var(--brand-blue);
  display: inline-flex;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-display);
  justify-content: center;
  padding: 4px 10px;
  white-space: nowrap;
}
.my-work-product-row:hover .my-work-product-open,
.my-work-product-row:focus-visible .my-work-product-open {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
}
.my-work-product-row:active {
  background: var(--tint-blue);
}
.my-work-card-footer {
  padding: 10px 14px;
  text-align: right;
  border-top: 1px solid var(--border);
}
.my-work-due-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.my-work-due-list {
  overflow: hidden;
}
.my-work-due-list .my-work-due-item:first-child {
  border-top: 0;
}
.my-work-due-list .my-work-due-item {
  padding: 12px 16px;
}
.my-work-due-lane {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand-blue);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  min-width: 0;
}
.my-work-due-lane--due_now {
  border-top-color: var(--text-primary);
}
.my-work-due-lane--this_week {
  border-top-color: var(--text-primary);
}
.my-work-due-lane--later {
  border-top-color: var(--brand-green);
}
.my-work-due-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-display);
}
.my-work-due-lane-head strong {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.my-work-due-helper {
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin: 2px 0 8px 0;
}
.my-work-due-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.my-work-due-item:hover .my-work-due-title,
.my-work-due-item:focus-visible .my-work-due-title {
  color: var(--brand-blue);
}
.my-work-due-date {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  line-height: 1.35;
  white-space: nowrap;
}
.my-work-due-title {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.my-work-due-status {
  grid-column: 2;
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.35;
}
.my-work-due-empty {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: 10px 0 2px 0;
}
.my-work-due-more {
  display: inline-flex;
  margin-top: 6px;
}
@media (max-width: 900px) {
  .my-work-due-grid {
    grid-template-columns: 1fr;
  }
  .my-work-ai-proof {
    grid-template-columns: 1fr;
  }
  .my-work-ai-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .my-work-product-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .my-work-due-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .my-work-due-status {
    grid-column: 1;
  }
  .my-work-product-open {
    justify-self: flex-start;
  }
  .my-work-focus-card {
    align-items: flex-start;
  }
  .my-work-focus-actions {
    width: 100%;
  }
  .workstation-task-main,
  .workstation-task-kind {
    min-width: 0;
  }
}

/* "Since you last logged in" ribbon */
.login-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--tint-info), var(--bg-card));
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-blue);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  font-size: var(--text-sm);
}
.login-ribbon-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-blue);
  margin-right: 4px;
}
.login-ribbon-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--login-text);
}
.login-ribbon-item + .login-ribbon-item::before {
  content: "·";
  color: var(--text-muted);
  margin-right: 6px;
}

/* Work queue card */
.queue-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.queue-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.queue-tabs {
  display: inline-flex;
  background: var(--tint-slate);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}
.queue-tab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 6px 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background 0.15s cubic-bezier(0.25, 0, 0, 1),
    color 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.queue-tab:hover {
  color: var(--text-primary);
}
.queue-tab.active {
  background: var(--bg-card);
  color: var(--brand-blue);
  box-shadow: 0 1px 2px rgba(var(--navy-rgb), 0.06);
}
.queue-tab .queue-tab-count {
  margin-left: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
}
.queue-tab.active .queue-tab-count {
  color: var(--brand-blue);
}

/* Row status color bar */
.queue-row-bar {
  display: inline-block;
  width: 4px;
  height: 28px;
  border-radius: var(--radius-xs);
  margin-right: 10px;
  vertical-align: middle;
}
.queue-row-bar.row-red {
  background: var(--brand-red);
}
.queue-row-bar.row-amber {
  background: var(--brand-amber-bright);
}
.queue-row-bar.row-green {
  background: var(--brand-green);
}
.queue-row-bar.row-slate {
  background: var(--border);
}

/* Employee Review Queue: filter rail + compact action-first rows */
.employee-review-layout {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}
.employee-review-body {
  gap: 10px;
}

.forge-ai-notice {
  align-items: flex-start;
  background: var(--brand-ai-tint);
  border-left: 3px solid var(--brand-ai);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: flex;
  font-size: var(--text-sm);
  gap: 10px;
  line-height: 1.45;
  margin-bottom: 12px;
  padding: 10px 12px;
}
.forge-ai-notice__icon {
  color: var(--brand-ai);
  flex-shrink: 0;
  line-height: 0;
  margin-top: 2px;
}
.forge-ai-notice__icon svg {
  display: block;
}
.forge-ai-notice__text {
  flex: 1;
  min-width: 0;
}

.workstation-task-row[data-ws-has-fields="1"] {
  cursor: pointer;
}
.workstation-task-missing-badge {
  align-items: center;
  background: var(--tint-red);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  display: inline-flex;
  font-size: var(--text-xs);
  font-weight: 700;
  justify-content: center;
  min-width: 1.75rem;
  padding: 2px 8px;
}
.workstation-task-expand ul {
  color: var(--text-secondary);
  margin: 0;
  padding-left: 18px;
}
.workstation-task-expand-grid {
  display: grid;
  gap: 16px 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .workstation-task-expand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.workstation-task-expand-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.workstation-task-expand-title {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}
.workstation-task-expand-body {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.45;
}
.workstation-task-expand-list {
  margin: 0;
  padding-left: 18px;
}
.workstation-task-expand-evidence > div {
  margin-bottom: 4px;
}
.workstation-task-expand-evidence > div:last-child {
  margin-bottom: 0;
}
.workstation-task-chevron {
  color: var(--text-muted);
  cursor: pointer;
  display: inline-block;
  font-size: 0.78rem;
  line-height: 1;
  margin-top: 6px;
  transition: transform 120ms ease-out;
}
.workstation-task-row[data-ws-has-fields] {
  cursor: pointer;
}
.workstation-task-row[data-ws-has-fields]:hover .workstation-task-chevron {
  color: var(--brand-blue);
}
.workstation-task-product-strong {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 750;
  line-height: 1.25;
}
.workstation-task-product-sub {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.3;
  margin-top: 2px;
}
.workstation-task-reg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.workstation-task-reg-pill {
  background: var(--tint-slate);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  white-space: nowrap;
}
.workstation-task-reg-more {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}
.workstation-task-product-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.workstation-task-product-meta {
  color: var(--text-muted);
  flex: 1 1 auto;
  font-size: var(--text-xs);
  min-width: 0;
}
.workstation-task-product-sku {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
}
.workstation-task-product-badge {
  flex: 0 0 auto;
}
.workstation-task-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.workstation-task-state-label {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.25;
}
.workstation-task-state-meta {
  line-height: 1.35;
  margin-top: 4px;
}
.workstation-task-owner-action {
  overflow-wrap: break-word;
  text-align: right;
  vertical-align: middle;
}
.workstation-task-owner-action .workstation-task-owner-avatar {
  display: inline-flex;
  margin-bottom: 8px;
}
.workstation-task-owner-action-cta {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}
.workstation-task-row {
  cursor: default;
}
.workstation-task-row:hover {
  background: var(--tint-slate);
}
.workstation-task-row:last-child td {
  border-bottom: 0;
}
.workstation-task-owner-avatar {
  align-items: center;
  background: var(--tint-blue);
  border-radius: 999px;
  color: var(--brand-blue);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  width: 32px;
}
/* Clip owner cell so emails don't bleed into the adjacent Status column */
.workstation-task-owner {
  overflow: hidden;
}
.workstation-task-owner .workstation-task-muted {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Assignee input (manager Team tab) — fill the column width, clip long emails */
.rm-owner-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--text-sm);
  padding: 4px 8px;
  width: 100%;
}
.workstation-task-bar-cell {
  padding-right: 0 !important;
  width: 18px;
}
.workstation-task-main {
  min-width: 360px;
}
.workstation-task-kind {
  min-width: 118px;
  vertical-align: top !important;
}
.workstation-task-title {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 750;
  line-height: 1.25;
}
.workstation-task-type {
  background: var(--tint-blue);
  border: 1px solid var(--border-cool);
  border-radius: var(--radius-pill);
  color: var(--brand-blue);
  display: inline-flex;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 4px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}
.workstation-task-desc {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.35;
  margin-top: 3px;
  max-width: 78ch;
}
.workstation-task-coverage {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: 4px;
}
.workstation-task-details {
  margin-top: 6px;
}
.workstation-task-details summary {
  font-size: var(--text-sm);
}
.workstation-ai-result {
  align-items: flex-start;
  background: var(--tint-green);
  border: 1px solid var(--border-cool);
  border-radius: var(--radius-lg);
  color: var(--brand-green);
  display: flex;
  gap: 8px;
  line-height: 1.35;
  margin-top: 8px;
  max-width: 78ch;
  padding: 8px 8px;
}
.workstation-ai-result .material-icons {
  color: var(--brand-green);
  font-size: var(--text-base);
  line-height: 1.2;
}
.workstation-ai-result span:last-child {
  font-size: var(--text-xs);
}
.workstation-ai-result em {
  color: var(--brand-green);
  font-style: normal;
  font-weight: 700;
  margin-left: 4px;
}
.workstation-task-product,
.workstation-task-certification,
.workstation-task-meta,
.workstation-task-state {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.workstation-task-product > div:first-child,
.workstation-task-certification > div:first-child,
.workstation-task-meta > div:first-child,
.workstation-task-meta > strong {
  color: var(--text-primary);
  font-weight: 600;
}
.workstation-task-state {
  overflow-wrap: break-word;
  vertical-align: top;
}
.workstation-task-muted {
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin-top: 2px;
}
.workstation-task-source {
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  font-size: var(--text-sm);
  gap: 4px;
  padding: 8px 10px;
  vertical-align: top;
}
.workstation-task-source-label {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.workstation-task-source-pills {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.workstation-task-source-pill {
  background: var(--tint-slate);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 8px;
  white-space: nowrap;
}
.workstation-task-source-more {
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.workstation-task-action {
  text-align: right;
}
.workstation-task-cta {
  background: var(--button-primary-bg);
  border: 1px solid var(--button-primary-border);
  border-radius: var(--radius-pill);
  color: var(--button-primary-text);
  display: inline-flex;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  padding: 4px 10px;
  text-decoration: none;
}
.workstation-task-cta:hover {
  background: var(--button-primary-bg-hover);
  border-color: var(--button-primary-bg-hover);
  color: var(--button-primary-text);
}
.workstation-task-cta.workstation-task-cta--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.workstation-task-cta.workstation-task-cta--ghost:hover {
  background: var(--tint-slate);
  color: var(--text-primary);
}
.workstation-task-action-group {
  align-items: stretch;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.workstation-task-reg-pill--missing {
  background: var(--tint-amber);
  color: var(--text-primary);
}
.workstation-task-row--compact .queue-row-bar {
  visibility: hidden;
}
.workstation-task-row--compact .workstation-task-desc,
.workstation-task-row--compact .workstation-task-chips {
  display: none;
}
.workstation-task-row--compact td {
  padding-bottom: 10px;
  padding-top: 10px;
}

/* Phase 5 — polish & a11y --------------------------------------------- */

/* Shell fills the rm-body column width so the table aligns
 * with the Connected Sources and AI assistant boxes above it.
 * The page root's max-w-[1600px] cap is the outer boundary. */
.workstation-task-card-shell {
  width: 100%;
}

/* Phase 6 retired the visible HIGH/MED/LOW micro-label that Phase 5
 * placed next to the product name — the priority bar's role="img" +
 * aria-label is the canonical a11y pairing, and the visible chip
 * was a redundant second colour signal. */

/* Description inside the expand panel's Notes section. Phase 6
 * relocated it from the closed-state row into the panel so the row
 * scans in five lines instead of eight. */
.workstation-task-expand-description {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.45;
  margin: 0;
}
.employee-review-body .kpi-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.employee-review-body .kpi-tile {
  padding: 14px 14px 12px 16px;
}
.employee-review-body .kpi-tile .kpi-value {
  font-size: var(--text-xl);
}
.review-filter-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-filter-summary,
.review-filter-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 12px;
}
.review-filter-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.review-filter-eyebrow,
.review-filter-title {
  color: var(--brand-blue);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.review-filter-count {
  color: var(--text-primary);
  font-size: var(--text-md);
  font-weight: var(--font-weight-display);
}
.review-filter-clear {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}
.review-filter-clear:hover {
  color: var(--brand-blue);
}
.review-filter-title {
  margin-bottom: 8px;
}
.review-filter-option {
  display: flex;
  align-items: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 6px 8px;
  text-decoration: none;
}
.review-filter-option:hover {
  background: var(--tint-slate);
  color: var(--text-primary);
}
.review-filter-option.is-active {
  background: var(--tint-blue);
  color: var(--brand-blue);
}

/* Product deep-dive: flat field-list view */
.field-row {
  transition: background 0.12s cubic-bezier(0.25, 0, 0, 1);
}
.field-row:hover {
  background: var(--tint-slate);
}
.section-divider td {
  border-top: 1px solid var(--border);
}

/* Sidebar section */
.side-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.side-section + .side-section {
  margin-top: 0;
}
.side-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-blue);
  margin-bottom: 10px;
}
.side-empty {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
}

/* Priority queue item */
.priority-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.priority-item + .priority-item {
  border-top: 1px dashed var(--border);
}
.priority-item .priority-name {
  font-weight: 600;
  color: var(--text-primary);
}
.priority-item .priority-reason {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* Compliance action button */
.next-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition:
    filter 0.15s cubic-bezier(0.25, 0, 0, 1),
    transform 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.next-action-btn:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.next-action-btn:disabled {
  opacity: 0.75;
  cursor: progress;
}
.next-action-btn:focus-visible {
  outline: 2px solid var(--button-primary-bg);
  outline-offset: 2px;
}
.nap-spin {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: napspin 0.7s linear infinite;
}
@keyframes napspin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nap-spinner {
    animation: none;
    border-right-color: currentColor;
  }
}

/* ======================================================================
 * Sidebar (collapsible rail) + top bar + app shell
 * ====================================================================== */

.forge-shell {
  --forge-sidebar-width: 260px;
  --forge-topbar-height: 56px;

  display: flex;
  flex-direction: row;
  gap: 0;
  width: 100%;
  min-height: 100vh;
  align-items: stretch;
  background: linear-gradient(
    90deg,
    var(--bg-sidebar) 0 var(--forge-sidebar-width),
    var(--bg-page) var(--forge-sidebar-width) 100%
  );
}

.forge-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--sidebar-border);
}
html[data-sidebar="collapsed"] .forge-sidebar {
  width: 64px;
  padding: 16px 8px 12px;
}
html[data-sidebar="collapsed"] .forge-shell {
  --forge-sidebar-width: 64px;
}

/* Brand block */
.forge-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 18px;
  min-height: 48px;
  margin: 0 4px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--sidebar-border) 55%, transparent);
}
.forge-brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.forge-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  opacity: 1;
  transition: opacity 0.15s cubic-bezier(0.25, 0, 0, 1);
  overflow: hidden;
  white-space: nowrap;
}
.forge-brand-text .forge-brand-name {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  color: var(--sidebar-text);
}
html[data-sidebar="collapsed"] .forge-brand-text {
  opacity: 0;
  pointer-events: none;
  width: 0;
}
html[data-sidebar="collapsed"] .forge-brand-mark {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

/* Collapse toggle button — inline at right of brand row */
.forge-collapse-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  margin-left: auto;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--sidebar-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.15s cubic-bezier(0.25, 0, 0, 1),
    color 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.forge-collapse-btn:hover {
  background: var(--bg-sidebar-hover);
  color: var(--sidebar-text);
}
.forge-collapse-btn:focus-visible {
  outline: 2px solid var(--sidebar-text);
  outline-offset: 2px;
}
.forge-collapse-btn .material-icons {
  font-size: var(--text-base);
  transition: transform 0.2s cubic-bezier(0.25, 0, 0, 1);
}
html[data-sidebar="collapsed"] .forge-collapse-btn {
  margin-left: 0;
}
html[data-sidebar="collapsed"] .forge-collapse-btn .material-icons {
  transform: rotate(180deg);
}
html[data-sidebar="collapsed"] .forge-brand {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 2px 0 14px;
  margin: 0 0 8px;
}

/* Section label */
.forge-nav-section {
  font-size: var(--text-xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--sidebar-text-muted) 72%, var(--bg-sidebar));
  padding: 0 12px 7px;
  margin-top: 8px;
  transition: opacity 0.15s cubic-bezier(0.25, 0, 0, 1);
}
/* Breathing room between sections, but not above the first one. */
.forge-nav-section:not(:first-child) {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--sidebar-border) 55%, transparent);
}
html[data-sidebar="collapsed"] .forge-nav-section {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

/* Nav links */
.forge-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.forge-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  min-height: 42px;
  border-radius: 7px;
  color: var(--sidebar-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition:
    background 0.15s cubic-bezier(0.25, 0, 0, 1),
    color 0.15s cubic-bezier(0.25, 0, 0, 1),
    border-color 0.15s cubic-bezier(0.25, 0, 0, 1);
  white-space: nowrap;
  overflow: hidden;
}
.forge-nav-link:hover {
  background: var(--bg-sidebar-hover);
  color: var(--sidebar-text);
}
.forge-nav-link:hover .forge-nav-icon {
  color: var(--sidebar-text);
}
.forge-nav-link:focus-visible {
  outline: 2px solid var(--sidebar-text);
  outline-offset: 2px;
  box-shadow: none;
}
.forge-nav-link .forge-nav-label {
  flex: 1;
  opacity: 1;
  transition: opacity 0.15s cubic-bezier(0.25, 0, 0, 1);
  overflow: hidden;
  text-overflow: ellipsis;
}
.forge-nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--sidebar-text-muted);
}
.forge-nav-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
html[data-sidebar="collapsed"] .forge-nav-link {
  justify-content: center;
  padding: 10px 0;
  border-left: none;
  margin-left: 0;
}
html[data-sidebar="collapsed"] .forge-nav-link .forge-nav-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html[data-sidebar="collapsed"] .forge-nav-icon {
  color: var(--sidebar-text-muted);
}
.forge-nav-link.active {
  background: var(--bg-sidebar-active);
  color: var(--sidebar-text);
  font-weight: 600;
  border-left-color: var(--brand-slate);
  box-shadow: none;
}
.forge-nav-link.active .forge-nav-icon {
  color: var(--sidebar-text);
}
html[data-sidebar="collapsed"] .forge-nav-link.active {
  border-left-color: transparent;
  box-shadow: inset 2px 0 0 var(--brand-slate);
}
/* Sidebar footer: sources link and user identity. */
.forge-sidebar-spacer {
  flex: 1;
}
.forge-nav-link--footer {
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sidebar-border);
}
.forge-sidebar-footer {
  border-top: 1px solid color-mix(in srgb, var(--sidebar-border) 55%, transparent);
  padding: 10px 4px 0;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.forge-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.forge-user-chip:hover {
  background: var(--bg-sidebar-hover);
}
.forge-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  /* Keep the identity marker within the navy and slate brand palette. */
  background: linear-gradient(
    135deg,
    var(--brand-blue),
    var(--brand-blue-bright)
  );
  color: var(--color-white);
  font-weight: 700;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--card-rgb), 0.08);
}
.forge-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.forge-user-info .forge-user-name {
  color: var(--sidebar-text);
  font-size: var(--text-sm);
  font-weight: 600;
  text-overflow: ellipsis;
  overflow: hidden;
}
.forge-user-info .forge-user-role {
  color: var(--sidebar-text-muted);
  font-size: var(--text-xs);
  margin-top: 1px;
}
html[data-sidebar="collapsed"] .forge-user-info {
  opacity: 0;
  width: 0;
}
html[data-sidebar="collapsed"] .forge-user-chip {
  justify-content: center;
  padding: 8px 0;
}

/* Identity switcher: dummy login dropdown styled to match the sidebar.
   The Quasar select inside .forge-user-select drops its default
   chrome and renders as a tight inline label. The dropdown menu itself
   (rendered by Quasar in a portal at body-level) keeps the default light
   theme since it lives outside the sidebar. */
.forge-user-chip--switcher {
  cursor: default;
}
.forge-user-chip--switcher:hover {
  background: transparent;
}
.forge-user-select {
  min-width: 0;
  width: 100%;
  font-size: var(--text-sm);
  color: var(--sidebar-text);
}
.forge-user-select .q-field__control,
.forge-user-select .q-field__native {
  background: transparent !important;
  color: var(--sidebar-text) !important;
  min-height: 22px !important;
  padding: 0 !important;
}
.forge-user-select .q-field__control::before,
.forge-user-select .q-field__control::after {
  display: none !important;
}
.forge-user-select .q-field__marginal {
  color: var(--sidebar-text-muted) !important;
}
.forge-user-select .q-field__inner {
  padding: 0 !important;
}
html[data-sidebar="collapsed"] .forge-user-select {
  display: none;
}

.forge-version {
  font-size: 0.66rem;
  color: color-mix(in srgb, var(--sidebar-text-muted) 70%, var(--bg-sidebar));
  text-align: center;
  padding: 6px 0 2px;
  transition: opacity 0.15s cubic-bezier(0.25, 0, 0, 1);
}
html[data-sidebar="collapsed"] .forge-version {
  display: none;
}

/* Thin custom scrollbar for the sidebar */
.forge-sidebar::-webkit-scrollbar {
  width: 6px;
}
.forge-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.forge-sidebar::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--sidebar-text-muted) 28%, transparent);
  border-radius: var(--radius-xs);
}
.forge-sidebar::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--sidebar-text-muted) 42%, transparent);
}

/* ======================================================================
 * Top bar (breadcrumb + right-side actions)
 * ====================================================================== */

.forge-topbar,
.row.forge-topbar,
.nicegui-row.forge-topbar {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  height: var(--forge-topbar-height);
  padding: 0 20px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  max-width: 100%;
  transition: box-shadow var(--motion-base) var(--ease-out-quart);
}
.forge-topbar.is-scrolled {
  box-shadow: 0 4px 12px -8px rgba(var(--navy-rgb), 0.12);
}
@media (prefers-reduced-motion: reduce) {
  .forge-topbar {
    transition: none;
  }
}
.forge-topbar-left,
.row.forge-topbar-left,
.nicegui-row.forge-topbar-left {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.forge-topbar-right,
.row.forge-topbar-right,
.nicegui-row.forge-topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  min-width: 0;
  flex: 0 0 auto;
  max-width: none;
}

.forge-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
.forge-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  transition:
    color 0.15s cubic-bezier(0.25, 0, 0, 1),
    background 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.forge-breadcrumb a:hover {
  color: var(--text-primary);
  background: var(--tint-slate);
}
.forge-breadcrumb .sep {
  color: var(--text-muted);
  font-size: var(--text-xs);
  user-select: none;
}
.forge-breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: min(42vw, 520px);
}
@media (max-width: 1100px) {
  /* Keep the shortcut hint off compact laptop widths while retaining the
   * Search label for a clear action affordance. */
  .forge-topbar-kbd {
    display: none;
  }
  .forge-breadcrumb .current {
    max-width: min(34vw, 380px);
  }
}
@media (max-width: 900px) {
  .forge-topbar-search-label {
    display: none;
  }
  .forge-topbar-btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
  }
  .forge-breadcrumb .current {
    max-width: min(40vw, 300px);
  }
}
.forge-topbar-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  height: 40px;
  min-height: 40px;
  border: 1px solid var(--border-cool);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background 0.15s cubic-bezier(0.25, 0, 0, 1),
    color 0.15s cubic-bezier(0.25, 0, 0, 1),
    border-color 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.forge-topbar-control:hover {
  background: var(--tint-slate);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.forge-topbar-control:focus-visible {
  outline: 2px solid var(--brand-slate);
  outline-offset: 2px;
}
.forge-topbar-btn {
  min-width: 132px;
  gap: 8px;
  padding: 0 10px;
  font-size: var(--text-sm);
}
.forge-topbar-btn .forge-topbar-search-label {
  flex: 0 0 auto;
  text-align: left;
}
.forge-topbar-btn .forge-topbar-kbd {
  margin-left: auto;
}
.forge-topbar-btn .material-icons {
  font-size: var(--text-md);
}
.forge-topbar-kbd {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: var(--text-xs);
  background: var(--tint-slate);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}
.forge-icon-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 8px;
  height: 8px;
  background: var(--brand-red);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* ----------------------------------------------------------------------
 * Manager dashboard — header trust caption + reg-updates bell badge.
 * Plan 627 Phase 2: surface freshness and the unread reg-updates count
 * directly in the page header so the manager can scan trust signals
 * without scrolling.
 * ---------------------------------------------------------------------- */
.forge-page-trust {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.forge-page-trust-link {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
}
.forge-page-trust-link:hover {
  text-decoration: underline;
}
.forge-bell-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background 0.15s cubic-bezier(0.25, 0, 0, 1),
    color 0.15s cubic-bezier(0.25, 0, 0, 1);
}
.forge-bell-button:hover {
  background: var(--tint-slate);
  color: var(--text-primary);
}
.forge-bell-button:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
.forge-bell-button .material-icons {
  font-size: var(--text-lg);
}
.forge-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--brand-red);
  color: var(--color-white);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  border: 2px solid var(--bg-card);
  box-sizing: content-box;
}

/* ----------------------------------------------------------------------
 * Manager dashboard — "Since you last visited" strip.
 * Plan 627 / target-layout rebuild: merges regulatory updates and
 * what-changed bullets into one muted band between hero and KPIs.
 * Auto-hides via the helper returning ""; no empty-state styles here.
 * ---------------------------------------------------------------------- */
.forge-since-strip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-cool, var(--border));
  border-radius: var(--radius-card);
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
}
.forge-since-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.forge-since-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.forge-since-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--brand-blue);
  text-decoration: none;
}
.forge-since-link:hover {
  text-decoration: underline;
}
.forge-since-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.forge-since-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.45;
  border-radius: var(--radius-xs);
}
.forge-since-item[role="button"] {
  cursor: pointer;
}
.forge-since-item[role="button"]:hover {
  background: var(--bg-page);
}
.forge-since-item[role="button"]:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
.forge-since-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
}
.forge-since-body {
  flex: 1;
  min-width: 0;
}
.forge-since-title {
  font-weight: 600;
}
.forge-since-meta,
.forge-since-affected {
  margin-left: 4px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 500;
}
.forge-since-affected {
  color: var(--brand-blue);
}

/* ----------------------------------------------------------------------
 * Manager dashboard — collapsed summary row (Plan 627).
 * Single-line replacement for the old full-width "Action pipeline" and
 * "Compliance health" KPI strips. Wraps inside a NiceGUI ui.expansion
 * so click-to-reveal returns the full tile detail when needed.
 * ---------------------------------------------------------------------- */
.forge-collapsed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 6px 4px;
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.4;
  flex-wrap: wrap;
}
.forge-collapsed-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.forge-collapsed-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.forge-collapsed-headline {
  font-weight: 600;
  color: var(--text-primary);
}
.forge-collapsed-bullets {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  margin-left: 4px;
}
/* The NiceGUI ui.expansion that wraps a collapsed-row only needs a
 * subdued background + tighter chrome than the default quasar styling.
 * Scope by class added on the view so we don't override other
 * expansion surfaces (e.g. category-details). */
.forge-collapsed-expansion .q-expansion-item__container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.forge-collapsed-expansion .q-expansion-item__toggle-icon {
  color: var(--text-secondary);
}
.forge-collapsed-expansion .q-item__section--main {
  padding: 0;
}
