/* Shared layout contract. Keep this stylesheet after component and page styles. */
:root {
  --sb-content-max: 1280px;
  --sb-content-gutter: 48px;
  --sb-type-hero: 56px;
  --sb-type-page: 48px;
  --sb-type-section: 36px;
  --sb-type-card: 20px;
  --sb-type-lead: 18px;
}

html,
body {
  min-width: 320px;
}

body .container.container,
body .sb-geo-banner-inner,
body .access-shell,
body .sb-case-layout,
body .pricing-page .shell {
  width: min(var(--sb-content-max), calc(100% - 2 * var(--sb-content-gutter)));
  max-width: 1280px;
  padding-left: 0;
  padding-right: 0;
  margin-left: auto;
  margin-right: auto;
}

.sb-site-header {
  --sb-header-shell: min(1280px, calc(100% - 2 * var(--sb-content-gutter)));
}

.sb-site-header .sb-site-header-bar {
  flex-wrap: nowrap;
}

.sb-site-brand {
  min-width: 0;
}

.sb-geo-banner-inner {
  grid-template-columns: 40px minmax(0, 1fr) 40px;
}

.sb-geo-banner-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
}

.sb-geo-banner-mobile-copy { display: none; }

/* Typography follows content roles rather than scaling icons and controls. */
:root body .sb-hero-title {
  max-width: 1120px;
  font-size: var(--sb-type-hero);
  line-height: 1.15;
  text-wrap: balance;
}

:root body main[class] h1 {
  font-size: var(--sb-type-page);
  line-height: 1.18;
  text-wrap: balance;
}

:root body :is(main[class] h2, .sb-repurchase-cycle-heading h2,
  .sb-integrations-heading h2, .sb-segments-heading h2, .sb-social-proof h2,
  .sb-setup-flow-heading h2, .sb-faq-heading h2, .sb-core-band-intro h2,
  .sb-final-cta h2) {
  font-size: var(--sb-type-section);
  line-height: 1.22;
  text-wrap: balance;
}

:root body :is(.sb-core-feature h3, .sb-integrations-group h3,
  .sb-setup-flow-steps h3, .sb-solution-problem-grid h3,
  .sb-solution-how-grid h3, .sb-solution-program-flow strong,
  .sb-solution-resource-grid strong, .sb-solution-use-grid strong,
  .pricing-page .plan-name, .sb-widget-fit-row h3, .sb-widget-behavior-card h3,
  .sb-api-flow-step strong, .sb-api-schema-card strong, .sb-how-step-row h3,
  .sb-how-profile-card h3, .sb-how-data-item strong, .sb-how-cycle-list strong,
  .sb-nuvem-step h3, .sb-nuvem-data-card h3, .sb-case-flow-copy strong,
  .sb-coupon-card h3, .sb-flash-coupon-card h3, .sb-coupons-empty h3,
  .sb-coupons-seo-grid h3, .sb-search-initial strong, .sb-search-empty strong,
  .sb-search-row a:not(.sb-search-row-action), .sb-terms-section h3) {
  font-size: var(--sb-type-card);
  line-height: 1.35;
}

:root body :is(.sb-hero-description, .sb-repurchase-cycle-heading p,
  .sb-core-band-intro p, .sb-integrations-heading p, .sb-segments-heading p,
  .sb-social-proof-copy p, .sb-setup-flow-heading p, .sb-faq-heading p,
  .sb-final-cta p, .sb-solution-hero-copy > p, .sb-solution-section-heading p,
  .sb-api-lead, .sb-widget-lead, .sb-how-lead, .sb-nuvem-lead,
  .sb-cases-lead, .sb-case-lead, .sb-coupons-lead, .sb-search-lead,
  .sb-blog-lead, .sb-compare-hero > .container > p, .sb-terms-hero > .container > p,
  .sb-faq-page-hero-copy > p, .access-copy > p, .pricing-page .lead) {
  font-size: var(--sb-type-lead);
  line-height: 1.6;
}

