/* Printable QR posters (tracker BB-206): #/posters in the app and posters.html. Drawn by js/posters.js.
   A poster is laid out in "poster units": --u is 1% of the sheet's width, so the same design fits a phone preview, US Letter
   (8.5in wide) and A4 (210mm wide). On screen the width comes from the preview frame (container units); in print from the paper.
   The sheet is paper: white with ink-colored text in both themes. Print rules: no background fills or shadows, ink only,
   and only #pst-print (the print copy) is shown. */

/* ---------- the page around the posters ---------- */
.pst-page{max-width:46rem;margin:0 auto;padding:0 0 2.5rem;color:var(--bb-ink);font:400 var(--bb-text-body, 1rem)/1.45 var(--bb-font-body)}
.pst-title{margin:.5rem 0 0;font:700 1.375rem/1.15 var(--bb-font-display);letter-spacing:-.01em;color:var(--bb-ink)}
.pst-standalone .pst-title{font-size:clamp(2rem,6vw,3rem);line-height:1.05}
html.puck .pst-title:focus,html.puck .pst-title:focus-visible{outline:none;box-shadow:none}   /* focused for screen readers on arrival, not a control */
.pst-lede{margin:.5rem 0 0;color:var(--bb-muted)}
.pst-controls{display:grid;gap:.75rem;margin:1rem 0 0}
.pst-choice{border:0;margin:0;padding:0;min-width:0}
.pst-choice__legend{padding:0;margin:0 0 .375rem;font:600 .75rem/1.2 var(--bb-font-body);letter-spacing:.08em;text-transform:uppercase;color:var(--bb-muted)}
.pst-choice__row{display:flex;flex-wrap:wrap;gap:.5rem}
.pst-pill{position:relative;display:inline-flex;align-items:center;min-height:var(--pk-tap,44px);padding:0 1rem;border-radius:var(--bb-radius-pill);
  border:1px solid var(--bb-rule);background:var(--bb-card, transparent);color:var(--bb-ink);font:600 .9375rem/1.2 var(--bb-font-body);cursor:pointer}
