/*
 * DAP Industry Pages: corrections layered on top of the ported design system.
 *
 * The five stylesheets this plugin ships are verbatim ports of the approved
 * staging build, so they can be diffed against it. Anything we deliberately
 * change goes here instead of being edited into them.
 *
 * No em-dashes anywhere in this codebase, per brand guardrails.
 */

/* ---------------------------------------------------------------------------
 * The 14px type floor.
 *
 * The design requires a hard 14px minimum on every element, including card
 * bodies, table cells, form labels, chip labels, eyebrows and fine print. Three
 * rules in the approved build hardcode px values below it. Corrected here
 * rather than in the ported files.
 * ------------------------------------------------------------------------- */

/* was 11px in shared.css */
.urgency-bar__text { font-size: 14px; }

/* was 12px in shared.css */
.urgency-bar__cta { font-size: 14px; }

@media (max-width: 767px) {
  .urgency-bar__text { font-size: 14px; letter-spacing: .02em; }
  .urgency-bar__cta  { font-size: 14px; }
}

/* was 11px in pages.css */
.hc-logocell .logo-wordmark,
.hc-logocell span { font-size: 14px; line-height: 1.2; }

/* ---------------------------------------------------------------------------
 * Page background.
 *
 * The design uses a light grey page canvas (--bg-page, #F2F4F7). Sections that
 * read as "grey bands" (#logos, #proof, #faq ...) are themselves transparent
 * and simply let that canvas show through.
 *
 * (2026-10-19, rebuild: the corrections for the old live theme that used to sit
 * here, its .btn margins, Bootstrap reset bleed, fixed bottom bar, ad slots and
 * the HubSpot plugin's inline label style, are removed. The rebuild does not run
 * that theme or plugin.)
 * ------------------------------------------------------------------------- */
body.dapv-page {
  background-color: var(--bg-page);
}

/* ---------------------------------------------------------------------------
 * Mobile corrections.
 *
 * This sheet only loads on vertical pages, so plain selectors are enough here -
 * nothing in the theme is being fought, unlike the blocks above.
 * ------------------------------------------------------------------------- */

/* The urgency bar's second clause, and the middot that introduces it, are
 * wrapped in .urgency-bar__more so both disappear together. Hiding only the
 * <strong> left a stray "." at the end of the line. Below 768px the bar has
 * room for one clause, the dot and the button, and no more. */
@media (max-width: 767px) {
  .urgency-bar__more {
    display: none;
  }

  /* One clause fits on one or two lines, so the dot, the text and the button
   * sit on a shared centre line. */
  .urgency-bar__inner {
    align-items: center;
  }

  .urgency-bar__text {
    align-items: center;
    text-wrap: balance;
  }
}

/* Team photos on phones: the design's plain two-column grid, every photo the
 * same size (the fifth sits alone in the last row). The September port made
 * the first photo full width here; QA Professional Services issue 30 (1 Dec
 * 2026) asked for the design's grid back. */

/* Legal links in the form fine print, in the brand orange. Underlined on hover
 * only, matching how links read elsewhere in this design. */
.hc-fine a {
  color: var(--accent-main);
  text-decoration: none;
}

.hc-fine a:hover,
.hc-fine a:focus-visible {
  text-decoration: underline;
}

/* The legal sentence runs on at the end of the fine print, as in every design (about, healthcare: inline).
   It used to sit on its own line (Sept 2026, before the designs were copied); Jade flagged the difference 13 Nov. */
.hc-fine__legal {
  display: inline;
  margin-top: 0;
}

/* ---------------------------------------------------------------------------
 * #problem: centre the number disc against the whole card.
 *
 * The disc is a ::before placed at `grid-row: 1 / -1` with `align-self: center`,
 * and computed style says it is centred - but it rendered against the title.
 *
 * The cause: a wide-viewport rule sets `grid-template-rows: auto`, a single
 * EXPLICIT track, and it applies at every width. The title and the description
 * then land in IMPLICIT tracks. `-1` names the end of the explicit grid, so the
 * disc's area was just the first row - about 24px - and it was being centred
 * faithfully inside that. getComputedStyle reporting three tracks is what hid
 * this: it lists implicit tracks alongside explicit ones.
 *
 * So the fix is to declare the rows the mobile layout actually uses, which makes
 * `1 / -1` span the whole card again. The label row stays collapsed on every
 * card but the first, exactly as before.
 * ------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .prob-card {
    grid-template-rows: auto auto auto;
  }

  .prob-card:not(:first-of-type) {
    grid-template-rows: 0 auto auto;
  }

  .prob-card::before {
    grid-row: 1 / -1;
    align-self: center;
  }
}

/* ---------------------------------------------------------------------------
 * #how-we-help: the eight strategies read "1)" rather than "1".
 *
 * The number and the title are one generated string, not two elements:
 *   .lem__data span::before { content: attr(data-n) " " attr(data-name) }
 * so the bracket goes into that content, keeping the single space that
 * separates the number from the title. Same specificity as the rule in
 * pages.css; this sheet loads after it, so it wins.
 *
 * (An earlier attempt put the bracket on .lem__n, which is the circular badge
 * in the interactive diagram's readout panel - the wrong element - and was
 * reverted.)
 * ------------------------------------------------------------------------- */
