/* ==========================================================================================
   BarcoderX website: online playground (English and Spanish).
   Used ONLY by the playground pages: /playground/ and /es/zona-de-pruebas/ link it directly, and /playground-app/ and /playground-app/es/
   get it inside /assets/playground-page.css (tools/playground/Build-PageBundles.ps1).
   Loaded after tokens.css, site.css, inner.css, zpl.css and free-tools.css, so it reuses the free-tool pieces
   (.ft-types chips, .ft-label, .ft-input, .ft-hint, .ft-status, .ft-table, .ft-related) and only adds what the
   playground needs: a wide card, the template editor, the result stage and the notes list.
   Tokens only: every colour, space, radius and type size comes from /brand/tokens.css through site.css.
   Light theme only. Mobile first. Breakpoints: 40rem (640), 48rem (768), 64rem (1024).
   The two pages for the playground host load a combined copy of this file and five others (assets/playground-page.css): after changing
   this file, run tools/playground/Build-PageBundles.ps1.
   Spanish runs ~30% longer than English, so nothing here relies on short labels: everything wraps.
   ========================================================================================== */

/* The HTML `hidden` attribute must win over any display value set below. */
.pg-card [hidden], .pg-stage [hidden], .pg-check[hidden], .pg-status [hidden] { display: none; }

/* ============================== HEADER FACTS ============================== */
/* Three short facts under the lede, as badges. They wrap on a phone, and Spanish labels are allowed to break onto two lines. */
.pg-facts-bar { display: flex; flex-wrap: wrap; gap: var(--bx-space-2); }
.pg-facts-bar .badge { white-space: normal; }

/* ============================== THE TOOL CARD ============================== */
/* Wider than the calculator card: the editor and the result need room. */
.pg-card { display: grid; gap: var(--bx-space-8); padding: var(--bx-space-5); background: var(--bx-surface); border: 1px solid var(--bx-border-strong); border-top: var(--rule); min-width: 0; }
@media (min-width: 40rem) { .pg-card { padding: var(--bx-space-8); } }
.pg-card-h { font-size: var(--bx-text-2xl); max-width: 30ch; }

/* The work area reads in three steps, numbered 01 to 03: pick a sample (the gallery), edit the template and draw it, read the picture.
   One column on a phone, in the order a person works: gallery, template, resolution, button, messages, picture. On a wide screen the
   template takes the left and the controls and messages take the right, so the button sits next to the text it draws. The gallery and
   the picture keep the full width: the picture needs it (an 812-dot label still shows at 1x inside the box at 1280 px and wider). */
.pg-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--bx-space-6); min-width: 0; }
.pg-form > * { min-width: 0; }
.pg-side { display: grid; gap: var(--bx-space-6); align-content: start; }
@media (min-width: 64rem) {
  .pg-form { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); column-gap: var(--bx-space-8); align-items: start; }
}

/* Section headings share one style: the gallery title, the editor label and the result title. The step number is decoration only. */
.pg-step-h, .pg-editor-bar .ft-label, .pg-result-h { display: flex; align-items: baseline; margin: 0; font: 650 var(--bx-text-xl)/1.25 var(--bx-font-display); letter-spacing: -0.01em; text-transform: none; color: var(--bx-ink); }
.pg-step { flex: none; margin-right: var(--bx-space-3); font: 600 var(--bx-text-xs)/1 var(--bx-font-mono); letter-spacing: 0.1em; color: var(--bx-green-600); }

/* Visually hidden but read by screen readers: the live regions for the sample count and for copy and reset. */
.pg-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ============================== STEP 01: THE SAMPLE GALLERY ============================== */
/* The gallery is built by the script from /assets/playground-samples.js. It is made for a library that keeps growing (dozens of
   samples in a dozen categories), so it never lists everything above the editor: a search box, a category list (a native select, which
   stays tidy at any count and in any language) and a short first row with "Show all". The editor and the Draw button stay close. */
.pg-gallery { display: grid; gap: var(--bx-space-4); min-width: 0; padding-bottom: var(--bx-space-8); border-bottom: var(--hair); }
.pg-gallery-head { display: grid; gap: var(--bx-space-2); }
.pg-gallery-intro { max-width: 62ch; color: var(--bx-text-muted); }
.pg-gallery-hint { max-width: 62ch; }

