/* ==========================================================================
   Rightlander, polish layer (Nov 2026)
   Loaded last on every page. Tightens type, spacing, cards and labels
   without changing brand tokens (royal blue #0263E0, restrained yellow,
   navy ink, Inter). Keep rules here small and global; page-specific
   fixes stay in their own files.
   ========================================================================== */

/* ---------- 1. Type: tighter display, cleaner wrapping ---------- */
h1, h2, h3,
.hero-title, .inner-title {
  text-wrap: balance;
}
.hero-title, .inner-title { letter-spacing: -0.035em; }
h2 { letter-spacing: -0.025em; }
h3, h4 { letter-spacing: -0.012em; }
p, li, blockquote { text-wrap: pretty; }

.hero-sub,
.inner-lede,
.section-lede,
.section-head p,
.section-header p {
  max-width: 62ch;
}
.hero-sub { font-size: clamp(16px, 1.25vw, 18.5px); line-height: 1.6; }

/* ---------- 2. Labels: one eyebrow style, Inter not mono ---------- */
:root { --tracking-eyebrow: 0.1em; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  gap: 8px;
}
.eyebrow::before {
  width: 6px;
  height: 6px;
  box-shadow: none;
  opacity: 0.9;
}
/* Small UI labels read as chrome, not data: use the body face. */
.section-head-compact .eyebrow,
.hub-card-eyebrow,
.product-tagline,
.panel-kicker,
.quiz-teaser-eyebrow,
.news-card-tag,
.team-role,
.contact-role,
.partner-type,
.job-meta,
.clients-hero-stats .stat-label,
.story-card .story-meta,
.quote-card footer span,
.quote-card cite span,
.quote-card-hero figcaption span {
  font-family: var(--font-body) !important;
  letter-spacing: 0.06em;
}

/* ---------- 3. Home hero ---------- */
/* Decorative "live" chips removed from markup; guard against cached copies. */
.hero .hero-float { display: none !important; }
.btn-pulse::before { display: none !important; animation: none !important; }
.hero-cta-sub { margin-top: 14px; font-size: 14px; }

/* ---------- 4. Hero stat strips (split heroes on inner pages) ---------- */
.clients-hero-stats {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 20px 28px;
}
.brand-hero-copy .clients-hero-stats .stat-num,
.uc-hero-stats .stat-num {
  font-size: clamp(24px, 2.3vw, 32px);
  letter-spacing: -0.03em;
}
.clients-hero-stats .stat-label {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
}

/* ---------- 5. Section heads: ledes align with their headings ---------- */
.feature-grid-section .section-lede,
.faq-section .section-lede,
.how-it-works .section-head:not(.is-centered):not(.section-head--centered) .section-lede {
  margin-inline: 0;
}

