
/* review-session-replays figures. This article-local stylesheet loads after resources.css.
   Replaces signal-driven-session-review.svg and session-review-sample-matrix.svg
   (both desktop and -mobile variants); figure 3 is new. */

.rr-fig {
  margin: 38px 0;
  padding: 30px 32px 28px;
  border: 1px solid #cfdcf0;
  border-radius: 20px;
  background: #f4f7fb;
  color: #071b3a;
}

h3.rr-h {
  margin: 0 0 22px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #071b3a;
}

p.rr-k {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a6a80;
}

p.rr-anti {
  margin: 16px 0 0;
  padding: 13px 16px;
  border-left: 4px solid #b8860b;
  border-radius: 0 10px 10px 0;
  background: #fdf9f1;
  font-size: 14px;
  line-height: 1.5;
  color: #6b4e08;
  text-wrap: pretty;
}

/* ---------- figure 1: the loop ---------- */

.rr-loop {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.rr-node {
  position: relative;
  display: grid;
  align-content: start;
  padding: 14px 15px 15px;
  border: 1px solid #d7e2f2;
  border-radius: 14px;
  background: #fff;
}

.rr-node--quant { border-top: 4px solid #2f6df6; }
.rr-node--qual { border-top: 4px solid #8a5a06; }

p.rr-node__n {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0 0 8px;
  border-radius: 50%;
  background: #071b3a;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

p.rr-node__t {
  margin: 0 0 5px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  color: #071b3a;
  text-wrap: pretty;
}

p.rr-node__d {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #4b5b76;
  text-wrap: pretty;
}

p.rr-node__tag {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px solid #e6edf7;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5a6a80;
}

.rr-node--quant p.rr-node__tag { color: #16408f; }
.rr-node--qual p.rr-node__tag { color: #8a5a06; }

.rr-go {
  position: absolute;
  display: none;
}

.rr-node:not(:last-of-type)::before {
  content: "";
  position: absolute;
  top: 34px;
  right: -20px;
  width: 9px;
  height: 3px;
  background: #8a94a6;
}

.rr-node:not(:last-of-type)::after {
  content: "";
  position: absolute;
  top: 28px;
  right: -13px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #8a94a6;
}

p.rr-back {
  position: relative;
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding-top: 22px;
  border-top: 2px dashed #b0bdcd;
  text-align: center;
}

p.rr-back span {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: #071b3a;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

p.rr-back::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 9px solid #8a94a6;
}

.rr-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin-top: 16px;
}

.rr-legend p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #4b5b76;
}

.rr-sw {
  flex: none;
  width: 22px;
  height: 4px;
  border-radius: 2px;
}

.rr-sw--quant { background: #2f6df6; }
.rr-sw--qual { background: #8a5a06; }

/* ---------- figure 2: sample matrix ---------- */

.rr-matrix {
  padding: 4px 20px 16px;
  border: 1px solid #d7e2f2;
  border-radius: 16px;
  background: #fff;
}

.rr-mx__head,
.rr-mx__row,
.rr-mx__foot {
  display: grid;
  grid-template-columns: 196px repeat(3, minmax(0, 1fr)) 58px;
  align-items: center;
  gap: 12px;
}

.rr-mx__head {
  padding: 14px 0 10px;
  border-bottom: 2px solid #071b3a;
}

.rr-mx__row {
  padding: 8px 0;
  border-bottom: 1px solid #eef2f8;
}

.rr-mx__foot {
  padding: 12px 0 0;
  border-top: 2px solid #071b3a;
}

p.rr-mx__corner,
p.rr-mx__col,
p.rr-mx__cap {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6a80;
}

p.rr-mx__cap { text-align: right; }

p.rr-mx__acct {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #071b3a;
}

p.rr-mx__acct em {
  display: block;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: #5a6a80;
}

.rr-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
  align-items: center;
  padding: 3px;
  border-radius: 8px;
  background: #f7f9fc;
}

.rr-v {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.rr-v b {
  padding: 1px 5px;
  border-radius: 4px;
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b4e08;
}

.rr-v--fail { background: #8a5a06; color: #fff; }
.rr-v--ok { background: #17693f; color: #fff; }
.rr-v--prev { background: #5a6a80; color: #fff; }
.rr-v--prev b { color: #33465f; }

p.rr-mx__n {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #5a6a80;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

p.rr-mx__tot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #071b3a;
}

p.rr-mx__tot::before {
  content: "";
  align-self: center;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

p.rr-mx__tot em {
  flex: 1 0 100%;
  padding-left: 20px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: #5a6a80;
}

.rr-mx__tot--fail::before { background: #8a5a06; }
.rr-mx__tot--ok::before { background: #17693f; }
.rr-mx__tot--prev::before { background: #5a6a80; }

.rr-versus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.rr-vs {
  padding: 14px 16px 15px;
  border: 1px solid #d7e2f2;
  border-radius: 14px;
  background: #fff;
}

p.rr-vs__k {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5a6a80;
}

.rr-vs__bars {
  display: flex;
  gap: 3px;
  height: 28px;
}

.rr-vs__bars span {
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}

.rr-vs--bad .rr-vs__bars span { background: #8a5a06; }
.rr-vs--good .rr-vs__bars span { background: #17693f; }

p.rr-vs__d {
  margin: 11px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #4b5b76;
  text-wrap: pretty;
}

/* ---------- figure 3: worked example ---------- */

.rr-work {
  display: grid;
  gap: 8px;
}

.rr-panel {
  padding: 16px 20px 18px;
  border: 1px solid #d7e2f2;
  border-radius: 16px;
  background: #fff;
}

.rr-panel--signal { border-left: 5px solid #2f6df6; }
.rr-panel--replay { border-left: 5px solid #8a5a06; }
.rr-panel--valid { border-left: 5px solid #17693f; }

p.rr-panel__d {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #4b5b76;
  text-wrap: pretty;
}

.rr-godown {
  justify-self: center;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid #b0bdcd;
}

.rr-rate {
  display: grid;
  gap: 8px;
}

.rr-rate__row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 14px;
}

p.rr-rate__t {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #071b3a;
}

.rr-rate__track {
  height: 28px;
  border-radius: 5px;
  background: #f4f7fb;
  box-shadow: inset 0 0 0 1px #e6edf7;
}

.rr-rate__track span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 54px;
  padding-right: 10px;
  border-radius: 5px;
  background: #5a6a80;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.rr-rate__track--now span { background: #16408f; }

p.rr-rate__n {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #5a6a80;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

p.rr-delta {
  margin: 12px 0 0;
  padding: 9px 13px;
  border-radius: 9px;
  background: #eaf1fe;
  font-size: 14px;
  font-weight: 700;
  color: #16408f;
  text-wrap: pretty;
}

.rr-obs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rr-ob {
  padding: 13px 15px 14px;
  border-radius: 12px;
  background: repeating-linear-gradient(-45deg, #fdf2dd 0 6px, #fdf9f1 6px 12px);
  box-shadow: inset 0 0 0 1px #e6cd9a;
}

p.rr-ob__c {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a5a06;
}

p.rr-ob__t {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #071b3a;
  text-wrap: pretty;
}

p.rr-ob__x {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: #6b4e08;
  text-wrap: pretty;
}

.rr-funnel {
  display: grid;
  gap: 7px;
}

.rr-fn {
  display: grid;
  grid-template-columns: 234px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.rr-fn--split p.rr-fn__t {
  padding-left: 16px;
  border-left: 2px solid #cfdcf0;
}

p.rr-fn__t {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #071b3a;
  text-wrap: pretty;
}

.rr-fn__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 26px;
  min-width: 34px;
  padding-right: 9px;
  border-radius: 5px;
  background: #5a6a80;
}

.rr-fn__bar b {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.rr-fn__bar--hi { background: #8a5a06; }

.rr-fn__bar--alt {
  background: #5a6a80;
}

.rr-fn__bar--alt2 {
  background: #8a94a6;
}

.rr-fn__bar--alt2 b { color: #071b3a; }

.rr-fn__bar--none {
  background: repeating-linear-gradient(-45deg, #dfe7f3 0 5px, #eef2f8 5px 10px);
  box-shadow: inset 0 0 0 1px #cfdcf0;
}

.rr-fn__bar--none b { color: #33465f; }

.rr-cross {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.rr-cross p {
  margin: 0;
  padding: 10px 13px;
  border-radius: 9px;
  background: #f4f7fb;
  box-shadow: inset 0 0 0 1px #dfe7f3;
  font-size: 14px;
  line-height: 1.4;
  color: #4b5b76;
  text-wrap: pretty;
}

.rr-cross p b { color: #071b3a; }

p.rr-hyp {
  margin: 14px 0 0;
  padding: 13px 16px;
  border-left: 4px solid #17693f;
  border-radius: 0 10px 10px 0;
  background: #eef6f1;
  font-size: 14px;
  line-height: 1.5;
  color: #114f30;
  text-wrap: pretty;
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .rr-loop { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .rr-node:nth-of-type(3)::before,
  .rr-node:nth-of-type(3)::after { display: none; }

  .rr-mx__head,
  .rr-mx__row,
  .rr-mx__foot { grid-template-columns: 168px repeat(3, minmax(0, 1fr)) 52px; }

  .rr-fn { grid-template-columns: 196px minmax(0, 1fr); }
}

@media (max-width: 940px) {
  .rr-fig { padding: 24px 20px 22px; }

  h3.rr-h { font-size: 22px; }

  .rr-loop { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .rr-node::before,
  .rr-node::after { display: none; }

  .rr-node:nth-of-type(odd)::before,
  .rr-node:nth-of-type(odd)::after { display: block; }

  .rr-matrix { padding: 4px 16px 14px; }

  .rr-mx__head { display: none; }

  .rr-mx__row,
  .rr-mx__foot {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 8px 12px;
    padding: 12px 0;
  }

  p.rr-mx__acct { grid-column: 1; grid-row: 1; }

  p.rr-mx__n {
    grid-column: 2;
    grid-row: 1;
  }

  .rr-cell {
    grid-column: 1 / -1;
    background: none;
    padding: 0;
    min-height: 0;
  }

  .rr-cell:empty { display: none; }

  .rr-mx__foot p.rr-mx__corner { grid-column: 1; grid-row: 1; }

  .rr-mx__foot p.rr-mx__cap { grid-column: 2; grid-row: 1; }

  p.rr-mx__tot { grid-column: 1 / -1; }

  .rr-mx__foot { row-gap: 10px; }

  .rr-versus { grid-template-columns: minmax(0, 1fr); }

  .rr-obs { grid-template-columns: minmax(0, 1fr); }

  .rr-cross { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .rr-loop { grid-template-columns: minmax(0, 1fr); }

  .rr-node::before,
  .rr-node::after { display: none !important; }

  .rr-rate__row {
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 4px 12px;
  }

  .rr-rate__track { grid-column: 1 / -1; grid-row: 2; }

  .rr-fn {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .rr-fn--split p.rr-fn__t { padding-left: 12px; }

  .rr-vs__bars span { font-size: 11.5px; }
}
