@layer features {


/* ── QC Operation Process (scoped to .qc-op-doc) ── */
.qc-op-doc, .qc-op-doc *, .qc-op-doc *::before, .qc-op-doc *::after { box-sizing: border-box; }
.qc-op-doc { font-family: var(--font-family-sans); color: var(--color-text-primary); padding: 0; /* MODEC: removed bg + radius wrapper */ }
.qc-op-doc h1 { font-size: 18px; font-weight: var(--font-weight-medium); margin-bottom: 4px; }
.qc-op-doc .subtitle { font-size: var(--font-size-xs); color: var(--color-text-secondary); margin-bottom: 20px; }

.qc-op-doc .tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.qc-op-doc .tb { padding: 6px 16px; border-radius: 20px; border: 1px solid var(--color-border-default); background: transparent; color: var(--color-text-secondary); font-size: var(--font-size-xs); cursor: pointer; font-family: inherit; transition: all .15s; }
.qc-op-doc .tb.on { background: var(--color-text-primary); color: var(--color-text-inverse); border-color: var(--color-text-primary); }

.qc-op-doc .tc { display: none; }
.qc-op-doc .tc.on { display: block; }

.qc-op-doc .qnote { font-size: var(--font-size-xs); color: var(--color-text-secondary); margin-bottom: 12px; line-height: 1.6; }

.qc-op-doc .scroll { overflow-x: auto; }

.qc-op-doc .sw { display: grid; gap: 1px; background: var(--color-border-default); border: 1px solid var(--color-border-default); border-radius: var(--radius-lg); overflow: hidden; }

.qc-op-doc .sh { background: var(--color-border-subtle); padding: 7px 10px; font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--color-text-secondary); letter-spacing: .03em; text-transform: uppercase; }
.qc-op-doc .sr { background: var(--color-border-subtle); padding: 10px 9px; font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); line-height: 1.4; }
.qc-op-doc .sc { background: var(--color-bg-surface); padding: 9px 10px; font-size: var(--font-size-xs); color: var(--color-text-secondary); line-height: 1.5; vertical-align: top; }
.qc-op-doc .sc.a { border-left: 3px solid var(--rc, var(--color-text-secondary)); background: var(--color-bg-surface-alt); }
.qc-op-doc .ak { font-weight: var(--font-weight-semibold); font-size: var(--font-size-xs); color: var(--color-text-primary); line-height: 1.4; }
.qc-op-doc .an { font-size: var(--font-size-xs); color: var(--color-text-secondary); margin-top: 3px; line-height: 1.4; }

.qc-op-doc .bdg { display: inline-block; font-size: var(--font-size-xs); padding: 1px 6px; border-radius: var(--radius-md); margin-bottom: 4px; font-weight: var(--font-weight-semibold); letter-spacing: .02em; }
.qc-op-doc .ba { background: var(--color-info-bg); color: var(--color-text-link); }
.qc-op-doc .bs { background: var(--color-warning-bg); color: var(--color-warning-text); }
.qc-op-doc .bp { background: var(--color-success-bg); color: var(--color-success-text); }

