.answer-trace { position: fixed; z-index: 170; inset: 0; pointer-events: none; }
.answer-trace.open { pointer-events: auto; }
.answer-trace-backdrop { position: absolute; inset: 0; background: rgba(27, 25, 24, .32); opacity: 0; transition: opacity .2s ease; }
.answer-trace.open .answer-trace-backdrop { opacity: 1; }
.answer-trace-sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(480px, 100vw);
  border-left: 1px solid #dfddda;
  background: #f5f5f3;
  box-shadow: -24px 0 70px rgba(27, 25, 24, .18);
  color: #201e1d;
  flex-direction: column;
  font-family: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transform: translateX(100%);
  transition: transform .24s ease;
}
.answer-trace.open .answer-trace-sheet { transform: none; }
.answer-trace-head { display: flex; padding: 28px 28px 20px; border-bottom: 1px solid #dfddda; align-items: flex-start; justify-content: space-between; gap: 16px; }
.answer-trace-head h2 { margin: 4px 0 0; font-size: 26px; font-weight: 540; letter-spacing: -.045em; line-height: 1.05; }
.answer-trace-close { display: grid; width: 34px; height: 34px; border: 1px solid #dfddda; border-radius: 50%; background: transparent; color: #201e1d; font-size: 20px; line-height: 1; place-items: center; cursor: pointer; }
.answer-trace-close:hover { background: #ecebe8; }
.answer-trace-body { flex: 1; padding: 22px 28px 36px; overflow-y: auto; }
.answer-trace-question { margin: 0 0 22px; padding: 14px 16px; border-radius: 10px; background: #1b1918; color: #f1eeea; font-size: 13px; line-height: 1.5; }
.answer-trace-body h3 { margin: 24px 0 12px; color: #78736f; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.answer-trace-steps { position: relative; margin: 0; padding: 0; list-style: none; }
.answer-trace-steps li { position: relative; display: grid; padding: 0 0 18px; grid-template-columns: 30px 1fr; gap: 14px; }
.answer-trace-steps li:not(:last-child)::before { position: absolute; top: 30px; bottom: 0; left: 14.5px; width: 1px; border-left: 1px dashed #cfccc8; content: ""; }
.answer-trace-index { display: grid; width: 30px; height: 30px; border-radius: 50%; background: #1b1918; color: #dfff68; font-size: 10px; font-weight: 650; place-items: center; }
.answer-trace-steps li > div { padding: 12px 14px; border: 1px solid #dfddda; border-radius: 8px; background: #fbfaf8; }
.answer-trace-steps strong { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 580; letter-spacing: -.01em; }
.answer-trace-steps p { margin: 0; color: #6b6865; font-size: 12px; line-height: 1.55; }
.answer-trace-sources { display: flex; flex-wrap: wrap; gap: 5px; }
.answer-trace-sources span { padding: 5px 8px; border: 1px solid #dfddda; border-radius: 5px; background: #f6f5f2; color: #615e5b; font-size: 11px; }

/* relationships used + data used */
.answer-trace-rel { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.answer-trace-rel + .answer-trace-rel { margin-top: 16px; padding-top: 16px; border-top: 1px dashed #cfccc8; }
.answer-trace-rel-eyebrow { align-self: flex-start; margin-bottom: 2px; color: #4b5b00; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.answer-trace-rel-box { width: 100%; padding: 9px 14px; border: 1px solid #dfddda; border-radius: 8px; background: #fbfaf8; text-align: center; }
.answer-trace-rel-box strong { display: block; font-size: 12.5px; font-weight: 580; line-height: 1.35; }
.answer-trace-rel-box span { display: block; margin-top: 2px; color: #78736f; font-size: 11px; }
.answer-trace-rel-box.phrase { background: #ecebe8; }
.answer-trace-rel-box.result { border-color: #1b1918; background: #f3f8d9; }
.answer-trace-rel-arrow { color: #78736f; font-size: 13px; line-height: 1; padding: 2px 0; }
.answer-trace-rel-row { display: flex; width: 100%; flex-wrap: wrap; gap: 8px; }
.answer-trace-rel-row .answer-trace-rel-box { flex: 1 1 120px; min-width: 0; }
.answer-trace-rel-foot { margin-top: 4px; color: #78736f; font-size: 11px; text-align: center; }
.answer-trace-data-row { display: flex; padding: 10px 0; border-bottom: 1px solid #dfddda; align-items: flex-start; justify-content: space-between; gap: 12px; }
.answer-trace-data-row:last-child { border-bottom: 0; }
.answer-trace-data-row strong { display: block; font-size: 13px; font-weight: 580; }
.answer-trace-data-row span { display: block; margin-top: 2px; color: #78736f; font-size: 11px; line-height: 1.4; }
.answer-trace-data-row em { flex-shrink: 0; padding: 3px 10px; border-radius: 999px; background: #1b1918; color: #dfff68; font-size: 10.5px; font-style: normal; font-weight: 600; white-space: nowrap; }
