/* The Operator's Trap Test
   Palette lifted from the book cover. Archivo (condensed for display) + Newsreader. */
:root {
  --paper: #efe9cf;
  --paper-deep: #e4ddbd;
  --bone: #fbf8ec;
  --ink: #17150f;
  --ink-2: #2a271e;
  --muted: #625e4d;
  --red: #b8321f;
  --red-deep: #962614;
  --red-soft: #e8a08f;
  --line: rgba(23, 21, 15, 0.14);
  --line-strong: rgba(23, 21, 15, 0.28);
  --line-control: rgba(23, 21, 15, 0.55);
  --white: #ffffff;
  --shadow-ink: 23, 21, 15;
  --placeholder: #625e4d;
  --zone-off: rgba(239, 233, 207, 0.36);
  --page-edge-a: #f6f1dc;
  --page-edge-b: #ddd6b6;
  --on-ink: #efe9cf;
  --on-ink-muted: rgba(239, 233, 207, 0.62);
  --line-on-ink: rgba(239, 233, 207, 0.16);

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border: 0; border-radius: 999px;
  font-family: var(--sans); font-weight: 650; font-size: 16px; letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer;
  transition: transform 140ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), opacity 160ms;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-red { background: var(--red); color: var(--white); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-line { background: transparent; color: var(--on-ink); border: 1.5px solid var(--line-on-ink); }
.btn-block { width: 100%; }
.btn:disabled { background: var(--paper-deep); color: rgba(var(--shadow-ink), 0.4); cursor: not-allowed; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover { background: var(--red); }
  .btn-red:hover:not(:disabled) { background: var(--red-deep); }
  .btn-paper:hover { background: var(--white); }
  .btn-line:hover { border-color: var(--on-ink); }
}

.text-btn {
  background: none; border: 0; padding: 12px 6px; min-height: 44px; cursor: pointer;
  font-size: 14px; font-weight: 550; color: var(--muted);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px;
}
.text-btn:hover { color: var(--ink); }

/* ---------- Landing ---------- */
.masthead {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 22px max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter)));
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--display); font-weight: 850; font-stretch: 70%; font-size: 19px; letter-spacing: 0.01em; text-transform: uppercase;
}
.masthead-date { font-size: 14px; color: var(--muted); }

.hero {
  display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) var(--gutter) clamp(56px, 9vw, 112px);
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.35fr 0.65fr; gap: 40px; min-height: min(calc(100svh - 70px), 860px); }
}
.hero-title {
  margin: 0;
  font-family: var(--display); font-weight: 850; font-stretch: 68%;
  font-size: clamp(44px, 5.2vw, 80px);
  line-height: 0.93; letter-spacing: -0.012em;
  text-transform: uppercase;
  max-width: 19ch;
  text-wrap: balance;
}
.hero-sub {
  margin: 28px 0 0; max-width: 44ch;
  font-size: clamp(17px, 0.8vw + 13px, 20px); line-height: 1.55; letter-spacing: -0.012em;
  color: var(--ink-2);
}
.hero-actions { margin-top: 36px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-note { font-size: 14px; color: var(--muted); }

.hero-book { display: flex; justify-content: center; perspective: 1600px; }
.book {
  --rx: 4deg; --ry: -22deg;
  position: relative; width: min(64vw, 330px);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 600ms var(--ease);
}
.book-cover {
  width: 100%; border-radius: 3px 6px 6px 3px;
  box-shadow:
    inset 4px 0 6px rgba(var(--shadow-ink), 0.14),
    0 2px 4px rgba(var(--shadow-ink), 0.12),
    24px 30px 50px -18px rgba(var(--shadow-ink), 0.45),
    50px 60px 90px -40px rgba(var(--shadow-ink), 0.35);
}
.book-pages {
  position: absolute; top: 1.2%; right: -14px; width: 14px; height: 97.6%;
  background: repeating-linear-gradient(90deg, var(--page-edge-a) 0 1px, var(--page-edge-b) 1px 2px);
  transform: rotateY(90deg) translateZ(-7px); transform-origin: left center;
  border-radius: 0 2px 2px 0;
}

/* entrance: one orchestrated moment on load */
.hero-title, .hero-sub, .hero-actions { animation: rise 760ms var(--ease) both; }
.hero-sub { animation-delay: 90ms; }
.hero-actions { animation-delay: 170ms; }
.hero-book { animation: settle 1100ms var(--ease) 120ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: translateY(28px) rotate(-2deg); } to { opacity: 1; transform: none; } }