.qc-op-doc .leg { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.qc-op-doc .li { display: flex; align-items: center; gap: 5px; font-size: var(--font-size-xs); color: var(--color-text-secondary); }
.qc-op-doc .ld { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

.qc-op-doc .qsec { font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); margin: 20px 0 6px; }
.qc-op-doc .qsec:first-of-type { margin-top: 0; }
.qc-op-doc .qsec-note { font-size: var(--font-size-xs); color: var(--color-text-secondary); margin: 0 0 10px; line-height: 1.6; }
.qc-op-doc .sc.ol { background: var(--color-border-subtle); color: var(--color-text-muted); font-style: italic; font-size: var(--font-size-xs); padding: 9px 10px; text-align: center; }

/* MUI-flat callout — single primitive used for all per-tab intro/warning
   banners across the QC Operation Process page. Subtle tinted background,
   no left-stripe ornament, comfortable padding. The `--warning` variant
   swaps to the yellow warning palette; default tone is info (green
   success palette to keep visual continuity with the previous design). */
.qc-op-doc .qc-op-callout {
  background: var(--color-success-bg);
  color: var(--color-text-primary);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: var(--font-size-xs);
  line-height: 1.6;
  margin: 0 0 12px;
}
/* Breathing room between the tab strip and the first callout that
   follows it (the "Reading the percentages" warning sits right after
   .ds-tabs on this page). */
.qc-op-doc .ds-tabs + .qc-op-callout { margin-top: 20px; }

/* The two main models (Pairing / Injection) keep the default blue accent.
   The three exception modes (Leave / Boost / Survival) use the warning/amber
   accent so the audience can tell "everyday model" from "special situation".
   A small "exceptions" divider separates the two groups in the tab strip. */
.qc-op-doc .qc-op-tabsep {
  align-self: center;
  margin: 0 2px 0 12px;
  padding-left: 14px;
  border-left: var(--border-width-1) solid var(--color-border);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-warning-700);
  user-select: none;
}
.qc-op-doc .ds-tab--exception:hover { background: rgba(255, 152, 0, 0.06); }
.qc-op-doc .ds-tab--exception.is-active {
  color: var(--c-warning-700);
  border-bottom-color: var(--c-warning-500);
}
.qc-op-doc .ds-tab--exception.is-active:hover { background: rgba(255, 152, 0, 0.08); }

/* Collapsible section — native <details>/<summary> with a chevron icon
   that rotates 90° when expanded. Used to group the per-mode capacity
   bars and the swimlane into two stacked collapsible blocks. */
.qc-op-doc .qc-op-section {
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  margin: 0 0 12px;
  overflow: hidden;
}
.qc-op-doc .qc-op-section > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.qc-op-doc .qc-op-section > summary::-webkit-details-marker { display: none; }
.qc-op-doc .qc-op-section > summary:hover { background: var(--color-bg-surface-alt); }
.qc-op-doc .qc-op-section__chevron {
  flex-shrink: 0;
  color: var(--color-text-secondary);
  transition: transform 150ms ease;
}
.qc-op-doc .qc-op-section[open] > summary .qc-op-section__chevron { transform: rotate(90deg); }
.qc-op-doc .qc-op-section__body { padding: 12px 14px; border-top: 1px solid var(--color-border-subtle); }
.qc-op-doc .qc-op-section__body > :first-child { margin-top: 0; }
.qc-op-doc .qc-op-section__body > :last-child { margin-bottom: 0; }
.qc-op-doc .qc-op-callout strong { font-weight: var(--font-weight-semibold); color: var(--color-success-text); }
.qc-op-doc .qc-op-callout--warning { background: var(--color-warning-bg); }
.qc-op-doc .qc-op-callout--warning strong { color: var(--color-warning-text); }

/* Compact diagram-reading hint — secondary copy that lives just above
   each swimlane. Smaller and lighter than the callouts above it. */
.qc-op-doc .qc-op-hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 12px;
}
.qc-op-doc .qc-op-hint strong { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }

/* Diagram legend row — modern flat bullets (no inline-styled spans). */
.qc-op-doc .qc-op-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
.qc-op-doc .qc-op-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.qc-op-doc .qc-op-legend-dot--start {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--color-text-primary);
}
.qc-op-doc .qc-op-legend-dot--end {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--color-bg-surface);
  border: 2px solid var(--color-text-primary);
}
.qc-op-doc .qc-op-legend-dash {
  width: 18px; height: 10px;
  border: 2px dashed var(--color-text-muted);
  border-radius: 2px;
}
.qc-op-doc .qc-op-legend-hint { color: var(--color-text-muted); }

/* Pre-existing .callout retained for backward compat (used by tab-end
   "Next step" callouts); flattened to match the new MUI look. */
