/* The share poster and its modal, shared by both result page designs (site.css and result.css pages).
   The poster keeps the design kit's layout (identity and DNA in the head, the character between the four traits,
   the exhibit line, relationships, footer) on a fixed 1000 x 1040 sheet in the result page's sticker-pack style:
   a mint sheet with a dotted backing, white cards, the persona's accent behind the character and on the code.
   It is saved as an image with html2canvas 1.4.1, so it sticks to what that renders: plain hex colours (tints
   come from src/pages.js), no filter, clip-path, mask, color-mix() or gradients, the dots are a PNG tile, and
   only the code label is tilted. It loads its own fonts, so both result designs show it the same way. */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@600;700;800;900&family=Instrument+Sans:wght@400;500;600;700&display=swap');
.modal{--navy:#071A2B;--muted:#6B7A86;--paper:#F6F7F8;--radius:18px}
/* poster modal */
.modal{position:fixed;inset:0;background:rgba(7,26,43,.78);display:flex;align-items:center;justify-content:center;padding:16px;z-index:20}
.modal[hidden]{display:none}
.modal-card{background:#fff;border-radius:var(--radius);padding:16px;max-width:460px;width:100%;max-height:100%;overflow:auto}
#poster-canvas{width:100%;height:auto;border-radius:10px;background:var(--navy)}
.modal-status{font-size:13px;color:var(--muted);margin:10px 0 0;text-align:center}
.modal .actions{justify-content:center;margin-top:12px}
.modal-poster{max-width:1040px;width:auto;padding:12px;display:flex;flex-direction:column;align-items:center;overflow:hidden;max-height:calc(100vh - 32px)}
.poster-stage{overflow:hidden;background:#EEF8F5;border-radius:10px;padding:12px;width:100%;box-sizing:border-box}
.poster-stage .poster{width:1000px;transform-origin:top left}

/* ---- the poster ---- */
.poster{--mint:#C4EBE1;--ink:#0E1F1B;--muted:#56665F;--line:#D8E9E3;--backing:#EEF8F5;--display:Unbounded,'Arial Black',sans-serif;
  box-sizing:border-box;width:1000px;height:1040px;overflow:hidden;display:flex;flex-direction:column;gap:12px;padding:22px 22px 13px;
  background-color:var(--mint);background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAXElEQVR42u3UoQ3AMAxFQSPDyKwgIPtvGVUqqjpArB54/IC/Y6wZnQpgYGBgYGBgYGBgYOBW4Bxr1lOeDr6B16s8GVwf4AL+80m0G50/DAwMDAwMDAwMDAzcGLwBXj8iv3Pwfy4AAAAASUVORK5CYII=");background-size:22px 22px;
  color:var(--ink);font:400 14px/1.5 'Instrument Sans','Helvetica Neue',Arial,sans-serif;text-align:left}
.poster *{box-sizing:border-box}
.poster :where(h1,h3,p){margin:0}
.poster-small{font:700 10px/1.2 var(--display);letter-spacing:.06em;color:var(--muted)}

/* head: the identity card beside the Shopping DNA card */
.poster-head{flex:none;display:grid;grid-template-columns:1fr .82fr;gap:12px}
.poster-id,.poster-dna,.trait,.poster-rel{background:#fff;border-radius:20px;box-shadow:0 6px 16px rgba(10,40,32,.12)}
.poster-id{padding:20px 24px 22px}
.poster-tag{display:inline-block;margin:12px 0 2px;padding:6px 13px 7px;border-radius:10px;background:var(--accent);color:var(--on-accent);font:800 22px/1 var(--display);letter-spacing:.01em;transform:rotate(-4deg);box-shadow:0 4px 10px rgba(10,40,32,.25)}
.poster h1{margin:10px 0 12px;font:800 36px/1.02 var(--display);letter-spacing:-.035em}
.poster .quote{display:inline-block;margin:0 0 12px;padding:9px 15px 10px;border-radius:16px 16px 16px 5px;background:var(--accent-12);font-weight:600;font-size:16px;line-height:1.35}
.poster .intro{font-size:13.5px;line-height:1.5}
.poster-dna{display:flex;flex-direction:column;padding:20px 22px}
.poster-dna h3{margin:0 0 8px;font:800 17px/1.15 var(--display);letter-spacing:-.02em}
.pbars{flex:1 1 auto;display:grid;align-content:space-evenly;gap:16px}
.pbar-line{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:13.5px;line-height:1.25}
.pbar-line strong{font-weight:700}
.pbar-line span{font:800 19px/1 var(--display);letter-spacing:-.02em}
.ptrack{height:14px;margin-top:8px;border-radius:999px;background:var(--backing);border:1.5px solid var(--line);overflow:hidden}
.pfill{height:100%;border-radius:999px;background:var(--accent)}
.poster-note{margin-top:auto;padding-top:14px;font-size:11.5px;line-height:1.4;color:var(--muted)}

/* core: four trait stickers around the character on its accent backdrop; this row takes the spare height */
.core{flex:1 1 auto;display:grid;grid-template-columns:1fr 1.25fr 1fr;grid-template-rows:1fr 1fr;gap:12px}
.trait{min-width:0;padding:14px 16px 15px}
.trait strong{display:block;margin-bottom:6px;font:700 11px/1.2 var(--display);letter-spacing:.05em;color:var(--accent-ink)}
.trait p{font-size:14px;line-height:1.45}
.trait-crime{background:var(--accent);color:var(--on-accent)}
.trait-crime strong{color:var(--on-accent);opacity:.85}
.central{grid-column:2;grid-row:1/3;position:relative;min-height:250px;overflow:hidden;border-radius:24px;background:var(--accent);box-shadow:0 10px 24px rgba(10,40,32,.18);container-type:size}
.central::before{content:"";position:absolute;left:17%;width:66%;bottom:5%;height:24px;border-radius:50%;background:rgba(14,31,27,.17)}
/* the character cropped to its visible box (src/art.js): as tall as the backdrop allows without outgrowing its width */
/* the code ghosted behind the character, as on the landing page's character panels (.code-big); plain text in
   translucent white, which html2canvas draws, so it is in the saved PNG too */
.central-code{position:absolute;left:0;right:0;top:4%;text-align:center;font-family:Unbounded,'Arial Black',sans-serif;font-weight:900;font-size:30cqw;letter-spacing:-.04em;line-height:1;white-space:nowrap;color:rgba(255,255,255,.24);pointer-events:none}
.central-fig{--fh:300px;--fh:min(86cqh,calc(88cqw / var(--ar)));position:absolute;bottom:7%;left:50%;height:var(--fh);width:calc(var(--fh) * var(--ar));margin-left:calc(var(--fh) * var(--ar) / -2)}
.central-fig img{position:absolute;display:block;max-width:none;height:auto;width:calc(var(--fh) * var(--iw));left:calc(var(--fh) * var(--ix) * -1);top:calc(var(--fh) * var(--iy) * -1)}

/* the respondent's own line */
.poster-exhibit{flex:none;padding:11px 18px 12px;border:2px dashed var(--accent-ink);border-radius:16px;background:#fff;font-weight:600;font-size:15px;line-height:1.4}

/* relationships: round face stickers */
.poster-rel{flex:none;padding:15px 22px 16px}
.poster-rel h3{margin:0 0 10px;font:800 15px/1.2 var(--display);letter-spacing:-.02em}
.relgroups{display:grid;grid-template-columns:1fr 1fr;gap:26px}
.relmini{display:flex;align-items:flex-start;gap:12px;margin:9px 0 0}
.relface{--t:42px;position:relative;flex:0 0 auto;display:block;width:47px;height:47px;border-radius:50%;overflow:hidden;border:2.5px solid #fff;box-shadow:0 2px 6px rgba(10,40,32,.22)}
.relface img{position:absolute;display:block;max-width:none;height:auto;width:calc(var(--t) * var(--fw));left:calc(var(--t) * var(--fx) * -1);top:calc(var(--t) * var(--fy) * -1)}
.relmini strong{display:block;font-weight:700;font-size:13.5px;line-height:1.3}
.relmini p{margin-top:2px;font-size:12.5px;line-height:1.4;color:var(--muted)}

.poster-foot{flex:none;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:0 4px;font:700 10.5px/1.2 var(--display);letter-spacing:.05em}

/* "Print or save as PDF" marks the body so only the poster prints, at full layout scaled to the page */
@media print{
  body.print-poster>:not(#poster-modal){display:none!important}
  body.print-poster #poster-modal{display:block!important;position:static;background:none;padding:0}
  body.print-poster .modal-card{max-width:none;max-height:none;overflow:visible;padding:0;box-shadow:none}
  body.print-poster .poster-stage{width:auto!important;height:auto!important;padding:0;background:none;overflow:visible}
  body.print-poster .poster-stage .poster{transform:none!important;zoom:.68;break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  body.print-poster .poster *{box-shadow:none!important;-webkit-print-color-adjust:exact;print-color-adjust:exact} /* blurred shadows print as grey bands */
  body.print-poster .modal-status,body.print-poster #poster-modal .actions{display:none!important}
}
