/*
 * Cross-article shared CSS.
 *
 * Synced to apps/web-site/public/lib/assets/insights/_shared/styles.css.
 * Loaded on every article page that opts into the per-article CSS pipeline
 * (`custom_styles: true` in frontmatter). Currently contains:
 *   - .priorities-solution-visual          (shared with analytics-solution)
 *   - .opera-process / .opera-process__*   (process diagram used by
 *                                           priorities-solution + analytics-solution)
 *   - .opera-brainstorm / etc.             (other ≥2-article BEM blocks)
 * Promotion criterion is "two consumers" — promote a class here only when a
 * second article starts using it.
 */

/* ============ priorities-* shared (used by priorities-solution + analytics-solution) ============ */

.priorities-solution-visual {
  overflow: hidden;
}
.priorities-consensus {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.priorities-consensus__card {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.15rem 0;
}
.priorities-consensus__card--filtered {
  opacity: 0.4;
}
.priorities-consensus__rank {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.priorities-consensus__card-body {
  flex: 1;
  min-width: 0;
}
.priorities-consensus__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f8fbff;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}
.priorities-consensus__score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}
.priorities-consensus__score {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-muted);
}
.priorities-consensus__label {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  letter-spacing: 0.03em;
}
.priorities-consensus__label--strong {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}
.priorities-consensus__label--good {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.priorities-consensus__bar-bg {
  width: 100%;
  height: 0.4rem;
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.priorities-consensus__bar-fill {
  height: 100%;
  border-radius: 0.2rem;
  transition: width 0.6s ease;
}
.priorities-consensus__bar--strong {
  background: linear-gradient(90deg, #06b6d4, #8b5cf6);
}
.priorities-consensus__bar--good {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.priorities-consensus__voters {
  display: flex;
  gap: 0.3rem;
}
.priorities-consensus__voter-badge {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.priorities-consensus__divider {
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 0.25rem;
  margin-top: 0.1rem;
}
.priorities-consensus__divider-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(193, 203, 225, 0.5);
  letter-spacing: 0.03em;
}
.priorities-heatmap {
  /* Allow the table inside to scroll horizontally on narrow viewports
   * instead of growing the page width past the viewport. The
   * border-radius rounds the outer edge of the whole grid; cells
   * inside are unrounded so they merge into a single coherent grid
   * instead of looking like detached chips. */
  overflow-x: auto;
  max-width: 100%;
  border-radius: 0.5rem;
}
.priorities-heatmap__table {
  width: 100%;
  border-collapse: collapse;
}
.priorities-heatmap__header-cell {
  padding: 0.65rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  color: #c493dd;
  background: transparent;
}
.priorities-heatmap__header-cell:first-child {
  text-align: left;
}
.priorities-heatmap__row-label {
  padding: 0.6rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8fbff;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.02);
  /* No display: flex here — applying flex to a <td> creates an
   * anonymous table cell wrapper around it, so the cell stops
   * stretching to the row height. Use inline-block + vertical-align
   * on the dot instead to preserve table-cell layout. */
}
.priorities-heatmap__dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}
.priorities-heatmap__score-cell {
  padding: 0.65rem 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: #f8fbff;
}
.priorities-consensus__name {
  color: var(--color-text);
}
.priorities-consensus__bar-bg {
  background: rgba(0, 0, 0, 0.06);
}
.priorities-consensus__divider {
  border-top-color: rgba(0, 0, 0, 0.12);
}
.priorities-consensus__divider-label {
  color: var(--color-text-muted);
}
.priorities-heatmap__row-label {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.02);
}
.priorities-heatmap__score-cell {
  color: var(--color-text);
}
[data-theme="dark"] .priorities-heatmap__row-label {
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.02);
}

/* ============ decision-space-* shared (used by defining-your-decision-space + analytics-solution) ============ */

.decision-space-visual {
  overflow: hidden;
}

.decision-space-visual--fanout {
  padding-top: 0.45rem;
}

.decision-space-visual--fanout .outcome-visual__title {
  margin-bottom: 0.65rem;
  text-align: center;
}

.decision-space-fanout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 13rem) 3rem minmax(0, 1fr);
  gap: 1.15rem;
  align-items: center;
  padding: 0.35rem 0;
}

.decision-space-fanout__entry {
  display: grid;
  gap: 0.6rem;
}