/* Search and category share a row when there is room, and stack on a phone. If the category list is hidden the search takes the row. */
.pg-tools { display: flex; flex-wrap: wrap; gap: var(--bx-space-4); }
.pg-tool { display: grid; gap: var(--bx-space-2); align-content: start; min-width: 0; }
.pg-tool-q { flex: 1 1 16rem; }
.pg-tool-cat { flex: 0 1 18rem; }
@media (max-width: 39.999rem) {
  .pg-tool-cat { flex: 1 1 100%; }
  /* The labels stay for screen readers, but are not drawn on a phone: the placeholder and the shown value name each field, and two lines of height are saved. */
  .pg-tool > .ft-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .pg-tools { gap: var(--bx-space-3); }
}
/* The icons are data: URIs (the policy allows data: images) drawn in the tokens' gray-600, #4F605A, because a custom property cannot
   be used inside a data: URI. */
.pg-search, .pg-select { width: 100%; min-height: 3rem; padding: var(--bx-space-2) var(--bx-space-4); border: 1px solid var(--bx-gray-500); border-radius: var(--bx-radius-md); background-color: var(--bx-surface); background-repeat: no-repeat; color: var(--bx-ink); font: 400 var(--bx-text-md)/1.4 var(--bx-font-sans); }
.pg-search { padding-left: 2.75rem; background-position: 0.875rem 50%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234F605A' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); }
.pg-select { appearance: none; padding-right: 2.75rem; background-position: right 0.875rem center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234F605A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); cursor: pointer; text-overflow: ellipsis; }
.pg-search::placeholder { color: var(--bx-gray-500); opacity: 1; }
.pg-search:focus-visible, .pg-select:focus-visible { outline: 3px solid var(--bx-focus-ring); outline-offset: 2px; border-color: var(--bx-ink); }

/* The visible count (hidden from screen readers) and, when a filter is on, the way to clear it. */
.pg-gal-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--bx-space-2) var(--bx-space-4); min-height: var(--bx-touch-target); }
.pg-gal-count { font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); letter-spacing: 0.04em; color: var(--bx-gray-700); max-width: none; }
.pg-link { min-height: var(--bx-touch-target); padding: 0 var(--bx-space-2); border: 0; background: none; color: var(--bx-green-600); font: 600 var(--bx-text-sm)/1.3 var(--bx-font-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pg-link:hover { color: var(--bx-ink); }
.pg-link:focus-visible { outline: 3px solid var(--bx-focus-ring); outline-offset: 2px; }

/* The grid. --pg-cols is the column count and --pg-limit the number of cards shown while collapsed; the script reads both, so the two
   can never disagree with the breakpoints. --pg-eff is set by the script: the real number of columns, never more than the cards shown,
   so two or three cards stay wide and balanced instead of leaving empty slots.
   Phone: two compact columns, four cards (two rows) until "Show all". With 30 or more samples a one-column list of tall cards would
   push the editor and the Draw button several screens down; two small tiles keep them within about one and a half. */
.pg-grid { --pg-cols: 2; --pg-limit: 4; display: grid; grid-template-columns: repeat(var(--pg-eff, 1), minmax(0, 1fr)); gap: var(--bx-space-3); max-width: calc(var(--pg-eff, 1) * 24rem + (var(--pg-eff, 1) - 1) * var(--bx-space-4)); margin: 0; padding: 0; list-style: none; }
@media (min-width: 40rem) { .pg-grid { gap: var(--bx-space-4); } }
@media (min-width: 48rem) { .pg-grid { --pg-cols: 3; --pg-limit: 3; } }
@media (min-width: 72rem) { .pg-grid { --pg-cols: 4; --pg-limit: 4; } }
.pg-item { display: grid; min-width: 0; }
/* The gallery shell is written in the page and visible from the first paint; the cards arrive with the (deferred) script. Until they do,
   the empty grid keeps the room the collapsed cards will take at each breakpoint (measured: about 430 to 470 px on a phone, 870 to 930
   at 640 px, 415 to 500 from 768 px), so the editor below does not jump down when they appear. */
.pg-grid:empty { min-height: 27rem; }
@media (min-width: 40rem) { .pg-grid:empty { min-height: 54rem; } }
@media (min-width: 48rem) { .pg-grid:empty { min-height: 26rem; } }
@media (min-width: 72rem) { .pg-grid:empty { min-height: 27rem; } }

/* A card is one button: the picture on top, the words under it. On a phone it is a compact tile (picture, name, size); from 640 px it also
   shows the category, the sentence and the barcode tags. Everything the tile leaves out is still read by screen readers (aria-describedby)
   and shown in the editor header once the sample is chosen. */
.pg-sample { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; width: 100%; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--bx-border-strong); border-radius: var(--bx-radius-md); background: var(--bx-surface); color: var(--bx-ink); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--bx-duration-fast) var(--bx-ease), box-shadow var(--bx-duration-fast) var(--bx-ease), transform var(--bx-duration-fast) var(--bx-ease); }
.pg-sample:hover { border-color: var(--bx-ink); box-shadow: var(--bx-shadow-md); transform: translateY(-1px); }
.pg-sample:focus-visible { outline: 3px solid var(--bx-focus-ring); outline-offset: 3px; }
/* The chosen sample: a green frame, a pale green card and a check. Colour is never the only signal (the check and aria-pressed carry it too). */
.pg-sample[aria-pressed="true"] { border-color: var(--bx-green-500); background: var(--bx-green-50); box-shadow: 0 0 0 1px var(--bx-green-500); }
.pg-sample:disabled { background: var(--bx-gray-50); color: var(--bx-gray-600); cursor: not-allowed; box-shadow: none; transform: none; }
.pg-sample:disabled:hover { border-color: var(--bx-border-strong); }

