/* Research and delivered evidence on the Malakoff Humanis study. */
.mh-study-discovery,
.mh-study-wireframes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.5vw, 24px);
}

.mh-study-map {
  margin: 0;
  padding: clamp(16px, 2.4vw, 26px);
  border: 1px solid #e5dad5;
  border-radius: 14px;
  background: #fcf8f6;
}

body.sober-case .ux148-story .mh-study-map figcaption,
.mh-study-questions h4 {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #362e2b;
  font: 680 16px/1.35 var(--sans, Arial, sans-serif);
}

.mh-study-map-root {
  display: block;
  margin: 0 0 0 5px;
  padding: 9px 12px;
  border: 1px solid #e1d5cf;
  border-radius: 8px;
  background: #fff;
  color: #45352f;
  font: 650 13px/1.4 var(--sans, Arial, sans-serif);
}

.mh-study-map-branches {
  --map-gap: 7px;
  --map-indent: 18px;
  display: grid;
  gap: var(--map-gap);
  margin: 0 0 0 16px;
  padding: 13px 0 0 var(--map-indent);
  list-style: none;
}

.mh-study-map-branches li {
  position: relative;
  padding: 7px 10px;
  border: 1px solid #e1d5cf;
  border-radius: 7px;
  background: #fff;
  color: #51443d;
  font: 550 13px/1.35 var(--sans, Arial, sans-serif);
}

.mh-study-map-branches li::before {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 100%;
  inline-size: calc(var(--map-indent) + 1px);
  block-size: 1px;
  background: #bba59b;
  content: "";
}

.mh-study-map-branches li::after {
  position: absolute;
  inset-block: calc((var(--map-gap) + 2px) / -2);
  inset-inline-end: calc(100% + var(--map-indent));
  inline-size: 1px;
  background: #bba59b;
  content: "";
}

.mh-study-map-branches li:first-child::after { inset-block-start: -14px; }
.mh-study-map-branches li:last-child::after { inset-block-end: 50%; }

.mh-study-map-branches .mh-study-map-current {
  border-color: #d7a293;
  background: #f6e7e1;
  color: #752d20;
  font-weight: 700;
}

.mh-study-questions {
  align-self: center;
}

.mh-study-questions dl {
  margin: 0;
}

.mh-study-questions dl > div {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-block-start: 1px solid #e5dad5;
}

.mh-study-questions dt,
.mh-study-route-copy strong,
.mh-study-wire-card figcaption strong {
  color: #332c29;
  font: 680 15px/1.35 var(--sans, Arial, sans-serif);
}

.mh-study-questions dd,
.mh-study-route-copy p,
.mh-study-wire-card figcaption span {
  margin: 0;
  color: #56504c;
  font: 400 13px/1.5 var(--sans, Arial, sans-serif);
}

