/* Acupixel component styles — the shared layer both sites compose from.
 *
 * Every rule here is layout, colour and rhythm. There is no content in this file: no product name,
 * no capability, no sentence a visitor reads. Labels like "Menu" come from ui-strings.
 *
 * Structure follows the patterns the brand document says to preserve:
 *   a bold headline upper-left with the hero visual upper-right; a horizontal capability strip;
 *   a left feature column beside a right structured table; an industries band near the bottom;
 *   a compact contact footer.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; }

/* A genuine, confirmed rendering-engine artifact, not a rule mistake here: a direct child of a
 * gap-spaced flex/grid container can render with an extra ~8px margin-top that no declaration in
 * this file, nor the browser's own UA stylesheet, accounts for - reproduced by direct measurement on
 * .nav-list, .feature-grid, .card-grid and .industry-list, on every affected item except the first,
 * on both sites. The plain `margin: 0` reset above does not stop it; only !important does, which is
 * why this narrow list carries one instead of relying on the general reset. Extend this list if the
 * same symptom (every item but the first sitting a few pixels lower than its siblings in the same
 * row) turns up in a container not named here. */
.nav-list > li,
.feature-grid > .feature,
.card-grid > .card,
.industry-list > li,
.steps > li,
.choice-list > .choice,
.sample-tabs > .sample-tab,
.cta-row > .btn,
.doc-toc ul > li {
  margin: 0 !important;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-body);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  /* This site is full of endpoint paths, SKUs and header names. A long unbreakable token is the
   * usual cause of a page that scrolls sideways on a phone, so long words wrap by default and the
   * exceptions (code blocks) scroll inside their own box instead. */
  overflow-wrap: break-word;
}

.card p, .feature p, .prose, td, th { overflow-wrap: anywhere; }
/* Headings get the gentler break-word, not anywhere: "anywhere" also feeds into the box's
 * min-content size, which made grid tracks size narrow enough that ordinary words like
 * "Simultaneous" or "preprocessing" split mid-character even though a plain wrap to the next line
 * would have fit. break-word only splits a word that genuinely cannot fit on its own line. Covers
 * both h2 and h3: a card/feature item's own title renders as whichever level its block's heading
 * (or lack of one) puts it at - see itemHTag() in render-lib.mjs. */
.card h2, .card h3, .feature h2, .feature h3 { overflow-wrap: break-word; }
:not(pre) > code { overflow-wrap: anywhere; }

::selection { background: var(--selection); }

/* ---------------------------------------------------------------- skeleton */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--page-gutter); }
.container--narrow { max-width: var(--container-narrow); }
.prose { max-width: var(--measure); }
/* The margin:0 reset above removes the default spacing p/ul/ol/blockquote/pre used to get for free
 * between each other inside markdown-rendered prose. One direction only (top), so two adjacent
 * margins can never add up to a doubled gap the way a bottom-plus-top pair would. */
.prose > * + * { margin-top: var(--space-4); }
.prose ul, .prose ol { padding-inline-start: 1.5em; }
.prose li + li { margin-top: var(--space-1); }
main { flex: 1 0 auto; }

.section { padding-block: var(--section-gap); }
.section + .section { padding-block-start: 0; }
.section--panel { background: var(--panel); padding-block: var(--section-gap); }
.section--panel + .section { padding-block-start: var(--section-gap); }
/* The hero has its own padding-block (below), so a section right after it must not add a second
 * full gap on top of the hero's own bottom padding - found by inspection: every page opens with a
 * hero, so this doubled the gap under the very first heading on every single page, both sites. */
.hero + .section { padding-block-start: 0; }

/* Skip link: visible the moment it is focused, never before. */
.skip-link {
  position: absolute; left: var(--space-4); top: -4rem; z-index: 10;
  background: var(--ink); color: var(--canvas);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  transition: top var(--duration) var(--easing);
}
.skip-link:focus { top: var(--space-4); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------- type */
h1, h2, h3, h4 { color: var(--ink); font-weight: var(--weight-bold); line-height: var(--leading-heading); margin: 0 0 var(--space-4); }
h1 { font-size: var(--text-display); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
p, ul, ol { margin: 0 0 var(--space-4); }
li + li { margin-top: var(--space-2); }
small, .caption { font-size: var(--text-caption); color: var(--ink-muted); }

.eyebrow {
  display: block;
  font-size: var(--text-caption);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--red-strong);
  margin-bottom: var(--space-3);
}
.standfirst { font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem); color: var(--ink-body); max-width: var(--measure); }