/* Keep nested cards separate from hero leads and section headings. */
:root body .sb-compare-summary-card { padding: 20px; }
:root body .sb-compare-brand { font-size: 18px; font-weight: 600; gap: 10px; }
:root body .sb-compare-mark { width: 32px; height: 32px; font-size: 13px; }
:root body .sb-compare-summary-card p { margin: 0; font-size: 15px; font-weight: 400; line-height: 1.6; }
:root body :is(.sb-solution-problem-grid p, .sb-solution-how-grid p,
  .sb-solution-resource-grid p, .sb-solution-use-grid p, .sb-solution-comparison p,
  .sb-widget-fit-row p, .sb-widget-behavior-card p, .sb-widget-cta p,
  .sb-api-flow-step p, .sb-api-schema-card p, .sb-how-step-row p,
  .sb-how-profile-card p, .sb-nuvem-step p, .sb-nuvem-data-card p,
  .sb-case-text-block, .sb-case-text-block p, .sb-case-dark-list p, .sb-case-closing p,
  .sb-cases-dark-band p, .sb-compare-decision p, .sb-compare-decision li,
  .sb-compare-cta p, .sb-faq-help p, .sb-coupons-faq-intro p) {
  font-size: 16px;
  line-height: 1.65;
}
:root body :is(.sb-solution-faq-list summary, .sb-faq-page-list summary,
  .sb-coupons-faq-list summary) { font-size: 18px; line-height: 1.45; }
:root body main[class] :is(.sb-faq-group-heading h2, .sb-terms-section h2) {
  font-size: 28px;
  line-height: 1.3;
}

:root body .sb-partners-label { font-size: 15px; font-weight: 400; line-height: 1.5; }
:root body .sb-repurchase-cycle-rail span { font-size: 32px; }
:root body .sb-repurchase-cycle-rail strong { font-size: var(--sb-type-card); line-height: 1.35; }
:root body .sb-repurchase-cycle-rail p { font-size: 15px; line-height: 1.6; }
:root body .sb-segment-row strong { font-size: 24px; line-height: 1.3; }
:root body .sb-segment-row p { font-size: 16px; line-height: 1.6; }
:root body .sb-faq-list summary span { font-size: 18px; line-height: 1.45; }
:root body .sb-faq-list p { font-size: 16px; line-height: 1.65; }
:root body .sb-social-proof-score strong { font-size: 36px; }
:root body .sb-social-proof-score span { font-size: 16px; }
:root body .sb-social-proof-card {
  display: flex;
  min-height: 0;
}
:root body .sb-social-proof-card > a {
  flex: 1;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 16px;
  box-shadow: none;
}
:root body .sb-social-proof-card > a:hover,
:root body .sb-social-proof-card > a:focus {
  transform: none;
  box-shadow: none;
}
:root body .sb-social-proof-card-top {
  min-height: 40px;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  gap: 10px;
}
:root body .sb-social-proof-card-top img { width: 36px; height: 36px; }
:root body .sb-social-proof-card-top strong { font-size: 14px; line-height: 1.3; }
:root body .sb-social-proof-card-top span { font-size: 12px; font-weight: 400; }
:root body .sb-social-proof-google { width: 18px; height: 18px; }
:root body .sb-social-proof-card .sb-social-proof-stars {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 1px;
}
:root body .sb-social-proof-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
  overflow-wrap: anywhere;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
}
:root body .sb-social-proof-reviews { padding-bottom: 12px; }
:root body .sb-social-proof-footer { margin-top: 24px; }
:root body .sb-blog-article-content :is(p, li) { font-size: 16px; line-height: 1.7; }
:root body .pricing-page .price-main { font-size: 44px; }
:root body .pricing-page .price-cents { font-size: 18px; }

