/* Side-by-side figure: survey scan beside the exam scan, matching words tinted.
   Static HTML reads with no script: tints and numbered markers are always visible.
   Each marked phrase carries a numbered marker on its top-left corner; the same number marks the match on both sides.
   sbs.js adds the joining lines on wide figures and plays the short reveal once.
   Set --sbs-bleed on the page to its side padding so phone scans run to the screen edge. */
.sbs{
  --sbs-ink:var(--color-ink,#16221E);--sbs-ink-2:var(--color-ink-2,#3d4a45);--sbs-paper:var(--color-paper,#FBFAF7);
  --sbs-emerald:var(--color-emerald,#047857);--sbs-line-c:var(--color-line,#dcdcd3);
  position:relative;container-type:inline-size;margin:24px 0;color:var(--sbs-ink)}
.sbs-cols{display:grid;grid-template-columns:minmax(0,1fr);gap:20px}
.sbs-col{padding-left:20px;min-width:0}
.sbs-label{font-family:var(--font-ui,'Bricolage Grotesque',system-ui,sans-serif);font-weight:600;font-size:15px;line-height:20px;margin:0 0 8px;color:var(--sbs-ink-2)}
.sbs-scan{position:relative;background:#fff;box-shadow:0 0 0 1px var(--sbs-line-c)}
.sbs-crop{position:relative}
.sbs-crop + .sbs-crop{margin-top:6px}
.sbs-crop img{display:block;width:100%;height:auto}
.sbs-tint{position:absolute;background:color-mix(in srgb,var(--sbs-emerald) 24%,transparent);mix-blend-mode:multiply;border-radius:3px}
.sbs-badge{position:absolute;width:18px;height:18px;transform:translate(calc(-100% - 1px),-22%);border-radius:50%;background:var(--sbs-emerald);color:var(--sbs-paper);
  box-shadow:0 0 0 2px #fff;font-family:var(--font-mono,'IBM Plex Mono',ui-monospace,monospace);font-weight:500;font-size:15px;line-height:18px;text-align:center;z-index:1}
.sbs-svg{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}
.sbs-line{fill:none;stroke:var(--sbs-emerald);stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
.sbs-arrow{fill:var(--sbs-emerald)}
.sbs-take{font-family:var(--font-body,Lora,Georgia,serif);font-weight:500;font-size:18px;line-height:26px;margin:16px 0 0;padding-left:20px;max-width:60ch}

/* Wide: two columns. With the script, lines join the matches as well. */
@container (min-width:760px){
  .sbs-cols{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:48px}
}
/* 20 px inset on every width: room for a marker on the left edge of a scan. */

/* Phone: survey above question; bleed the scans to the screen edge so the scan text stays at 15 px or more. */
@media (max-width:759px){
  .sbs{margin-left:calc(-1 * var(--sbs-bleed,0px));margin-right:calc(-1 * var(--sbs-bleed,0px))}
  .sbs-take{padding-right:var(--sbs-bleed,0px)}
}