a { color: var(--red-strong); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- header */
.masthead { border-bottom: var(--border-hairline); background: var(--canvas); }
.masthead__inner { display: flex; align-items: center; gap: var(--space-5); padding-block: var(--space-4); }
.masthead__logo img, .masthead__logo svg { display: block; height: 2.25rem; width: auto; }
.masthead__nav { margin-inline-start: auto; }
.nav-list { display: flex; gap: var(--space-5); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list a { color: var(--ink); text-decoration: none; font-weight: var(--weight-medium); padding-block: var(--space-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-list a:hover, .nav-list a[aria-current="page"] { border-bottom-color: var(--red); }
.nav-utility { display: flex; gap: var(--space-3); align-items: center; }

/* A header item can carry a submenu (Products, Developers, the open industries list). Found by
 * manual inspection of the real build: the template has always generated a nested <ul> for these,
 * but no rule here ever styled it, so it rendered as a permanently-expanded, bulleted block list
 * pushed under its parent link, on every page, on both sites. Desktop gets a conventional dropdown,
 * shown on hover or on keyboard focus inside it (no JS needed for either). The phone treatment lives
 * in the ~400px block below, consistent with this file's "a list you can see" mobile nav rule. */
.nav-list li { position: relative; }
.nav-list li > ul { list-style: none; margin: 0; padding: 0; }
.nav-list > li > ul {
  display: none; flex-direction: column; gap: 0;
  position: absolute; top: 100%; left: 0; z-index: 20; min-width: 12rem;
  background: var(--canvas); border: var(--border-hairline); border-radius: var(--radius);
  padding: var(--space-2); box-shadow: 0 4px 16px rgb(0 0 0 / 12%);
}
.nav-list > li:hover > ul, .nav-list > li:focus-within > ul { display: flex; }
.nav-list > li > ul a { display: block; padding: var(--space-2) var(--space-3); border-bottom: none; white-space: nowrap; }
.nav-list > li > ul a:hover, .nav-list > li > ul a:focus-visible { background: var(--panel); }

/* A ~4px first-item offset was chased here earlier and "fixed" with a position:relative;top:4px
 * compensation, before the real root cause was found: every direct child of a gap-spaced flex/grid
 * container (see the margin:0 !important list near the top of this file) could carry a phantom
 * margin-top on every item but the first. That fix already corrects .nav-list > li itself, which
 * turned out to be the actual cause here too - this position offset is removed because keeping both
 * double-corrected the first item 4px in the other direction. Re-measure before reintroducing either
 * fix if this symptom reappears. */

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font: inherit; font-weight: var(--weight-bold); text-align: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background var(--duration) var(--easing), color var(--duration) var(--easing);
}
.btn--primary { background: var(--red-strong); color: var(--canvas); }
.btn--primary:hover { background: var(--ink); color: var(--canvas); }
.btn--secondary { background: var(--canvas); color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--canvas); }
/* The two masthead utility controls: an icon standing in for the usual text pill (a portrait for
 * sign-in, a handset for the contact CTA - see navUtilityButton() in render-lib.mjs). A fixed
 * circle at the WCAG 2.5.5 minimum touch size, same at every viewport width, so the mobile-only
 * text-shrinking rules the old text pill needed no longer apply here. */
.btn--icon-only { padding: 0; width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; }
.btn__icon { width: 22px; height: 22px; }
.btn--link { padding-inline: 0; color: var(--red-strong); background: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }

/* ---------------------------------------------------------------- hero */
.hero { padding-block: var(--section-gap); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--space-7); align-items: center; }
.hero--platform .hero__inner { grid-template-columns: minmax(0, 1fr); }     /* acupixel leads with words */
.hero--hardware .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } /* idsnap leads with the device */
.hero--no-media .hero__inner { grid-template-columns: minmax(0, 1fr); }  /* no device photo to fill a second column */
.hero--no-media .standfirst { max-width: none; }  /* an index hero's mission statement, not an article: line up with the full-width grid below it, not the usual reading measure */
.hero__media img { width: 100%; height: auto; display: block; }
/* An acupixel ("platform") hero's own illustration (products.json is the first to use one) sits
 * below the standfirst paragraph instead of beside it: floating it into the text (shape-outside)
 * read as covering the words rather than sitting next to them, so it renders as its own centred
 * block underneath, with room above and below instead of being crammed against the text. */