/* ---------- 6. Cards: one radius, one border, one hover ---------- */
.feature-card,
.quote-card,
.hub-card,
.uc-hub-card,
.pr-hub-card,
.news-card {
  border-radius: 16px;
}
.feature-card,
.hub-card,
.uc-hub-card {
  border-color: var(--color-divider);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.feature-card:hover,
.hub-card:hover,
.uc-hub-card:hover,
.quote-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-divider));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
[data-theme='dark'] .quote-card:hover {
  border-color: color-mix(in srgb, #4e92ff 45%, transparent);
}

/* ---------- 7. Quotes: one opening mark, not two ---------- */
.quote-card blockquote::before { display: none !important; }
.quote-card::before {
  position: static;
  display: block;
  content: "\201C";
  font-size: 44px;
  line-height: 0.7;
  height: 22px;
  opacity: 1;
  color: var(--color-primary);
  margin-bottom: 6px;
}
.featured-quote blockquote {
  font-size: clamp(20px, 1.9vw, 27px);
  line-height: 1.38;
  letter-spacing: -0.015em;
}

/* ---------- 8. Grids: no orphan cards on desktop ---------- */
@media (min-width: 900px) {
  /* 4 cards: 2 x 2 instead of 3 + 1 */
  .feature-grid:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* 5 cards: 3 on top, 2 wide below */
  .hub-cards:has(> :nth-child(5):last-child) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .hub-cards:has(> :nth-child(5):last-child) > * { grid-column: span 2; }
  .hub-cards:has(> :nth-child(5):last-child) > :nth-child(n+4) { grid-column: span 3; }
}

/* ---------- 9. Buttons: consistent weight ---------- */
.btn { font-weight: 600; letter-spacing: -0.005em; }
.btn-lg { min-height: 48px; }

/* ---------- 10. Mobile ---------- */
@media (max-width: 640px) {
  .hero-sub { font-size: 16px; }
  .clients-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .featured-quote blockquote { font-size: 19px; }
}

/* Quote cards: keep the mark close to the quote */
.quote-card > blockquote,
.quote-card > p:first-of-type { margin-top: 0; }
.quote-card { gap: 14px; }

/* FAQ lists line up with their left-aligned headings */
.faq-section .faq-list { margin-inline: 0; }

/* Home hero stats: label style matches inner heroes; compact row on phones */
.hero-stat .label { text-transform: none; letter-spacing: 0.01em; font-weight: 500; font-size: 13px; margin-top: 4px; }
@media (max-width: 640px) {
  .hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .hero-stat .num { font-size: 22px; }
  .hero-stat .label { font-size: 12px; line-height: 1.35; }
}

/* Official event logos on events hub cards */
.news-card-media--event-logo img { max-width: 72%; max-height: 72px; height: auto; }
.news-card-media--event-logo img[src*="igb-affiliate"],
.news-card-media--event-logo img[src*="igb-live-logo"],
.news-card-media--event-logo img[src*="affilifest"] { max-height: 140px; }
.news-card-media--event-logo img[src*="g2e"] { max-height: 80px; }
.news-card-media--event-logo img[src*="ice-logo"] { max-height: 60px; }
.news-card-media--plate-dark { background: #0b1a2e; }
[data-theme="dark"] .news-card-media--plate-dark { background: #16304f !important; }

/* ==========================================================================
   Whitespace pass (2026-11-16): one tighter vertical rhythm site-wide.
   Section padding stacked to 200-250px between blocks on desktop.
   ========================================================================== */
:root {
  --section-y: clamp(48px, 5.5vw, 80px);
  --section-y-sm: clamp(32px, 4vw, 56px);
  --section-pad-y: clamp(40px, 4.5vw, 64px);
}
.feature-grid-section, .feature-split, .feature-list-section, .how-it-works,
.faq-section, .regulators, .pi-home, .uc-outcomes, .uc-pillars,
.engine-section, .verticals-section, .two-paths {
  padding-block: var(--section-y);
}
section.section-sm { padding-block: var(--section-y-sm); }
.trust-bar.section-sm { padding-block: clamp(28px, 3vw, 40px); }
.funnel { padding-block: var(--section-y-sm) var(--section-y); }
.cta-band, .inner-cta { padding-block: clamp(40px, 4vw, 64px); }
.section-head, .section-head-compact { margin-bottom: clamp(20px, 2.4vw, 32px); }

/* Product heroes: screenshot beside the copy, not under it */
@media (min-width: 1024px) {
  .product-hero:has(.product-hero-shot) > .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(40px, 4vw, 64px);
    align-items: start;
  }
  .product-hero:has(.product-hero-shot) > .container > *:not(.product-hero-shot) { grid-column: 1; }
  .product-hero:has(.product-hero-shot) .product-hero-shot {
    grid-column: 2; grid-row: 1 / span 12; align-self: center;
    margin: 0; max-width: 600px; justify-self: end;
  }
}

/* FAQs: heading left, questions right, instead of one narrow column */
@media (min-width: 1024px) {
  .faq-section > .container:has(> .faq-list) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    column-gap: clamp(40px, 5vw, 80px);
    align-items: start;
  }
  .faq-section > .container:has(> .faq-list) > .section-head {
    position: sticky; top: 104px; margin-bottom: 0;
  }
  .faq-section > .container:has(> .faq-list) > .faq-list { max-width: none; width: 100%; }
  .faq-section > .container:has(> .faq-list) > :not(.section-head):not(.faq-list) { grid-column: 1 / -1; }
}

/* Inline links inside feature-list items were splitting into flex columns */
.feature-list-section .feature-list li { display: block; }
/* Quiz teaser strip sits between two padded sections; do not add a third gap */
section[data-quiz-teaser] { padding-block: 0; }

/* News articles: restore bullets and numbering (base.css resets all lists) */
.article-body .prose ul:not([class]), .article-body .content-section ul:not([class]) { list-style: disc outside; padding-inline-start: 1.4em; margin-block: 1em; }
.article-body .prose ol:not([class]), .article-body .content-section ol:not([class]) { list-style: decimal outside; padding-inline-start: 1.6em; margin-block: 1em; }
.article-body .prose ul:not([class]) ul:not([class]) { list-style-type: circle; margin-block: .4em; }
.article-body .prose li::marker { color: var(--color-primary, #0263E0); }
/* Cover image fills its frame: no inherited prose image margin */
.article-hero-figure img, .article-hero-figure picture { margin: 0 !important; }

/* News category bar */
.news-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(20px, 2.4vw, 32px); }
.news-cat { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border: 1px solid var(--color-border, #d5dae3); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--color-text, #0f1e33); background: var(--color-surface, #fff); text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.news-cat:hover { border-color: var(--color-primary, #0263E0); color: var(--color-primary, #0263E0); }
.news-cat[aria-current="page"] { background: var(--color-primary, #0263E0); border-color: var(--color-primary, #0263E0); color: #fff; }
@media (max-width: 640px) {
  .news-cats { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--container-pad, 16px)); padding-inline: var(--container-pad, 16px); scrollbar-width: none; }
  .news-cats::-webkit-scrollbar { display: none; }
  .news-cat { flex: 0 0 auto; }
}
a.eyebrow--link { text-decoration: none; }
a.eyebrow--link:hover { text-decoration: underline; }
/* In-article demo CTA: prose link colour was making the button text blue on blue */
.prose a.rl-convert__cta, .rl-convert a.rl-convert__cta { color: #fff !important; text-decoration: none !important; }
.prose a.rl-convert__cta:hover { color: #fff !important; }
/* Body-copy links: brand blue, not the neon accent (which failed contrast on white) */
.prose a:not(.btn):not(.btn-pill):not(.rl-convert__cta) { color: var(--color-primary, #0263E0); text-underline-offset: 2px; }
.prose a:not(.btn):not(.btn-pill):not(.rl-convert__cta):hover { color: var(--color-primary-hover, #0350b8); }

/* Cross-link rows (internal linking) */
.xlink-row { padding-block: clamp(28px, 4vw, 48px); border-top: 1px solid var(--color-divider, #e6e9ef); }
.xlink-row .xlink-group + .xlink-group { margin-top: var(--space-4, 16px); }
.xlink-row .xlink-label { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted, #5b6676); }
.xlink-row .news-cats { margin: 0; }
@media (max-width: 640px) {
  .xlink-row .news-cats { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
}

/* Site search (Nov 2026): visible header box, palette results, /search page */
.nav-search-trigger { min-height: 36px; min-width: 168px; justify-content: flex-start; cursor: text; }
.nav-search-trigger .nav-search-label { flex: 1; text-align: left; font-size: 13px; }
.nav-search-trigger .nav-search-kbd { margin-left: auto; }
@media (max-width: 1499px) { .nav-search-trigger { min-width: 0; } .nav-search-trigger .nav-search-label { display: none; } }
@media (max-width: 1279px) {
  .nav-cta .nav-search-trigger { display: inline-flex !important; min-width: 44px; min-height: 44px; justify-content: center; padding: 0; background: transparent; border-color: transparent; color: var(--color-text); }
}
.cmdk-form { margin: 0; }
.cmdk-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.cmdk-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item-kind { flex: 0 0 auto; min-width: 72px; text-align: center; }
.cmdk-item.is-active { background: rgba(2,99,224,0.08); }
.cmdk-more { display: block; margin-top: 4px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--color-primary); text-decoration: none; }
.cmdk-more:hover { background: rgba(2,99,224,0.08); }
.cmdk-empty a { color: var(--color-primary); font-weight: 600; }
@media (max-width: 640px) {
  .cmdk-overlay { padding-top: 8px; }
  .cmdk { width: calc(100vw - 16px); }
  .cmdk-list { max-height: 65vh; }
  .cmdk-item { min-height: 44px; }
  .cmdk-footer { display: none; }
}
.site-search { display: flex; gap: 8px; max-width: 680px; margin: var(--space-5, 24px) 0 0; }
.site-search input[type="search"] { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--color-text); background: var(--color-surface, #fff); border: 1px solid var(--color-border, #d5dae3); border-radius: 10px; }
.site-search input[type="search"]:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary); }
.site-search .btn { min-height: 48px; }
.search-results { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.search-results li { padding: 18px 0; border-bottom: 1px solid var(--color-divider); }
.search-results .sr-kind { display: inline-block; margin-bottom: 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-muted); }
.search-results a { font-size: 18px; font-weight: 600; color: var(--color-text); text-decoration: none; }
.search-results a:hover { color: var(--color-primary); text-decoration: underline; }
.search-results p { margin: 6px 0 0; color: var(--color-text-muted); font-size: 15px; }
.search-count { color: var(--color-text-muted); margin: 0 0 8px; }

/* Article FAQs (no .section-head): one column, same width as the article text */
.article-faq > .container.prose { display: block; max-width: 760px; }
.article-faq .faq-list { max-width: none; width: 100%; margin-inline: 0; }
/* Pillar CTA buttons keep white text on blue */
.prose .rl-pillar-cta__actions a.btn-pill--primary,
.prose .rl-pillar-cta__actions a.btn-pill--primary:hover { color: #fff; text-decoration: none; }

/* News listing "Show more" (js/news-more.js) */
.news-more { display: flex; justify-content: center; margin-top: var(--space-8, 2rem); }
.news-more .btn { min-height: 44px; }
.news-grid > article.news-card[hidden] { display: none !important; }

/* Mobile header: brand + search + Book a demo + menu needed ~405px, so the
   menu button sat off-screen on 390px phones. Tighten the row, and below
   375px drop the header demo button (it stays in the menu drawer). */
@media (max-width: 480px) {
  .site-header .nav { gap: 12px; }
  .site-header .nav-brand img, .site-header .brand-logo { height: auto; width: 120px; }
  .site-header .nav-cta { gap: 6px; }
  .site-header .nav-search-trigger { width: 40px; min-width: 40px; }
  .site-header .nav-cta .btn-primary.btn-sm { padding-inline: 12px; }
  .site-header .nav-mobile-toggle { width: 44px; min-width: 44px; height: 44px; flex: 0 0 44px; }
}
@media (max-width: 374px) {
  .site-header .nav-cta .btn-primary.btn-sm { display: none; }
}