/* What it measures */
.measures {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(80px, 11vw, 160px) var(--gutter);
  display: grid; grid-template-columns: 1fr; gap: 20px 64px;
}
@media (min-width: 900px) { .measures { grid-template-columns: 0.8fr 1.2fr; } }
.section-title {
  margin: 0; font-family: var(--display); font-weight: 850; font-stretch: 70%; text-transform: uppercase;
  font-size: clamp(32px, 4vw, 48px); line-height: 0.98;
}
.section-lede { margin: 18px 0 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 40ch; }
@media (min-width: 900px) { .measures-intro { position: sticky; top: 32px; align-self: start; } }
.measure-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.measure-list li {
  display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.measure-k { font-weight: 600; font-size: 15px; }
.measure-v { font-size: 17px; color: var(--ink-2); }
@media (max-width: 520px) { .measure-list li { grid-template-columns: 1fr; gap: 2px; } }

/* Author */
.author {
  background: var(--bone);
  display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center;
  padding: clamp(80px, 11vw, 160px) var(--gutter);
}
.author > * { max-width: 1240px; }
@media (min-width: 860px) {
  .author { grid-template-columns: minmax(220px, 360px) minmax(0, 640px); justify-content: center; gap: 72px; }
}
.author-photo { width: 100%; max-width: 360px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; border-radius: 4px; filter: saturate(0.92); }
.author-quote { margin: 0; }
.author-quote p {
  margin: 0; font-weight: 500;
  font-size: clamp(24px, 1.8vw + 15px, 36px); line-height: 1.22; letter-spacing: -0.028em;
  text-wrap: pretty;
}
.author-name { margin: 28px 0 0; font-weight: 700; font-size: 16px; }
.author-bio { margin: 8px 0 0; font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 56ch; }

.closer {
  background: var(--ink); color: var(--on-ink);
  padding: clamp(96px, 13vw, 184px) max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter)));
  display: flex; flex-direction: column; align-items: flex-start; gap: 32px;
}
.closer-line {
  margin: 0; font-family: var(--display); font-weight: 850; font-stretch: 68%; text-transform: uppercase;
  font-size: clamp(48px, 10vw, 152px); line-height: 0.9; max-width: none;
}
.site-footer {
  background: var(--ink); color: var(--on-ink-muted);
  border-top: 1px solid var(--line-on-ink);
  padding: 22px max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter))); font-size: 13.5px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}