.hero__media-row { display: flex; gap: var(--space-5); margin: var(--space-6) 0 var(--space-2); }
.hero__media--stacked { flex: 0 1 34.5rem; min-width: 0; margin: 0; }

/* ---------------------------------------------------------------- capability strip / feature grid */
/* min() keeps the minimum track from ever exceeding the column: without it a 17rem card forces the
 * page sideways on a narrow phone, which is the most common way a "responsive" layout is not. */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: var(--block-gap); list-style: none; padding: 0; margin: 0; }
/* Gate 2 feedback section 3.3 / owner ruling on decorative red (design-system.md section 11): a
 * red top border on EVERY card and a red icon on EVERY card had no precedent in Acupixel's own
 * brand document and read as decoration, not signal. The brand document's own "Feature List"
 * component puts red on the HEADING TEXT of a genuinely notable item, sparingly — not as an
 * unconditional card border. Default is now a plain hairline; `.feature--signal` is the accent,
 * for a card content genuinely wants to mark, not applied automatically. */
.feature {
  background: var(--canvas); border-top: var(--border-hairline);
  padding: var(--space-5) var(--space-4) var(--space-4);
}
.feature--signal { border-top: var(--border-accent); }
.feature--signal h3 { color: var(--red-strong); }
.feature h2, .feature h3 { margin-bottom: var(--space-2); font-size: var(--text-h4); }
.feature p { margin-bottom: var(--space-2); }
.feature__qualifier { display: block; font-size: var(--text-caption); color: var(--ink-muted); }
/* A named icon (document, shield, ...) is real content structure, not decoration: given back only
 * where a block supplies one of the fixed keys in render-lib.mjs's ICONS map. Near-black by default,
 * matching the brand document's capability-strip icon rule (design-system.md section 11). Sits in
 * its own tinted tile rather than floating bare on the card, and grows and switches to the accent
 * colour together with the rest of the card on hover/focus (see .feature__card-link below). */
.feature__icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-bottom: var(--space-4);
  border-radius: var(--radius-lg); background: var(--panel-soft);
  transition: background var(--duration) var(--easing);
}
.feature__icon { display: block; width: 1.75rem; height: 1.75rem; color: var(--ink); transition: color var(--duration) var(--easing), transform var(--duration) var(--easing); }
/* A feature card can be a single click-through to its own full page (schemas/blocks.schema.json's
 * feature_grid item.link_ref). The whole card is the target, not just its title, so the hit area
 * matches what visually reads as one clickable tile. */
.feature--linked { padding: 0; }
.feature__card-link {
  display: block; height: 100%; padding: var(--space-5) var(--space-4) var(--space-4);
  color: inherit; text-decoration: none;
  transition: background var(--duration) var(--easing), box-shadow var(--duration) var(--easing), transform var(--duration) var(--easing);
}
.feature__card-link:hover, .feature__card-link:focus-visible {
  background: var(--panel-soft); box-shadow: var(--shadow-raised); transform: translateY(-2px);
}
.feature__card-link:hover h2, .feature__card-link:hover h3,
.feature__card-link:focus-visible h2, .feature__card-link:focus-visible h3 { color: var(--red-strong); }
.feature__card-link:hover .feature__icon-tile, .feature__card-link:focus-visible .feature__icon-tile { background: var(--callout); }
.feature__card-link:hover .feature__icon, .feature__card-link:focus-visible .feature__icon { color: var(--red-strong); transform: scale(1.08); }
.feature--linked .feature__qualifier { color: var(--ink-muted); }
/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--text-small); }
caption { text-align: left; font-weight: var(--weight-bold); color: var(--ink); padding-bottom: var(--space-3); }
th, td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { background: var(--panel); color: var(--ink); font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.04em; }
tbody th { font-weight: var(--weight-bold); color: var(--ink); width: 40%; }
tr.is-emphasis td, tr.is-emphasis th { background: var(--callout); }
.table-note { font-size: var(--text-caption); color: var(--ink-muted); margin-top: var(--space-3); }
.col-emphasis { border-inline: 2px solid var(--red); }

/* ---------------------------------------------------------------- steps and decisions */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: var(--block-gap); }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--space-4); }
.steps > li::before {
  content: counter(step); grid-row: span 2;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--ink); color: var(--canvas);
  display: grid; place-items: center; font-weight: var(--weight-bold);
}
/* Neutral rule, not red: a decision guide repeats this once per question (six on the "which
 * scanner" page), and a red rule on every one of them is exactly "every section a red box" — the
 * brand document's own DON'T. No brand precedent describes a component like this, so it takes the
 * plain structural treatment rather than borrowing the callout's alert-coloured one. */