.decision-space-fanout__outcome {
  width: 100%;
  min-height: 3.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #95a7d8 0%, #7b8fc2 58%, #6678aa 100%);
  color: #f8fbff;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 16px 30px rgba(17, 24, 39, 0.16);
}

.decision-space-fanout__entry-note {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c493dd;
  text-align: center;
}

.decision-space-fanout__junction {
  position: relative;
  align-self: stretch;
  min-height: 14rem;
}

.decision-space-fanout__junction-line {
  position: absolute;
  top: 50%;
  left: -0.35rem;
  right: 0.95rem;
  height: 0.18rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(149, 167, 216, 0.88), rgba(149, 167, 216, 0.55));
}

.decision-space-fanout__junction-dot {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  width: 0.95rem;
  height: 0.95rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(135deg, #95a7d8 0%, #b58bd5 100%);
  box-shadow: 0 0 0 0.22rem rgba(149, 167, 216, 0.18);
}

.decision-space-fanout__junction-branch {
  position: absolute;
  top: 1.2rem;
  bottom: 1.2rem;
  right: 1rem;
  width: 0.16rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(149, 167, 216, 0.36), rgba(149, 167, 216, 0.92) 38%, rgba(181, 139, 213, 0.44));
}

.decision-space-fanout__routes {
  display: grid;
  gap: 0.85rem;
}

.decision-space-route {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}

.decision-space-route__line {
  display: block;
  width: 100%;
  height: 0.18rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(149, 167, 216, 0.88), rgba(181, 139, 213, 0.52));
  position: relative;
}

.decision-space-route__line::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.02rem;
  width: 0.56rem;
  height: 0.56rem;
  border-top: 0.13rem solid rgba(193, 203, 225, 0.94);
  border-right: 0.13rem solid rgba(193, 203, 225, 0.94);
  transform: translateY(-50%) rotate(45deg);
}

.decision-space-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(129, 164, 212, 0.18);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.08);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: #f8fbff;
}

.decision-space-option--north {
  color: #76d6da;
}

.decision-space-option--northeast {
  color: #aebdf0;
}

.decision-space-option--southwest {
  color: #7ddae2;
}

.decision-space-option--south {
  color: #c8a1e8;
}

