/*=====================================================*/
/*  OPERATIONAL OUTCOMES — page styles                 */
/*  Depends on assets/css/ai/common.css                */
/*=====================================================*/

/*-----------------------------------*/
/* HERO — THE PRIORITY STACK         */
/* The day's insights as a physical  */
/* stack: the one that matters most  */
/* is on top, the rest wait behind   */
/* it. Cards share one grid cell, so */
/* the stack sizes to its tallest    */
/* card instead of a magic height.   */
/*-----------------------------------*/
.oco-stack {
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ai-line-dark);
  border-radius: 18px;
  box-shadow: 0 4px 0 0 var(--ai-primary), 0 30px 60px rgba(0, 0, 0, 0.35);
}

.oco-stack__head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  font-family: var(--ai-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* On the label itself, not inherited — the live theme styles spans directly
   and a direct declaration always beats an inherited one */
.oco-stack__head span {
  font-family: var(--ai-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.oco-stack__head i,
.oco-stack__head svg {
  width: 15px;
  height: 15px;
  color: var(--ai-primary);
  stroke-width: 2.4;
  flex-shrink: 0;
}

.oco-stack__cards {
  display: grid;
  /* Room for the cards sitting behind the top one */
  padding-bottom: 46px;
}

.oco-card {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 20px;
  background: #FFF;
  border: 1px solid var(--ai-line);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transform-origin: top center;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.6s ease;
}

/* Source order is the starting arrangement, so the stack is already correct on
   first paint rather than four cards flat on top of each other for a frame.
   The [data-depth] rules below take over the moment the script runs. */
.oco-card:nth-child(1) {
  transform: translateY(0) scale(1);
  opacity: 1;
  z-index: 4;
}

.oco-card:nth-child(2) {
  transform: translateY(16px) scale(0.955);
  opacity: 0.62;
  z-index: 3;
}

.oco-card:nth-child(3) {
  transform: translateY(31px) scale(0.91);
  opacity: 0.34;
  z-index: 2;
}

.oco-card:nth-child(4) {
  transform: translateY(45px) scale(0.865);
  opacity: 0.15;
  z-index: 1;
}

/* Depth is assigned by the page script; 0 is the card on top */
.oco-card[data-depth="0"] {
  transform: translateY(0) scale(1);
  opacity: 1;
  z-index: 4;
}

.oco-card[data-depth="1"] {
  transform: translateY(16px) scale(0.955);
  opacity: 0.62;
  z-index: 3;
}

.oco-card[data-depth="2"] {
  transform: translateY(31px) scale(0.91);
  opacity: 0.34;
  z-index: 2;
}

.oco-card[data-depth="3"] {
  transform: translateY(45px) scale(0.865);
  opacity: 0.15;
  z-index: 1;
}

.oco-card__top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.oco-card__rank {
  font-family: var(--ai-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ai-primary-deep);
}

.oco-card__fn {
  padding: 3px 9px;
  background: var(--ai-cream);
  border: 1px solid var(--ai-line);
  border-radius: 999px;
  font-family: var(--ai-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ai-muted);
}

.oco-card__impact {
  margin-left: auto;
  font-family: var(--ai-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ai-muted);
  white-space: nowrap;
}

.oco-card__impact--high {
  color: var(--ai-primary-deep);
}

.oco-card h3 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ai-ink);
}

.oco-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55 !important;
  color: var(--ai-muted);
}

.oco-card__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ai-line);
  font-family: var(--ai-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ai-muted);
}

.oco-card__meter {
  width: 54px;
  height: 5px;
  flex-shrink: 0;
  background: var(--ai-line);
  border-radius: 999px;
  overflow: hidden;
}

.oco-card__meter b {
  display: block;
  width: var(--oco-w, 50%);
  height: 100%;
  background: var(--ai-primary);
  border-radius: 999px;
}