.decision { border-inline-start: 3px solid var(--rule-strong); padding-inline-start: var(--space-5); margin-bottom: var(--space-6); }
.decision__q { font-weight: var(--weight-bold); color: var(--ink); font-size: var(--text-h3); margin-bottom: var(--space-2); }
.decision__not { color: var(--ink-muted); font-size: var(--text-small); }

/* ---------------------------------------------------------------- cards, listings, industries band */
/* Found too flat and too quiet by direct feedback: a hairline box the same size as the body text
 * next to it reads as a placeholder, not a real listing. Same direction as the feature_grid cards
 * (design-system.md section 11's decorative-red discipline still applies - the lift and shadow are
 * neutral, not the brand-red accent, so nothing here becomes decoration for its own sake). */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); gap: var(--block-gap); list-style: none; padding: 0; margin: 0; align-items: stretch; }
.card {
  background: var(--canvas); border: var(--border-hairline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--duration) var(--easing), transform var(--duration) var(--easing), border-color var(--duration) var(--easing);
}
.card h2, .card h3 { margin: 0 0 var(--space-2); font-size: var(--text-h3); }
/* Two lines reserved for a title on text and icon cards, so a row of one-line titles ("Car rental")
 * lands at the same height as a row with a two-line one ("Financial services and lending"). Not on
 * photo cards: every scanner title fits on one line, so the reserve would only add empty space. */
.card:not(.card--media) h2, .card:not(.card--media) h3 { min-height: 2.5em; }
.card p { margin-bottom: var(--space-2); }
/* Clamped to a fixed number of lines so every card lands at roughly the same height regardless of
 * how much copy that record happens to carry - without this, a scanner with a long duplex/passport/
 * chip output sentence towers over a shorter one, even within the same grid row. */
/* min-height reserves the same slot every card's clamped text could fill, so a short one (with
 * blank space left over) still ends up the same overall height as a fully-clamped one - clamping
 * the maximum without also flooring the minimum still leaves shorter cards visibly shorter.
 * Four lines, not three: three cut real sentences mid-word ("licences and passports, at...") on four
 * industry cards, and on acupixel.com those cards are not links yet, so the rest of the sentence
 * could never be read at all. Measured: no card on either site needs more than four. */
.card__body p:not(.card__io) { display: -webkit-box; line-clamp: 4; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; min-height: 6.4em; }
.card__io { font-size: var(--text-caption); color: var(--ink-muted); display: -webkit-box; line-clamp: 4; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; min-height: 6.4em; }
.card__io b { color: var(--ink); font-weight: var(--weight-bold); }
.card--held { display: none; }   /* a held record never renders; belt and braces alongside the build filter */
/* search.js filters a list by setting `hidden` on each card, but .card's own display: flex beats the
 * browser's built-in [hidden] { display: none } - so the filter hid nothing on screen, ever, until
 * this rule. */
.card[hidden] { display: none; }

/* ---------------------------------------------------------------- list filter */
/* Only on lists long enough to need one (API reference, glossary). It filters the list below it,
 * not the whole site, and its label says so. */
.search-field { position: relative; max-width: 40rem; margin: 0 0 var(--space-6); }
.search-field__icon {
  position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%);
  width: 1.25rem; height: 1.25rem; color: var(--ink-muted); pointer-events: none;
}
.search-field input {
  width: 100%; min-height: 3.25rem; padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 1.25rem + var(--space-3));
  font: inherit; font-size: var(--text-body); color: var(--ink);
  background: var(--canvas); border: 1px solid var(--rule); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-raised);
  transition: border-color var(--duration) var(--easing), box-shadow var(--duration) var(--easing);
}
.search-field input::placeholder { color: var(--ink-muted); }
.search-field input:hover { border-color: var(--ink-muted); }
.search-field input:focus { border-color: var(--red-strong); box-shadow: var(--shadow-raised); }
.search-field:focus-within .search-field__icon { color: var(--red-strong); }
.search-no-results { color: var(--ink-muted); margin: 0 0 var(--space-5); }
/* An industry card's own icon (.card__icon-tile, card__icon) - same tile-plus-glyph language as
 * .feature__icon-tile, its own class rather than a shared one since a card can carry either an icon
 * or a photo (.card__media) but never both. */