/* The thumbnail frame: label stock. A neutral gray surface with the picture centred on it as white paper, at its own proportions.
   It is never stretched and never cropped (max-width and max-height only shrink), so a barcode is never cut through, whether the
   label is a 4 x 6 inch portrait, a wide shelf label, a tiny tube label or a long narrow wristband. The picture carries its width
   and height attributes, so the frame is the same size before and after it loads. A strip along the top is kept free for the two
   marks ("Start here" and "Selected"), so nothing is ever laid over the picture: the pictures are replaced from time to time and the
   design must not depend on what they show. */
.pg-thumb { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; height: 7.5rem; padding: 1.75rem var(--bx-space-2) var(--bx-space-2); background: var(--bx-gray-100); border-bottom: 1px solid var(--bx-border-strong); }
.pg-thumb-img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; background: var(--bx-white); box-shadow: var(--bx-shadow-md); }
/* On a phone "Selected" is the check alone (the tile is too narrow for the word); the card frame and aria-pressed say the rest. */
.pg-picked { position: absolute; top: var(--bx-space-1); right: var(--bx-space-1); display: none; align-items: center; justify-content: center; width: 1.375rem; height: 1.375rem; border-radius: var(--bx-radius-pill); background: var(--bx-green-500); color: var(--bx-white); font-size: 0; }
.pg-picked::before { content: "\2713"; font: 700 var(--bx-text-xs)/1 var(--bx-font-sans); }
.pg-sample[aria-pressed="true"] .pg-picked { display: inline-flex; }
/* The starter pill gives way to the "Selected" mark: it is never wider than the tile minus the mark, and shortens with an ellipsis if a language needs more room. */
.pg-starter { position: absolute; max-width: calc(100% - 2.25rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; top: var(--bx-space-1); left: var(--bx-space-1); padding: 0 var(--bx-space-2); border: 1px solid var(--bx-border-strong); border-radius: var(--bx-radius-pill); background: var(--bx-surface); color: var(--bx-ink); font: 600 0.6875rem/1.5 var(--bx-font-mono); }

.pg-body { display: flex; flex-direction: column; gap: var(--bx-space-1); min-width: 0; padding: var(--bx-space-3); }
.pg-cat, .pg-desc, .pg-tags { display: none; }
.pg-name { font: 650 var(--bx-text-sm)/1.3 var(--bx-font-display); letter-spacing: -0.005em; overflow-wrap: anywhere; }
/* The facts and the tags sit at the bottom of the card, so a row of cards lines up even when the sentences differ in length. */
.pg-facts { display: grid; margin-top: auto; padding-top: var(--bx-space-1); font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); color: var(--bx-gray-700); }
.pg-fact + .pg-fact::before { content: none; }

