/* 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.
 */
.forge-skip-link {
  position: fixed;
  inset: 0.5rem auto auto 0.5rem;
  z-index: 10000;
  transform: translateY(-200%);
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--brand-blue);
  border-radius: var(--radius-md);
}
.forge-skip-link:focus {
  transform: translateY(0);
}

/* Status dot utility classes */
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: var(--space-1-5);
  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: var(--border-width-default) solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-4);
  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: var(--space-2);
}
.progress-inline .progress-bar {
  width: 80px;
}
.progress-inline-pct {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
}

/* ---- 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: var(--space-1);
}

/* ---- Product header metadata (products.py) ---- */
.product-brand-legal {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-1-5);
}
.product-annual-revenue {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.product-meta-value {
  color: var(--text-primary);
  font-weight: var(--type-body-emphasis-weight);
}
.product-meta-block {
  min-width: 0;
  margin-bottom: var(--space-4);
}
.product-meta-eyebrow {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: var(--type-label-transform);
  letter-spacing: var(--type-label-letter-spacing);
  font-weight: var(--type-body-emphasis-weight);
  margin-bottom: var(--space-1-5);
}
.product-meta-facts {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1-5);
  align-items: center;
}
.fill-blue {
  background: var(--brand-blue);
}

/* Badge utility */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-0-5) 7px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-strong);
  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: var(--space-1);
  padding-right: var(--space-1);
}
.badge-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: var(--space-0-5);
  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: var(--space-1);
  padding: 1px var(--space-1-5);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-strong);
  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: var(--space-0-5) var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: var(--type-body-emphasis-weight);
  letter-spacing: 0.02em;
  margin-right: var(--space-1);
  margin-bottom: var(--space-1);
}
.tag-green {
  background: var(--tint-green);
  color: var(--brand-green);
}

/* Section header */
.section-header {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-strong);
  color: var(--brand-blue);
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: var(--border-width-default) solid var(--border);
}

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

/* ------------------------------------------------------------------
 * 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: var(--space-1);
  padding: 0 0 var(--space-2) 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: var(--font-weight-medium);
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.forge-hero-stat__sublabel {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-0-5);
}

/* ------------------------------------------------------------------
 * .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: var(--space-2);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-4);
  background: var(--bg-card);
  border: var(--border-width-default) 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: var(--space-6);
  flex-wrap: wrap;
}
.forge-hero-compliance__primary {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.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: var(--font-weight-medium);
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}
.forge-hero-compliance__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1-5);
  padding-left: var(--space-4);
  border-left: var(--border-width-default) solid var(--border);
}
.forge-hero-compliance__delta {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  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: var(--space-1);
  min-width: 200px;
}
.forge-hero-compliance__composition-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  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: var(--font-weight-strong);
  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: var(--space-1);
  padding-top: 0;
}
.forge-hero-compliance__peer-source {
  color: var(--text-muted);
  margin-right: var(--space-1);
}
.forge-hero-compliance__peer-quartile {
  margin-left: var(--space-2);
  padding: 1px var(--space-2);
  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: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px var(--space-4);
  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: var(--font-weight-strong);
  color: var(--text-primary);
  line-height: 1;
}
.metric-mini .mm-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  text-transform: var(--type-label-transform);
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-top: var(--space-1-5);
}

/* Certification tracker card */
.cert-card {
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-2-5);
  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: var(--font-weight-strong);
  text-transform: var(--type-label-transform);
  letter-spacing: var(--type-label-letter-spacing);
  color: var(--brand-blue);
  margin-bottom: var(--space-2-5);
}
.cert-card .cert-counts {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-2-5);
}
.cert-card .cert-count-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
}
.cert-card .cert-count-item .num {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-strong);
}
.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: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) 14px;
  margin-bottom: var(--space-2-5);
  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: var(--border-width-default) 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: var(--border-width-default) 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%;
}
.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: var(--space-1-5);
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  padding: var(--space-2-5) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.cmdk-item:hover,
.cmdk-item.active {
  background: var(--tint-info);
}
.cmdk-item-content {
  flex: 1;
  min-width: 0;
}
.cmdk-title {
  color: var(--text-primary);
}
.cmdk-sub {
  color: var(--text-muted);
}
.cmdk-badge {
  margin-left: auto;
  color: var(--brand-blue);
  background: var(--tint-blue);
  padding: var(--space-0-5) var(--space-2);
  border-radius: var(--radius-sm);
}
.cmdk-hint {
  padding: var(--space-2) 14px;
  color: var(--text-muted);
  border-top: var(--border-width-default) solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cmdk-empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--text-muted);
}
.cmdk-empty-title {
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.cmdk-empty-hint {
  max-width: 420px;
  margin: 0 auto;
}
/* Canonical Ask Osperan action in command search. */
.cmdk-item-assistant {
  background: var(--brand-ai-tint);
  border: var(--border-width-default) solid color-mix(in srgb, var(--brand-ai) 18%, transparent);
  box-shadow: inset 2px 0 0 0 var(--brand-ai);
}
.cmdk-item-assistant:hover,
.cmdk-item-assistant.active {
  background: color-mix(in srgb, var(--brand-ai) 14%, transparent);
}
.cmdk-item-assistant .cmdk-title {
  color: var(--brand-ai);
}
.cmdk-item-assistant .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,
  .xray-spotlight {
    transform: none !important;
  }
  .card:hover,
  .kpi-tile.clickable:hover,
  .metric-mini:hover,
  .cert-card:hover,
  .xray-spotlight:hover {
    transform: none;
    transition: background 0.15s cubic-bezier(0.25, 0, 0, 1);
  }
}
.reg-sidebar-card .reg-title {
  font-weight: var(--type-body-emphasis-weight);
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: var(--type-compact-line-height);
  margin-bottom: var(--space-1);
}
.reg-sidebar-card .reg-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1-5);
}
.reg-sidebar-card .reg-action {
  color: var(--text-secondary);
}

/* Dashboard grid */
.dash-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-4);
  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: var(--space-3);
}