.card__icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.75rem; height: 3.75rem; margin-bottom: var(--space-2);
  border-radius: var(--radius-lg); background: var(--panel-soft);
  transition: background var(--duration) var(--easing), transform var(--duration) var(--easing);
}
.card__icon { display: block; width: 2.25rem; height: 2.25rem; color: var(--ink); transition: color var(--duration) var(--easing); }
/* The whole card is the click target (schemas/blocks.schema.json's link_ref/url fields), not just
 * its title - the same reasoning as .feature__card-link. Acupixel asked for a bigger, more obvious
 * hover after the first pass still read as flat: the card now visibly "lights up" (the brand's own
 * pale-red callout tint, not a new colour), on top of the lift/shadow/border/heading shift, and an
 * icon card's own tile pops out - background flips to white against the tinted card so it reads as
 * lifting off the surface, plus a scale-and-tilt rather than a plain scale, for a livelier "pop" than
 * the more restrained feature-card hover uses. */
/* .card--icon (industry cards) gets the same hover whether or not it links anywhere yet, at
 * Acupixel's request: an industry whose own page is still a draft should still respond. The
 * pointer stays the plain arrow on those (no cursor rule here, and there is no <a> to set one), so a
 * card that goes nowhere does not also pretend to be a link. */
.card--linked:hover, .card--linked:focus-within, .card--icon:hover {
  box-shadow: var(--shadow-raised), 0 12px 28px rgba(17, 17, 17, 0.16); transform: translateY(-4px);
  border-color: var(--red-strong); background: var(--callout);
}
.card--linked:hover .card__icon-tile, .card--linked:focus-within .card__icon-tile, .card--icon:hover .card__icon-tile {
  background: var(--canvas); transform: scale(1.15) rotate(-6deg);
}
.card--linked:hover .card__icon, .card--linked:focus-within .card__icon, .card--icon:hover .card__icon { color: var(--red-strong); }
.card__link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.card__link:hover h2, .card__link:hover h3, .card__link:focus-visible h2, .card__link:focus-visible h3,
.card--icon:hover h2, .card--icon:hover h3 { color: var(--red-strong); }
/* Padding lives here, not on .card__link/.card, so a product photo (.card__media, hardware listings
 * only) can bleed to the card's own rounded edges above the text instead of being squeezed inside
 * the same padding as the heading. */
.card__body { display: flex; flex-direction: column; flex: 1; gap: var(--space-2); padding: var(--space-5); }
/* height: auto overrides the HTML height attribute's own presentational hint - without it, aspect-
 * ratio has no auto dimension left to compute, and every card ends up the raw pixel height of its
 * own source photo. object-fit: cover crops to fill that fixed box instead of letterboxing a
 * near-square photo next to a landscape one at different apparent sizes - every card's photo reads
 * as the same size at a glance, cropped rather than boxed. .card's own overflow: hidden clips the
 * image to the card's rounded corners, so no separate radius is needed here. */
.card__media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform var(--duration) var(--easing); }
.card--linked:hover .card__media img, .card--linked:focus-within .card__media img { transform: scale(1.06); }

.industry-band { background: var(--panel); }
.industry-list { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; padding: 0; margin: 0; }
.industry-list a { background: var(--canvas); border: var(--border-hairline); border-radius: var(--radius); padding: var(--space-2) var(--space-4); text-decoration: none; color: var(--ink); }
.industry-list a:hover { border-color: var(--red); }
.open-list-note { margin-top: var(--space-5); color: var(--ink-body); font-style: italic; }

/* ---------------------------------------------------------------- cross-site promotion */
/* The two sites promote each other. This is a composition, not a footer link: it is the moment a
 * reader on one site realises the other one has what they came for. */
.site-promo { background: var(--ink); color: var(--canvas); border-radius: var(--radius-lg); overflow: hidden; }
.site-promo__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); align-items: center; padding: var(--space-7); }
.site-promo h2 { color: var(--canvas); }
.site-promo p { color: var(--panel); margin-bottom: 0; max-width: 46ch; }
.site-promo .btn--primary { background: var(--canvas); color: var(--ink); }
/* --red-strong on hover, not --red: the label is small white text on the fill, and white on
 * Acupixel Red is 4.38:1. On --red-strong it is 6.96:1. */