@media (min-width: 40rem) {
  .pg-thumb { height: 11.5rem; padding: 2.25rem var(--bx-space-4) var(--bx-space-4); }
  /* from 40 rem the tiles are wide enough for the words, but not for the words AND "Start here" side by side: the mark stays a check until 64 rem */
  .pg-picked { top: var(--bx-space-2); right: var(--bx-space-2); }
  .pg-starter { top: var(--bx-space-2); left: var(--bx-space-2); padding: 2px var(--bx-space-3); font: 600 var(--bx-text-xs)/1.6 var(--bx-font-mono); }
  .pg-body { gap: var(--bx-space-2); padding: var(--bx-space-4); }
  .pg-cat { display: block; font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bx-gray-600); overflow-wrap: anywhere; }
  .pg-desc { display: block; font: 400 var(--bx-text-sm)/1.5 var(--bx-font-sans); color: var(--bx-gray-700); overflow-wrap: anywhere; }
  .pg-name { font-size: var(--bx-text-md); }
  .pg-facts { display: flex; flex-wrap: wrap; gap: 0 var(--bx-space-2); }
  .pg-fact + .pg-fact::before { content: "\00b7"; margin-right: var(--bx-space-2); color: var(--bx-gray-500); }
  .pg-tags { display: flex; flex-wrap: wrap; gap: var(--bx-space-1) var(--bx-space-2); }
}
@media (min-width: 64rem) {
  .pg-picked { top: var(--bx-space-2); right: var(--bx-space-2); width: auto; height: auto; gap: var(--bx-space-1); padding: 2px var(--bx-space-3) 2px var(--bx-space-2); font: 600 var(--bx-text-xs)/1.6 var(--bx-font-mono); }
  .pg-starter { max-width: calc(100% - 7.5rem); }
}
.pg-tag { padding: 0 var(--bx-space-2); border: 1px solid var(--bx-border-strong); border-radius: var(--bx-radius-sm); background: var(--bx-surface); font: 500 var(--bx-text-xs)/1.6 var(--bx-font-mono); color: var(--bx-gray-700); }
.pg-tag-more { border-style: dashed; }

.pg-gal-empty { padding: var(--bx-space-6); border: 1px dashed var(--bx-gray-400); border-radius: var(--bx-radius-md); background: var(--bx-gray-50); }
.pg-gal-empty p { max-width: 52ch; font-size: var(--bx-text-sm); color: var(--bx-text-muted); }
.pg-gal-empty .pg-gal-empty-h { margin-bottom: var(--bx-space-1); font: 600 var(--bx-text-md)/1.4 var(--bx-font-display); color: var(--bx-ink); }
.pg-more { display: flex; }

/* ---------- The template editor ---------- */
.pg-editor { display: grid; gap: var(--bx-space-2); }
/* Label on the left; "Reset to sample" (only after an edit) and "Copy template" on the right, wrapping under the label on a phone. */
.pg-editor-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--bx-space-2) var(--bx-space-3); }
.pg-editor-tools { display: flex; flex-wrap: wrap; gap: var(--bx-space-2); }
.pg-source { display: grid; align-content: start; gap: var(--bx-space-1); min-height: 2.9rem; max-width: none; overflow-wrap: anywhere; }   /* two lines are reserved: the name and its sentence arrive with the script */
.pg-source-name { font: 600 var(--bx-text-sm)/1.5 var(--bx-font-sans); color: var(--bx-ink); }
.pg-source-desc { font: 400 var(--bx-text-sm)/1.5 var(--bx-font-sans); color: var(--bx-gray-700); max-width: 70ch; }
/* JSON is code: mono, no wrapping (a wrapped line would hide where a line really ends), scrolls sideways inside the box. */
.pg-json { display: block; width: 100%; min-height: 20rem; max-height: 40rem; padding: var(--bx-space-4); border: 1px solid var(--bx-gray-500); border-radius: var(--bx-radius-md); background: var(--bx-surface); color: var(--bx-ink); font: 400 var(--bx-text-sm)/1.65 var(--bx-font-mono); white-space: pre; overflow: auto; resize: vertical; tab-size: 2; }
@media (min-width: 64rem) { .pg-json { min-height: 26rem; } }
.pg-json:focus-visible { outline: 3px solid var(--bx-focus-ring); outline-offset: 2px; border-color: var(--bx-ink); }
.pg-json[aria-invalid="true"] { border-color: var(--bx-danger); }
/* Closed playground: the template is read-only (still selectable and copyable), the resolution field is disabled. */
.pg-json[readonly], .ft-input:disabled { background: var(--bx-gray-50); color: var(--bx-gray-600); border-color: var(--bx-border-strong); cursor: not-allowed; }
.pg-json[readonly] { cursor: text; }
.pg-count { font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); color: var(--bx-gray-600); max-width: none; }
.pg-count[data-state="over"] { color: var(--bx-danger); font-weight: 700; }