.dash-hero-row {
  display: flex;
  gap: var(--space-4);
  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: var(--space-3);
}
.cert-cards-row > .cert-card {
  min-width: 0;
  max-width: 420px;
  margin-bottom: 0;
}
.metrics-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Alert strip */
.alert-strip {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
  background: var(--tint-amber);
  border: var(--border-width-default) solid var(--kpi-border-amber);
  border-radius: var(--radius-card);
  margin-bottom: var(--space-4);
}
.alert-strip-item {
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
}

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-block-start: var(--space-5);
  margin-block-end: var(--space-5);
  margin-inline: 0;
}
.section-divider .section-title {
  font-size: var(--text-md);
  font-weight: var(--font-weight-strong);
  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: var(--space-2-5);
  padding: var(--space-2) 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: var(--font-weight-medium);
}
.step.active {
  color: var(--brand-blue);
  font-weight: var(--font-weight-medium);
}
.step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-strong);
  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: var(--border-width-default) 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: var(--space-1-5);
  font-weight: var(--font-weight-medium);
}
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 auto var(--space-1-5) 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: var(--space-3);
  flex-wrap: wrap;
  margin: 0;
}
.forge-section-eyebrow {
  margin: 0;
  font-size: var(--text-base);
  font-weight: var(--font-weight-strong);
  line-height: 1.3;
  text-transform: none;
  letter-spacing: normal;
  color: var(--brand-blue);
}
.forge-section-copy {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  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: var(--space-3);
  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: var(--font-weight-strong);
  line-height: var(--type-compact-line-height);
}
.forge-card-header-title {
  font-size: var(--text-base);
}
.forge-stage-header-title {
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.2;
}
.forge-context-page .forge-stage-header-title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-weight-strong);
  line-height: var(--type-compact-line-height);
}
.forge-context-stage-heading-row {
  box-sizing: border-box;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-1);
  border-bottom: var(--border-width-default) solid var(--border-subtle);
}
.forge-context-page .forge-stage-surface .forge-context-stage-heading-row .forge-stage-header {
  width: 100%;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.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: var(--border-width-default) solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: none;
  padding: var(--space-5) var(--space-6);
}
.forge-content-box--summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.forge-content-box--filters {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  /* 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: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-none);
  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: var(--space-3);
  border-top: var(--border-width-default) solid var(--border);
  padding-top: var(--space-5);
  margin-top: var(--space-2);
}
.forge-field-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 540px;
  width: 100%;
}
.forge-section-actions {
  display: flex;
  justify-content: flex-end;
  max-width: 540px;
  width: 100%;
  padding-top: var(--space-1);
}
.forge-stage-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-left: auto;
  flex: none;
}
.forge-stage-attention {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2-5);
  width: 100%;
  border: var(--border-width-default) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  padding: var(--space-3) 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: var(--type-compact-line-height);
}
.forge-stage-attention-detail {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--type-supporting-line-height);
  margin-top: var(--space-0-5);
}
.forge-stage-attention-copy {
  flex: 1;
  min-width: 0;
}
.forge-stage-attention-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  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: var(--space-2);
  width: 100%;
  padding-top: var(--space-1);
}
.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: var(--space-4);
  border: var(--border-width-default) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: var(--space-5);
  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 {
  width: 100%;
  margin-bottom: var(--space-1);
  padding-bottom: var(--space-3);
  border-bottom: var(--border-width-default) solid var(--border-subtle);
  box-sizing: border-box;
}
.forge-stage-surface .forge-stage-header-row {
  position: relative;
  margin-bottom: 0;
  gap: var(--space-3);
}
.forge-stage-surface--compact {
  gap: var(--space-3);
  padding: 14px var(--space-4);
}
.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: var(--space-2);
  width: 100%;
  box-sizing: border-box;
  border: var(--border-width-default) solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  padding: var(--space-2-5) var(--space-3);
}
.forge-stage-item--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.forge-stage-item--compact {
  gap: var(--space-1);
  padding: var(--space-2) var(--space-2-5);
}
.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: var(--space-2);
  margin-top: var(--space-2);
  border-left: 3px solid var(--brand-blue);
  padding-left: var(--space-3);
}
.scope-obligation-section__heading {
  margin: var(--space-2-5) 0 var(--space-1-5);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-extra-bold);
  letter-spacing: var(--type-eyebrow-letter-spacing);
  text-transform: var(--type-label-transform);
  color: var(--text-muted);
}
.scope-obligation-section__heading:first-child {
  margin-top: 0;
}
.scope-obligation-section__items {
  gap: var(--space-2);
}
.scope-obligation-row__main {
  min-width: 0;
  flex: 1;
}
.scope-obligation-row__title {
  font-weight: var(--font-weight-strong);
  color: var(--text-primary);
}
.scope-obligation-row__meta {
  display: flex;
  gap: var(--space-2);
  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: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--type-supporting-line-height);
  max-width: 52ch;
}
.scope-obligation-trace {
  margin-bottom: var(--space-2);
  font-size: var(--text-compact);
  color: var(--text-muted);
}
.scope-obligation-trace__summary {
  cursor: pointer;
  font-weight: var(--type-body-emphasis-weight);
  color: var(--text-secondary);
  list-style: none;
}
.scope-obligation-trace__summary::-webkit-details-marker {
  display: none;
}
.scope-obligation-trace__body {
  margin-top: var(--space-1-5);
  padding: var(--space-2) var(--space-2-5);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  line-height: var(--type-supporting-line-height);
}
.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: var(--space-2) 0;
}
.forge-stage-divider--md {
  margin: 14px 0;
}
.forge-stage-divider--lg {
  margin: var(--space-5) 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: var(--space-2) 14px;
  width: 100%;
  padding: var(--space-2) 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: var(--font-weight-strong);
}
.forge-inventory-status-row__value {
  color: var(--text-primary);
  font-weight: var(--font-weight-strong);
}
.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: var(--space-3);
}
.forge-execution-panels {
  margin-top: 0;
}
.forge-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  width: 100%;
}
.forge-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  flex: 1 1 360px;
  min-width: 260px;
}
.forge-filter-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  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;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.forge-topbar .forge-mobile-menu-btn {
  /* Keep this responsive shell rule ahead of components.css's .forge-btn. */
  display: none;
}
.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-topbar .forge-mobile-menu-btn {
    display: inline-flex;
  }

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

  /* Sidebar becomes a fixed off-canvas drawer */
  .forge-sidebar {
    --forge-mobile-sidebar-layout: drawer;
    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-content .forge-page {
    padding: var(--layout-page-gutter-top-responsive) var(--layout-page-gutter-x-responsive) var(--space-8);
  }

  /* 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: var(--space-2);
  }

  /* 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: var(--space-4) var(--space-5) var(--space-8);
  }
}

/* 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: var(--space-1-5);
  min-width: 0;
  padding: 14px var(--space-4);
  background: var(--bg-card);
  border: var(--border-width-default) 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: var(--border-width-default) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(var(--navy-rgb), 0.12);
  padding: var(--space-2-5) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  flex-wrap: wrap;
}
.forge-bulk-bar__count {
  font-weight: var(--type-body-emphasis-weight);
  font-size: 0.875rem;
  white-space: nowrap;
}
.forge-bulk-bar__select-all {
  display: none;
  font-weight: var(--font-weight-medium);
  color: var(--brand-blue);
  border: 0;
  background: transparent;
  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;
  border-radius: var(--radius-sm);
  border: var(--border-width-default) solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  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);
}
.forge-content-box .kpi-strip,
.forge-kpi-pane .kpi-strip {
  margin-bottom: 0;
}
.forge-filter-summary {
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
  flex-wrap: wrap;
  width: 100%;
}
.forge-filter-summary-count {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--font-weight-strong);
}
.forge-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: var(--border-width-default) solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  padding: 3px var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-primary);
}
.forge-filter-chip-label {
  color: var(--text-muted);
  font-weight: var(--type-body-emphasis-weight);
}
.forge-filter-chip-value {
  color: var(--text-primary);
  font-weight: var(--font-weight-strong);
}
.forge-filter-clear {
  font-size: var(--text-xs);
  color: var(--brand-blue);
  font-weight: var(--font-weight-strong);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.forge-empty-state--compact {
  padding: var(--space-6) 18px;
  margin-top: var(--space-1);
}
.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: var(--space-0-5) 14px;
  padding: var(--space-3) 14px;
  text-align: left;
  background: var(--bg-soft);
  border: var(--border-width-default) 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: var(--space-2);
  }
}
.forge-empty-icon {
  font-size: 32px;
  line-height: 1;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.forge-empty-title {
}
.forge-empty-hint {
  margin: var(--space-1-5) 0 0 0;
  max-width: 520px;
  color: var(--text-secondary);
}
/* KPI strip defaults to the 6-tile Portfolio dashboard layout. Pages with
 * fewer tiles declare their finite count through data-kpi-columns.
 */
.kpi-strip {
  --kpi-strip-columns: 6;
  display: grid;
  grid-template-columns: repeat(var(--kpi-strip-columns), minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.kpi-strip[data-kpi-columns="1"] { --kpi-strip-columns: 1; }
.kpi-strip[data-kpi-columns="2"] { --kpi-strip-columns: 2; }
.kpi-strip[data-kpi-columns="3"] { --kpi-strip-columns: 3; }
.kpi-strip[data-kpi-columns="4"] { --kpi-strip-columns: 4; }
.kpi-strip[data-kpi-columns="5"] { --kpi-strip-columns: 5; }
.kpi-strip[data-kpi-columns="6"] { --kpi-strip-columns: 6; }

/* Hero layout: one dominant stat above a row of smaller supporting tiles */
.kpi-strip-hero-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.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;
    }
  }
  @container forge-page (max-width: 400px) {
    .category-risk-grid {
      grid-template-columns: 1fr;
    }
  }
}
.kpi-tile {
  position: relative;
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  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: var(--font-weight-strong);
  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: var(--type-body-emphasis-weight);
  text-transform: var(--type-label-transform);
  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: var(--space-0-5);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-strong);
  border-radius: var(--radius-xs);
  padding: 1px var(--space-1-5);
  margin-left: var(--space-1-5);
  vertical-align: middle;
}
.kpi-delta--good {
  color: var(--brand-green);
  background: color-mix(in srgb, var(--brand-green) 10%, transparent);
}
.kpi-delta--bad {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--brand-red) 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 {
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px var(--space-5) var(--space-4) var(--space-5);
  margin: var(--space-1) 0 var(--space-3) 0;
  box-shadow: var(--shadow-sm);
  gap: 14px;
}
.forge-product-overview-headrow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.forge-product-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
  flex-wrap: wrap;
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-1) var(--space-2);
  box-shadow: var(--shadow-sm);
}
.forge-product-panel {
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-card);
  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. */
