/* ==========================================================================================
   BarcoderX website: inner-page building blocks. Author: P4 Software.
   Page header, split layout, rows, lists, steps and spec tables used by every page except the home page.
   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), 56rem (896), 64rem (1024).
   ========================================================================================== */

/* ============================== PAGE HERO ============================== */
.p-hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.p-hero-grid { display: grid; gap: var(--bx-space-12); align-items: center; }
.p-hero-copy { display: grid; gap: var(--bx-space-6); justify-items: start; min-width: 0; }
.p-hero h1 { font-size: clamp(2.5rem, 1.5rem + 3.8vw, 3.75rem); overflow-wrap: break-word; max-width: 18ch; }
.p-hero-grid.solo h1 { max-width: 22ch; }
.p-hero .actions { margin-top: var(--bx-space-2); }
.p-hero .lede { max-width: 50ch; }
/* Single-column page headers carry a one or two line lede: balance it so the last line is never a stranded word pair. */
.p-hero-grid.solo .lede { text-wrap: balance; }
/* Contact header: the copy on the left, "what helps us help you" on the right (content that already lived on the page, moved up). */
.p-hero-grid.has-aside { gap: var(--bx-space-10); }
.hero-aside { --cut: 24px; --cut-fill: var(--bx-canvas); --cut-edge: var(--bx-border-strong); }
.hero-aside .cut-in { display: grid; gap: var(--bx-space-4); align-content: start; padding: var(--bx-space-6); }
.hero-aside .nf-h { margin-bottom: 0; }
@media (min-width: 64rem) { .p-hero-grid.solo.has-aside { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--bx-space-16); } }
.jump { display: flex; flex-wrap: wrap; gap: var(--bx-space-2); }
.jump a { display: inline-flex; align-items: center; gap: var(--bx-space-2); min-height: var(--bx-touch-target); padding: 0 var(--bx-space-4); border: 1px solid var(--bx-border-strong); border-radius: var(--bx-radius-md); background: var(--bx-surface); color: var(--bx-ink); text-decoration: none; font: 600 var(--bx-text-sm)/1 var(--bx-font-mono); }
.jump a b { color: var(--bx-green-600); font-weight: 600; }
.jump a:hover { border-color: var(--bx-ink); }
@media (min-width: 64rem) { .p-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--bx-space-12); } .p-hero-grid.solo { grid-template-columns: minmax(0, 1fr); } }
/* ============================== SPLIT SECTIONS ============================== */
/* Explicit minmax(0, 1fr) tracks: an implicit auto track grows to the widest child (a code block or table) and pushes the page wider than the phone. */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--bx-space-10); }
.split-side { display: grid; gap: var(--bx-space-4); align-content: start; justify-items: start; min-width: 0; }
.split-side h2 { max-width: 14ch; }
.split-side .lede { font-size: var(--bx-text-md); }
.split-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--bx-space-10); min-width: 0; }
@media (min-width: 64rem) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--bx-space-16); }
  .split-side { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
}
.blk h3 { font-size: var(--bx-text-xl); margin-bottom: var(--bx-space-4); }
.blk > p { color: var(--bx-text-muted); max-width: 54ch; }
.blk > p + p { margin-top: var(--bx-space-3); }
.rows { border-top: var(--rule); }
.rows li { display: grid; gap: var(--bx-space-1) var(--bx-space-6); padding-block: var(--bx-space-4); border-bottom: var(--hair); min-width: 0; }
.rows code { font-weight: 600; font-size: var(--bx-text-sm); color: var(--bx-ink); overflow-wrap: anywhere; }
.rows span { font-size: var(--bx-text-sm); color: var(--bx-text-muted); }
.rows .tag { justify-self: start; }
@media (min-width: 48rem) { .rows li { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); } }
.pk-group { margin-bottom: var(--bx-space-5); }
.pk-group > h4 { font: 600 var(--bx-text-xs)/1.4 var(--bx-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bx-green-600); margin-bottom: var(--bx-space-2); }
/* .note (labelled call-out) now lives in site.css: the home page uses it too and does not load this file. */
/* ============================== AGENT ============================== */
.steps { counter-reset: st; border-top: var(--rule); }
.steps li { counter-increment: st; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--bx-space-1) var(--bx-space-4); padding-block: var(--bx-space-5); border-bottom: var(--hair); }
.steps li::before { content: counter(st, decimal-leading-zero); grid-row: span 2; font: 600 var(--bx-text-sm)/1.6 var(--bx-font-mono); color: var(--bx-green-600); }
.steps h3, .steps h4 { font: 650 var(--bx-text-lg)/1.3 var(--bx-font-display); letter-spacing: -0.01em; }
.steps p { font-size: var(--bx-text-sm); color: var(--bx-text-muted); }
.spec { display: grid; gap: 0; border-top: var(--rule); }
.spec div { display: grid; gap: var(--bx-space-1) var(--bx-space-6); padding-block: var(--bx-space-3); border-bottom: var(--hair); }
.spec dt { font: 600 var(--bx-text-xs)/1.5 var(--bx-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bx-gray-600); }
.spec dd { margin: 0; font-size: var(--bx-text-sm); color: var(--bx-ink); }
@media (min-width: 48rem) { .spec div { grid-template-columns: 11rem minmax(0, 1fr); } }
.two-col { display: grid; gap: var(--bx-space-8); }
@media (min-width: 48rem) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bx-space-10); } }
.mini-list { display: grid; gap: var(--bx-space-3); }
/* Block li with an absolutely placed dash, so an inline <b> lead-in stays in the same line of text. */
.mini-list li { position: relative; padding-left: var(--bx-space-5); font-size: var(--bx-text-sm); color: var(--bx-gray-700); }
.mini-list li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.5rem; height: 2px; background: var(--bx-ink); }
.mini-list b { color: var(--bx-ink); font-weight: 600; }
/* A row that is only a link (404 page, contact page) becomes a full 44px touch row. The negative margin cancels the
   list gap so the rows keep their previous rhythm, and the dash centres on the row instead of on the first text line. */
