/* ==========================================================================
   Human review — Figma 7:2 › 19:5936 (1216×364 row, x 112–1328, space-between)
   Left column 19:5915 (705.89 wide) · right column 55:12081 (bare 503×364 card stack,
   499-wide cards, no tile)
   Behaviour: js/review.js
   ========================================================================== */

/* ---------- Section + row ---------------------------------------------- */
.hr { padding-top: 64px; }
@media (min-width: 48rem) { .hr { padding-top: 120px; } }

.hr-row {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
@media (min-width: 64rem) {
  /* Figma 19:5936: x=112–1328 (3px past the 115–1325 content box on each side),
     705.89 copy + 503 card column, space-between (7.11px left over), both 364 tall. */
  .hr { padding-top: 126px; } /* heading sits 126px under the roadmap band, like Figma */
  .hr-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 7.11px;
    margin-inline: -3px;
  }
}

/* ---------- Left column (Figma 19:5915) -------------------------------- */
.hr-copy {
  display: flex;
  flex: 1 1 0%;
  min-width: 0;
  flex-direction: column;
  gap: 40px;
}
/* Figma 19:5915: vertical, gap 126 between the trimmed intro copy (last baseline 4429) and
   the trimmed "You get to check…" line (baseline 4567). Figma trims Inter Display 16 to a
   12px cap box; our 17px line boxes put the baseline 14.32 below the box top, so the CSS
   gap that lands both baselines where Figma has them is 121. */
@media (min-width: 64rem) { .hr-copy { flex: 0 1 705.89px; min-height: 364px; gap: 121px; } }

.hr-intro { display: flex; flex-direction: column; }

/* "AI does the work." — STIX Two Text 40/40, -0.9px, #0F172A */
.hr-title {
  font-size: 32px;
  line-height: 34px;
  letter-spacing: -0.9px;
  color: #0f172a;
}
@media (min-width: 48rem) { .hr-title { font-size: 40px; line-height: 40px; } }

/* Body copy — Inter Display 16/17, black (Figma 19:5827, 19:5834) */
.hr-lead {
  max-width: 467px;
  font-size: 16px;
  line-height: 19px;
  color: #000;
}
.hr-lead--wide { max-width: none; }
.hr-intro .hr-lead { margin-top: 15px; }
@media (min-width: 64rem) {
  .hr-lead { line-height: 17px; }
  /* Figma gaps are measured between trimmed text boxes (cap height → baseline);
     these offsets put the glyphs where Figma has them. */
  .hr-intro .hr-lead { margin-top: 12.68px; } /* first baseline 4412, like Figma */
}

/* Figma 19:5859: gap 20 from the trimmed line to the list → 20 − 2.68 = 17.32 */
.hr-bottom { display: flex; flex-direction: column; gap: 17.32px; }

/* Checklist (Figma 19:5835): 2 × 159.23px columns, 15.53px gaps both ways (334 × 50.93).
   Items: 17.7 icon frame (17.09 blue icon at 0.39, 1.36 stroke) + 6.21 gap +
   Inter Display 13.61/16.33, -0.34px. */
.hr-list {
  display: grid;
  grid-template-columns: 159.23px 159.23px;
  gap: 15.53px;
}
.hr-list li {
  display: flex;
  align-items: center;
  gap: 6.21px;
  height: 17.7px;
}
.hr-list img { flex: none; margin: 0.39px 0.22px 0.22px 0.39px; width: 17.09px; height: 17.09px; }
.hr-list span {
  white-space: nowrap;
  font-size: 13.61px;
  line-height: 16.33px;
  letter-spacing: -0.34px;
  color: #000;
}

/* ---------- Right column — card stack (Figma 55:12081: 503×364, gap 15) ---- */
.hr-cards {
  display: flex;
  flex: none;
  width: 503px;
  max-width: 100%;
  margin: 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  /* Figma sets the card text in "Inter" (text cut); opsz 22 matches its widths */
  font-variation-settings: "opsz" 22;
}
@media (min-width: 64rem) { .hr-cards { margin: 0; } }

/* Stack (Figma 55:12082: 499×331, centred in the 503 column). Cards are fluid up to 499;
   review.js pins the stack to 340px and scales it (--hr-scale) only below 340px. */
.hr-stack {
  display: flex;
  flex: none;
  width: min(499px, 100%);
  flex-direction: column;
  align-items: center;
  transform: scale(var(--hr-scale, 1));
  transform-origin: top center;
}

/* Reviewer card (Figma 55:12083): 499×66, 1px #EEE4EC, radius 12, row 64 high, px 14 */
.hr-reviewer {
  display: flex;
  width: 100%;
  height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border: 1px solid #eee4ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px 0 rgba(31, 26, 20, 0.04);
}
.hr-reviewer__left { display: flex; align-items: center; gap: 12px; }

/* Avatar (Figma 55:12086): 34 circle, cream, 1px border; blue Veeza mascot
   21×19 at (5,6) inside the border, image cropped like Figma's fill */