.forge-product-body {
  display: flex;
  gap: var(--space-3);
  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: var(--space-4);
  padding-bottom: var(--space-4);
}

/* Product workspace: persistent navigation and stage content share the same
   rounded surface used by the Source Documents content box. */
.forge-product-workspace-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border-subtle);
  border-radius: var(--radius-card);
}
.forge-product-navigation {
  border-right: var(--border-width-default) solid var(--border-subtle);
  padding: var(--space-2-5) var(--space-3) var(--space-6);
  min-width: 0;
}
.forge-product-rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  position: sticky;
  top: calc(var(--forge-topbar-height, 56px) + 12px);
  max-height: calc(100vh - var(--forge-topbar-height, 56px) - 24px);
  overflow-y: auto;
}
.forge-product-rail-heading {
  color: var(--text-secondary);
  text-transform: var(--type-label-transform);
  font-size: 10px;
  font-weight: var(--font-weight-strong);
  letter-spacing: .08em;
  padding: var(--space-2-5) var(--space-2-5) var(--space-1);
}
.forge-product-rail-heading:not(.forge-product-rail-heading--tracks) {
  margin-top: var(--space-2-5);
  padding-top: var(--space-3);
  border-top: var(--border-width-default) solid var(--border-subtle);
}
.forge-product-rail-heading--tracks {
  margin-top: 14px;
  padding-top: var(--space-1);
}
.forge-product-regulation-groups { display: flex; flex-direction: column; gap: 3px; }
.forge-product-regulation-group { min-width: 0; }
.forge-product-regulation-group > summary { list-style: none; }
.forge-product-regulation-group > summary::-webkit-details-marker { display: none; }
.forge-product-regulation-link {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1-5) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
}
.forge-product-regulation-link::before {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(-45deg);
}
.forge-product-regulation-group[open] > .forge-product-regulation-link::before { transform: rotate(45deg); }
.forge-product-regulation-link:hover,
.forge-product-regulation-group[open] > .forge-product-regulation-link { background: var(--bg-hover); }
.forge-product-regulation-name { min-width: 0; }
.forge-product-regulation-name small { display: block; margin-top: var(--space-0-5); color: var(--text-muted); font-size: 11px; }
.forge-product-status-pill {
  flex: 0 0 auto;
  padding: var(--space-0-5) 7px;
  border: var(--border-width-default) solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
}
.forge-product-status-pill--applied { border-color: var(--border-subtle); background: var(--tint-green); color: var(--tint-green-fg); }
.forge-product-status-pill--rejected { border-color: var(--border-danger); background: var(--tint-red); color: var(--text-danger); }
.forge-product-status-pill--review { border-color: var(--border-subtle); background: var(--bg-page); }
.forge-product-track-children {
  display: flex;
  flex-direction: column;
  gap: var(--space-0-5);
  margin: 0 0 3px var(--space-2-5);
  padding: 3px 0 3px var(--space-2);
  border-left: var(--border-width-default) solid var(--border-subtle);
}
details:not([open]) > .forge-product-track-children { display: none; }
.forge-product-track-child { padding: 7px var(--space-2) 7px var(--space-2-5); font-size: 12px; }
.forge-product-track-child small { font-size: 10px; }
.forge-product-regulation-link:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 1px; }
.forge-product-rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1-5);
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  padding: var(--space-2-5) var(--space-3) var(--space-2-5) 9px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  line-height: var(--type-body-secondary-line-height);
  overflow-wrap: normal;
  word-break: normal;
}
.forge-product-rail-link:hover {
  background: var(--bg-hover);
}
.forge-product-rail-link.active {
  border-left-color: var(--brand-blue);
  background: var(--bg-hover);
  color: var(--brand-blue);
  font-weight: var(--type-body-emphasis-weight);
}
.forge-product-rail-link:focus-visible,
.forge-product-process-step:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: -2px;
}
.forge-product-rail-track { align-items: flex-start; flex-direction: column; }
.forge-product-rail-track small,
.forge-product-rail-note { color: var(--text-muted); font-size: 12px; line-height: var(--type-body-secondary-line-height); }
.forge-product-rail-note { margin: var(--space-1) var(--space-2) 0; padding: 0 var(--space-1); }
.forge-product-rail-count {
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.forge-product-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100vh - 220px);
  padding: var(--space-6) var(--space-6) var(--space-6);
  min-width: 0;
  container-type: inline-size;
  container-name: product-workspace;
  background: transparent;
}
.forge-product-content .forge-product-main { padding: 0; }
.forge-product-content .forge-stage-surface {
  border: 0;
  border-radius: var(--radius-none);
  box-shadow: none;
  padding: 0;
  background: transparent;
}
.forge-product-content .forge-standards-first-section { border-top: var(--border-width-none); }
.forge-settings-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  align-items: stretch;
  gap: 22px;
}
.forge-settings-nav {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  position: sticky;
  top: 16px;
  width: 196px;
  min-width: 196px;
  padding-right: 14px;
  border-right: var(--border-width-default) solid var(--border-subtle);
}
.forge-btn.forge-settings-nav-item {
  margin: 0 !important;
  justify-content: flex-start;
  text-align: left;
}
.forge-btn.forge-settings-nav-item .q-btn__content {
  justify-content: flex-start;
  text-align: left;
}
.forge-settings-panels,
.forge-settings-panel { min-width: 0; }
.forge-settings-panel > .forge-card-section:first-child {
  border-top: 0;
}
.forge-settings-stage .forge-settings-field-grid {
  display: grid;
  grid-template-columns: var(--layout-settings-field-columns-desktop);
  gap: var(--space-3) var(--space-5);
  max-width: var(--layout-unbounded-size);
}
.forge-product-content .forge-settings-stage .forge-settings-readonly-hint { width: var(--layout-full-inline-size); max-width: var(--layout-unbounded-size); box-sizing: border-box; }
.forge-settings-stage .forge-section-actions { max-width: var(--layout-unbounded-size); }
.forge-scope-workspace {
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: calc(100vh - 260px);
  gap: 22px;
}
.forge-scope-regulation-nav {
  position: sticky;
  top: 16px;
  width: 256px;
  min-width: 256px;
  min-height: calc(100vh - 260px);
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: var(--space-3);
}
.forge-scope-review-detail { min-width: 0; }
.forge-scope-regulation-nav__title {
  margin: 0 var(--space-2) 5px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 750;
}
.forge-scope-regulation-list { width: 100%; gap: var(--space-1-5); }
.forge-scope-regulation-entry { width: 100%; gap: 3px; }
.forge-scope-regulation-entry__meta {
  min-height: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 0 var(--space-2) 0 var(--space-3);
}
.forge-scope-regulation-entry__reference {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forge-scope-regulation-nav__status {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.forge-scope-regulation-nav__status--applied { color: var(--brand-green); }
.forge-scope-regulation-nav__status--review,
.forge-scope-regulation-nav__status--blocked { color: var(--brand-amber); }
.forge-scope-regulation-nav__status--deferred,
.forge-scope-regulation-nav__status--history { color: var(--text-muted); }
@media (max-width: 720px) {
  .forge-scope-workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .forge-scope-regulation-nav {
    position: static;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 0 0 var(--space-3);
    border-right: 0;
    border-bottom: var(--border-width-default) solid var(--border-subtle);
  }
  .forge-scope-regulation-list {
    display: flex;
    overflow-x: auto;
    padding: var(--space-0-5) 0 5px;
  }
  .forge-scope-regulation-entry { flex: 0 0 208px; }
}
@media (max-width: 720px) {
  .forge-settings-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .forge-settings-nav {
    position: static;
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: row;
    gap: var(--space-1);
    overflow-x: auto;
    padding: 0 0 9px;
    border-right: 0;
    border-bottom: var(--border-width-default) solid var(--border-subtle);
  }
}
/* Product Deep-Dive tab typography uses Manrope with semantic heading levels. */
.forge-product-content h1,
.forge-product-content h2,
.forge-product-content h3,
.forge-product-content h4,
.forge-product-content .forge-card-header-title {
  font-family: var(--font-body);
}
.forge-product-content .forge-section-eyebrow {
  color: var(--text-primary);
  letter-spacing: normal;
}
.forge-product-content h3.forge-section-eyebrow {
  font-size: 1rem;
  font-weight: var(--font-weight-strong);
  line-height: 1.3;
}
.forge-product-content h4.forge-section-eyebrow {
  font-size: 0.875rem;
  font-weight: var(--type-body-emphasis-weight);
  line-height: var(--type-compact-line-height);
}
.forge-product-review-action { flex-wrap: wrap; }
.forge-product-track-title { font-size: 16px; font-weight: var(--type-body-emphasis-weight); }
.forge-product-track-detail { color: var(--text-muted); font-size: 12px; }
.forge-product-process-step {
  box-sizing: border-box;
  display: grid;
  position: relative;
  flex: 1 1 0;
  grid-template-columns: 22px minmax(0, 1fr);
  align-content: center;
  align-items: start;
  gap: 0 var(--space-2-5);
  min-width: 0;
  min-height: 72px;
  padding: var(--space-3) 14px;
  border-right: var(--border-width-default) solid var(--border);
  border-bottom: var(--border-width-default) solid var(--border);
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}
.forge-product-process-step:last-child { border-right: 0; }
.forge-product-process-step:hover { background: var(--bg-hover); }
.forge-product-process-step.is-locked,
.forge-product-process-step.is-locked:hover {
  background: var(--surface-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
.forge-product-process-step.is-locked .forge-product-process-step__number {
  border-color: var(--border);
  color: var(--text-muted);
}
.forge-product-process-step.is-locked .forge-product-process-step__detail { color: var(--text-muted); }
.forge-product-process-step.active {
  background: var(--surface-primary);
  border-bottom: 3px solid var(--brand-blue);
  color: var(--brand-blue);
  font-weight: 650;
}
.forge-product-process-step__number {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  grid-column: 1;
  grid-row: 1 / span 2;
  border: var(--border-width-default) solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-primary);
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.forge-product-process-step.active .forge-product-process-step__number {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: var(--text-on-brand);
}
.forge-product-content .forge-product-process-steps {
  display: grid;
  grid-template-columns: var(--layout-product-process-columns-desktop);
  width: 100%;
  overflow: hidden;
  border: var(--border-width-default) solid var(--border);
  border-bottom: var(--border-width-none);
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
}
.forge-product-process-step__copy { display: grid; min-width: 0; gap: var(--space-1-5); }
.forge-product-process-step__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forge-product-process-step__detail {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-secondary-line-height);
  white-space: normal;
}
.forge-product-process-step.active .forge-product-process-step__detail { color: var(--text-primary); font-weight: 550; }
@media (max-width: 540px) {
  .forge-product-process-step { grid-template-columns: 20px minmax(0, 1fr); gap: 0 7px; min-height: 76px; padding: var(--space-2-5) var(--space-2); }
  .forge-product-process-step__number { width: 20px; height: 20px; flex-basis: 20px; }
  .forge-product-process-step__detail { white-space: normal; }
}
/* Workspace internals respond to available content width after both rails. */
@container product-workspace (max-width: 900px) {
  .forge-product-content .forge-work-surface-document-workspace,
  .forge-product-content .forge-work-surface-full-workspace,
  .forge-product-content .forge-work-surface-layout,
  .forge-product-content .forge-work-surface-hierarchy { grid-template-columns: minmax(0, 1fr); }
  .forge-product-content .forge-work-surface-details { min-height: 0; position: static; }
}
@container product-workspace (max-width: 700px) {
  .forge-product-content .forge-declaration-workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .forge-product-workspace-grid { grid-template-columns: 200px minmax(0, 1fr); }
  .forge-product-content { padding: var(--space-6) var(--space-4) 28px; }
}
@media (min-width: 701px) and (max-width: 1024px) {
  .forge-product-workspace-grid { grid-template-columns: var(--layout-product-workspace-columns-tablet); }
  .forge-product-navigation {
    border-right: 0;
    border-bottom: var(--border-width-default) var(--border-style-default) var(--border-subtle);
    padding: var(--space-2) var(--space-3);
  }
  .forge-product-rail {
    display: grid;
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    max-height: var(--layout-unbounded-size);
    overflow: visible;
  }
  .forge-product-rail-heading { grid-column: 1 / -1; }
  .forge-product-regulation-groups { grid-column: 1 / -1; }
  .forge-product-content .forge-stage-surface .forge-scope-stage-header-row {
    display: grid;
    grid-template-columns: var(--layout-product-workspace-columns-tablet);
    justify-content: stretch;
    width: var(--layout-full-inline-size);
    max-width: var(--layout-full-inline-size);
    box-sizing: border-box;
  }
  .forge-product-content .forge-stage-surface .forge-scope-stage-header-row .forge-stage-header-actions-live {
    position: static !important;
    display: grid !important;
    grid-template-columns: var(--layout-stage-action-columns-tablet);
    align-self: stretch;
    width: var(--layout-full-inline-size);
    max-width: var(--layout-full-inline-size);
  }
  .forge-product-content .forge-stage-surface .forge-scope-stage-header-row .forge-stage-header-actions-live > :last-child {
    grid-column: 1 / -1;
  }
  body:has(.forge-product-workspace-grid) .activity-dock {
    left: 12px;
    right: auto;
  }
}
@container product-workspace (max-width: 640px) {
  .forge-product-content .forge-manager-decision-row {
    grid-template-columns: var(--layout-manager-decision-columns-mobile);
    align-items: start;
  }
  .forge-product-content .forge-manager-decision-row__object { grid-column: 1 / -1; }
  .forge-product-content .forge-manager-decision-row__status { grid-column: 1; }
  .forge-product-content .forge-manager-decision-row__actions { grid-column: 2; }

  .forge-product-content .forge-scope-workspace { grid-template-columns: var(--layout-scope-workspace-columns-mobile); gap: var(--layout-scope-workspace-gap); }
  .forge-product-content .forge-scope-regulation-nav {
    position: static;
    width: var(--layout-full-inline-size);
    min-width: var(--layout-min-content-size);
    min-height: var(--layout-min-content-size);
    max-height: var(--layout-unbounded-size);
    overflow: visible;
    padding-block-end: var(--space-3);
    border-right: var(--border-width-none);
    border-bottom: var(--border-width-default) var(--border-style-default) var(--border-subtle);
  }
  .forge-product-content .forge-scope-regulation-list {
    display: flex;
    overflow-x: auto;
    padding: var(--layout-scope-regulation-list-padding);
  }
  .forge-product-content .forge-scope-regulation-entry { flex: 0 0 208px; }
  .forge-product-content .forge-scope-stage-header-row { flex-direction: column; }
  .forge-product-content .forge-stage-surface .forge-scope-stage-header-row .forge-stage-header-actions-live {
    position: static;
    align-self: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    max-width: var(--layout-full-inline-size);
  }
  .forge-product-content .forge-scope-stage-tabs .q-tab { min-width: var(--layout-min-content-size); }
  .forge-product-content .forge-scope-stage-tabs .q-tab__content,
  .forge-product-content .forge-scope-stage-tabs .q-tab__label {
    white-space: normal;
    text-align: center;
  }

  .forge-product-content .forge-stage-header-row:not(.forge-scope-stage-header-row) {
    align-items: flex-start;
    flex-direction: column;
  }
  .forge-product-content .forge-stage-surface .forge-stage-header-row:not(.forge-scope-stage-header-row) .forge-stage-header-actions-live {
    position: static;
    align-self: flex-start;
    justify-content: flex-start;
    width: var(--layout-full-inline-size);
  }
  .forge-product-content .forge-stage-header-actions { flex-wrap: wrap; justify-content: flex-start; }

  .forge-product-content .forge-product-process-steps { grid-template-columns: var(--layout-product-process-columns-mobile); }
  .forge-product-content .forge-product-process-step:nth-child(2n) { border-right: var(--border-width-none); }
  .forge-product-content .forge-product-process-step:nth-child(2n + 1) { border-right: var(--border-width-default) solid var(--border); }

  .forge-product-content .forge-settings-stage .forge-settings-field-grid { grid-template-columns: var(--layout-settings-field-columns-mobile); }
}

/* 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: var(--border-width-default) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-2-5) 0 var(--space-1-5);
}

/* Bulk-review modal lanes */
.forge-review-lane {
  border-radius: var(--radius-md);
  padding: var(--space-3) 14px;
  flex: 1;
}
.forge-review-lane--accept {
  background: var(--tint-green);
  border: var(--border-width-default) 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: var(--border-width-default) 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: var(--border-width-default) 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: var(--border-width-default) solid var(--lane-border-row);
  padding: var(--space-1) 0;
  gap: var(--space-2);
}
.forge-product-overview-heading {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  text-transform: var(--type-label-transform);
  letter-spacing: 0.07em;
  color: var(--brand-blue);
  padding-top: var(--space-1);
}
.forge-product-overview-status {
  border-left: 4px solid var(--brand-blue);
  background: var(--bg-page);
  border-radius: var(--radius-card);
  padding: var(--space-3) 14px;
}
.forge-product-overview-status-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.forge-product-overview-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-display);
  text-transform: var(--type-label-transform);
  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: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--type-supporting-line-height);
}
.forge-product-overview-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1-5) var(--space-3);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-strong);
  color: var(--text-primary);
}
.forge-product-overview-owner {
  justify-content: flex-end;
  min-width: 0;
}
.forge-owner-feedback {
  margin-top: var(--space-2);
  padding: var(--space-2-5) var(--space-3);
  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: var(--space-0-5);
  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: var(--space-3);
}
.forge-product-overview-card .kpi-tile {
  padding: 18px 18px var(--space-4) var(--space-5);
}
.forge-product-overview-card .kpi-tile .kpi-value {
  font-size: var(--text-2xl);
}
/* Regulation accordion — matched regulations inside the product overview card */