.site-promo .btn--primary:hover { background: var(--red-strong); color: var(--canvas); }
/* NOT red. This is a 13px caption on the near-black panel, so it is small text needing 4.5:1, and
 * every red we have fails there: Acupixel Red is 4.31 and --red-strong is 2.71, because darkening a
 * colour makes it worse against a dark background, not better. --panel reaches 16.87. Red still
 * signals on this component through the call to action, which is where it belongs. */
.site-promo__domain { display: block; font-size: var(--text-caption); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--panel); margin-bottom: var(--space-2); }

/* ---------------------------------------------------------------- closing band */
/* Every page's closing call to action (cta_banner), and - where a page also promotes the other site
 * - that promotion beside it as a tile in the same band (render-lib.mjs closingHtml). Replaced a
 * .callout-styled box plus a separate near-black .site-promo slab stacked on top of it, which read as
 * two unrelated boxes in two unrelated styles. Same language as the cards: soft panel, rounded,
 * hairline border; red stays on the button, not on a warning-style rule down the side. */
.closing {
  background: var(--panel-soft); border: var(--border-hairline); border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-7); text-align: center;
}
.closing h2 { margin: 0 0 var(--space-3); }
.closing__main p { max-width: 46ch; margin: 0 auto; color: var(--ink-body); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); }
.closing .cta-row { justify-content: center; margin-top: var(--space-6); }
.closing--split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7);
  align-items: center; text-align: left; padding: var(--space-7);
}
.closing--split .closing__main p { margin: 0; }
.closing--split .cta-row { justify-content: flex-start; }
.closing__promo {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2);
  background: var(--canvas); border: var(--border-hairline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised); padding: var(--space-5);
  transition: box-shadow var(--duration) var(--easing), transform var(--duration) var(--easing), border-color var(--duration) var(--easing);
}
.closing__promo:hover, .closing__promo:focus-within {
  transform: translateY(-3px); border-color: var(--red-strong);
  box-shadow: var(--shadow-raised), 0 12px 28px rgba(17, 17, 17, 0.14);
}
.closing__promo:hover .card__icon-tile, .closing__promo:focus-within .card__icon-tile { background: var(--callout); transform: scale(1.1) rotate(-6deg); }
.closing__promo:hover .card__icon, .closing__promo:focus-within .card__icon { color: var(--red-strong); }
.closing__promo .card__icon-tile { margin-bottom: var(--space-1); }
.closing__promo h2 { font-size: var(--text-h3); margin: 0; }
.closing__promo p { margin: 0; color: var(--ink-body); }
.closing__promo .btn { margin-top: var(--space-3); padding-inline: var(--space-5); max-width: 100%; }
.closing__eyebrow { font-size: var(--text-caption); font-weight: var(--weight-bold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--red-strong); }

/* ---------------------------------------------------------------- callout, pull-out, media */
/* Precedented: the brand document names this exact pattern — "Key Update Callout: Pale red
 * background, red outline/icon, one concise product/news update" — for a boxed alert-style
 * notice. Kept as designed; `.form__routed` below plays the same alert role. */
.callout { background: var(--callout); border-inline-start: var(--border-accent); padding: var(--space-5); border-radius: var(--radius); }
/* Class name is one word on purpose: the hyphenated form contains a token the commercial-terms
 * scan searches for, and a class name is a shipped string like any other.
 * No component quite like this is named in the brand document; treated as the same family as the
 * "Feature List" heading rule (red on the one thing deliberately singled out), used sparingly. No
 * content record uses this block yet — revisit if it starts appearing often enough to read as
 * decoration rather than one deliberate highlight. */
.pullquote { border-inline-start: var(--border-accent); padding-inline-start: var(--space-5); font-size: var(--text-h3); color: var(--ink); }
.pullquote cite { display: block; font-size: var(--text-caption); color: var(--ink-muted); font-style: normal; margin-top: var(--space-3); }
figure { margin: 0; }
figure img { width: 100%; height: auto; display: block; border: var(--border-hairline); border-radius: var(--radius); }
figcaption { font-size: var(--text-caption); color: var(--ink-muted); margin-top: var(--space-2); }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: var(--space-5); max-width: 44rem; }
.field { display: grid; gap: var(--space-2); }
.field > label { font-weight: var(--weight-bold); color: var(--ink); }
.field__hint { font-size: var(--text-caption); color: var(--ink-muted); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--canvas);
  border: var(--border-control); border-radius: var(--radius);
  padding: var(--space-3);
  width: 100%;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--red-strong); border-width: 2px; }
