/* The MVPAI Framework showcase (/methods/mvpai/): chevrons, the board, the walk-through and the phase details. */

.fw-p1 { --p: var(--pink); --pd: #c93d84; --pl: #fff1f7; }
.fw-p2 { --p: var(--yellow); --pd: #a87a00; --pl: #fff9e3; }
.fw-p3 { --p: var(--sky); --pd: #237fc2; --pl: #eef8ff; }
.fw-p4 { --p: var(--lilac); --pd: #6e48d4; --pl: #f5f0ff; }
.fw-p5 { --p: var(--mint); --pd: #0f8a5b; --pl: #ecfbf4; }

/* Parts the script reveals stay hidden without it, whatever their display. */
.fw-hero [hidden],
.fw-stage [hidden],
.fw-details [hidden] {
  display: none !important;
}

.fw-icon {
  width: 22px;
  height: 22px;
  flex: none;
}

/* Hero and chevrons */
.fw-hero {
  padding: 56px 0 48px;
}
.fw-hero .back-link {
  display: inline-block;
  margin-bottom: 18px;
}
.fw-hero .kicker {
  display: block;
}
.fw-hero h1 {
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 14px 0 18px;
}
.fw-hero .hero-lede {
  max-width: 760px;
}
.fw-chevrons {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.fw-chevrons a {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 14px 26px 14px 30px;
  background: var(--p);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.fw-chevrons li:first-child a {
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
  border-radius: 14px 0 0 14px;
}
.fw-chevrons a:hover,
.fw-chevrons a.is-active {
  transform: translateY(-3px);
  filter: saturate(1.25);
}
.fw-chevrons b {
  font-family: var(--font-hand);
  font-size: 46px;
  line-height: 1;
  font-weight: 600;
}
.fw-chevrons span {
  font-weight: 800;
}
.fw-chevrons small {
  font-size: 12px;
  color: #31405d;
}
.fw-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* The stage that holds the board */
.fw-stage {
  background: #fff;
  border-block: 1px solid var(--line);
  padding: 56px 0 64px;
}
.fw-shell {
  width: min(1480px, calc(100% - 48px));
  margin: auto;
}
.fw-stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-bottom: 22px;
}
.fw-stage-head h2 {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
  margin: 0;
}
.fw-hint {
  margin: 0;
  color: var(--muted);
}
.fw-reset {
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

/* The board: people | five phases | outcomes, with the Product Book underneath */
.fw-board {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 180px;
  grid-template-areas:
    "people columns outcomes"
    "booklabel book .";
  gap: 18px 22px;
}
.fw-people {
  grid-area: people;
  display: grid;
  align-content: start;
  gap: 10px;
}
.fw-columns {
  grid-area: columns;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.fw-outcomes {
  grid-area: outcomes;
  display: grid;
  align-content: start;
  gap: 12px;
}
.fw-book-label {
  grid-area: booklabel;
  align-self: center;
}
.fw-book {
  grid-area: book;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0 0;
  border-top: 2px dashed #d7dbe1;
}
.fw-lane-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #31405d;
  margin: 0 0 4px;
}

.fw-person {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 16px;
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.fw-person:after {
  content: "→";
  position: absolute;
  right: -18px;
  color: #a3abb8;
}
.fw-person:hover,
.fw-person[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.1);
}
.fw-person[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.fw-person[aria-pressed="true"] small {
  color: #c9d1de;
}
.fw-person-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  flex: none;
}
.fw-person-text b {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}
.fw-person-text small {
  display: block;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
  margin-top: 2px;
}

/* A phase column */
.fw-col {
  display: flex;
  flex-direction: column;
  background: var(--pl);
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--p) 55%, #fff);
  transition: opacity 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.fw-col-head {
  display: grid;
  justify-items: center;
  text-align: center;
  background: var(--p);
  border: 0;
  border-radius: 19px 19px 0 0;
  padding: 12px 8px 14px;
  cursor: pointer;
  color: var(--ink);
}
.fw-letter {
  font-family: var(--font-hand);
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
}
.fw-col-head span {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.fw-col-head small {
  font-size: 12px;
  color: #31405d;
}
.fw-steps {
  list-style: none;
  margin: 12px 10px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fw-steps li {
  flex: 1 1 70px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  font-size: 12.5px;
  line-height: 1.25;
  text-align: center;
  font-weight: 600;
}
.fw-steps li b {
  display: block;
  color: var(--pd);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.fw-who {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 14px 10px 0;
  font-size: 13px;
  font-weight: 700;
  color: #31405d;
}
.fw-who .fw-icon {
  color: var(--pd);
}
.fw-out {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border-radius: 14px;
  margin: 12px 10px 0;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.05);
}
.fw-out-icon {
  color: var(--pd);
}
.fw-out-icon .fw-icon {
  width: 32px;
  height: 32px;
}
.fw-out ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.35;
}
.fw-out li + li {
  margin-top: 4px;
}
.fw-notes {
  list-style: none;
  margin: 0 10px;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.35;
}
.fw-notes li {
  display: none;
}
.fw-notes li.is-shown {
  display: block;
  margin-top: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 10px;
  animation: fw-pop 0.25s ease;
}
.fw-loopback {
  position: relative;
  margin: auto 18px 0;
  top: 16px;
  height: 26px;
  border: 2px solid var(--pd);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  opacity: 0.75;
}
.fw-loopback:before {
  content: "";
  position: absolute;
  left: -7px;
  top: -6px;
  border: 6px solid transparent;
  border-bottom: 8px solid var(--pd);
  border-top: 0;
}
.fw-loopback span {
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  background: var(--pl);
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--pd);
  white-space: nowrap;
}
.fw-gate {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  border: 0;
  background: transparent;
  padding: 34px 10px 16px;
  cursor: pointer;
  color: var(--ink);
}
.fw-diamond {
  display: inline-block;
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  border: 3px solid var(--pd);
  background: #fff;
  border-radius: 3px;
  vertical-align: middle;
  transition: background 0.2s ease;
}
.fw-gate .fw-diamond {
  width: 24px;
  height: 24px;
  margin-top: 4px;
}
.fw-gate:hover .fw-diamond,
.fw-gate.is-active .fw-diamond {
  background: var(--pd);
}
.fw-gate-text {
  font-size: 12.5px;
  line-height: 1.3;
}
.fw-gate-text b {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pd);
}

/* Outcomes */
.fw-outcome-item {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.fw-outcome-item:before {
  content: "→";
  position: absolute;
  left: -18px;
  color: #a3abb8;
}
.fw-outcome-item > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  flex: none;
}
.fw-outcome-item p {
  margin: 0;
}
.fw-outcome-item b {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}
.fw-outcome-item small {
  display: block;
  line-height: 1.35;
  font-size: 12px;
  color: var(--muted);
}

/* Product Book lane */
.fw-book-label h3 {
  margin: 0;
  font-size: 18px;
}
.fw-book-label p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.fw-book-group {
  display: grid;
  gap: 8px;
  transition: opacity 0.25s ease;
}
.fw-book-group p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  background: var(--pl);
  border: 1px solid color-mix(in srgb, var(--p) 55%, #fff);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
}
.fw-book-group .fw-icon {
  color: var(--pd);
}

/* Focus: one phase, one gate or one person at a time */
.fw-board.has-focus .fw-col:not(.is-active),
.fw-board.has-focus .fw-book-group:not(.is-active) {
  opacity: 0.3;
  filter: grayscale(0.5);
}
.fw-col.is-active {
  box-shadow: 0 0 0 3px var(--pd), 0 18px 40px rgba(17, 24, 39, 0.12);
  transform: translateY(-4px);
}
.fw-col.is-active .fw-col-head {
  background: var(--p);
}

/* Enabled by */
.fw-tools {
  margin-top: 34px;
  background: #f1f2f5;
  border-radius: 22px;
  padding: 20px 22px;
}
.fw-tools h3 {
  margin: 0 0 14px;
  font-size: 18px;
}
.fw-tools ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}
.fw-tools li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.fw-tools li .fw-icon {
  width: 28px;
  height: 28px;
  color: var(--blue);
}
.fw-tools b {
  display: block;
  font-size: 13.5px;
  line-height: 1.2;
}
.fw-tools small {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  margin-top: 3px;
}
.fw-neutral {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Walk the journey */
.fw-walk {
  background: var(--ink);
  color: #fff;
  border-radius: 22px;
  padding: 18px 22px 18px;
  margin-bottom: 22px;
}
.fw-walk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fw-walk .kicker {
  color: #aeb9ca;
}
.fw-walk-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.fw-walk-steps {
  list-style: none;
  margin: 10px 0 14px;
  padding: 0;
}
.fw-walk-steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  animation: fw-pop 0.3s ease;
}
.fw-walk-badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 48px;
  border-radius: 50%;
  background: var(--p, var(--blue));
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 600;
}
.fw-walk-end .fw-walk-badge {
  background: #fff;
  font-family: inherit;
  font-size: 24px;
}
.fw-walk h3 {
  margin: 2px 0 6px;
  font-size: 20px;
}
.fw-walk p {
  margin: 0 0 8px;
  color: #dfe5ee;
}
.fw-walk a {
  color: #fff;
  text-decoration: underline;
}
.fw-walk-gate .fw-diamond {
  width: 14px;
  height: 14px;
  border-width: 2px;
  background: var(--p);
  border-color: var(--p);
  margin: 0 4px 0 2px;
}
.fw-outcome {
  display: inline-block;
  background: var(--p, #fff);
  color: var(--ink);
  border-radius: 999px;
  padding: 1px 10px;
  margin: 0 4px;
  font-size: 13px;
}
.fw-walk-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fw-walk-nav .button-outline {
  border-color: #fff;
  color: #fff;
}
.fw-walk-nav .button-dark {
  background: #fff;
  color: var(--ink);
}
.fw-walk-dots {
  display: flex;
  gap: 6px;
  margin-right: auto;
}
.fw-walk-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #43506a;
}
.fw-walk-dots i.is-on {
  background: #fff;
}
.fw-play {
  border: 1px solid #43506a;
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

/* Inside each phase */
.fw-details {
  background: var(--paper);
}
.fw-details-head h2 {
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 10px 0 24px;
  max-width: 760px;
}
.fw-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.fw-tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  font-weight: 700;
  cursor: pointer;
}
.fw-tab b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--p);
  font-family: var(--font-hand);
  font-size: 18px;
  margin-right: 4px;
}
.fw-tab[aria-selected="true"] {
  border-color: var(--pd);
  box-shadow: 0 0 0 2px var(--pd);
}
.fw-detail {
  background: #fff;
  border-radius: 26px;
  border-top: 8px solid var(--p);
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.06);
}
.fw-ready .fw-detail:not(.is-active) {
  display: none;
}
.fw-ready .fw-detail.is-active {
  animation: fw-pop 0.3s ease;
}
.fw-detail header {
  display: flex;
  gap: 18px;
  align-items: center;
}
.fw-detail-letter {
  display: grid;
  place-items: center;
  width: 76px;
  height: 64px;
  border-radius: 50%;
  background: var(--p);
  font-family: var(--font-hand);
  font-size: 40px;
  font-weight: 600;
  flex: none;
}
.fw-detail h3 {
  font-size: 34px;
  letter-spacing: -0.04em;
  margin: 2px 0;
}
.fw-detail-q {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}
.fw-detail-summary {
  font-size: 17px;
  max-width: 860px;
  margin: 18px 0;
}
.fw-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 24px;
}
.fw-detail h4 {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pd);
  margin: 0 0 6px;
}
.fw-detail h4:not(:first-child) {
  margin-top: 18px;
}
.fw-detail p {
  margin: 0 0 8px;
}
.fw-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fw-plain li {
  margin-bottom: 5px;
}
.fw-plain b {
  color: var(--pd);
}
.fw-detail code {
  display: inline-block;
  font-size: 13px;
  background: var(--pl);
  border-radius: 8px;
  padding: 2px 8px;
  margin: 0 4px 4px 0;
}
.fw-detail-gate {
  background: var(--pl);
  border-radius: 18px;
  padding: 16px 18px;
  scroll-margin-top: 120px;
}
.fw-detail-gate.is-flash {
  animation: fw-flash 1.2s ease;
}
.fw-gate-q {
  font-weight: 800;
  font-size: 17px;
}
.fw-outcome-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px !important;
}
.fw-outcome-row span {
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  border-radius: 999px;
  padding: 3px 10px;
}
.fw-outcome-row span:nth-child(1) { border: 2px solid var(--mint); }
.fw-outcome-row span:nth-child(2) { border: 2px solid var(--yellow); }
.fw-outcome-row span:nth-child(3) { border: 2px solid var(--pink); }
.fw-detail-example {
  margin: 20px 0 0 !important;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: #31405d;
}