/* ---------- App ---------- */
#app { min-height: 100svh; }
.screen { display: none; min-height: 100svh; }
.screen.active { display: flex; flex-direction: column; animation: screenIn 420ms var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.screen-quiz { padding: 18px var(--gutter) 32px; }
.quiz-bar { display: flex; align-items: center; gap: 14px; max-width: 760px; width: 100%; margin: 0 auto; }
.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--line-control);
  transition: opacity 160ms, background-color 160ms;
}
.icon-btn:hover { background: var(--bone); }
.icon-btn.is-hidden { opacity: 0; pointer-events: none; }
.steps { flex: 1; display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.steps li { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.steps li::after {
  content: ""; display: block; height: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform 420ms var(--ease);
}
.steps li.done::after, .steps li.current::after { transform: scaleX(1); }
.steps li.current::after { background: var(--red); }

.quiz-body { width: 100%; max-width: 760px; margin: auto; padding: 40px 0 24px; }
.step-count { margin: 0; flex: none; min-width: 3.2em; text-align: right; font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.question {
  margin: 0; outline: none;
  font-weight: 600; font-size: clamp(26px, 2.2vw + 16px, 40px);
  line-height: 1.16; letter-spacing: -0.03em; text-wrap: balance;
}
.question.enter { animation: rise 520ms var(--ease) both; }
.options { margin-top: 32px; border-top: 1px solid var(--ink); }
.option {
  width: 100%; display: grid; grid-template-columns: 36px 1fr; gap: 16px; align-items: center;
  padding: 18px 12px 18px 4px; text-align: left; cursor: pointer;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  font-size: 17px; line-height: 1.4; color: var(--ink);
  transition: background-color 160ms var(--ease), padding-left 220ms var(--ease);
  animation: rise 460ms var(--ease) both;
}
.option-key {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  border: 1.5px solid var(--line-control); font-weight: 700; font-size: 14px; color: var(--muted);
  transition: background-color 160ms, color 160ms, border-color 160ms, transform 220ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .option:hover { background: var(--bone); padding-left: 12px; }
  .option:hover .option-key { border-color: var(--ink); color: var(--ink); }
}
.option[aria-pressed="true"] { background: var(--bone); padding-left: 12px; }
.option[aria-pressed="true"] .option-key { background: var(--red); border-color: var(--red); color: var(--white); transform: scale(1.06); }
.kbd-hint { margin: 22px 0 0; font-size: 13.5px; color: var(--muted); }
@media (hover: none) { .kbd-hint { display: none; } }

/* Details */
.screen-lead { justify-content: center; align-items: center; padding: 40px var(--gutter); }
.lead { width: 100%; max-width: 460px; }
.lead-title { margin: 0; font-family: var(--display); font-weight: 850; font-stretch: 70%; text-transform: uppercase; font-size: clamp(40px, 6vw, 56px); line-height: 0.95; }
.lead-sub { margin: 14px 0 28px; font-size: 18px; color: var(--ink-2); letter-spacing: -0.012em; }
.field { display: block; margin-top: 16px; }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
.field input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--bone); border: 1.5px solid var(--line-control); border-radius: 12px;
  transition: border-color 160ms, box-shadow 160ms;
}
.field input::placeholder { color: var(--placeholder); opacity: 1; }
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(var(--shadow-ink), 0.1); }
.field input.invalid { border-color: var(--red); }
.field-error { display: none; margin-top: 6px; font-size: 13.5px; color: var(--red-deep); }
.field-error.show { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 12px; margin: 22px 0 24px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); cursor: pointer; }
.consent span { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.lead-back { display: block; margin: 12px auto 0; }
.fine { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* Result */
.screen-result { background: var(--ink); color: var(--on-ink); padding: 40px var(--gutter) 64px; }
.result { width: 100%; max-width: 680px; margin: 0 auto; }
.result-name {
  margin: 0; outline: none; color: var(--white);
  font-family: var(--display); font-weight: 850; font-stretch: 66%; text-transform: uppercase;
  font-size: clamp(54px, 11vw, 104px); line-height: 0.9; letter-spacing: -0.01em;
}

.scale { margin: 44px 0 0; }
.scale-track { position: relative; height: 10px; display: grid; gap: 3px; }
.zone { border-radius: 2px; background: var(--zone-off); transition: background-color 500ms var(--ease) 900ms; }
.zone.on { background: var(--red); }
.marker {
  position: absolute; top: 50%; left: 0; width: 2px; height: 34px; background: var(--white);
  transform: translate(-1px, -50%); transition: left 1100ms var(--ease-io) 250ms;
}
.marker-score {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--white);
}
.scale-labels { display: grid; gap: 3px; margin-top: 12px; font-size: 13px; color: var(--on-ink-muted); }

.result-blurb { margin: 36px 0 0; font-size: clamp(17px, 0.5vw + 14px, 19px); line-height: 1.62; letter-spacing: -0.01em; color: var(--on-ink); max-width: 60ch; }
.result-status { margin: 12px 0 0; font-size: 14px; color: var(--on-ink-muted); min-height: 1em; }

.result-quote {
  margin: 36px 0 0; padding: 22px 0; border-top: 1px solid var(--line-on-ink); border-bottom: 1px solid var(--line-on-ink);
  display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center;
}
.result-quote img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 28%; }
.result-quote p { margin: 0; font-weight: 500; font-size: 16px; line-height: 1.45; letter-spacing: -0.012em; }
.result-quote p > span:not(.q) { display: block; margin-top: 6px; font-weight: 600; font-size: 13.5px; color: var(--on-ink-muted); }