.mh-study-route {
  --route-gap: 12px;
  --route-axis: 26px;
  --route-line: 2px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--route-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mh-study-route-step {
  position: relative;
  display: grid;
  grid-template-rows: var(--route-axis) 1fr;
  min-inline-size: 0;
}

/* Each segment reaches the midpoint of the gap. The line and marker
   share the same axis even when a step wraps or grows on mobile. */
.mh-study-route-step::before {
  position: absolute;
  inset-inline: calc(var(--route-gap) / -2);
  inset-block-start: calc((var(--route-axis) - var(--route-line)) / 2);
  block-size: var(--route-line);
  background: #be8a7d;
  content: "";
}

.mh-study-route-step:first-child::before { inset-inline-start: 50%; }
.mh-study-route-step:last-child::before { inset-inline-end: 50%; }

.mh-study-route-point {
  z-index: 1;
  place-self: center;
  box-sizing: border-box;
  inline-size: 12px;
  block-size: 12px;
  border: 2px solid #9f4a36;
  border-radius: 50%;
  background: #fff;
}

.mh-study-route-copy {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: clamp(13px, 2vw, 20px);
  border: 1px solid #e5dad5;
  border-radius: 12px;
  background: #fff;
}

.mh-study-wire-card {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  min-inline-size: 0;
  margin: 0;
}

body.sober-case .ux148-story .mh-study-wire-card figcaption {
  display: grid;
  align-content: start;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.mh-study-wire-screen {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-inline-size: 0;
  border: 1px solid #d5dce0;
  border-radius: 12px;
  background: #fff;
}

.mh-study-wire-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-block-end: 1px solid #dbe2e5;
  background: #eff3f5;
  color: #3b4e57;
  font: 650 12px/1.35 var(--sans, Arial, sans-serif);
}

.mh-study-wire-progress {
  display: flex;
  gap: 4px;
}

.mh-study-wire-progress i {
  inline-size: 13px;
  block-size: 3px;
  border-radius: 2px;
  background: #b8c6cd;
}

.mh-study-wire-progress i:nth-child(3) { background: #4d6a76; }

.mh-study-wire-body {
  display: grid;
  align-content: start;
  gap: 9px;
  min-inline-size: 0;
  padding: 14px;
  color: #354751;
  font: 500 12px/1.4 var(--sans, Arial, sans-serif);
}

.mh-study-wire-body > strong {
  color: #273843;
  font: 700 14px/1.3 var(--sans, Arial, sans-serif);
}

.mh-study-wire-card:first-child .mh-study-wire-body {
  grid-template-rows: auto auto minmax(46px, 1fr);
}

.mh-study-wire-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.mh-study-wire-types span,
.mh-study-wire-file {
  display: grid;
  place-items: center;
  min-inline-size: 0;
  padding: 6px 5px;
  border: 1px solid #cbd6db;
  border-radius: 5px;
  background: #fff;
  text-align: center;
  overflow-wrap: anywhere;
}

.mh-study-wire-types .mh-study-wire-picked {
  border-color: #9d685a;
  background: #f6ece8;
  color: #693526;
  font-weight: 700;
}

.mh-study-wire-instruction,
.mh-study-wire-drop {
  padding: 8px 9px;
  border-radius: 5px;
}

.mh-study-wire-instruction {
  border-inline-start: 2px solid #7c98a8;
  background: #edf3f6;
}

.mh-study-wire-drop {
  display: grid;
  place-items: center;
  min-block-size: 46px;
  border: 1px dashed #8e9ea5;
  background: #f7f9fa;
  text-align: center;
}

.mh-study-wire-file {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding-inline: 9px;
  border-color: #8fa99e;
  background: #edf4f0;
  color: #355d4a;
}

.mh-claim-initial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .43fr);
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
  margin-block: 20px 34px;
}

.mh-claim-initial-copy {
  grid-area: 1 / 2;
  min-inline-size: 0;
}

.mh-claim-initial-copy h3 {
  margin: 0 0 8px;
  color: #362e2b;
  font: 650 clamp(18px, 2vw, 24px)/1.25 var(--sans, Arial, sans-serif);
  letter-spacing: -.02em;
}

.mh-claim-initial-copy p {
  margin: 0;
  max-inline-size: 36ch;
  color: #56504c;
  font: 400 15px/1.5 var(--sans, Arial, sans-serif);
}

body.v105-malakoff-humanis #montant .mh-claim-initial-shot {
  grid-area: 1 / 1;
  margin: 0;
}

body.v105-malakoff-humanis #montant .mh-claim-initial-shot .mh2-shot-viewport {
  block-size: auto;
  min-block-size: 0;
  max-block-size: none;
}

body.v105-malakoff-humanis #montant .mh-claim-initial-shot img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  max-block-size: none;
}

body.v105-malakoff-humanis #montant .mh-claim-initial-shot figcaption::after {
  display: none;
}

@media (max-width: 760px) {
  .mh-study-discovery,
  .mh-study-wireframes,
  .mh-claim-initial {
    grid-template-columns: minmax(0, 1fr);
  }

  .mh-study-route {
    grid-template-columns: minmax(0, 1fr);
  }

  .mh-study-route-step {
    grid-template: 1fr / var(--route-axis) minmax(0, 1fr);
  }

  .mh-study-route-step::before {
    inset-block: calc(var(--route-gap) / -2);
    inset-inline: calc((var(--route-axis) - var(--route-line)) / 2) auto;
    inline-size: var(--route-line);
    block-size: auto;
  }

  .mh-study-route-step:first-child::before,
  .mh-study-route-step:last-child::before {
    inset-inline: calc((var(--route-axis) - var(--route-line)) / 2) auto;
  }

  .mh-study-route-step:first-child::before { inset-block-start: 50%; }
  .mh-study-route-step:last-child::before { inset-block-end: 50%; }

  .mh-claim-initial {
    gap: 12px;
    margin-block: 18px 26px;
  }

  .mh-claim-initial-copy,
  body.v105-malakoff-humanis #montant .mh-claim-initial-shot {
    grid-area: auto;
  }
}

@media (forced-colors: active) {
  .mh-study-route-step::before,
  .mh-study-map-branches li::before,
  .mh-study-map-branches li::after {
    background: CanvasText;
    forced-color-adjust: none;
  }
}
