/* Conditions delivery matrix: preserves phase comparisons on desktop and readable workstreams on tablet and mobile. */
/* Keep the jump panel concise and readable within the narrow editorial side rail. */
.strategy-article__callout--delivery p { font-family: var(--font-body); font-size: var(--type-body); font-style: normal; line-height: 1.6; }
.delivery-matrix__jump { margin-top: var(--space-5); white-space: nowrap; width: 100%; box-sizing: border-box; justify-content: space-between; gap: var(--space-3); padding-inline: var(--space-4); }
.delivery-matrix__jump .icon { width: var(--arrow-icon-size); height: var(--arrow-icon-size); flex-shrink: 0; stroke-width: var(--arrow-stroke-width); }
#delivery-roadmap { scroll-margin-top: calc(var(--space-9) + var(--space-7)); }
/* Requested outcome colours are local to the matrix and match the supplied palette. */
.delivery-matrix { container-type: inline-size; --color-delivery-outcome: #2e7d52; --color-delivery-tint: var(--color-surface); width: var(--page-rail-width); margin: var(--space-8) auto var(--space-9); padding-top: var(--space-5); color: var(--color-text); }
.delivery-matrix__intro { max-width: none; margin-bottom: 0; padding-bottom: var(--space-9); }
/* Intro heading uses the requested page-specific green. */
.delivery-matrix__eyebrow { color: #2d7d52; font-size: calc(var(--type-eyebrow-size) * 3.5); letter-spacing: var(--type-eyebrow-letter-spacing); text-transform: uppercase; }
.delivery-matrix__intro h2 { color: var(--color-brand); font-family: var(--font-display); font-size: var(--type-heading-lg); line-height: 1.2; margin: var(--space-4) 0; }
.delivery-matrix__intro p { font-size: var(--type-body-lg); margin-top: var(--space-2); margin-bottom: 0; }
.delivery-matrix__intro .delivery-matrix__intro-note { max-width: none; width: 100%; font-size: var(--type-body); font-style: italic; margin-top: var(--space-5); overflow-wrap: break-word; }
.delivery-matrix__table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: var(--type-editorial-body-size); line-height: 1.65; }
.delivery-matrix__table caption { caption-side: bottom; text-align: left; padding-top: var(--space-5); font-size: var(--type-small); font-style: italic; }
.delivery-matrix__table th, .delivery-matrix__table td { padding: var(--space-5) var(--space-4); vertical-align: top; text-align: left; overflow-wrap: anywhere; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.delivery-matrix__table thead th { background: var(--color-brand); color: var(--color-text-inverse); font-weight: 500; }
.delivery-matrix__table thead th:first-child { width: 14%; background: var(--color-surface); color: var(--color-brand); }
.delivery-matrix__table thead th:last-child { width: 20%; }
.delivery-matrix__phase { display: block; margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-4)) var(--space-4); padding: var(--space-3) var(--space-4); background: var(--color-brand-accent); color: var(--color-text); }
.delivery-matrix__table thead strong { display: block; font-size: var(--type-body-lg); }
.delivery-matrix__phase-icon { display: block; width: var(--space-5); height: var(--space-5); stroke-width: var(--arrow-stroke-width); margin-bottom: var(--space-3); color: var(--color-text-inverse); }
.delivery-matrix__phase { font-family: var(--font-display); font-style: italic; color: var(--color-text-inverse); }
.delivery-matrix__months { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); font-size: var(--type-eyebrow-size); }
.delivery-matrix__months svg, .delivery-matrix__cell-label small svg { width: var(--space-4); height: var(--space-4); flex-shrink: 0; }
.delivery-matrix__table thead .delivery-matrix__outcome-heading { background: var(--color-delivery-outcome); }
.delivery-matrix__table tbody th { background: var(--color-surface-warm); color: var(--color-brand); }
.delivery-matrix__table tbody tr:first-child th,
.delivery-matrix__table tbody tr:nth-child(5) th { background: var(--color-surface); }
.delivery-matrix__table tbody tr:first-child th strong,
.delivery-matrix__table tbody tr:nth-child(5) th strong { font-weight: 500; }
.delivery-matrix__table tbody th span { display: block; margin-top: var(--space-2); font-weight: 400; }
/* Numbered model levels step outside the desktop grid; the requested cream is a page-specific art-direction colour. */
/* Model-level labels and numbers use the requested warm brown. */
.delivery-matrix__table tbody th.delivery-matrix__numbered { position: relative; color: #826f59; }
.delivery-matrix__table tbody th.delivery-matrix__numbered strong { font-size: calc(var(--type-body-lg) + 2px); font-weight: 500; }
.delivery-matrix__table tbody th.delivery-matrix__numbered { line-height: 1.4; }
.delivery-matrix__table thead strong,
.delivery-matrix__table thead .delivery-matrix__outcome-heading { line-height: 1.4; }
.delivery-matrix__number-circle { background: var(--color-surface); color: #826f59; display: flex; align-items: center; justify-content: center; width: var(--space-6); height: var(--space-6); box-sizing: border-box; border: 0; border-radius: var(--radius-round); font-style: italic; line-height: 1; }
.delivery-matrix__table tbody th .delivery-matrix__level-number { display: flex; align-items: center; justify-content: center; margin: 0; font-family: var(--font-display); font-size: var(--type-body-lg); background: #ead6b7; color: var(--color-brand); }
.delivery-matrix__table tbody tr:last-child th { background: var(--color-delivery-tint); color: var(--color-brand); }
.delivery-matrix__table tbody tr:last-child th strong { font-weight: 500; }
.delivery-matrix__outputs-icon { display: block; width: var(--space-5); height: var(--space-5); stroke-width: var(--arrow-stroke-width); margin-bottom: var(--space-4); color: var(--color-brand); }
.delivery-matrix__assets-icon { display: block; width: var(--space-5); height: var(--space-5); stroke-width: var(--arrow-stroke-width); margin-bottom: var(--space-4); color: var(--color-brand); }
.delivery-matrix__table td { background: var(--color-surface); }
.delivery-matrix__table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--color-surface-warm) 38%, var(--color-surface)); }
.delivery-matrix__table tbody tr:nth-child(3) td { background: color-mix(in srgb, var(--color-surface-warm) 38%, var(--color-surface)); }
.delivery-matrix__table p { margin: 0; font-size: var(--type-small); }
.delivery-matrix__table tbody tr:last-child .delivery-matrix__outcome p { font-size: var(--type-body-lg); line-height: 1.45; color: var(--color-delivery-outcome); }
/* Output cards float within their phase cells; the controller matches their natural heights after reflow. */
.delivery-matrix__table tbody tr:is(:last-child, :nth-child(5)) td:not(.delivery-matrix__outcome) p {
  font-weight: 500;
  color: var(--color-delivery-outcome);
  box-sizing: border-box;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
 .delivery-matrix__table tbody tr:is(:last-child, :nth-child(5)) td:not(.delivery-matrix__outcome) p + p { margin-top: var(--space-3); }
/* Round only the perimeter; internal comparison cells retain straight edges. */
@media (min-width: 641px) {
  .delivery-matrix__table thead th:nth-child(n+2):nth-child(-n+5)::after { content: ""; position: absolute; top: calc(100% - 1px); left: 50%; transform: translateX(-50%); width: var(--space-7); height: var(--space-3); background: var(--color-brand); clip-path: polygon(0 0, 100% 0, 50% 100%); z-index: 1; }
  /* Overlap pointers by one pixel and omit the header border to prevent a seam across their bases. */
  .delivery-matrix__table thead th:nth-child(n+2) { border-bottom: 0; }
  /* Decorative pointer connects the outcome header to its column below. */
  .delivery-matrix__outcome-heading::after { content: ""; position: absolute; top: calc(100% - 1px); left: 50%; transform: translateX(-50%); width: var(--space-7); height: var(--space-3); background: var(--color-delivery-outcome); clip-path: polygon(0 0, 100% 0, 50% 100%); z-index: 1; }
  .delivery-matrix__table tbody tr:first-child th,
  .delivery-matrix__table tbody tr:nth-child(5) th,
  .delivery-matrix__table tbody tr:last-child th { border-left: 1px solid var(--color-border); }
  .delivery-matrix__table tbody th .delivery-matrix__level-number { position: absolute; inset: 0 100% 0 auto; width: var(--space-7); box-sizing: border-box; align-items: flex-start; padding-top: var(--space-5); }
  .delivery-matrix__table tbody tr:nth-child(2) .delivery-matrix__level-number { border-top-left-radius: var(--radius-card); }
  .delivery-matrix__table tbody tr:nth-child(4) .delivery-matrix__level-number { border-bottom-left-radius: var(--radius-card); }
  /* Phase bands step above the shared header baseline without moving the end columns. */
  .delivery-matrix__table { margin-top: var(--space-9); }
  .delivery-matrix__table thead th { position: relative; }
  .delivery-matrix__phase { position: absolute; inset: auto 0 100%; margin: 0; }
  .delivery-matrix__table thead th:nth-child(2) .delivery-matrix__phase { border-top-left-radius: var(--radius-card); }
  .delivery-matrix__table thead th:nth-child(5) .delivery-matrix__phase { border-top-right-radius: var(--radius-card); }
  /* Two title lines keep phase dates aligned even when the fourth title wraps. */
  .delivery-matrix__table thead strong { min-height: 3.3em; }
  .delivery-matrix__table thead th:first-child { border-top-left-radius: var(--radius-card); border-top: 1px solid var(--color-border); border-left: 1px solid var(--color-border); }
  .delivery-matrix__table thead th:last-child { border-top-right-radius: var(--radius-card); }
  .delivery-matrix__table tbody tr:last-child th { border-bottom-left-radius: var(--radius-card); }
  .delivery-matrix__table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-card); }
}
.delivery-matrix__table .delivery-matrix__outcome { border-left: 0; }
.delivery-matrix__outcome svg { width: var(--space-5); height: var(--space-5); color: var(--color-delivery-outcome); margin-bottom: var(--space-3); }
.delivery-matrix__cell-label { display: none; }
/* Animate only after the observer exists; content remains readable without JavaScript. */
.delivery-matrix--motion [data-delivery-reveal] { transition: opacity var(--card-lift-duration) var(--motion-ease), transform var(--card-lift-duration) var(--motion-ease); }
.delivery-matrix--motion [data-delivery-reveal]:not(.is-visible) { opacity: 0; transform: translateY(var(--space-5)); }
@media (max-width: 640px) {
  .delivery-matrix__table { display: flex; flex-direction: column; }
  .delivery-matrix__table tbody { display: block; }
  .delivery-matrix__table caption { display: block; width: 100%; order: 1; }
  /* Explicit table roles in HTML retain relationships when CSS reflows rows. */
  .delivery-matrix__table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .delivery-matrix__table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-card); overflow: hidden; }
  .delivery-matrix__table tbody th { grid-column: 1 / -1; padding: var(--space-5); }
  .delivery-matrix__table tbody th .delivery-matrix__level-number { width: var(--space-7); height: var(--space-7); border-radius: var(--radius-sm); margin-bottom: var(--space-3); }
  .delivery-matrix__table tbody th strong { font-size: var(--type-body-lg); }
  .delivery-matrix__table td { padding: var(--space-5); }
  .delivery-matrix__cell-label { display: block; color: var(--color-brand); font-weight: 600; margin-bottom: var(--space-4); }
  .delivery-matrix__cell-label small { display: flex; align-items: center; gap: var(--space-2); font-weight: 400; margin-top: var(--space-1); }
  .delivery-matrix__table .delivery-matrix__outcome { grid-column: 1 / -1; border-left: 0; background: var(--color-surface-warm); }
}
@media (max-width: 640px) {
  .delivery-matrix__eyebrow { display: block; font-size: var(--type-heading-md); line-height: 1.3; }
  .delivery-matrix { margin-block: var(--space-7) var(--space-8); }
  .delivery-matrix__table tbody tr { grid-template-columns: minmax(0, 1fr); }
  .delivery-matrix__table { font-size: var(--type-editorial-body-mobile-size); }
  .delivery-matrix__table p { font-size: var(--type-editorial-body-size); }
}
@media (prefers-reduced-motion: reduce) {
  .delivery-matrix--motion [data-delivery-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
}

/* Both side panels share the soft outcome tint across every responsive layout. */
.delivery-matrix__table tbody tr td.delivery-matrix__outcome { background: var(--color-delivery-tint); }
.delivery-matrix__table tbody tr:last-child td { background: var(--color-delivery-tint); }
/* Asset and output cards use the requested slate. */
.delivery-matrix__table tbody tr:is(:nth-child(5), :last-child) td:not(.delivery-matrix__outcome) p { color: #33495e; }
/* Outcome cells retain the light surface; their copy and icons share the outcome green. */
.delivery-matrix__table .delivery-matrix__outcome p { font-size: var(--type-body); font-weight: 400; }
.delivery-matrix__table tbody tr td.delivery-matrix__outcome { background: var(--color-delivery-tint); color: var(--color-delivery-outcome); }
.delivery-matrix__table .delivery-matrix__outcome :is(p, svg, .delivery-matrix__cell-label),
.delivery-matrix__table tbody tr:last-child .delivery-matrix__outcome p { color: var(--color-delivery-outcome); }

/* Month ranges qualify the estimated duration in desktop and repeated mobile labels. */
.delivery-matrix__month-range { display: block; margin-top: var(--space-1); padding-left: calc(var(--space-4) + var(--space-2)); font-size: var(--type-eyebrow-size); font-weight: 400; line-height: 1.4; }

/* Preserve the complete comparison on tablets by scaling one desktop composition. */
.delivery-matrix--scaled .delivery-matrix__table { width: 1280px; margin-left: var(--space-7); zoom: var(--delivery-table-scale); }
@media (min-width: 641px) {
  @container (max-width: 1200px) {
    .delivery-matrix__table { width: 1280px; margin-left: var(--space-7); zoom: calc(100cqw / 1328px); }
  }
}