.mini-list li:has(> a:only-child) { display: flex; align-items: center; min-height: var(--bx-touch-target); margin-block: calc(var(--bx-space-3) / -2); }
.mini-list li:has(> a:only-child)::before { top: calc(50% - 1px); }
.mini-list li:has(> a:only-child) a { display: inline-flex; align-items: center; min-height: var(--bx-touch-target); min-width: var(--bx-touch-target); }


/* ---------- Conventions list: code token + one line, ruled rows ---------- */
.conv { display: grid; margin-top: var(--bx-space-10); border-bottom: var(--hair); }
.conv li { display: grid; gap: var(--bx-space-1); align-content: start; padding-block: var(--bx-space-4); border-top: var(--hair); }
.conv code { font-weight: 600; font-size: var(--bx-text-sm); color: var(--bx-ink); }
.conv span { font-size: var(--bx-text-sm); color: var(--bx-text-muted); }
@media (min-width: 48rem) { .conv { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--bx-space-10); } }
@media (min-width: 64rem) { .conv { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Block-level hero status chip (contact page) */
/* The same line carries the pre-launch strip on several pages: badge, one sentence and a "See the status" link. It wraps on a phone, and the link
   keeps its own 44px touch row without making the whole strip tall (the negative block margin cancels the link's padding). */
.p-hero .hero-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bx-space-1) var(--bx-space-3); font-size: var(--bx-text-sm); color: var(--bx-text-muted); max-width: none; }
.p-hero .hero-status .link { margin-block: calc(var(--bx-space-2) * -1); }

/* ---------- Capability grid: titled bullet lists in two columns (editor page) ---------- */
.cap-grid { display: grid; gap: var(--bx-space-10); }
.cap-block { display: grid; gap: var(--bx-space-4); align-content: start; border-top: var(--rule); padding-top: var(--bx-space-5); min-width: 0; }
.cap-block h3 { font-size: var(--bx-text-xl); }
@media (min-width: 48rem) { .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bx-space-12) var(--bx-space-10); } }
@media (min-width: 64rem) { .cap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Utility paragraphs */
.more { margin-top: var(--bx-space-4); max-width: none; }


/* ---------- 404 column headings ---------- */
.nf-h { font-size: var(--bx-text-xl); margin-bottom: var(--bx-space-4); }

/* Body copy inside two-column blocks matches the single-column .blk copy. */
.two-col > div > p { color: var(--bx-text-muted); max-width: 54ch; }

/* ---------- Contact form (an anota.cloud form embedded in an iframe) ----------
   The frame is cross-origin, so the page cannot read its content height. Heights are fixed per breakpoint instead, measured from the real
   form at the frame's real width, with a little slack so no inner scrollbar appears and no big gap is left. The Spanish form is taller
   because its labels and help text wrap more, so it has its own values (html:lang(es)). A fixed height also means no layout shift.
   Measured 2026-11-14 on the live form (natural content height incl. its own padding, +17 to 30px slack). The form switches from one column to\n   two-field rows at a frame width of about 640px, which is why the height drops at 44rem and again at 70rem (where the narrow column is\n   wider than 640px). Validation messages add a little height; if the form changes, re-measure. */
.form-embed { display: grid; gap: var(--bx-space-3); min-width: 0; }
.form-frame { display: block; width: 100%; height: var(--form-h); border: 0; border-radius: var(--bx-radius-md); background: var(--bx-surface); }
.form-fallback { font-size: var(--bx-text-sm); color: var(--bx-text-muted); max-width: none; }
.form-fallback a { display: inline-flex; align-items: center; min-height: var(--bx-touch-target); }
.form-alt { font-size: var(--bx-text-sm); color: var(--bx-text-muted); max-width: none; }:root { --form-h: 1650px; }                                  /* under 360px: the narrowest phones, where the form wraps most */
@media (min-width: 22.5rem) { :root { --form-h: 1510px; } }   /* 360px and up */
@media (min-width: 30rem)   { :root { --form-h: 1440px; } }
@media (min-width: 44rem)   { :root { --form-h: 1170px; } }   /* frame is 640px or wider: two-column rows */
@media (min-width: 64rem)   { :root { --form-h: 1420px; } }   /* contact page goes two columns, so the frame is narrow again (587px) */
@media (min-width: 70rem)   { :root { --form-h: 1170px; } }
/* Spanish labels and help text wrap more on narrow frames, so the form is taller there. */
:root:lang(es) { --form-h: 1670px; }
@media (min-width: 22.5rem) { :root:lang(es) { --form-h: 1550px; } }
@media (min-width: 30rem)   { :root:lang(es) { --form-h: 1480px; } }
@media (min-width: 44rem)   { :root:lang(es) { --form-h: 1170px; } }
@media (min-width: 64rem)   { :root:lang(es) { --form-h: 1420px; } }
@media (min-width: 70rem)   { :root:lang(es) { --form-h: 1170px; } }