.lem__data span::before {
  content: attr(data-n) ") " attr(data-name);
}


/* ---------------------------------------------------------------------------
 * Mobile round 2.
 * ------------------------------------------------------------------------- */

/* 1. The people cards are a horizontal scroller (382px visible, 1074px of
 *    content) with scroll snapping already on, but nothing on screen says so.
 *    Three cues, no JavaScript: a brand-coloured scrollbar that is actually
 *    visible, a fade on the trailing edge so the row reads as continuing, and
 *    padding so a snapped card sits clear of that fade. */
@media (max-width: 767px) {
  .hc-people {
    /* Kept for pointer devices that render a scrollbar. Touch devices do not,
     * which is why the rail below exists. No mask: it would clip the scrollbar
     * and the card edges. */
    scrollbar-color: var(--accent-main) rgba(4, 28, 44, .12);
    scrollbar-width: thin;
  }

  .hc-people::-webkit-scrollbar {
    height: 4px;
  }

  .hc-people::-webkit-scrollbar-track {
    background: rgba(4, 28, 44, .12);
    border-radius: 999px;
  }

  .hc-people::-webkit-scrollbar-thumb {
    background: var(--accent-main);
    border-radius: 999px;
  }

  .hc-people > * {
    scroll-snap-align: start;
  }
}

/* 2. The hero audit form: input and button sat on one flex row with a 6px gap,
 *    which is what made the spacing look wrong at 414px. Stack them, give the
 *    gap a real value, and let the button fill the width. */
@media (max-width: 767px) {
  .hc-audit__row {
    /* Wrap, do NOT switch to column: the input is `flex: 1`, and in a column
     * that grows it vertically into an oversized pill. Keeping the main axis
     * horizontal leaves the input at its own height and lets the button wrap
     * onto the next line. */
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  .hc-audit__input {
    flex: 1 1 100%;
  }

  .hc-audit__btn {
    flex: 1 0 100%;
    width: 100%;
  }
}

/* 3. #audits heading: 28px type on a 30.8px line (1.1) is too tight once the
 *    highlighted phrase carries its own background box. */
@media (max-width: 767px) {
  #audits h2,
  #audits2 h2 {
    line-height: 1.3;
  }
}

/* The scroll rail. Only rendered by hubspot-forms.js's sibling, vertical.js,
 * and only when the row actually overflows, so it never appears on a viewport
 * where all the cards already fit. */
.hc-people__rail {
  display: none;
}

@media (max-width: 767px) {
  .hc-people__rail {
    display: block;
    position: relative;
    height: 4px;
    margin: var(--space-4) auto 0;
    width: calc(100% - var(--space-10));
    max-width: 220px;
    background: rgba(4, 28, 44, .12);
    border-radius: 999px;
    overflow: hidden;
  }

  .hc-people__rail span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    background: var(--accent-main);
    border-radius: 999px;
    transition: left .12s linear;
    will-change: left;
  }

  /* Sits on a dark band, so the track needs to read against it. */
  .hc-closeband .hc-people__rail,
  [data-theme="dark-section"] .hc-people__rail {
    background: rgba(255, 255, 255, .22);
  }
}

/* ---------------------------------------------------------------------------
 * Carried over from the live plugin's own edits to the ported sheets (Sep 2026),
 * now that those sheets are the design's current files again (2026-10-20).
 * ------------------------------------------------------------------------- */
/* The sticky orange bar is position:fixed at the bottom, so it sat over the foot of the closing
   band and clipped the form it points at. Its measured height (--urgency-h, set by
   dapvChromeVars in vertical.js) is reserved; with no JS the fallback is 0. */