.forge-reg-title {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forge-reg-urgency-badge {
  display: inline-block;
  padding: var(--space-0-5) var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-strong);
  color: var(--text-on-dark);
  white-space: nowrap;
  flex-shrink: 0;
}
.forge-reg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  flex-shrink: 0;
}
.forge-reg-chip {
  display: inline-block;
  padding: var(--space-0-5) var(--space-2);
  border: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  font-weight: var(--type-body-emphasis-weight);
  color: var(--brand-blue);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: background 0.1s;
}
.forge-reg-chip:hover {
  background: var(--bg-hover);
}

@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: var(--space-3);
  margin-bottom: var(--space-4);
  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: var(--space-2-5);
  margin-bottom: var(--space-2);
}
.category-risk-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.category-risk-row-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-strong);
  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: var(--space-2-5);
  width: 100%;
}
.category-risk-card {
  position: relative;
  display: flex;
  flex-direction: row;
  text-decoration: none;
  color: inherit;
  border: var(--border-width-default) 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: var(--space-3) 14px;
  display: flex;
  flex-direction: column;
  gap: var(--space-1-5);
  min-width: 0;
}
.category-risk-card .cat-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.category-risk-card .cat-card-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-strong);
  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: var(--font-weight-strong);
  text-transform: var(--type-label-transform);
  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: var(--space-1) var(--space-2);
}
.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: var(--space-1);
  margin-top: var(--space-0-5);
}
.category-risk-card .cat-card-distribution-label {
  font-size: var(--text-xs);
  font-weight: var(--type-body-emphasis-weight);
  text-transform: var(--type-label-transform);
  letter-spacing: var(--type-eyebrow-letter-spacing);
  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: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.matrix-expansion .q-item {
  min-height: 44px;
  font-weight: var(--type-body-emphasis-weight);
  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: var(--space-2);
  text-decoration: none;
  color: inherit;
  font-weight: var(--type-body-emphasis-weight);
}
.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: var(--font-weight-strong);
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.1;
}
.cat-table-atrisk-count {
  font-size: var(--text-xs);
  font-weight: var(--type-body-emphasis-weight);
  margin-top: var(--space-0-5);
}
.cat-table-atrisk-ok {
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
}/* Readiness bar cell — used for the regulation,
evidence {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 140px;
}
.cat-table-bar-head {
  display: flex;
  justify-content: flex-start;
}
.cat-table-bar-label {
  font-weight: var(--font-weight-strong);
  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: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  width: 100%;
  box-sizing: border-box;
}
.top-risks-events-card__label,
.top-risks-card__label {
  font-size: var(--text-xs);
  text-transform: var(--type-label-transform);
  letter-spacing: var(--type-label-letter-spacing);
  color: var(--text-secondary);
  font-weight: var(--font-weight-strong);
}
.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;
}

/* Employee My Work: simple focus dashboard */
.my-work-section-heading {
  margin: var(--space-5) 0 var(--space-2) 0;
}
.my-work-card,
.my-work-focus-card,
.my-work-summary-card,
.my-work-clear-card {
  background: var(--bg-card);
  border: var(--border-width-default) 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: var(--space-5) var(--space-5);
  margin-bottom: var(--space-3);
  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: var(--type-label-transform);
  letter-spacing: var(--type-label-letter-spacing);
  color: var(--brand-blue);
  margin-bottom: var(--space-1);
}
.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: var(--type-supporting-line-height);
  margin-top: var(--space-1-5);
}
.my-work-ai-reason {
  align-items: flex-start;
  background: var(--tint-blue);
  border: var(--border-width-default) solid var(--border-cool);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  display: flex;
  gap: var(--space-2);
  line-height: var(--type-supporting-line-height);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
}
.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: var(--space-1-5);
  line-height: var(--type-compact-line-height);
  margin-top: var(--space-2);
}
.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: var(--space-2);
  flex-wrap: wrap;
}
.my-work-btn,
.my-work-link,
.my-work-card-footer a,
.my-work-due-more {
  text-decoration: none;
  font-weight: var(--font-weight-strong);
}
.my-work-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  border-radius: var(--radius-lg);
}
.my-work-btn--primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
}
.my-work-btn--secondary {
  border: var(--border-width-default) 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: var(--space-3);
  padding: var(--space-3) var(--space-4);
  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: var(--type-supporting-line-height);
}
.my-work-ai-proof {
  background: var(--bg-card);
  border: var(--border-width-default) 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: var(--space-3);
  padding: 15px var(--space-4);
}
.my-work-ai-proof-head {
  align-items: flex-start;
  display: flex;
  gap: var(--space-2-5);
}
.my-work-ai-proof-head > .material-icons {
  color: var(--brand-blue);
  font-size: var(--text-xl);
  margin-top: 1px;
}
.my-work-ai-proof-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.my-work-ai-proof-tile {
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2-5) var(--space-3);
}
.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: var(--space-1);
}
.my-work-clear-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 15px var(--space-4);
  background: var(--tint-green);
  border-left: 4px solid var(--brand-green);
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: var(--type-supporting-line-height);
}
.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: var(--space-3);
  padding: var(--space-3) 14px;
  border-bottom: var(--border-width-default) 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 var(--space-4);
}
.my-work-row-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2-5);
}
.my-work-row-copy {
  min-width: 0;
  flex: 1;
}
.my-work-row-title {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-strong);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}
.my-work-task-ai-reason {
  color: var(--brand-blue);
  font-size: var(--text-sm);
  font-weight: var(--type-body-emphasis-weight);
  line-height: var(--type-compact-line-height);
  margin-top: var(--space-1-5);
  /*
     * 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: var(--space-1-5);
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-align: right;
}
.my-work-pill-row {
  display: flex;
  gap: var(--space-1-5);
  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: var(--space-1-5);
  text-transform: var(--type-label-transform);
}
.my-work-assessment-line {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  gap: var(--space-2);
  line-height: var(--type-compact-line-height);
  margin-bottom: var(--space-2);
}
.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: var(--space-0-5) var(--space-2);
  text-transform: var(--type-label-transform);
  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: var(--border-width-default) 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: var(--space-1) var(--space-2-5);
  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: var(--space-2-5) 14px;
  text-align: right;
  border-top: var(--border-width-default) solid var(--border);
}
.my-work-due-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.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: var(--space-3) var(--space-4);
}
.my-work-due-lane {
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border);
  border-top: 3px solid var(--brand-blue);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3);
  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: var(--space-2);
  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: var(--space-0-5) 0 var(--space-2) 0;
}
.my-work-due-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  align-items: start;
  padding: var(--space-2) 0;
  border-top: var(--border-width-default) 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: var(--type-compact-line-height);
  white-space: nowrap;
}
.my-work-due-title {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-strong);
  line-height: var(--type-compact-line-height);
  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: var(--type-compact-line-height);
}
.my-work-due-empty {
  border-top: var(--border-width-default) solid var(--border);
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: var(--space-2-5) 0 var(--space-0-5) 0;
}
.my-work-due-more {
  display: inline-flex;
  margin-top: var(--space-1-5);
}
@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: var(--space-2-5);
  }
  .my-work-due-item {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }
  .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%;
  }
}

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

/* Work queue card */
.queue-card {
  background: var(--bg-card);
  border: var(--border-width-default) 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: var(--space-3);
  padding: 14px 18px;
  border-bottom: var(--border-width-default) solid var(--border);
  background: var(--bg-card);
}
/* 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: var(--space-2-5);
}

.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: var(--space-2-5);
  line-height: var(--type-supporting-line-height);
  margin-bottom: var(--space-3);
  padding: var(--space-2-5) var(--space-3);
}
.forge-ai-notice__icon {
  color: var(--brand-ai);
  flex-shrink: 0;
  line-height: 0;
  margin-top: var(--space-0-5);
}
.forge-ai-notice__icon svg {
  display: block;
}
.forge-ai-notice__text {
  flex: 1;
  min-width: 0;
}

.employee-review-body .kpi-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.employee-review-body .kpi-tile {
  padding: 14px 14px var(--space-3) var(--space-4);
}
.employee-review-body .kpi-tile .kpi-value {
  font-size: var(--text-xl);
}
.review-filter-rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.review-filter-summary,
.review-filter-group {
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3);
}
.review-filter-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.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: var(--type-label-transform);
}
.review-filter-count {
  color: var(--text-primary);
  font-size: var(--text-md);
  font-weight: var(--font-weight-display);
}
.review-filter-clear {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-strong);
  text-decoration: none;
}
.review-filter-clear:hover {
  color: var(--brand-blue);
}
.review-filter-title {
  margin-bottom: var(--space-2);
}
.review-filter-option {
  display: flex;
  align-items: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--type-body-emphasis-weight);
  padding: var(--space-1-5) var(--space-2);
  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: var(--border-width-default) solid var(--border);
}

/* Sidebar section */
.side-section {
  background: var(--bg-card);
  border: var(--border-width-default) solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px var(--space-4);
  box-shadow: var(--shadow-sm);
}
.side-section + .side-section {
  margin-top: 0;
}
.side-section-title {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-strong);
  text-transform: var(--type-label-transform);
  letter-spacing: var(--type-label-letter-spacing);
  color: var(--brand-blue);
  margin-bottom: var(--space-2-5);
}
/* Priority queue item */
.priority-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.priority-item + .priority-item {
  border-top: var(--border-width-default) dashed var(--border);
}
.priority-item .priority-name {
  font-weight: var(--type-body-emphasis-weight);
  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: var(--space-1-5);
  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: var(--layout-sidebar-expanded-width);
  --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%
  );
}

