/*
 * Hub pages (AI Audits, and Original Research after it): the AI Audits design's own inline
 * styles (dap-rebrand-catalin ai-audits.html, 2026-10-21). The sections themselves (or-hero,
 * or-callouts, or-study, at-tool, at-stage, careers) are already in pages.css.
 *
 * On the design page these rules were written against #hero, #tools and #meet. Here they are
 * tied to the hub blocks' own classes (or-hero, at-tools, hub-meet), because this sheet loads
 * on every page built from these blocks and the industry pages have a #hero of their own.
 * The icon tone rules from the design are already in design-inline.css.
 *
 * No em-dashes anywhere in this codebase, per brand guardrails.
 */

/* the meet band: form card and calendar stretch to one height, the "Or" divider between them */
.hub-meet .careers__grid--2:has(.careers__cal) { align-items: stretch; }
.hub-meet .careers__grid--2 .careers__cal { --hs-embed-h: 715px; }
.hub-meet .careers__grid--2:has(.careers__cal) > .hc-formcard:not(.careers__cal) { display: flex; flex-direction: column; justify-content: flex-start; }
.meet-or { display: flex; align-items: center; justify-content: center; gap: var(--space-4); color: rgba(255,255,255,.75); font-weight: 700; font-size: var(--t-small); letter-spacing: .08em; text-transform: uppercase; }
.meet-or::before, .meet-or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.2); }
@media (min-width: 1024px) {
  .hub-meet .careers__grid--2 { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) !important; align-items: stretch; }
  .hub-meet .meet-or { flex-direction: column; justify-content: center; padding: 0 var(--space-2); }
  .hub-meet .meet-or::before, .hub-meet .meet-or::after { flex: 0 0 25%; width: 1px; height: auto; }
  .hub-meet .meet-or::before { background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.3)); }
  .hub-meet .meet-or::after { background: linear-gradient(to top, rgba(255,255,255,0), rgba(255,255,255,.3)); }
}

/* the tools: icon tones on the panels */
.at-tools .at-tool__ic svg { color: inherit !important; }
.at-tools .at-tool .at-tool__ic[data-ico-tone="dark"] { color: var(--accent-main) !important; --ico-accent: #fff !important; }
.at-tools .at-tool .at-tool__ic[data-ico-tone="accent"] { color: #fff !important; --ico-accent: var(--secondary-900, #041c2c) !important; }

/* callout labels */
.or-callout__l { display: block; margin-top: var(--space-2); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-main); }

/* spacing between the hero and the tools (AI Audits only: the Original Research design keeps
   the pages.css spacing between its hero and its studies) */
.or-hero:has(~ #tools) { padding-bottom: 40px; }
#tools.at-tools { padding-top: 56px; }
.or-hero:has(~ #tools) .or-callouts { margin-bottom: 0; }
#tools.at-tools .container > .or-study:first-of-type { padding-top: 40px; }

/* the hero glow */
.or-hero { position: relative; isolation: isolate; overflow: hidden; }
.or-hero::after { content: ""; position: absolute; right: -180px; top: -300px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(240,109,58,.55) 0%, rgba(240,109,58,0) 70%); filter: blur(90px); opacity: .5; z-index: -1; pointer-events: none; }
@media (max-width: 640px) { .or-hero::after { width: 420px; height: 420px; right: -160px; top: -200px; } }
/* QA AI Audits Issue 1 (27 Nov): design-inline.css paints the same glow on every #hero.hc-hero::before (the Healthcare
   design), so AI Audits and Original Research drew it twice and it read twice as strong. Their designs draw it once. */
#hero.hc-hero.or-hero::before { content: none; }

/* the callout row takes as many columns as it has callouts (AI Audits shows two, once the
   Conversion Audit is gone), instead of leaving the design's third column empty */
@media (min-width: 900px) {
  .or-hero .or-callouts:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .or-hero .or-callouts:has(> li:only-child) { grid-template-columns: minmax(0, 1fr); }
}

/* a tool with several versions (Discoverability: healthcare, law firms, ABA, SaaS) stacks its buttons,
   one per line, each as wide as its own label with the arrow right after it, like the design's single
   button (Nick, QA AI Audits Issue 7, 27 Nov: they were all the width of the widest, arrow pushed to the edge). */
.at-tool__btns { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.at-tool__btns--stack { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; }

/* A link to one tool (/ai-audits/#ai-readiness-audit, e.g. from the homepage) lands it below the sticky header. */
.at-tools .at-tool[id] { scroll-margin-top: 110px; }

/* the numbered steps beside the sticky stage take one column per study or tool (the design
   sets three, and Original Research lists four studies) */
@media (min-width: 900px) {
  .at-tools[data-layout="d"] .at-stage__idx { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

/* Original Research (or-studies.js wraps the steps in .at-stage__idxwrap): up to four steps share
   the row; from the fifth study the row scrolls sideways, four steps at a time, follows the study
   in view, and fades on the side with more steps (Nick, 6 Nov 2026: the list grows with every
   study). The padding gives the active step's ring room inside the scroller. */
@media (min-width: 900px) {
  .at-stage__idxwrap { position: relative; min-width: 0; }
  .at-stage__idxwrap:has(> .at-stage__idx > li:nth-child(5)) { container-type: inline-size; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; padding: 10px 10px 4px; margin: -10px -10px -4px; }
  .at-stage__idxwrap::-webkit-scrollbar { display: none; }
  .at-tools[data-layout="d"] .at-stage__idxwrap:has(> .at-stage__idx > li:nth-child(5)) > .at-stage__idx { width: max-content; grid-auto-columns: calc((100cqw - 3 * var(--space-4)) / 4); }
  .at-stage__idxwrap.has-more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
  .at-stage__idxwrap.has-more-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 56px), transparent); }
  .at-stage__idxwrap.has-more-l.has-more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
}

/* "The studies" heading at the design's full H2 size (Original Research QA Issue 1, 27 Nov 2026). The design page
   carries body.p-awards, whose "#main-content .hc-h2 { font-size: var(--t-h2); line-height: 1.06 }" sets it; this page has no p-awards. */
.or-studies .hc-h2 { font-size: var(--t-h2); line-height: 1.06; }