.pst-pill input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.pst-pill:has(input:checked){background:var(--bb-green);border-color:var(--bb-green);color:var(--bb-on-green,#fff)}
.pst-pill:has(input:focus-visible){outline:3px solid var(--pk-focus,var(--bb-green));outline-offset:3px}
html[data-theme="dark"] .pst-pill:has(input:checked){background:var(--bb-gold-light,#D9C08E);border-color:var(--bb-gold-light,#D9C08E);color:#17281D}
.pst-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;margin:1rem 0 0}
.pst-print-btn{min-height:var(--pk-tap,44px);padding:0 1.5rem;border:0;border-radius:var(--bb-radius-pill);background:var(--bb-green);color:var(--bb-on-green,#fff);
  font:600 1rem/1 var(--bb-font-body);cursor:pointer}
html[data-theme="dark"] .pst-print-btn{background:var(--bb-gold-light,#D9C08E);color:#17281D}
.pst-note{margin:0;flex:1 1 14rem;color:var(--bb-muted);font-size:var(--bb-fs-subhead)}
.pst-openrow{margin:.75rem 0 0}
.pst-open{display:inline-flex;align-items:center;min-height:var(--pk-tap,44px);color:var(--bb-ink);font-weight:600}
.pst-open[hidden],.pst-openrow:has(.pst-open[hidden]){display:none}
/* in the app the header already shows the title: the heading stays for screen readers (focused on arrival) */
.pst-view .pst-title{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.pst-view .pst-lede{margin-top:1rem}
.pst-previews{display:grid;gap:1.5rem;margin:1.5rem 0 0}
@media (min-width:900px){ .pst-standalone .pst-previews{grid-template-columns:repeat(auto-fill,minmax(18rem,1fr))} }
.pst-frame{margin:0;container-type:inline-size}
.pst-frame .pst-sheet{box-shadow:0 1px 2px rgba(28,38,32,.12),0 8px 24px rgba(28,38,32,.10);border-radius:var(--bb-radius-button)}
html[data-theme="dark"] .pst-frame .pst-sheet{box-shadow:0 0 0 1px rgba(245,240,225,.18),0 8px 24px rgba(0,0,0,.45)}
.pst-cap{margin:.5rem 0 0;color:var(--bb-muted);font-size:var(--bb-fs-subhead)}

/* ---------- one poster ---------- */
.pst-sheet{--w:100cqw;--u:calc(var(--w) / 100);--ink:#1C2620;--green:#2F4D36;
  position:relative;box-sizing:border-box;width:var(--w);aspect-ratio:8.5 / 11;overflow:hidden;
  background:#fff;color:var(--ink);padding:calc(5 * var(--u));font-family:var(--bb-font-body);text-align:left;
  print-color-adjust:exact;-webkit-print-color-adjust:exact}
.pst-sheet[data-size="a4"]{aspect-ratio:210 / 297}
.pst-inner{box-sizing:border-box;height:100%;border:calc(.9 * var(--u)) double var(--ink);padding:calc(4.5 * var(--u)) calc(5 * var(--u)) calc(3.5 * var(--u));
  display:grid;gap:calc(2 * var(--u));min-height:0}
.pst-sheet p{margin:0}
.pst-mark{display:block;width:calc(34 * var(--u));height:auto}
.pst-hook{font:700 calc(7.4 * var(--u))/1.04 var(--bb-font-display);letter-spacing:-.015em;color:var(--ink);text-wrap:balance}
.pst-sub{font:500 calc(3.3 * var(--u))/1.3 var(--bb-font-body);color:var(--ink)}
.pst-artbox{min-height:0;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
.pst-art{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.pst-qr{display:flex;flex-direction:column;align-items:center;gap:calc(1.2 * var(--u));text-align:center}
.pst-qr__code{display:block;width:calc(30 * var(--u));height:calc(30 * var(--u))}
.pst-qr__txt{display:grid;gap:calc(.4 * var(--u));min-width:0}
.pst-scan{font:600 calc(2.1 * var(--u))/1.2 var(--bb-font-body);letter-spacing:.08em;text-transform:uppercase;color:var(--ink)}
.pst-url{font:700 calc(3.4 * var(--u))/1.15 var(--bb-font-body);color:var(--ink);white-space:nowrap}   /* never broken at the hyphen: it has to be typed as one piece */
.pst-foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:calc(1 * var(--u)) calc(3 * var(--u));align-items:baseline;
  border-top:calc(.25 * var(--u)) solid var(--ink);padding-top:calc(1.6 * var(--u));font:500 calc(2 * var(--u))/1.3 var(--bb-font-body);color:var(--ink)}
.pst-tag{font:italic 400 calc(2.6 * var(--u))/1.2 var(--bb-font-display)}

/* Design 1, "Split 100 bucks": headline across the top, Buck pointing out at the reader at bottom left, the code at right */
.pst-sheet--split .pst-inner{grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto minmax(0,1fr) auto;
  grid-template-areas:"mark mark" "hook hook" "sub sub" "art qr" "foot foot"}
.pst-sheet--split .pst-mark{grid-area:mark}
.pst-sheet--split .pst-hook{grid-area:hook;font-size:calc(8.2 * var(--u))}
.pst-sheet--split .pst-sub{grid-area:sub}
.pst-sheet--split .pst-artbox{grid-area:art;justify-content:flex-start;margin-bottom:calc(-3.5 * var(--u))}
.pst-sheet--split .pst-qr{grid-area:qr;align-self:end;padding-bottom:calc(1 * var(--u))}
.pst-sheet--split .pst-qr__code{width:calc(32 * var(--u));height:calc(32 * var(--u))}
.pst-sheet--split .pst-url{font-size:calc(3 * var(--u))}
.pst-sheet--split .pst-foot{grid-area:foot;position:relative;background:#fff}

/* Design 2, "Follow the Bucks": centered like a playbill, Buck with his magnifier on top, the code at the bottom */
.pst-sheet--follow .pst-inner{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr) auto auto auto auto;
  grid-template-areas:"mark" "art" "hook" "sub" "qr" "foot";justify-items:center;text-align:center}
.pst-sheet--follow .pst-mark{grid-area:mark}
.pst-sheet--follow .pst-artbox{grid-area:art;align-self:stretch;justify-self:stretch;align-items:flex-end}
.pst-sheet--follow .pst-hook{grid-area:hook;font-size:calc(7 * var(--u))}
.pst-sheet--follow .pst-sub{grid-area:sub}
.pst-sheet--follow .pst-qr{grid-area:qr;flex-direction:row;gap:calc(3 * var(--u));text-align:left;margin-top:calc(1 * var(--u))}
.pst-sheet--follow .pst-qr__code{width:calc(26 * var(--u));height:calc(26 * var(--u))}
.pst-sheet--follow .pst-foot{grid-area:foot;justify-self:stretch}

/* Design 3, "Yea or Nay": words at left, Buck at right, the code in a ruled band across the bottom */
.pst-sheet--docket .pst-inner{grid-template-columns:1.25fr .75fr;grid-template-rows:auto auto minmax(0,1fr) auto auto;
  grid-template-areas:"mark mark" "hook art" "sub art" "qr qr" "foot foot"}
.pst-sheet--docket .pst-mark{grid-area:mark}
.pst-sheet--docket .pst-hook{grid-area:hook;font-size:calc(8.4 * var(--u));align-self:end}
.pst-sheet--docket .pst-sub{grid-area:sub;align-self:start}
.pst-sheet--docket .pst-artbox{grid-area:art;align-items:center;justify-content:flex-end}
.pst-sheet--docket .pst-qr{grid-area:qr;flex-direction:row;justify-content:flex-start;gap:calc(4 * var(--u));text-align:left;
  border-top:calc(.25 * var(--u)) solid var(--ink);padding-top:calc(2.5 * var(--u))}
.pst-sheet--docket .pst-qr__code{width:calc(28 * var(--u));height:calc(28 * var(--u))}
.pst-sheet--docket .pst-url{font-size:calc(3.6 * var(--u))}
.pst-sheet--docket .pst-sub{font-size:calc(3.6 * var(--u))}
.pst-sheet--docket .pst-foot{grid-area:foot}

/* ---------- the print copy ---------- */
#pst-print{display:none}
@media print{
  html.pst-on,html.pst-on body{background:#fff !important;color:#000 !important}
  /* every app screen, bar and sheet is hidden; the demo build's phone frame is undone so nothing clips the paper */
  html.pst-on body{width:auto !important;height:auto !important;min-height:0 !important;margin:0 !important;padding:0 !important;overflow:visible !important;
    box-shadow:none !important;transform:none !important;border-radius:0 !important}
  html.pst-on body > :not(#pst-print){display:none !important}
  html.pst-on #pst-print{display:block !important}
  #pst-print .pst-sheet{--w:8.5in;width:8.5in;height:10.99in;aspect-ratio:auto;break-after:page;page-break-after:always;box-shadow:none;border-radius:0}
  #pst-print[data-size="a4"] .pst-sheet{--w:210mm;width:210mm;height:296.8mm}
  #pst-print .pst-sheet:last-child{break-after:auto;page-break-after:auto}
}