/* ---------- Resolution ---------- */
.pg-dpi-field { display: grid; gap: var(--bx-space-2); }
.pg-dpi { max-width: 10rem; font-size: var(--bx-text-lg); }

/* ---------- Buttons ---------- */
.pg-actions { display: flex; flex-wrap: wrap; gap: var(--bx-space-3); }
.pg-actions .btn { flex: 1 1 10rem; }
@media (min-width: 40rem) { .pg-actions .btn { flex: 0 0 auto; min-width: 10rem; } }
/* aria-disabled is used while a request runs or a wait counts down: the button keeps the keyboard focus but looks and behaves unavailable. */
.btn[disabled], .btn[disabled]:hover, .btn[aria-disabled="true"], .btn[aria-disabled="true"]:hover { background: var(--bx-gray-100); border-color: var(--bx-border-strong); color: var(--bx-gray-600); cursor: not-allowed; transform: none; }

/* ============================== MESSAGES (the aria-live region) ============================== */
/* The region exists, empty, from the first paint, which is what lets screen readers announce text placed in it later. It reserves a
   minimum height so the form does not jump when the first message arrives. */
.pg-status { display: grid; gap: var(--bx-space-3); min-height: 4.5rem; align-content: start; }
.pg-status[data-state="info"] { background: var(--bx-gray-50); border-left-color: var(--bx-gray-500); }
.pg-status[data-state="warn"] { background: var(--bx-warning-100); border-left-color: var(--bx-warning-ink); }
.pg-status p { max-width: none; margin: 0; }
.pg-headline { font: 600 var(--bx-text-lg)/1.4 var(--bx-font-display); color: var(--bx-ink); }
.pg-detail { font: 400 var(--bx-text-md)/1.5 var(--bx-font-sans); color: var(--bx-ink); overflow-wrap: anywhere; }
.pg-ref { font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); color: var(--bx-gray-700); overflow-wrap: anywhere; }
/* Notes and error reasons: one line each, the code first in mono. Values the visitor wrote (ids, pointers) arrive as text in <bdi>. */
.pg-list { display: grid; gap: var(--bx-space-3); margin: 0; padding: 0; list-style: none; }
.pg-list li { display: grid; gap: var(--bx-space-1); padding-top: var(--bx-space-3); border-top: 1px solid var(--bx-border-strong); font: 400 var(--bx-text-sm)/1.5 var(--bx-font-sans); color: var(--bx-ink); overflow-wrap: anywhere; }
.pg-list code { justify-self: start; font: 600 var(--bx-text-xs)/1.5 var(--bx-font-mono); letter-spacing: 0.04em; color: var(--bx-gray-700); }
.pg-meta { display: flex; flex-wrap: wrap; gap: var(--bx-space-1) var(--bx-space-4); }
.pg-list .pg-where { font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); color: var(--bx-gray-700); }
.pg-notes-h { font: 600 var(--bx-text-xs)/1.5 var(--bx-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bx-gray-700); }
.pg-check { align-self: start; }