.qc-op-doc .callout { background: var(--color-warning-bg); border-radius: var(--radius-md); padding: 10px 14px; font-size: var(--font-size-xs); color: var(--color-text-primary); line-height: 1.6; margin-top: 20px; }
.qc-op-doc .callout strong { font-weight: var(--font-weight-semibold); color: var(--color-warning-text); }

/* Workload-stack bars under each QC mode summary. Wider + taller than
   the original (1100/26 vs 600/20) so a typical 4-segment row reads
   without ellipsizing every label. */
.qc-op-doc .wl-wrap { margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; max-width: 1100px; }
.qc-op-doc .wl-row { display: flex; align-items: center; gap: 12px; }
.qc-op-doc .wl-label { font-size: 10.5px; color: var(--color-text-secondary); width: 160px; flex-shrink: 0; text-align: right; line-height: 1.3; }
/* QC name (the first line of the bar row label, wrapped in <strong>) —
 * bigger, primary text, semibold so the QC identifier reads as the
 * row's anchor while the descriptive subline below stays muted. */
.qc-op-doc .wl-label strong { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); display: inline-block; margin-bottom: 2px; }

.qc-op-doc .wl-bar { flex: 1; display: flex; align-items: stretch; border-radius: var(--radius-sm); overflow: hidden; min-height: 32px; background: var(--color-bg-surface-alt); }
.qc-op-doc .wl-seg { display: flex; align-items: center; justify-content: center; padding: 4px 8px; font-size: 11px; font-weight: var(--font-weight-medium); color: var(--color-text-inverse); line-height: 1.2; white-space: normal; overflow: hidden; text-align: center; word-break: break-word; }
/* MUI-flat chip aesthetic for workload-bar segments. The legacy markup
 * sets saturated role-color backgrounds inline (white text); we
 * override those inline backgrounds with soft tinted versions and use
 * a darker variant of the same hue for the text. `!important` is
 * needed only because the inline style would otherwise win. */