.hr-avatar {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid #eee4ec;
  border-radius: 999px;
  background: #fbf7f2;
}
.hr-avatar__img {
  position: absolute;
  left: 5px;
  top: 6px;
  width: 21px;
  height: 19px;
  overflow: hidden;
  border-radius: 999px;
}
.hr-avatar__img img {
  position: absolute;
  left: -20%;
  top: -24.42%;
  width: 142.48%;
  height: 157.47%;
  max-width: none;
}

.hr-reviewer__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  white-space: nowrap;
  line-height: normal;
}
.hr-reviewer__name { font-size: 14px; font-weight: 500; color: #231a2e; }
.hr-reviewer__sub { font-size: 12px; color: #8c8197; }
.hr-reviewer__sub.is-approved { color: #1f9d63; }

/* Status pills (Figma 55:12110 / 55:12122) — both share one grid cell, right-aligned */
.hr-pills { display: grid; justify-items: end; }
.hr-pill {
  grid-area: 1 / 1;
  display: flex;
  height: 21px; /* Figma 55:12110 / 55:12122 */
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  line-height: normal;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.hr-pill img { flex: none; }
.hr-pill--review { background: rgba(203, 213, 255, 0.6); color: #5c65c6; opacity: 0; }
.hr-pill--approved { background: rgba(31, 157, 99, 0.1); color: #1f9d63; }
.hr-pills.is-reviewing .hr-pill--review { opacity: 1; }
.hr-pills.is-reviewing .hr-pill--approved { opacity: 0; transform: scale(0.94); }

/* Connector · Expert check (Figma 55:12125): 14 line, 21 tag, 14 line */
.hr-connector { display: flex; flex-direction: column; align-items: center; }
.hr-connector__line { display: flex; height: 14px; width: 1px; align-items: center; justify-content: center; }
.hr-connector__line img { flex: none; width: 14px; height: 1px; max-width: none; transform: rotate(90deg); }
.hr-expert {
  display: flex;
  height: 21px; /* Figma 55:12127 */
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 125, 250, 0.1);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.11px;
  color: #2663eb;
}
.hr-expert img { flex: none; }

/* Check rows (Figma 55:12135): 499×48, gap 8, radius 12, px 14.
   waiting = 55% opacity; checking = 1.5px #5C65C6 border (1px border + 0.5px inset ring,
   so the content doesn't jump); done = 1px #EEE4EC. */
.hr-checks { display: flex; width: 100%; flex-direction: column; gap: 8px; }
.hr-check {
  position: relative;
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #eee4ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 0 #5c65c6, 0 2px 6px 0 rgba(31, 26, 20, 0.04);
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.hr-check[data-state="waiting"] { opacity: 0.55; }
.hr-check[data-state="checking"] {
  border-color: #5c65c6;
  box-shadow: inset 0 0 0 0.5px #5c65c6, 0 2px 3px 0 rgba(31, 26, 20, 0.04);
}

.hr-check__icon { position: relative; flex: none; width: 18px; height: 18px; margin-right: 10px; }
.hr-check__icon img { position: absolute; inset: 0; }
/* ring cross-fade (0.35s) */
.hr-ring { opacity: 0; transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.hr-check[data-state="waiting"] .hr-ring--waiting,
.hr-check[data-state="checking"] .hr-ring--checking { opacity: 1; }
/* tick: pops 0.6 → 1 on enter (0.4s); on exit it only fades, scale resets afterwards */
.hr-tick {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0s linear 0.4s;
}
.hr-check[data-state="done"] .hr-tick {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hr-check__label {
  flex: 1 1 auto;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.14px;
  color: #231a2e;
}
.hr-check__status {
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.125px;
  color: #8c8197;
}
.hr-check__status.is-checking { color: #5c65c6; }
.hr-check__status.is-done { color: #1f9d63; }

/* Text swaps (sub line + row status): fade out 0.12s, swap, fade in 0.25s */
.hr-swap-out { opacity: 0; transition: opacity 0.12s ease-out; }
.hr-swap-in { opacity: 1; transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1); }

/* Approved note (Figma 55:12271): 18 high, gap 6, blue shield in an 18 frame,
   "Human-Approved Before Submission" Inter Display 14, -0.5px, black */
.hr-note {
  display: flex;
  height: 18px;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.hr-note.is-shown { opacity: 1; transform: none; }
.hr-note__icon { position: relative; flex: none; width: 18px; height: 18px; }
.hr-note__icon img { position: absolute; left: 2px; top: 1.05px; max-width: none; }
.hr-note > span:last-child {
  white-space: nowrap;
  font-size: 14px;
  line-height: 18px; /* cap height centred in the 18px row, like Figma's trimmed 24px box */
  letter-spacing: -0.5px;
  color: #000;
  font-variation-settings: "opsz" 32; /* Inter Display */
}

/* Instant state changes (initial reset before the loop starts) */
.hr-cards.no-anim * { transition: none !important; }