/*----------------------------*/
/* LEARN BAND SPACING         */
/*----------------------------*/
.oco-learn-section {
  padding-bottom: 0;
}

/*-----------------------------------*/
/* HORIZONTAL PIPELINE               */
/* The monitoring chain, laid out    */
/* across rather than down — the     */
/* vertical .ai-flow further down    */
/* this page carries the longer one. */
/*-----------------------------------*/
.oco-pipe {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  max-width: 1000px;
  margin: 0 auto 72px;
}

.oco-pipe__node {
  position: relative;
  display: flex;
  flex: 1 1 168px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 16px 14px;
  background: #FFF;
  border: 1px solid var(--ai-line);
  border-radius: 13px;
  font-family: var(--ai-heading);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--ai-ink);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.oco-pipe__node:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--ai-primary-rgb), 0.45);
  box-shadow: 0 14px 30px rgba(20, 20, 20, 0.07);
}

.oco-pipe__node i,
.oco-pipe__node svg {
  width: 18px;
  height: 18px;
  color: var(--ai-primary-deep);
  stroke-width: 2.1;
  flex-shrink: 0;
}

/* Connector between nodes, drawn on the gap */
.oco-pipe__node+.oco-pipe__node::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-top: 2px solid rgba(var(--ai-primary-rgb), 0.55);
  border-right: 2px solid rgba(var(--ai-primary-rgb), 0.55);
  transform: rotate(45deg);
}

/* The output of the chain carries the accent */
.oco-pipe__node--key {
  background: var(--ai-ink);
  border-color: var(--ai-ink);
  color: #FFF;
  box-shadow: 0 4px 0 0 var(--ai-primary);
}

.oco-pipe__node--key i,
.oco-pipe__node--key svg {
  color: var(--ai-primary);
}

.oco-pipe__node--key:hover {
  border-color: var(--ai-ink);
  box-shadow: 0 4px 0 0 var(--ai-primary), 0 14px 30px rgba(20, 20, 20, 0.14);
}

/*-----------------------------------*/
/* ANATOMY OF AN INSIGHT             */
/* The page's centrepiece: one real  */
/* insight taken apart into the four */
/* questions every insight answers.  */
/*-----------------------------------*/
.oco-anatomy {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: 60px;
}

.oco-anatomy__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.oco-anatomy__intro h3 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ai-ink);
}

.oco-anatomy__intro p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.7 !important;
  color: var(--ai-muted);
}

.oco-anatomy__card {
  background: #FFF;
  border: 1px solid var(--ai-line);
  border-radius: 18px;
  box-shadow: 0 4px 0 0 var(--ai-primary), 0 22px 46px rgba(20, 20, 20, 0.08);
  overflow: hidden;
}

.oco-anatomy__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  background: var(--ai-ink);
  font-family: var(--ai-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.oco-anatomy__bar span {
  font-family: var(--ai-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.oco-anatomy__bar i,
.oco-anatomy__bar svg {
  width: 16px;
  height: 16px;
  color: var(--ai-primary);
  stroke-width: 2.4;
  flex-shrink: 0;
}

.oco-anatomy__bar em {
  margin-left: auto;
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--ai-mono);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ai-primary);
}

.oco-anatomy__band {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 20px 24px;
  border-top: 1px solid var(--ai-line);
  opacity: 0;
  translate: 0 10px;
  transition: opacity 0.5s ease, translate 0.5s ease, background 0.3s ease;
}

.oco-anatomy__band:first-of-type {
  border-top: 0;
}

.oco-anatomy__band.is-in {
  opacity: 1;
  translate: 0 0;
}

.oco-anatomy__band:hover {
  background: rgba(var(--ai-primary-rgb), 0.035);
}

.oco-anatomy__q {
  font-family: var(--ai-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--ai-primary-deep);
}

.oco-anatomy__band p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6 !important;
  color: var(--ai-ink-soft);
}