.field__error { color: var(--red-strong); font-weight: var(--weight-bold); font-size: var(--text-small); }
.choice-list { display: grid; gap: var(--space-2); border: 0; margin: 0; padding: 0; }
.choice { display: flex; gap: var(--space-3); align-items: flex-start; }
.choice input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--red-strong); }
.form__consent { background: var(--panel-soft); padding: var(--space-4); border-radius: var(--radius); }
.form__routed { background: var(--callout); border-inline-start: var(--border-accent); padding: var(--space-4); border-radius: var(--radius); }
.form__status[hidden] { display: none; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- documentation */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: var(--space-7); align-items: start; }
.doc-toc { position: sticky; top: var(--space-5); font-size: var(--text-small); border-inline-start: var(--border-hairline); padding-inline-start: var(--space-4); }
.doc-toc ul { list-style: none; padding: 0; }
.endpoint-signature { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; background: var(--panel); border-radius: var(--radius); padding: var(--space-3) var(--space-4); font-family: var(--font-mono); font-size: var(--text-small); }
.method { font-weight: var(--weight-bold); color: var(--canvas); background: var(--ink); border-radius: var(--radius-sm); padding: 0.1rem var(--space-2); }
pre { background: var(--ink); color: var(--panel); padding: var(--space-4); border-radius: var(--radius); overflow-x: auto; font-family: var(--font-mono); font-size: var(--text-small); line-height: 1.5; }
code { font-family: var(--font-mono); font-size: 0.95em; }
:not(pre) > code { background: var(--panel); padding: 0.1em 0.35em; border-radius: var(--radius-sm); color: var(--ink); }
/* A request body's optional fields, disclosed on demand. Every field still ships in the DOM: this
 * is progressive disclosure, never a dropped row (gate 2 feedback section 4). */
.optional-fields { margin-top: var(--space-4); border: var(--border-hairline); border-radius: var(--radius); padding: var(--space-4); }
.optional-fields summary { cursor: pointer; font-weight: var(--weight-bold); color: var(--ink); }
.optional-fields[open] summary { margin-bottom: var(--space-4); }
.sample-tabs { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }
.sample-tab { font: inherit; font-size: var(--text-small); background: var(--panel); border: var(--border-hairline); border-radius: var(--radius); padding: var(--space-2) var(--space-3); cursor: pointer; }
.sample-tab[aria-selected="true"] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }

/* ---------------------------------------------------------------- article */
.article-meta { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: var(--text-caption); color: var(--ink-muted); border-bottom: var(--border-hairline); padding-bottom: var(--space-4); margin-bottom: var(--space-6); }
/* A boxed aside inside running prose plays the callout's role (compare the "Key Update Callout"
 * precedent above), so it keeps the same red rule. */
.article blockquote { border-inline-start: var(--border-accent); margin: 0 0 var(--space-4); padding-inline-start: var(--space-5); color: var(--ink); }
.feedback { border-top: var(--border-hairline); margin-top: var(--space-7); padding-top: var(--space-5); display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--panel); border-top: var(--border-hairline); margin-top: var(--section-gap); padding-block: var(--space-7); }
/* A brand block (logo, one-line statement, contact details with icons) beside the link columns,
 * replacing a row of five equal plain-text columns and a fine-print legal line. The brand statement
 * lives under the logo now, where it reads as a tagline, not as small print beside the legal name. */
.footer-top { display: grid; grid-template-columns: minmax(13rem, 1fr) minmax(0, 2.6fr); gap: var(--space-7); }
.footer-brand__logo { display: inline-block; transition: transform var(--duration) var(--easing); }
.footer-brand__logo img { display: block; height: 2.25rem; width: auto; }
.footer-brand__logo:hover { transform: translateY(-2px); }
.footer-brand__statement { margin: var(--space-4) 0 var(--space-5); color: var(--ink-body); max-width: 30ch; }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.footer-contact li { margin: 0; }
.footer-contact li, .footer-contact a { display: flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; }
.footer-contact__icon {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--canvas); border: var(--border-hairline); color: var(--ink);
  transition: background var(--duration) var(--easing), color var(--duration) var(--easing), transform var(--duration) var(--easing), border-color var(--duration) var(--easing);
}
.footer-contact__icon svg { width: 1.1rem; height: 1.1rem; }
.footer-contact a span:last-child { transition: color var(--duration) var(--easing); }
.footer-contact a:hover .footer-contact__icon, .footer-contact a:focus-visible .footer-contact__icon {
  background: var(--red-strong); border-color: var(--red-strong); color: var(--canvas); transform: scale(1.12) rotate(-8deg);
}
.footer-contact a:hover span:last-child, .footer-contact a:focus-visible span:last-child { color: var(--red-strong); }