:root body :is(.sb-hero-btn, .sb-final-cta-button, .sb-solution-button,
  .sb-widget-button, .sb-api-button, .sb-how-button, .sb-nuvem-button,
  .pricing-page .button, .sb-social-proof-footer a, .sb-segments-toggle,
  .sb-compare-button, .sb-faq-button, .sb-coupons-button, .sb-integration-button,
  .sb-error-button, .access-button) {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

:root body .sb-site-mega-aside-title { font-size: 26px; line-height: 1.25; }
:root body .sb-site-mega-aside p { font-size: 14px; line-height: 1.6; }
:root body .sb-site-mega-copy strong { font-size: 15px; }
:root body .sb-site-mega-copy small { font-size: 14px; }
:root body .sb-site-mobile-link { font-size: 16px; }

/* Footer navigation stays quieter than the page content at every breakpoint. */
:root body .sb-site-footer-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
:root body .sb-site-footer-column ul { gap: 10px; }
:root body .sb-site-footer-column li > a,
:root body .sb-site-footer-legal > a,
:root body .sb-site-footer-legal > span,
:root body .sb-site-footer-locale > span {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
:root body .sb-site-footer-legal .sb-site-meta-badge-copy strong {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
:root body .sb-site-footer-legal .sb-site-meta-badge-mark svg {
  width: 22px;
  height: 22px;
}

@media (min-width: 981px) and (max-width: 1200px) {
  .sb-site-header-bar { gap: 8px; }
  .sb-site-nav { gap: 0; }
  .sb-site-nav-link { padding: 0 8px; font-size: 13px; }
  .sb-site-actions { gap: 6px; }
  .sb-site-actions .sb-site-action-button { padding: 0 12px; font-size: 13px; }
}

@media (max-width: 1200px) {
  .sb-hero-trust { flex-wrap: wrap; }
  .sb-site-mega-grid-tight {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 20px;
  }
  .sb-segment-row {
    grid-template-columns: 54px minmax(0, 0.9fr) minmax(0, 1fr) auto 44px;
    column-gap: 16px;
  }
}

@media (max-width: 980px) {
  :root {
    --sb-content-gutter: 32px;
    --sb-type-hero: 48px;
    --sb-type-page: 42px;
    --sb-type-section: 34px;
  }
  .sb-site-header { height: 64px; }
  .sb-site-header .sb-site-header-bar {
    height: 63px;
    min-height: 63px;
    gap: 8px;
  }
  .sb-site-brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .sb-site-mobile-header-actions { margin-left: auto; gap: 8px; }
  .sb-site-mobile-header-actions .sb-site-action-button { min-height: 40px; padding: 0 12px; }
  .sb-site-mobile-header-actions .sb-site-icon-button,
  .sb-site-mobile-menu .sb-site-mobile-toggle { width: 40px; height: 40px; }
  .sb-site-mobile-panel {
    top: 64px;
    height: min(calc(100vh - 64px), var(--sb-mobile-panel-height, 100vh));
    height: min(calc(100dvh - 64px), var(--sb-mobile-panel-height, 100dvh));
    min-height: 0;
    padding: 24px 20px 32px;
  }
  .sb-site-mobile-link {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }
  .sb-segment-row { grid-template-columns: 54px minmax(0, 0.8fr) minmax(0, 1fr) 44px; }
}

@media (max-width: 700px) {
  :root {
    --sb-content-gutter: 20px;
    --sb-type-hero: 38px;
    --sb-type-page: 36px;
    --sb-type-section: 32px;
    --sb-type-card: 18px;
    --sb-type-lead: 16px;
  }
  .sb-segment-row { grid-template-columns: minmax(0, 1fr) 42px; }
}

@media (max-width: 600px) {
  :root {
    --sb-type-hero: 36px;
    --sb-type-page: 34px;
    --sb-type-section: 30px;
  }
  .sb-geo-banner { background: var(--sb-surface-soft); }
  .sb-geo-banner-inner {
    grid-template-columns: minmax(0, 1fr) 40px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .sb-geo-banner-spacer,
  .sb-geo-banner-icon,
  .sb-geo-banner-text,
  .sb-geo-banner-desktop-copy { display: none; }
  .sb-geo-banner-content {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    text-align: left;
  }
  .sb-geo-banner-mobile-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .sb-geo-banner-mobile-copy i { font-size: 10px; }
  .sb-geo-banner-actions {
    flex-direction: row;
    align-items: center;
    width: auto;
    flex-wrap: nowrap;
    gap: 16px;
  }
  .sb-geo-banner-confirm,
  .sb-geo-banner-decline {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0;
    font-size: 13px;
    line-height: 1.35;
  }
  .sb-geo-banner-confirm,
  .sb-geo-banner-confirm:hover,
  .sb-geo-banner-confirm:focus {
    border-radius: 0;
    background: transparent;
    color: var(--sb-blue);
    text-decoration: none;
  }
  .sb-geo-banner-confirm:hover,
  .sb-geo-banner-confirm:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .sb-geo-banner-decline {
    position: relative;
    padding-left: 16px;
    font-weight: 400;
  }
  .sb-geo-banner-decline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: var(--sb-border-soft);
  }
  .sb-geo-banner-close {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  .sb-site-mobile-header-actions .sb-site-action-button-secondary { display: none; }
  .sb-core-band-main,
  .sb-core-band-secondary,
  .sb-core-card-grid,
  .sb-site-mobile-feature-grid { grid-template-columns: minmax(0, 1fr); }
}