.qc-op-doc .wl-seg[style*="#1D9E75"] { background: rgba(29, 158, 117, 0.22) !important; color: #1a6b48 !important; font-weight: var(--font-weight-medium) !important; }   /* Anchor green / Project A */
.qc-op-doc .wl-seg[style*="#378ADD"] { background: rgba(55, 138, 221, 0.22) !important; color: #1f4f80 !important; font-weight: var(--font-weight-medium) !important; }   /* Shadow blue / Project B */
.qc-op-doc .wl-seg[style*="#D85A30"] { background: rgba(216, 90, 48, 0.22) !important; color: #7e3618 !important; font-weight: var(--font-weight-medium) !important; }    /* Injection orange */
.qc-op-doc .wl-seg[style*="#7F77DD"] { background: rgba(127, 119, 221, 0.24) !important; color: #4a45a3 !important; font-weight: var(--font-weight-medium) !important; }  /* QC Lead purple */
.qc-op-doc .wl-seg[style*="#888780"] { background: rgba(95, 94, 90, 0.14) !important; color: var(--color-text-secondary) !important; font-weight: var(--font-weight-medium) !important; }   /* Product/Dev neutral */
.qc-op-doc .wl-seg[style*="#e8e6de"] { background: var(--color-bg-surface-alt) !important; color: var(--color-text-muted) !important; font-weight: var(--font-weight-medium) !important; }  /* uncovered / available */

/* Exception decision branches inside swimlane cells. Click the chip
   to expand the alternate-path detail. */
.qc-op-doc .brn { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; padding: 2px 8px 2px 6px; background: var(--color-warning-bg); border: 1px solid var(--c-warning-500); border-radius: 9px; color: var(--color-warning-text); font-size: 9.5px; font-weight: var(--font-weight-semibold); cursor: pointer; line-height: 1.3; text-align: left; font-family: inherit; transition: background .12s; }
.qc-op-doc .brn::before { content: "⚠"; font-size: 9px; }
.qc-op-doc .brn:hover { background: #fde6d2; }
.qc-op-doc .brn[aria-expanded="true"] { background: #f7d29a; border-color: #d9941b; }
.qc-op-doc .brn-body { margin-top: 6px; padding: 6px 8px; background: #fff8ec; border-left: 2px solid var(--c-warning-500); border-radius: 0 4px 4px 0; font-size: 10.5px; line-height: 1.45; color: var(--color-text-secondary); }
.qc-op-doc .brn-body .brn-trg { color: var(--color-warning-text); font-weight: var(--font-weight-semibold); margin-bottom: 2px; }

/* BPMN-style flow swimlane (pilot: Steady mode). Horizontal lanes with
   activity boxes, decision diamonds, and labeled arrows. */
.qc-op-doc .qc-bpmn { width: 100%; overflow-x: auto; background: var(--color-bg-surface-alt); border: 1px solid var(--color-border-default); border-radius: var(--radius-lg); padding: 12px 8px; margin-bottom: 14px; }
.qc-op-doc .qc-bpmn svg { display: block; min-width: 1700px; }
/* Lane labels — medium weight (was semibold). Lighter feel + consistent
 * with the page-chrome typography in Noto Sans. */
.qc-op-doc .qc-bpmn .lane-label { font: var(--font-weight-medium) 11px var(--font-family-sans); fill: var(--color-text-primary); letter-spacing: .02em; text-transform: uppercase; }

/* All BPMN <text> uses Noto Sans (the page-chrome font) so the diagrams
 * read as one typographic family with the surrounding UI. Box titles
 * are unbolded from semibold→medium AND shrunk 12→11px so they fit the
 * 170px boxes in Noto Sans's wider glyph metrics. Subtitles stay at
 * the smaller 9.5px regular weight set inline on each <text>. */
.qc-op-doc .qc-bpmn .bx text,
.qc-op-doc .qc-bpmn .dc text,
.qc-op-doc .qc-bpmn .edge-labels text {
  font-family: var(--font-family-sans);
}
.qc-op-doc .qc-bpmn .bx text[font-weight="600"] {
  font-weight: var(--font-weight-medium);
  font-size: 11px;
}
.qc-op-doc .qc-bpmn .bx text[font-size="9.5"] {
  fill: var(--color-text-secondary);
}
/* Phase header labels (above each phase band) — drop semibold→medium. */
.qc-op-doc .qc-bpmn svg > text[font-weight="600"] {
  font-weight: var(--font-weight-medium);
}

/* MUI-flat refresh of the swimlane chrome. CSS overrides the inline
 * SVG presentation attributes so we don't have to touch every <rect>
 * across all 5 diagrams.
 *   - Softer 1.25px strokes (was 2px) — modern flat outline
 *   - More rounded corners (rx/ry 8) — MUI surface curvature
 *   - Subtle elevation on hover (filter: drop-shadow) — surface lift
 *   - Phase background bands toned down to 30-40% of their original
 *     intensity via attribute selectors targeting the known fills.
 *   - Lane role-stripe tints in the leftmost column also softened. */
.qc-op-doc .qc-bpmn .bx rect {
  stroke-width: 1.25;
  rx: 8;
  ry: 8;
  transition: filter 150ms ease, transform 150ms ease;
}
.qc-op-doc .qc-bpmn .bx:hover rect {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.10));
}
.qc-op-doc .qc-bpmn .dc polygon { stroke-width: 1.25; }
.qc-op-doc .qc-bpmn .bx rect, .qc-op-doc .qc-bpmn .dc polygon { cursor: default; }

/* Lighten the phase tints (these <rect>s are the wide horizontal bands
 * sitting under each phase). Original hex → low-opacity hue in the
 * same family. */
.qc-op-doc .qc-bpmn svg rect[fill="#eaf1f8"] { fill: rgba(63, 91, 255, 0.04); }     /* Test Planning  → primary @ 4% */
.qc-op-doc .qc-bpmn svg rect[fill="#fbf4e9"] { fill: rgba(241, 182, 71, 0.06); }    /* Test Execution → amber @ 6%   */
.qc-op-doc .qc-bpmn svg rect[fill="#ecf3ec"] { fill: rgba(63, 195, 128, 0.05); }    /* Test Closure   → success @ 5% */
.qc-op-doc .qc-bpmn svg rect[fill="#f7f6f1"] { fill: rgba(0, 0, 0, 0.02); }         /* Post-phase     → neutral @ 2% */

/* Lane role-stripe tints in the leftmost column — soften so the
 * 3px-wide colored stripe on the left edge becomes the dominant
 * lane indicator, with the bg tint as supporting context. */
.qc-op-doc .qc-bpmn svg rect[fill="#ede9dd"] { fill: rgba(95, 94, 90, 0.08); }      /* Product/Dev lane */
.qc-op-doc .qc-bpmn svg rect[fill="#e8e3f0"] { fill: rgba(127, 119, 221, 0.10); }   /* QC Lead lane row */
.qc-op-doc .qc-bpmn svg rect[fill="#dde9d8"] { fill: rgba(29, 158, 117, 0.10); }    /* Anchor lane row  */
.qc-op-doc .qc-bpmn svg rect[fill="#dee8f3"] { fill: rgba(55, 138, 221, 0.10); }    /* Shadow lane row  */
.qc-op-doc .qc-bpmn svg rect[fill="#f5d4c3"] { fill: rgba(216, 90, 48, 0.10); }     /* Injection lane row */
.qc-op-doc .qc-bpmn-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 10px; color: var(--color-text-secondary); padding-left: 4px; }
.qc-op-doc .qc-bpmn-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.qc-op-doc .qc-bpmn-legend .sw-line { display: inline-block; width: 24px; height: 0; border-top: 1.5px solid var(--color-text-secondary); }
.qc-op-doc .qc-bpmn-legend .sw-line.exc { border-top: 1.5px dashed #b54708; }
.qc-op-doc .qc-bpmn-legend .sw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fff8ec; border: 2px solid #d9941b; transform: rotate(45deg); }

/* Sprint-ceremony attendance panel that sits below a BPMN diagram. */
.qc-op-doc .qc-cer-panel { background: var(--color-bg-surface-alt); border: 1px solid var(--color-border-default); border-radius: var(--radius-md); padding: 12px 14px; margin-top: 14px; }
.qc-op-doc .qc-cer-title { font-size: 11px; font-weight: var(--font-weight-semibold); color: var(--color-text-primary); margin-bottom: 8px; letter-spacing: .03em; text-transform: uppercase; }
.qc-op-doc .qc-cer-table { width: 100%; border-collapse: collapse; font-size: 11px; line-height: 1.4; }
.qc-op-doc .qc-cer-table th { text-align: left; padding: 6px 8px; background: var(--color-border-subtle); color: var(--color-text-secondary); font-weight: var(--font-weight-semibold); font-size: 10px; letter-spacing: .03em; text-transform: uppercase; border: 1px solid var(--color-border-default); }
.qc-op-doc .qc-cer-table td { padding: 7px 8px; background: var(--color-bg-surface); color: var(--color-text-primary); border: 1px solid var(--color-border-default); vertical-align: top; }
.qc-op-doc .qc-cer-table .qc-cer-name { font-weight: var(--font-weight-semibold); }
.qc-op-doc .qc-cer-table .qc-cer-src { display: inline-block; font-size: 9px; color: var(--color-success-text); font-style: italic; margin-left: 2px; }
.qc-op-doc .qc-cer-table .qc-cer-proposed { color: var(--color-text-muted); font-style: italic; }
.qc-op-doc .qc-cer-foot { margin: 8px 0 0; font-size: 10.5px; color: var(--color-text-secondary); font-style: italic; line-height: 1.5; }


} /* end @layer features */