.fw-matrix {
  background: #fff;
  padding: 64px 0;
}
.fw-matrix-box summary {
  cursor: pointer;
  list-style: none;
}
.fw-matrix-box summary::-webkit-details-marker {
  display: none;
}
.fw-matrix-box summary h2 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
  margin: 8px 0 18px;
}
.fw-matrix-box summary h2:after {
  content: " +";
  color: var(--muted);
}
.fw-matrix-box[open] summary h2:after {
  content: " –";
}
.fw-matrix .mv-table td {
  font-size: 14px;
  min-width: 150px;
}

@keyframes fw-pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes fw-flash {
  0%, 100% { box-shadow: none; }
  30% { box-shadow: 0 0 0 4px var(--pd); }
}

/* Medium screens: people and outcomes move above and below the phases */
@media (max-width: 1180px) {
  .fw-board {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "people" "columns" "outcomes" "booklabel" "book";
  }
  .fw-people,
  .fw-outcomes {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
  .fw-people .fw-lane-label,
  .fw-outcomes .fw-lane-label {
    grid-column: 1 / -1;
  }
  .fw-person:after,
  .fw-outcome-item:before {
    display: none;
  }
  .fw-tools ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .fw-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .fw-detail-gate {
    grid-column: 1 / -1;
  }
}

/* Phones and small tablets: one phase per row */
@media (max-width: 900px) {
  .fw-shell {
    width: calc(100% - 32px);
  }
  .fw-chevrons {
    gap: 2px;
  }
  .fw-chevrons a {
    padding: 10px 12px 10px 18px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
  }
  .fw-chevrons li:first-child a {
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  }
  .fw-chevrons b {
    font-size: 30px;
  }
  .fw-chevrons span {
    font-size: 11px;
  }
  .fw-chevrons small {
    display: none;
  }
  .fw-columns,
  .fw-book {
    grid-template-columns: minmax(0, 1fr);
  }
  .fw-col-head {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    column-gap: 12px;
    padding: 10px 16px;
  }
  .fw-letter {
    grid-row: 1 / 3;
  }
  .fw-steps li {
    flex: 1 1 120px;
  }
  .fw-who {
    justify-content: flex-start;
    text-align: left;
  }
  .fw-loopback {
    display: none;
  }
  .fw-gate {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    gap: 12px;
    padding: 14px 16px;
  }
  .fw-book-group:before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pd);
  }
  .fw-tools ul {
    grid-template-columns: 1fr 1fr;
  }
  .fw-detail {
    padding: 20px 18px;
  }
  .fw-detail-grid {
    grid-template-columns: 1fr;
  }
  .fw-detail h3 {
    font-size: 28px;
  }
  .fw-detail-letter {
    width: 60px;
    height: 52px;
    font-size: 32px;
  }
  .fw-walk-steps li {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
@media (max-width: 520px) {
  .fw-chevrons span {
    display: none;
  }
  .fw-tools ul,
  .fw-people,
  .fw-outcomes {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fw-col,
  .fw-chevrons a,
  .fw-notes li.is-shown,
  .fw-walk-steps li,
  .fw-ready .fw-detail.is-active,
  .fw-detail-gate.is-flash {
    transition: none;
    animation: none;
  }
}