.buy { margin-top: 36px; display: grid; grid-template-columns: 72px 1fr; gap: 18px 20px; align-items: center; }
.buy-links { grid-column: 1 / -1; }
@media (min-width: 560px) {
  .buy { grid-template-columns: 96px 1fr; grid-template-rows: auto 1fr; align-items: start; }
  .buy-cover { grid-row: 1 / span 2; }
  .buy-links { grid-column: 2; }
}
.buy-cover { width: 100%; border-radius: 2px 4px 4px 2px; box-shadow: 0 14px 30px rgba(var(--shadow-ink), 0.6); }
.buy-title { margin: 0; font-family: var(--display); font-weight: 850; font-stretch: 70%; text-transform: uppercase; font-size: 26px; line-height: 1; color: var(--white); }
.buy-meta { margin: 6px 0 0; font-size: 14px; color: var(--on-ink-muted); }
.buy-links { display: flex; flex-direction: column; gap: 10px; }
.buy-links .btn { justify-content: center; }
@media (min-width: 560px) { .buy-links { flex-direction: row; flex-wrap: wrap; } .buy-links .btn { flex: 1 1 auto; } }

.share { margin-top: 40px; }
.share { margin-top: 32px; }
.share-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .share-row { grid-template-columns: repeat(3, 1fr); } }
.share-row .btn { padding: 0 10px; font-size: 15px; }
.retake { display: block; margin: 36px 0 0; color: var(--on-ink-muted); text-decoration-color: var(--line-on-ink); }
.retake:hover { color: var(--on-ink); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--paper); color: var(--ink); font-size: 14.5px; font-weight: 600;
  padding: 12px 20px; border-radius: 999px; box-shadow: 0 12px 30px rgba(var(--shadow-ink), 0.35);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
}

/* ---------- Privacy notice ---------- */
.wordmark.plain { text-decoration: none; }
.legal { max-width: 680px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) 96px; }
.legal h1 { margin: 0; font-family: var(--display); font-weight: 850; font-stretch: 70%; text-transform: uppercase; font-size: clamp(40px, 6vw, 64px); line-height: 0.95; }
.legal-updated { margin: 12px 0 32px; color: var(--muted); font-size: 14px; }
.legal h2 { margin: 40px 0 10px; font-size: 19px; font-weight: 750; }
.legal p, .legal li { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 6px 0; }
.legal a { text-underline-offset: 3px; }
.legal-back { margin-top: 48px; font-family: var(--sans) !important; font-size: 15px !important; }

@media (max-width: 560px) {
  .masthead { padding-top: 18px; padding-bottom: 18px; }
  .wordmark { font-size: 17px; white-space: nowrap; }
  .masthead-date { display: none; }
}