.hc-closeband { padding-bottom: calc(var(--space-20) + var(--urgency-h, 0px)); }
/* 39s was written for the ABA band's 12 pills; a page with more clients sets --marquee-dur inline
   from its own count (blocks/logos/render.php) so a longer strip does not travel faster. */
.hc-logos #logos .logo-marquee-track--rtl,
#logos .logo-marquee-track--ltr,
#logos .logo-marquee-track--rtl { animation-duration: var(--marquee-dur, 39s); }

/* "White" in a block's Background setting: a real white band. Without it a section shows the
   page's own light grey (#f2f4f7), which the ABA design paints over on these sections. */
.section.section--white { background-color: #fff; }


/* ---------------------------------------------------------------------------
   2026-10-20 · Nick's healthcare QA
   --------------------------------------------------------------------------- */
/* Proof numbers: the tight -.05em tracking pulls the last digit's ink past the box that the
   gradient text is clipped to, so the 8 of 528 lost its right edge. A little room on the inline
   end keeps the tracking and the whole glyph. */
#trust-bar .hc-proof__v { padding-inline-end: .08em; }

/* People: the homepage's leadership slider (same markup and posts), so the homepage rules for it
   are mirrored here: the photo ring on hover, the snap, and two cards plus a peeking third on phones. */
#people .team-board { margin-top: var(--space-12); touch-action: pan-x pan-y; scroll-padding-left: var(--space-8); }
#people a.team-card { display: block; text-decoration: none; color: inherit; }
#people a.team-card img { transition: box-shadow var(--transition-base), filter var(--transition-base), transform var(--transition-base); }
/* The industry designs crop these photos 3:4 (262x350 at 1920px); the homepage card's 2:3 made them taller
   (QA Nonprofit issue 21, 1 Dec 2026). Industry pages only: About keeps the homepage card. */
.single-industry #people .team-card img { aspect-ratio: 3 / 4; }
#people a.team-card:hover img,
#people a.team-card:focus-visible img { outline: 3px solid var(--accent-main); outline-offset: -3px; }
#people a.team-card:hover .team-name,
#people a.team-card:focus-visible .team-name { color: var(--accent-main); }
#people a.team-card .team-name,
#people a.team-card .team-role { transition: color var(--transition-base); }
#people .team-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8); margin-top: var(--space-12); }
#people .team-foot .hc-close-line { flex: 1 1 32rem; max-width: 62ch; }
#people .team-foot .btn { flex: 0 0 auto; }
#people mark.motto-mark { background: none; color: inherit; font-weight: 700; }
@media (max-width: 767px) {
  #people .team-board { scroll-snap-type: x proximity; scroll-padding-left: 12px; }
  #people .team-board .team-card { scroll-margin-inline-start: 12px; flex-basis: calc((100vw - 12px - 2 * var(--space-5)) / 2.3); }
}
/* Phones on industry pages: the industry designs' people row below 760px, 200px cards with 2:3 photos, in place of
   the homepage's two cards and a peek (156px at 390px wide). QA B2B Tech issues 9 and 12, 1 Dec 2026. The slider's
   arrows and progress bar stay (every slider on the site, 29 Oct). */
@media (max-width: 759px) {
  .single-industry #people .team-board .team-card { flex-basis: 200px; width: 200px; }
  .single-industry #people .team-card img { aspect-ratio: 2 / 3; }
}
/* the homepage card type scale (its .team-line is a caption), not this page's body size */
#people .team-name { font-family: var(--t-font-display); font-weight: 700; font-size: var(--text-base, 16px); color: var(--text-heading); }
#people .team-role { font-size: var(--text-sm, 14px); color: var(--text-muted); }
#people .team-line { font-size: 15px; line-height: 1.5; color: var(--text-muted); margin-top: var(--space-2); max-width: none; }
#people mark.motto-mark { padding: 0; margin: 0; }

/* audits: the screenshot inside an accordion item below 1024px (vertical.js moves it there) */
.aud-right--empty { display: none !important; }
.acc-b .pane { margin: var(--space-4) 0 var(--space-2); }
.acc-b .pane-img { display: block; width: 100%; height: auto; border-radius: var(--radius-md, 10px); }


/* ---------------------------------------------------------------------------
 * #how-we-help ribbon icons (Nick, 2026-10-20).
 * The shared icon rule sizes every icon 48px, but these sit in 26px slots on the
 * ribbon, so only a corner showed; and the light tone drew them navy on a navy
 * band, then orange on the orange active band. On the ribbon they are white with
 * the orange accent, and navy with a white accent on the lit (orange) segment.
 * The hover scale is dropped here: WebKit draws a transformed element inside an
 * SVG foreignObject at the wrong place, which left a stray copy beside the panel.
 * The #how-we-help in :is() lifts these above the shared rule's specificity.
 * ------------------------------------------------------------------------- */
:is(#how-we-help, #aba-steps) .lem-seg .lem-seg__ico,
:is(#how-we-help, #aba-steps) .lem-seg:hover .lem-seg__ico {
  width: 26px !important; height: 26px !important;
  color: #fff !important; --ico-accent: var(--accent-main);
  transform: none !important;
}
:is(#how-we-help, #aba-steps) .lem-seg .lem-seg__ico > svg { width: 26px !important; height: 26px !important; }
:is(#how-we-help, #aba-steps) .lem-seg.is-on .lem-seg__ico,
:is(#how-we-help, #aba-steps) .lem-seg:hover .lem-seg__ico,
:is(#how-we-help, #aba-steps) .lem-seg:focus-visible .lem-seg__ico {
  color: var(--secondary-800) !important; --ico-accent: #fff;
}

/* the side-panel layout squeezed the ribbon between 900px and 1300px; there the
   ribbon and the panel stack, as they do below 900px */
@media (min-width: 900px) and (max-width: 1299px) {
  .lem { display: block; }
  .lem__svg { width: min(720px, 100%); height: auto; aspect-ratio: 720 / 400; margin: 0 auto; }
  .lem__panel,
  .lem[data-side] .lem__panel { max-width: 46rem; margin: var(--space-8) auto 0; padding: var(--space-12); text-align: center; }
}

/* #problem: between 768px and 899px the cards still use the stacked rows, but the
   disc fix above stopped at 767px, so the number sat at the top; same fix up to 899px */
@media (min-width: 768px) and (max-width: 899px) {
  .prob-card { grid-template-rows: auto auto auto; }
  .prob-card:not(:first-of-type) { grid-template-rows: 0 auto auto; }
  .prob-card::before { grid-row: 1 / -1; align-self: center; }
}

/* ---------------------------------------------------------------------------
 * Content fills its container (Nick, 2026-10-21).
 * Body copy, leads, headings, the audit accordion, the hero audit form (it stopped at
 * 34rem, about half the width below 1024px) and the band copy all carried their own
 * max-widths, so they stopped short of the container. Every one of them now runs the full
 * width of whatever holds it. The containers themselves keep their widths, and the trust
 * bar's stat labels (spans) are untouched, since they size the stat cells.
 * #content (the page's <main>) keeps this off the header and footer.
 * Service pages (.p-service) keep the service design's own text widths.
 * ------------------------------------------------------------------------- */
body:not(.p-service) #content section :is(p, li, blockquote, h1, h2, h3, h4, h5, h6),
body:not(.p-service) #content section :is(.hc-lead, .hc-hero__sub, .hc-hero__trust, .hc-audit, .acc-wrap, .acc-b,
  .aud-note, .team-line, .hc-close-line, .prob-close, .cm-intro, .cm-get, .cm-grid,
  .lem__panel, .faq-q-list) {
  max-width: none !important;
}

/* Logo strip, sized in CSS only (Nick, 2026-10-21). The design shipped a script that set every
   logo's height inline from its proportions and the screen size; that is gone. Every logo is
   40px high at every width, and a wide logo is held to a width cap instead (object-fit keeps
   its proportions), so long wordmarks do not dominate the row. Each pill takes the width of
   its logo plus padding. The selectors out-rank design-inline.css, which writes the strip with
   doubled ids and classes and per-logo heights. */
html body #logos#logos#logos .logo-marquee-track .client-logo-pill.client-logo-pill.client-logo-pill img,
html body .hc-logos .logo-marquee-track .client-logo-pill.client-logo-pill.client-logo-pill img {
  height: 40px !important;
  width: auto !important;
  max-width: 170px !important;
  max-height: none !important;
  object-fit: contain !important;
}
@media (max-width: 767px) {
  html body #logos#logos#logos .logo-marquee-track .client-logo-pill.client-logo-pill.client-logo-pill,
  html body .hc-logos .logo-marquee-track .client-logo-pill.client-logo-pill.client-logo-pill {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 20px !important;
  }
  html body #logos#logos#logos .logo-marquee-track .client-logo-pill.client-logo-pill.client-logo-pill img,
  html body .hc-logos .logo-marquee-track .client-logo-pill.client-logo-pill.client-logo-pill img {
    max-width: 140px !important;
  }
}