/* Keep route-level content inside the application viewport. Shared tables
   reflow secondary fields and never add horizontal scroll containers. */
.q-page-container {
  overflow-x: clip;
}

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

/* Brand block */
.forge-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  padding: var(--space-0-5) var(--space-2) 18px;
  min-height: 48px;
  margin: 0 var(--space-1) var(--space-2);
  border-bottom: var(--border-width-default) solid color-mix(in srgb, var(--sidebar-border) 55%, transparent);
}
.forge-brand-mark {
  width: 22px;
  height: 32px;
  flex: 0 0 22px;
  border-radius: var(--radius-none);
  object-fit: contain;
}
.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: 22px;
  height: 32px;
  flex-basis: 22px;
}

/* Collapse toggle button — inline at right of brand row */
.forge-collapse-btn {
  flex-shrink: 0;
  margin-left: auto;
  border: var(--border-width-default) 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 {
  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: var(--space-1);
  padding: var(--space-0-5) 0 14px;
  margin: 0 0 var(--space-2);
}

/* Section label */
.forge-nav-section {
  font-size: var(--text-xs);
  font-weight: 650;
  text-transform: var(--type-label-transform);
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--sidebar-text-muted) 72%, var(--bg-sidebar));
  padding: 0 var(--space-3) 7px;
  margin-top: var(--space-2);
  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: var(--space-2);
  padding-top: 14px;
  border-top: var(--border-width-default) 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: var(--space-2-5);
  padding: var(--space-2) var(--space-3);
  min-height: 42px;
  border-radius: 7px;
  color: var(--sidebar-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  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: var(--space-2-5) 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: var(--type-body-emphasis-weight);
  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: var(--space-1);
  padding-bottom: var(--space-2-5);
  border-bottom: var(--border-width-default) solid var(--sidebar-border);
}
.forge-sidebar-footer {
  border-top: var(--border-width-default) solid color-mix(in srgb, var(--sidebar-border) 55%, transparent);
  padding: var(--space-2-5) var(--space-1) 0;
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.forge-user-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  padding: var(--space-2) var(--space-2);
  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: var(--font-weight-strong);
  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: var(--type-body-emphasis-weight);
  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: var(--space-2) 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: var(--space-1-5) 0 var(--space-0-5);
  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: var(--space-3);
  height: var(--forge-topbar-height);
  padding: 0 var(--space-5);
  background: var(--bg-topbar);
  border-bottom: var(--border-width-default) 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: var(--space-2);
  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: var(--space-1-5);
  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: var(--space-1) var(--space-1-5);
  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: var(--type-body-emphasis-weight);
  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-ask-label {
    display: none;
  }
  .forge-topbar-report-label {
    display: none;
  }
  .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;
  border: var(--border-width-default) 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-search-icon { display: none; }
.forge-topbar .forge-topbar-search-icon { display: none; }
.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 {
  gap: var(--space-2);
}
.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);
}
@media (max-width: 900px) {
  .forge-topbar-btn {
    width: var(--layout-mobile-topbar-action-inline-size);
    min-width: var(--layout-mobile-topbar-action-inline-size);
    padding: var(--space-0);
  }
}
.forge-topbar-kbd {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: var(--text-xs);
  background: var(--tint-slate);
  color: var(--text-secondary);
  border: var(--border-width-default) solid var(--border);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  padding: 1px var(--space-1-5);
  min-width: 18px;
  text-align: center;
}
@media (max-width: 900px) {
  .forge-topbar .forge-topbar-btn:not([data-forge-action="assistant-open"]):not([data-forge-action="user-feedback-open"]) { display: none; }
  .forge-topbar .forge-topbar-search-icon { display: inline-flex; }
  .forge-breadcrumb .current {
    max-width: var(--layout-mobile-breadcrumb-max-inline-size);
  }
}
/* ----------------------------------------------------------------------
 * 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: var(--space-1);
  flex-wrap: wrap;
}
.forge-page-trust-link {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: var(--type-body-emphasis-weight);
}
.forge-page-trust-link:hover {
  text-decoration: underline;
}
.forge-bell-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--border-width-default) 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-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: var(--font-weight-strong);
  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: var(--border-width-default) solid var(--border);
  border-left: 3px solid var(--border-cool, var(--border));
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  box-sizing: border-box;
}
.forge-since-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-1-5);
}
.forge-since-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-strong);
  text-transform: var(--type-label-transform);
  letter-spacing: var(--type-label-letter-spacing);
  color: var(--text-secondary);
}
.forge-since-link {
  font-size: var(--text-xs);
  font-weight: var(--type-body-emphasis-weight);
  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: var(--space-1);
}
.forge-since-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2-5);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: var(--type-supporting-line-height);
  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: var(--type-body-emphasis-weight);
}
.forge-since-meta,
.forge-since-affected {
  margin-left: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}
.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: var(--space-2-5);
  width: 100%;
  min-height: 36px;
  padding: var(--space-1-5) var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: var(--type-body-secondary-line-height);
  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: var(--font-weight-strong);
  text-transform: var(--type-label-transform);
  letter-spacing: var(--type-label-letter-spacing);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.forge-collapsed-headline {
  font-weight: var(--type-body-emphasis-weight);
  color: var(--text-primary);
}
.forge-collapsed-bullets {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  margin-left: var(--space-1);
}
/* 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: var(--border-width-default) 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;
}

@media (max-width: 700px) {
  .forge-product-workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .forge-product-navigation { border-right: 0; border-bottom: var(--border-width-default) solid var(--border-subtle); }
  .forge-product-rail { max-height: 220px; overflow: auto; }
  .forge-product-content { padding: var(--space-6) var(--space-4) var(--space-6); }
}

/* Obligation-work shortcuts stay available but secondary while reviewing Scope. */
.forge-product-rail--scope .forge-product-rail-heading--tracks {
  color: var(--text-secondary);
}
.forge-product-rail--scope .forge-product-regulation-link {
  color: var(--text-secondary);
  font-size: 12px;
}