@media (max-width: 960px) {
  .decision-space-fanout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .decision-space-fanout__junction {
    min-height: 0;
    height: 2.6rem;
  }

  .decision-space-fanout__junction-line {
    left: 1rem;
    right: 1rem;
  }

  .decision-space-fanout__junction-dot {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
  }

  .decision-space-fanout__junction-branch {
    display: none;
  }

  .decision-space-fanout__routes {
    gap: 0.7rem;
  }

  .decision-space-route {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .decision-space-route__line {
    flex: 0 0 40%;
  }

  .decision-space-option {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0.75rem 1.2rem;
  }
}

@media (max-width: 640px) {
  .decision-space-fanout__junction {
    height: 2.2rem;
  }

  .decision-space-route__line {
    flex: 0 0 30%;
  }
}

/* ============ outcome-* shared (used by 4 articles: defining-your-decision-space, analytics-solution, priorities-solution, outcome-solution) ============ */

.outcome-visual {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid rgba(108, 166, 224, 0.2);
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 92%, white 8%), color-mix(in srgb, var(--color-bg) 95%, white 5%));
  box-shadow: 0 24px 50px rgba(20, 33, 61, 0.08);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.outcome-visual.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.outcome-visual__frame {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.outcome-visual__flow {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.outcome-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border-radius: 0.95rem;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  color: #fff;
  box-shadow: 0 12px 24px rgba(31, 41, 55, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.outcome-token.is-active {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(31, 41, 55, 0.16);
  filter: saturate(1.05) brightness(1.02);
}

.outcome-token--verb {
  background: linear-gradient(135deg, #66c7cb 0%, #56b4b8 55%, #469ca3 100%);
}

.outcome-token--deliverable {
  background: linear-gradient(135deg, #95a7d8 0%, #7b8fc2 58%, #6678aa 100%);
}

.outcome-token--impact {
  background: linear-gradient(135deg, #b58bd5 0%, #a07dc0 58%, #8b69ab 100%);
}

.outcome-visual__caption {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.insights-article .outcome-visual__caption-note {
  margin: -0.35rem 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 600;
  text-align: center;
  color: #5f4f77;
  opacity: 0.96;
}

[data-theme="dark"] .insights-article .outcome-visual__caption-note {
  color: #dcd6ee;
}

.outcome-visual__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.outcome-visual__title--compact {
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
}

.outcome-elements {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 0.6rem;
  row-gap: 1.2rem;
  align-items: start;
}

.outcome-elements__label {
  align-self: start;
  margin-top: 0.76rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #c493dd;
  white-space: nowrap;
}

.outcome-elements__token-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.outcome-elements__token-slot .outcome-token {
  min-width: min(100%, 10rem);
  width: 100%;
  max-width: 11rem;
}

.outcome-token--long {
  min-width: clamp(11rem, 17vw, 13.5rem);
  max-width: clamp(11rem, 17vw, 13.5rem);
  white-space: normal;
}

.outcome-token--undefined-impact {
  position: relative;
  color: rgba(248, 251, 255, 0.88);
  filter: saturate(0.82) brightness(1.02);
}

.outcome-token--undefined-impact::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  top: 50%;
  height: 0.18rem;
  border-radius: 9999px;
  background: rgba(248, 251, 255, 0.95);
  transform: translateY(-50%) rotate(-6deg);
  box-shadow: 0 0 0 1px rgba(116, 78, 149, 0.18);
}

.outcome-elements__plus {
  align-self: start;
  justify-self: center;
  margin-top: 1rem;
  color: #888;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.outcome-elements__brace {
  display: block;
  width: calc(100% - 1.25rem);
  max-width: 8.75rem;
  min-width: 5.75rem;
  height: 1.1rem;
  color: rgba(188, 196, 229, 0.88);
}

.outcome-elements__brace path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.outcome-column--elements {
  margin-top: -0.1rem;
  padding: 0.85rem 0.15rem 0 0.55rem;
  border-left: none;
}

.outcome-elements > .outcome-column--verb {
  grid-column: 2;
  padding-left: 0;
  padding-right: 0.15rem;
  border-left: none;
}

.outcome-elements > .outcome-column--deliverable {
  grid-column: 4;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(224, 224, 224, 0.95);
}

.outcome-elements > .outcome-column--impact {
  grid-column: 6;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(224, 224, 224, 0.95);
}

/* Mobile: stack the outcome elements vertically. The desktop 6-column grid
 * (label + 3 token-slot / "+" alternation) collapses to one column. Each
 * token slot is immediately followed by its column-text, with "+" between
 * the three blocks. `order` reorders the DOM-ordered children so the visual
 * sequence reads: label, verb, verb-text, +, deliverable, deliverable-text,
 * +, impact, impact-text. */
@media (max-width: 640px) {
  .outcome-elements {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    row-gap: 0.5rem;
  }
  .outcome-elements__label {
    margin-top: 0;
    text-align: center;
  }
  .outcome-elements__token-slot .outcome-token {
    max-width: 16rem;
  }
  .outcome-elements__plus {
    margin: 0.2rem auto 0;
    justify-self: center;
  }
  .outcome-elements > .outcome-column--verb,
  .outcome-elements > .outcome-column--deliverable,
  .outcome-elements > .outcome-column--impact {
    grid-column: 1;
    padding: 0 0.5rem;
    border-left: none;
    text-align: center;
  }
  .outcome-elements__label                         { order: 1; }
  .outcome-elements__token-slot--verb              { order: 2; }
  .outcome-elements > .outcome-column--verb        { order: 3; }
  .outcome-elements__plus--first                   { order: 4; }
  .outcome-elements__token-slot--deliverable       { order: 5; }
  .outcome-elements > .outcome-column--deliverable { order: 6; }
  .outcome-elements__plus--second                  { order: 7; }
  .outcome-elements__token-slot--impact            { order: 8; }
  .outcome-elements > .outcome-column--impact      { order: 9; }
}

.outcome-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.outcome-column {
  padding: 1rem 1.05rem;
  border-left: 1px solid rgba(224, 224, 224, 0.95);
}

.outcome-column:first-child {
  border-left: none;
}

.outcome-column h4 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
}

.outcome-column p,
.outcome-visual__lede {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.outcome-token--placeholder-impact {
  background:
    linear-gradient(135deg, rgba(181, 139, 213, 0.14) 0%, rgba(160, 125, 192, 0.12) 58%, rgba(139, 105, 171, 0.14) 100%);
  color: rgba(196, 147, 221, 0.95);
  box-shadow: inset 0 0 0 1.5px rgba(196, 147, 221, 0.7);
  filter: none;
}

.outcome-token--placeholder-deliverable {
  position: relative;
  background:
    linear-gradient(135deg, rgba(149, 167, 216, 0.16) 0%, rgba(123, 143, 194, 0.12) 58%, rgba(102, 120, 170, 0.14) 100%);
  color: rgba(167, 184, 234, 0.95);
  box-shadow: inset 0 0 0 1.5px rgba(149, 167, 216, 0.75);
  filter: none;
}

.outcome-token--placeholder-deliverable::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 50%;
  height: 0.16rem;
  border-radius: 9999px;
  background: rgba(167, 184, 234, 0.92);
  transform: translateY(-50%) rotate(-6deg);
}

.outcome-token--placeholder-impact::after {
  left: 1rem;
  right: 1rem;
  height: 0.16rem;
  background: rgba(196, 147, 221, 0.9);
  box-shadow: none;
}

.outcome-visual--case-study {
  padding-block: 1.2rem;
}

.outcome-visual--case-study-challenge {
  margin-top: 0.9rem;
  margin-bottom: 1.1rem;
}

.outcome-visual--case-study-shift {
  margin-top: 0.9rem;
}

.outcome-visual--case-study-challenge-team {
  padding-top: 0.95rem;
}

.outcome-visual--team-flow {
  padding-block: 1.35rem;
}

.outcome-visual--team-sequence {
  padding: 1rem 1.15rem;
}

.outcome-column--verb h4 {
  color: #56b4b8;
}

.outcome-column--deliverable h4 {
  color: #7b8fc2;
}

.outcome-column--impact h4 {
  color: #a07dc0;
}

/* ============ Shared Process Diagram (.opera-process) ============ */
/* Used by analytics-solution, priorities-solution, and risk-solution. */
/* Mirrors the Paper artboard "From Surfacing to Filtering" layout. */
/* Per-step color is opt-in via inline `--step-color` on `.opera-process__left`. */

.opera-process {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Row: badge column (52px) + body column. No per-row rail — the rail is
   a single absolutely-positioned element on `.opera-process__steps` so it
   can start at badge 1's bottom and end at badge 5's top. */
.opera-process__row {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.375rem 0;
  position: relative;
}

.opera-process__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 800;
  color: #17223a;
  justify-self: center;
  position: relative;
  z-index: 1;
}

/* Body: single bordered slab holding name + description, with an
   internal vertical divider between them. Paper artboard tokens:
   140px name col, 12/16 padding, #FFFFFF0A surface, #FFFFFF14 border. */
.opera-process__body {
  display: grid;
  grid-template-columns: 8.75rem 1fr;
  align-items: stretch;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  overflow: hidden;
}

.opera-process__name {
  display: flex;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  padding: 0.75rem 1rem;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

.opera-process__desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  padding: 0.75rem 1rem;
}

/* Inter-step connector removed in favor of the rail on `__steps`;
   this rule hides any legacy connector markup still emitted by older builds. */
.opera-process__connector {
  display: none;
}

/* Bookend rows — sit outside the bordered steps box */
.opera-process__bookend-row {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.65rem 0;
}

.opera-process__bookend {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 2px solid;
}

.opera-process__bookend--priority {
  border-color: rgba(176, 106, 255, 0.45);
  background: rgba(176, 106, 255, 0.08);
}

.opera-process__bookend--analytic {
  border-color: rgba(200, 200, 200, 0.4);
  background: rgba(200, 200, 200, 0.06);
}

.opera-process__bookend--priority .opera-process__bookend-label {
  color: #b06aff;
}

.opera-process__bookend--analytic .opera-process__bookend-label {
  color: #999;
}

.opera-process__bookend-label {
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.opera-process__bookend-desc {
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  padding-left: 1rem;
}

/* Steps container — bordered box that wraps the step rows. The vertical
   rail bridges between badge 1 (bottom) and badge N (top). Top/bottom
   distances are derived from row geometry:
     container top padding (0.625rem) + row top padding (0.375rem) + badge (2.25rem) = 3.25rem
   So the rail begins at the bottom edge of badge 1 (3.25rem from top)
   and ends symmetrically at the top edge of badge N (3.25rem from bottom). */
.opera-process__steps {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.015);
  padding: 0.625rem 0.75rem;
}

.opera-process__steps::before {
  content: "";
  position: absolute;
  top: 3.25rem;
  bottom: 3.25rem;
  left: calc(0.75rem + 1.625rem - 0.75px);
  width: 1.5px;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

@media (max-width: 720px) {
  .opera-process__body {
    grid-template-columns: 1fr;
  }

  .opera-process__name {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: normal;
  }

  .opera-process__bookend-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .opera-process__bookend-desc {
    border-left: none;
    padding-left: 0.5rem;
  }

  .opera-process__steps {
    padding: 0.35rem 0.5rem;
  }
}

[data-theme="dark"] .opera-process__steps::before {
  background: rgba(255, 255, 255, 0.16);
}

/* Mobile rail: the single-container rail (`__steps::before`) uses fixed
 * top/bottom offsets calibrated to desktop's compact row heights. When
 * descriptions wrap to many lines on narrow viewports, those offsets no
 * longer align with badge centers. Replace with per-row segments that
 * follow each badge's actual position. First row's segment starts at its
 * badge center; last row's ends at its badge center. */
@media (max-width: 720px) {
  .opera-process__steps::before {
    display: none;
  }
  .opera-process__row::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(1.625rem - 0.75px);
    width: 1.5px;
    background: rgba(0, 0, 0, 0.18);
    pointer-events: none;
    z-index: 0;
  }
  .opera-process__row:first-child::before {
    top: 50%;
  }
  .opera-process__row:last-child::before {
    bottom: 50%;
  }
  [data-theme="dark"] .opera-process__row::before {
    background: rgba(255, 255, 255, 0.16);
  }
}
[data-theme="dark"] .opera-process__body {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .opera-process__name {
  color: #f8fbff;
  border-right-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .opera-process__bookend-desc {
  border-left-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .opera-process__steps {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
[data-theme="dark"] .opera-process__bookend--priority {
  border-color: rgba(176, 106, 255, 0.35);
  background: rgba(176, 106, 255, 0.08);
}
[data-theme="dark"] .opera-process__bookend--analytic {
  border-color: rgba(224, 224, 224, 0.2);
  background: rgba(224, 224, 224, 0.04);
}
[data-theme="dark"] .opera-process__bookend--analytic .opera-process__bookend-label {
  color: #ccc;
}

/* ============ Shared Brainstorm (.opera-brainstorm) ============ */
/* Used by priorities-solution and risk-solution. Mirrors Paper's
   "Brainstorm" artboard: card grid with a per-contributor accent strip
   on top, body text, and a small badge in the bottom-right corner.
   Per-card accent is passed via `--accent` inline style. */

.opera-brainstorm {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.opera-brainstorm__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.opera-brainstorm__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0.95rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 3px solid var(--accent, #95a7d8);
  min-height: 6.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.opera-brainstorm__card:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 1;
}

.opera-brainstorm__card-id {
  position: absolute;
  top: 0.55rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.opera-brainstorm__card-text {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  padding-right: 1.5rem;
  margin: 0;
}

.opera-brainstorm__card-badge {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  border: 1px solid;
  margin-top: auto;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.opera-brainstorm__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.opera-brainstorm__legend-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.opera-brainstorm__legend-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.opera-brainstorm__legend-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  border: 1px solid;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.opera-brainstorm__legend-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.opera-brainstorm__legend-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
}

.opera-brainstorm__legend-role {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

@media (max-width: 720px) {
  .opera-brainstorm__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .opera-brainstorm__grid {
    grid-template-columns: 1fr;
  }
}

/* Scroll-triggered pop-in animation. Cards opt in by adding the
   `.opera-brainstorm__card--anim` class and the JS adds/removes
   `.opera-brainstorm__card--hidden` / `.opera-brainstorm__card--revealed`.
   The per-card rotation (`--rot`) is preserved through every keyframe so
   the sticky-note tilt survives the pop-in. */
.opera-brainstorm__card--anim.opera-brainstorm__card--hidden {
  opacity: 0;
  transform: scale(0.85) translateY(20px) rotate(0deg);
}

.opera-brainstorm__card--anim.opera-brainstorm__card--revealed {
  animation: operaBrainstormPop 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes operaBrainstormPop {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(20px) rotate(0deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.06) translateY(-3px) rotate(calc(var(--rot, 0deg) * 1.15));
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(var(--rot, 0deg));
  }
}

[data-theme="dark"] .opera-brainstorm__card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .opera-brainstorm__card-text {
  color: #f8fbff;
}
[data-theme="dark"] .opera-brainstorm__legend {
  border-top-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .opera-brainstorm__legend-name {
  color: #f8fbff;
}

/* sync-trigger: 2026-05-27T17:30 post-migration consolidation */