.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: var(--space-5); }
.footer-cols h2 { position: relative; font-size: var(--text-caption); text-transform: uppercase; letter-spacing: var(--tracking-eyebrow); color: var(--ink); padding-bottom: var(--space-3); margin-bottom: var(--space-4); }
.footer-cols h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 1.5rem; height: 2px; background: var(--red); }
.footer-cols ul { list-style: none; padding: 0; }
/* A link slides right as a short red bar grows in ahead of it - motion that says "go" without
 * underlining every link in a block that is nothing but links. --duration drops to 0 under
 * prefers-reduced-motion (tokens.css), so this becomes an instant state change there. */
.footer-cols a { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; transition: color var(--duration) var(--easing), transform var(--duration) var(--easing); }
.footer-cols a::before { content: ""; display: inline-block; width: 0; height: 2px; margin-right: 0; background: var(--red); transition: width var(--duration) var(--easing), margin-right var(--duration) var(--easing); }
.footer-cols a:hover, .footer-cols a:focus-visible { color: var(--red-strong); }
.footer-cols a:hover::before, .footer-cols a:focus-visible::before { width: 0.75rem; margin-right: var(--space-2); }

.footer-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); border-top: var(--border-hairline); margin-top: var(--space-7); padding-top: var(--space-5); font-size: var(--text-caption); color: var(--ink-muted); }
.footer-legal .nav-list { gap: var(--space-4); }
.footer-legal .nav-list:empty { display: none; }

/* ---------------------------------------------------------------- ~400px */
@media (max-width: 52rem) {
  .hero__inner, .hero--hardware .hero__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .hero--hardware .hero__media { order: -1; }   /* on a phone, the device comes first */
  .hero__media-row { flex-direction: column; margin: var(--space-4) 0; }
  .hero__media--stacked { flex: 0 0 auto; width: 100%; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { position: static; border-inline-start: 0; border-bottom: var(--border-hairline); padding: 0 0 var(--space-4); }
  .site-promo__inner { grid-template-columns: minmax(0, 1fr); padding: var(--space-5); }
  .closing { padding: var(--space-6) var(--space-5); }
  .closing--split { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding: var(--space-5); }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  tbody th { width: auto; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; justify-content: center; }

  /* Header at phone width. The navigation stays visible and scrolls sideways rather than hiding
   * behind a menu button: these menus are six items, and a list you can see beats one you must open.
   * Only the site's declared mobile_primary_cta stays in the header; the rest is reachable in the
   * page and the footer. Which CTA that is comes from _site/navigation.json, not from this file. */
  .masthead__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    grid-template-areas: "logo utility" "nav nav";
    gap: var(--space-3) var(--space-4); align-items: center;
  }
  .masthead__logo { grid-area: logo; min-width: 0; }
  .masthead__logo img { height: 1.75rem; max-width: 100%; }
  /* min-width:0 is what stops a grid item from being sized by its widest child and pushing the
   * whole page sideways. The negative gutter lets the scrolling row bleed to the screen edges. */
  .masthead__nav { grid-area: nav; min-width: 0; margin-inline: calc(var(--page-gutter) * -1); }
  .nav-utility { grid-area: utility; justify-self: end; min-width: 0; }
  .nav-list {
    flex-wrap: nowrap; overflow-x: auto; gap: var(--space-4); min-width: 0;
    padding-inline: var(--page-gutter); padding-bottom: var(--space-2);
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  /* Same list, not a menu you must open: a submenu's items join the scroll strip right after their
   * parent, instead of the desktop hover dropdown (there is no hover on a touch screen). */
  .nav-list > li { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-4); }
  .nav-list > li > ul {
    display: flex; position: static; flex-direction: row; flex-wrap: nowrap;
    gap: var(--space-4); min-width: 0; padding: 0; border: 0; box-shadow: none; background: none;
  }
  /* Both utility controls are now fixed 44px icon circles (.btn--icon-only above), the same at
   * every width, so the old rule hiding the non-primary one and squeezing the other's text to fit
   * no longer has anything to do: two icons fit beside the logo at any phone width a text pill
   * never could. */
}

@media print {
  .masthead__nav, .cta-row, .feedback { display: none; }
}