/* ============================== RESULT ============================== */
.pg-result { display: grid; gap: var(--bx-space-3); padding-top: var(--bx-space-6); border-top: var(--hair); min-width: 0; }
.pg-result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--bx-space-2) var(--bx-space-4); }
/* The stage is the scroll container. A picture is shown at a whole-number zoom (never squeezed to a fraction, which would blur the
   dots), so one wider or taller than the box is scrolled, not scaled: the box can take the keyboard focus to do that. */
.pg-stage { min-width: 0; max-height: 85vh; overflow: auto; border: 1px solid var(--bx-border-strong); background: var(--bx-gray-100); }
.pg-stage:focus-visible { outline: 3px solid var(--bx-focus-ring); outline-offset: 2px; }
.pg-stage-in { display: grid; justify-items: start; min-height: 14rem; padding: var(--bx-space-4); }
@media (min-width: 40rem) { .pg-stage-in { padding: var(--bx-space-6); } }
.pg-empty { align-self: center; justify-self: center; max-width: 36ch; text-align: center; font-size: var(--bx-text-sm); color: var(--bx-gray-600); }
/* The base stylesheet gives every img max-width: 100%, which would shrink a wide picture by a fraction. Width and height are set in
   the script from the BarcoderX-Image-* headers, so the box is the right size before the picture is decoded (no layout shift). */
.pg-img { max-width: none; height: auto; background: var(--bx-white); box-shadow: var(--bx-shadow-md); image-rendering: pixelated; }
.pg-caption { font: 500 var(--bx-text-xs)/1.5 var(--bx-font-mono); color: var(--bx-gray-700); max-width: none; overflow-wrap: anywhere; }
.pg-mark-note { font-size: var(--bx-text-sm); color: var(--bx-text-muted); max-width: 60ch; }

/* ============================== FACTS AND LIMITS ============================== */
.pg-blocks { display: grid; gap: var(--bx-space-10); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) { .pg-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bx-space-12) var(--bx-space-10); } }
.pg-block { display: grid; gap: var(--bx-space-3); align-content: start; border-top: var(--rule); padding-top: var(--bx-space-5); min-width: 0; }
.pg-block h3 { font-size: var(--bx-text-xl); }
.pg-block p { max-width: 44ch; color: var(--bx-text-muted); }
.pg-codes th[scope="row"] { white-space: normal; }

/* ============================== BARCODE TYPES THE PLAYGROUND DRAWS ============================== */
/* A tidy reference: a few groups, each a ruled column with a heading and a plain list. Written in the page (so it reads without script) and
   replaced by the script with the service's list, which is built with the same classes. A group with more than eight types is "wide":
   it takes the full row and runs its list in columns, so twelve retail names do not make one tall column beside three short ones. */
.pg-types { display: grid; gap: var(--bx-space-10) var(--bx-space-8); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .pg-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .pg-types { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pg-type-group { min-width: 0; border-top: var(--rule); padding-top: var(--bx-space-4); }
.pg-type-wide { grid-column: 1 / -1; }
.pg-type-h { margin: 0 0 var(--bx-space-3); font: 650 var(--bx-text-lg)/1.3 var(--bx-font-display); letter-spacing: -0.01em; }
.pg-type-list { margin: 0; padding: 0; list-style: none; }
.pg-type-list li { padding: var(--bx-space-2) 0; border-top: 1px solid var(--bx-border); font: 400 var(--bx-text-sm)/1.5 var(--bx-font-sans); color: var(--bx-ink); overflow-wrap: anywhere; break-inside: avoid; }
.pg-type-list li:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 40rem) { .pg-type-wide .pg-type-list { column-count: 2; column-gap: var(--bx-space-8); } }
@media (min-width: 64rem) { .pg-type-wide .pg-type-list { column-count: 3; } }
/* In a multi-column list the first line of each column has no rule above it, so a column never starts with a stray line. */
.pg-type-wide .pg-type-list li, .pg-type-wide .pg-type-list li:first-child { padding: var(--bx-space-2) 0; border-top: 0; border-bottom: 1px solid var(--bx-border); }

/* ============================== MOTION AND PRINT ============================== */
@media (prefers-reduced-motion: reduce) { .btn, .pg-sample, .pg-json, .ft-input { transition: none; } .pg-sample:hover { transform: none; } }
@media print { .pg-form, .pg-check, .pg-gallery { display: none; } }