/* The band that turns an observation into work */
.oco-anatomy__band--next {
  background: rgba(var(--ai-primary-rgb), 0.06);
  box-shadow: inset 3px 0 0 0 var(--ai-primary);
}

.oco-anatomy__band--next:hover {
  background: rgba(var(--ai-primary-rgb), 0.09);
}

.oco-anatomy__band--next p {
  font-family: var(--ai-heading);
  font-weight: 700;
  color: var(--ai-ink);
}

/*----------------------------*/
/* INSIGHT TYPES              */
/*----------------------------*/
.oco-types {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.oco-type {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 20px;
  background: #FFF;
  border: 1px solid var(--ai-line);
  border-radius: 15px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.oco-type:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--ai-primary-rgb), 0.5);
  box-shadow: 0 4px 0 0 rgba(var(--ai-primary-rgb), 0.35), 0 18px 38px rgba(20, 20, 20, 0.08);
}

.oco-type__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--ai-cream);
  border: 1px solid var(--ai-line);
  border-radius: 12px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.oco-type:hover .oco-type__icon {
  background: rgba(var(--ai-primary-rgb), 0.1);
  border-color: rgba(var(--ai-primary-rgb), 0.4);
}

.oco-type__icon i,
.oco-type__icon svg {
  width: 20px;
  height: 20px;
  color: var(--ai-primary-deep);
  stroke-width: 2;
}

.oco-type h3 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--ai-ink);
  transition: color 0.2s ease;
}

.oco-type:hover h3 {
  color: var(--ai-primary-deep);
}

.oco-type__fn {
  margin-top: auto;
  font-family: var(--ai-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ai-muted);
}

.oco-types__note {
  max-width: 700px;
  margin: 36px auto 0 !important;
  text-align: center;
  font-family: var(--ai-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6 !important;
  color: var(--ai-ink);
}

/*----------------------------*/
/* DELIVERED WHERE THEY WORK  */
/*----------------------------*/
.oco-allows__note {
  max-width: 740px;
  margin: 32px auto 56px !important;
  text-align: center;
  font-size: 16.5px;
  line-height: 1.7 !important;
  color: var(--ai-muted);
}

.oco-compare {
  background: #FFF;
}

.oco-quoteband {
  margin-top: 64px;
}

/*----------------------------*/
/* FROM DATA TO DECISIONS     */
/*----------------------------*/
.ai-page .oco-questions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 840px;
  margin: 0 auto 60px !important;
}

.oco-questions li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ai-line-dark);
  border-radius: 14px;
  font-family: var(--ai-heading);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.4;
  color: #FFF;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.oco-questions li:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(var(--ai-primary-rgb), 0.5);
}

.oco-questions li i,
.oco-questions li svg {
  width: 21px;
  height: 21px;
  color: var(--ai-primary);
  stroke-width: 2;
  flex-shrink: 0;
}

/* .ai-flow is built for light sections; this is the dark-section variant */
.oco-chain .ai-flow__step {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--ai-line-dark);
}

.oco-chain .ai-flow__step h3 {
  color: #FFF;
}

.oco-chain .ai-flow__step p {
  color: rgba(255, 255, 255, 0.7) !important;
}

.oco-chain .ai-flow__step .ai-index {
  color: var(--ai-primary);
}

.oco-chain .ai-flow__glyph {
  color: rgba(255, 255, 255, 0.25) !important;
}

.oco-chain .ai-flow__step.is-on {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(var(--ai-primary-rgb), 0.5);
  box-shadow: 0 4px 0 0 rgba(var(--ai-primary-rgb), 0.35);
}

.oco-chain .ai-flow__step.is-on .ai-flow__glyph {
  color: var(--ai-primary) !important;
}

.oco-chain .ai-flow__link {
  background: rgba(255, 255, 255, 0.14);
}

/* The closing step inverts on a dark section — a light plate, not another
   ink one, so it still reads as the destination */
.oco-chain .ai-flow__step.is-final {
  background: var(--ai-primary);
  border-color: var(--ai-primary);
}