/* Faint polygon lines from the book cover, behind the hero */
.hero { position: relative; isolation: isolate; }
.hero-lines {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  width: 100%; height: 100%; color: var(--ink); opacity: 0.09;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Paper grain: makes the paper colour read as the book's stock, not a flat fill */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.screen-result, .closer, .site-footer { position: relative; z-index: 2; }

/* Portrait: slow hover zoom inside its frame */
.author-photo-frame { overflow: hidden; border-radius: 4px; width: 100%; max-width: 360px; }
.author-photo-frame .author-photo { border-radius: 0; transition: transform 900ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .author-photo-frame:hover .author-photo { transform: scale(1.045); } }

/* The one scroll moment: the quote fills in word by word as it is read */
.author-quote .w { opacity: var(--o, 1); transition: opacity 120ms linear; }

.preview-bar { position: sticky; top: 0; z-index: 70; background: var(--red); color: var(--white); text-align: center; font-size: 14px; font-weight: 600; padding: 10px 16px; }

/* Endorsements */
.praise { max-width: 1240px; margin: 0 auto; padding: clamp(80px, 11vw, 160px) var(--gutter); }
.praise .section-title { margin-bottom: clamp(32px, 4vw, 56px); max-width: 16ch; }
.praise-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .praise-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.praise-list li {
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(24px, 2.6vw, 36px);
  box-shadow: 0 1px 0 rgba(var(--shadow-ink), 0.04), 0 24px 48px -32px rgba(var(--shadow-ink), 0.35);
}
.praise-list figure { margin: 0; display: flex; flex-direction: column; height: 100%; }
.praise-list blockquote { margin: 0; }
.praise-list blockquote p { margin: 0; font-weight: 500; font-size: clamp(18px, 0.6vw + 14px, 21px); line-height: 1.4; letter-spacing: -0.02em; color: var(--ink); text-wrap: pretty; }
.praise-list figcaption { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; gap: 2px; }
.praise-list figcaption::before { content: ""; display: block; width: 32px; height: 2px; background: var(--red); margin-bottom: 16px; }
.praise-name { font-weight: 650; font-size: 15px; }
.praise-role { font-size: 14px; color: var(--muted); }
/* On wide screens, line up the quotes and the names across all cards. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 900px) {
    .praise-list { grid-auto-rows: auto; row-gap: 0; }
    .praise-list li { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
    .praise-list figure { display: grid; grid-row: span 2; grid-template-rows: subgrid; height: auto; }
    .praise-list figcaption { margin-top: 0; justify-content: flex-start; }
  }
}

/* Endorsement motion: staggered rise-and-focus on scroll, cursor spotlight, stretching rule. */
.praise-list li { position: relative; overflow: hidden; isolation: isolate;
  transition: transform 500ms var(--ease), box-shadow 500ms var(--ease), border-color 300ms var(--ease); }
.praise-list li::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(184, 50, 31, 0.13), transparent 62%);
  transition: opacity 400ms var(--ease);
}
.praise-list figcaption::before { transition: width 600ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .praise-list li:hover { transform: translateY(-6px); border-color: rgba(184, 50, 31, 0.28);
    box-shadow: 0 1px 0 rgba(var(--shadow-ink), 0.04), 0 36px 60px -34px rgba(var(--shadow-ink), 0.5); }
  .praise-list li:hover::after { opacity: 1; }
  .praise-list li:hover figcaption::before { width: 64px; }
}
.praise-list.will-reveal li {
  opacity: 0; transform: translateY(48px) scale(0.97); filter: blur(10px);
  transition: opacity 900ms var(--ease), transform 1000ms var(--ease), filter 900ms var(--ease),
              box-shadow 500ms var(--ease), border-color 300ms var(--ease);
  transition-delay: calc(var(--i, 0) * 140ms);
}
.praise-list.will-reveal li.in { opacity: 1; transform: none; filter: none; }
.praise-list.will-reveal li.in:hover { transition-delay: 0ms; }
@media (hover: hover) and (pointer: fine) {
  .praise-list.will-reveal li.in:hover { transform: translateY(-6px); }
}
.praise-list.will-reveal li .praise-name, .praise-list.will-reveal li .praise-role {
  opacity: 0; transform: translateY(8px); transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  transition-delay: calc(var(--i, 0) * 140ms + 450ms);
}
.praise-list.will-reveal li.in .praise-name, .praise-list.will-reveal li.in .praise-role { opacity: 1; transform: none; }
.praise-list.will-reveal li figcaption::before { width: 0; transition-delay: calc(var(--i, 0) * 140ms + 350ms); }
.praise-list.will-reveal li.in figcaption::before { width: 32px; }
@media (hover: hover) and (pointer: fine) {
  .praise-list.will-reveal li.in:hover figcaption::before { width: 64px; transition-delay: 0ms; }
}