.oco-chain .ai-flow__step.is-final h3,
.oco-chain .ai-flow__step.is-final .ai-index {
  color: #FFF;
}

.oco-chain .ai-flow__step.is-final p {
  color: rgba(255, 255, 255, 0.85) !important;
}

.oco-chain .ai-flow__step.is-final .ai-flow__glyph,
.oco-chain .ai-flow__step.is-final.is-on .ai-flow__glyph {
  color: rgba(255, 255, 255, 0.75) !important;
}

.oco-chain .ai-flow__step.is-final.is-on {
  box-shadow: 0 4px 0 0 var(--ai-primary-deep), 0 14px 34px rgba(20, 20, 20, 0.2);
}

/*----------------------------*/
/* WHY INSIGHTS MATTER        */
/*----------------------------*/
.oco-matters {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 64px;
}

.oco-matters__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.oco-matters__copy h2 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: clamp(26px, 3.1vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ai-ink);
}

.oco-matters__copy p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.7 !important;
  color: var(--ai-muted);
}

.oco-matters__pull {
  margin-top: 6px !important;
  padding-left: 20px;
  border-left: 3px solid var(--ai-primary);
  font-family: var(--ai-heading);
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1.5 !important;
  color: var(--ai-ink) !important;
}

.oco-matters__media {
  position: relative;
  margin: 0;
}

.oco-matters__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--ai-line);
  box-shadow: 0 30px 60px rgba(20, 20, 20, 0.14);
}

.oco-matters__media figcaption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--ai-line);
  border-radius: 12px;
  font-family: var(--ai-heading);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ai-ink);
}

.oco-matters__media figcaption i,
.oco-matters__media figcaption svg {
  width: 20px;
  height: 20px;
  color: var(--ai-primary);
  stroke-width: 2.2;
  flex-shrink: 0;
}

.oco-advisor {
  margin-top: 64px;
}

/*----------------------------*/
/* DEFINITION                 */
/*----------------------------*/
.oco-definition {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Both titles reserve two lines so the copy under them starts level */
.oco-definition__title {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: clamp(23px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  min-height: 2.3em;
}

.oco-definition p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7 !important;
}

.oco-definition__list {
  width: 100%;
  margin-top: 6px;
}

.oco-definition__list li {
  font-size: 14.5px;
}

/*----------------------------*/
/* RESPONSIVE                 */
/*----------------------------*/
@media (max-width: 1023px) {
  .oco-anatomy {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  /* Keep all five nodes on one line. Wrapping would leave the first node of
     each new row with a connector chevron pointing at nothing. */
  .oco-pipe__node {
    flex-basis: 116px;
    gap: 7px;
    padding: 14px 10px;
    font-size: 12.5px;
  }

  .oco-pipe__node i,
  .oco-pipe__node svg {
    width: 16px;
    height: 16px;
  }

  .oco-types {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-page .oco-questions {
    grid-template-columns: 1fr;
  }

  .oco-matters {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .oco-matters__media {
    order: 2;
    max-width: 520px;
  }

  .oco-matters__media img {
    aspect-ratio: 16 / 10;
  }

  .oco-definition {
    grid-template-columns: 1fr;
  }

  .oco-definition__title {
    min-height: 0;
  }
}

@media (max-width: 767px) {
  .oco-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oco-anatomy__band {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 20px;
  }

  .oco-pipe {
    margin-bottom: 52px;
  }

  /* Chevrons turn down once the pipeline wraps to one per row */
  .oco-pipe__node {
    flex-basis: 100%;
  }

  .oco-pipe__node+.oco-pipe__node::before {
    left: 50%;
    top: -11px;
    margin: 0 0 0 -3px;
    transform: rotate(135deg);
  }

  .oco-quoteband {
    margin-top: 44px;
  }

  .oco-stack__cards {
    padding-bottom: 38px;
  }
}
