/*
 * Final shared typography polish.
 * Keeps headings, titles, subtitles, and premium labels readable across page CSS overrides.
 */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .entry-title,
body .page-title,
body .section-title,
body [class*="__title"],
body [class*="-title"],
body [class*="_title"] {
  letter-spacing: 0 !important;
  text-wrap: balance;
}

body .subtitle,
body .sub-title,
body [class*="subtitle"],
body [class*="sub-title"],
body [class*="__subtitle"],
body [class*="-lead"],
body [class*="__lead"] {
  letter-spacing: 0 !important;
}

body .eyebrow,
body [class*="eyebrow"],
body [class*="kicker"],
body [class*="label"],
body [class*="badge"],
body [class*="premium"],
body [class*="Premium"] {
  letter-spacing: .02em !important;
}

body .asset-premium-badge,
body .premium-badge,
body .ok-premium-badge,
body .is-premium,
body [class*="premium-badge"],
body [class*="premium_badge"] {
  letter-spacing: .01em !important;
}

/* Pricing has older highly-specific !important rules, so keep these explicit. */
body .ok-pricing-wrap .ok-pricing-header,
body .ok-pricing-wrap .ok-credit-plans,
body .ok-pricing-wrap .ok-on-demand-section,
body .ok-pricing-wrap .ok-enterprise-credit,
body .ok-pricing-wrap .ok-subscription-benefits,
body .ok-pricing-wrap .ok-subscription-faq {
  width: min(1320px, calc(100% - clamp(40px, 10vw, 144px))) !important;
  max-width: 1320px !important;
  margin-inline: auto !important;
}

body .ok-pricing-wrap .ok-pricing-header {
  padding-top: clamp(18px, 3vw, 34px) !important;
  margin-bottom: clamp(42px, 6vw, 74px) !important;
}

body .ok-pricing-wrap .ok-pricing-header h1,
body .ok-pricing-wrap .ok-pricing-header h2 {
  max-width: 1080px !important;
  font-size: clamp(42px, 5.4vw, 74px) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

body .ok-pricing-wrap .ok-subscription-benefits-head {
  width: min(1120px, 100%) !important;
  max-width: 1120px !important;
}

body .ok-pricing-wrap .ok-subscription-benefits h2,
body .ok-pricing-wrap .ok-subscription-faq h2,
body .ok-pricing-wrap .ok-on-demand-copy h3 {
  max-width: 1080px !important;
  font-size: clamp(36px, 4.8vw, 64px) !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

body .ok-pricing-wrap .ok-subscription-benefits-head p,
body .ok-pricing-wrap .ok-pricing-header p,
body .ok-pricing-wrap .ok-on-demand-copy p {
  max-width: 780px !important;
  line-height: 1.62 !important;
  letter-spacing: 0 !important;
}

@media (max-width: 760px) {
  body .ok-pricing-wrap .ok-pricing-header,
  body .ok-pricing-wrap .ok-credit-plans,
  body .ok-pricing-wrap .ok-on-demand-section,
  body .ok-pricing-wrap .ok-enterprise-credit,
  body .ok-pricing-wrap .ok-subscription-benefits,
  body .ok-pricing-wrap .ok-subscription-faq {
    width: calc(100% - 24px) !important;
  }

  body .ok-pricing-wrap .ok-pricing-header h1,
  body .ok-pricing-wrap .ok-pricing-header h2,
  body .ok-pricing-wrap .ok-subscription-benefits h2,
  body .ok-pricing-wrap .ok-subscription-faq h2,
  body .ok-pricing-wrap .ok-on-demand-copy h3 {
    font-size: clamp(34px, 10vw, 48px) !important;
    line-height: 1.12 !important;
  }
}

/* Premium consistency across the rest of the theme. */
body .ok-profile-page .ok-profile-shell,
body .ok-profile-page .ok-profile-main,
body .ok-checkout-wrap .ok-checkout-main,
body .okb-policy-page .okb-policy-shell,
body .okb-studio-v2 .okb-studio-v2-shell,
body .okb-studio-v2-final > .okb-studio-v2-shell,
body .okb-studio-v2-trust .okb-studio-v2-shell,
body .okb-studio-v2-contact-band .okb-studio-v2-shell,
body .contact-page .contact-shell,
body .ok-product-page .ok-product-shell,
body .homefeed .homefeed__inner,
body .homefeed--taxonomy,
body .ok-stock-banner,
body .site-main .entry:not(.entry--custom-page) .entry-header,
body .site-main .entry:not(.entry--custom-page) .entry-content,
body .okb-global-page .entry-header,
body .okb-global-page .entry-content,
body .okb-footer .okb-footer-shell {
  width: min(1320px, calc(100% - clamp(40px, 10vw, 144px))) !important;
  max-width: 1320px !important;
  margin-inline: auto !important;
}

body .ok-profile-page .ok-profile-hero h1,
body .ok-checkout-wrap .ok-checkout-main h1,
body .okb-policy-page .okb-policy-hero h1,
body .okb-studio-v2 .okb-studio-v2-heading h1,
body .okb-studio-v2 .okb-studio-v2-heading h2,
body .contact-page .contact-card h1,
body .ok-stock-banner .ok-stock-banner__content h1,
body .site-main .entry:not(.entry--custom-page) .entry-header h1,
body .okb-footer .okb-footer-hero h2 {
  max-width: 1080px !important;
  font-size: clamp(42px, 5.4vw, 74px) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

body .okb-global-page .entry-content h2,
body .okb-global-page .entry-content h3,
body .ok-product-page .ok-product-section-head h2,
body .homefeed .ok-stock-results__bar h1,
body .homefeed .ok-stock-results__bar h2,
body .homefeed--taxonomy .ok-stock-results__bar h1,
body .homefeed--taxonomy .ok-stock-results__bar h2,
body .okb-footer .okb-footer-col h3 {
  letter-spacing: 0 !important;
}

body .ok-profile-page .ok-profile-hero p,
body .ok-checkout-wrap .ok-checkout-lead,
body .okb-policy-page .okb-policy-hero p,
body .okb-studio-v2 .okb-studio-v2-heading p,
body .contact-page .contact-subtitle,
body .ok-stock-banner .ok-stock-banner__content p,
body .site-main .entry:not(.entry--custom-page) .entry-header p {
  max-width: 780px !important;
  line-height: 1.62 !important;
  letter-spacing: 0 !important;
}

body .ok-product-page .ok-product-shell {
  width: min(80%, 1800px) !important;
  max-width: 1800px !important;
}

body .ok-product-page {
  min-height: 0 !important;
}

body .ok-product-page .ok-product-preview-box,
body .ok-product-page .ok-product-preview-box.is-image {
  min-height: var(--ok-product-preview-min-height, 0px) !important;
}

body .ok-product-page .ok-product-preview-box.is-png {
  background:
    linear-gradient(45deg, rgba(226, 232, 240, .95) 25%, transparent 25% 75%, rgba(226, 232, 240, .95) 75%),
    linear-gradient(45deg, rgba(226, 232, 240, .95) 25%, transparent 25% 75%, rgba(226, 232, 240, .95) 75%),
    #fff !important;
  background-size: 24px 24px !important;
  background-position: 0 0, 12px 12px !important;
}

body .ok-product-page .ok-product-preview-box img,
body .ok-product-page .ok-product-preview-box picture,
body .ok-product-page .ok-product-preview-box picture img {
  max-height: min(78vh, var(--ok-product-preview-max-height, 820px)) !important;
}

body .ok-product-page .ok-product-preview-box.is-video {
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
}

body .ok-product-page .ok-product-preview-box.is-video video {
  width: 100% !important;
  height: 100% !important;
  max-height: min(78vh, var(--ok-product-preview-max-height, 820px)) !important;
  object-fit: contain !important;
}

body .homefeed .ok-stock-card__title,
body .homefeed--taxonomy .ok-stock-card__title,
body .homefeed .feed-title,
body .homefeed--taxonomy .feed-title,
body .ok-product-page .ok-product-preview-title {
  letter-spacing: 0 !important;
}

body .homefeed .ok-stock-banner,
body .homefeed--taxonomy .ok-stock-banner {
  width: 100% !important;
  max-width: 100% !important;
}

body .homefeed .ok-stock-banner .ok-stock-banner__content h1,
body .homefeed--taxonomy .ok-stock-banner .ok-stock-banner__content h1 {
  max-width: 860px !important;
  font-size: clamp(34px, 4.4vw, 56px) !important;
  line-height: 1.1 !important;
}

body .homefeed .ok-stock-banner .ok-stock-banner__content p,
body .homefeed--taxonomy .ok-stock-banner .ok-stock-banner__content p {
  max-width: 620px !important;
}

body .okb-footer .okb-footer-hero {
  gap: clamp(32px, 6vw, 90px) !important;
}

/* Checkout should feel wide and calm, not tall and scroll-heavy. */
body .ok-checkout-wrap {
  min-height: auto !important;
  padding: clamp(24px, 3.2vw, 42px) 0 clamp(34px, 4vw, 56px) !important;
  align-items: start !important;
}

body .ok-checkout-wrap .ok-checkout-shell {
  width: min(80vw, 1400px) !important;
  max-width: 1400px !important;
  min-height: 0 !important;
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr) !important;
  border-radius: 22px !important;
}

body .ok-checkout-wrap .ok-checkout-main,
body .ok-checkout-wrap .ok-checkout-summary {
  min-height: 0 !important;
  padding: clamp(22px, 2.6vw, 34px) !important;
}

body .ok-checkout-wrap .ok-checkout-summary {
  justify-content: flex-start !important;
}

body .ok-checkout-wrap .ok-checkout-main h1 {
  max-width: 720px !important;
  margin: clamp(14px, 1.8vw, 22px) 0 10px !important;
  font-size: clamp(34px, 3.8vw, 54px) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

body .ok-checkout-wrap .ok-checkout-lead {
  max-width: 720px !important;
  margin-bottom: 18px !important;
  line-height: 1.55 !important;
}

body .ok-checkout-wrap .ok-checkout-methods {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

body .ok-checkout-wrap .ok-checkout-method {
  min-height: 68px !important;
  padding: 13px 14px !important;
  border-radius: 14px !important;
}

body .ok-checkout-wrap .ok-checkout-promo {
  gap: 10px !important;
  margin: 8px 0 14px !important;
  padding: 14px !important;
  border-radius: 14px !important;
}

body .ok-checkout-wrap .ok-checkout-promo-form input,
body .ok-checkout-wrap .ok-checkout-promo-form button {
  min-height: 40px !important;
}

body .ok-checkout-wrap .ok-checkout-pay {
  min-height: 50px !important;
}

body .ok-checkout-wrap .ok-summary-prices {
  margin-top: 18px !important;
  padding-top: 14px !important;
}

@media (max-width: 1100px) {
  body .ok-checkout-wrap .ok-checkout-shell {
    width: calc(100% - 24px) !important;
  }
}

@media (max-width: 780px) {
  body .ok-checkout-wrap {
    padding-top: 14px !important;
  }

  body .ok-checkout-wrap .ok-checkout-shell {
    width: calc(100% - 20px) !important;
    grid-template-columns: 1fr !important;
  }

  body .ok-checkout-wrap .ok-checkout-methods {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body .ok-profile-page .ok-profile-shell,
  body .ok-profile-page .ok-profile-main,
  body .ok-checkout-wrap .ok-checkout-main,
  body .okb-policy-page .okb-policy-shell,
  body .okb-studio-v2 .okb-studio-v2-shell,
  body .okb-studio-v2-final > .okb-studio-v2-shell,
  body .okb-studio-v2-trust .okb-studio-v2-shell,
  body .okb-studio-v2-contact-band .okb-studio-v2-shell,
  body .contact-page .contact-shell,
  body .ok-product-page .ok-product-shell,
  body .homefeed .homefeed__inner,
  body .homefeed--taxonomy,
  body .ok-stock-banner,
  body .site-main .entry:not(.entry--custom-page) .entry-header,
  body .site-main .entry:not(.entry--custom-page) .entry-content,
  body .okb-global-page .entry-header,
  body .okb-global-page .entry-content,
  body .okb-footer .okb-footer-shell {
    width: calc(100% - 24px) !important;
  }

  body .ok-profile-page .ok-profile-hero h1,
  body .ok-checkout-wrap .ok-checkout-main h1,
  body .okb-policy-page .okb-policy-hero h1,
  body .okb-studio-v2 .okb-studio-v2-heading h1,
  body .okb-studio-v2 .okb-studio-v2-heading h2,
  body .contact-page .contact-card h1,
  body .ok-stock-banner .ok-stock-banner__content h1,
  body .site-main .entry:not(.entry--custom-page) .entry-header h1,
  body .okb-footer .okb-footer-hero h2 {
    font-size: clamp(34px, 10vw, 48px) !important;
    line-height: 1.12 !important;
  }
}

body :where(
  .ok-pricing-wrap,
  .ok-profile-page,
  .okb-policy-page,
  .okb-studio-v2,
  .contact-page,
  .ok-checkout-wrap,
  .homefeed,
  .homefeed--taxonomy,
  .ok-product-page
) {
  --ok-premium-page-x: clamp(20px, 5vw, 72px);
  --ok-premium-shell: 1320px;
}

body :where(
  .ok-pricing-header,
  .ok-credit-plans,
  .ok-on-demand-section,
  .ok-enterprise-credit,
  .ok-subscription-benefits,
  .ok-subscription-faq,
  .ok-profile-shell,
  .okb-policy-shell,
  .okb-studio-v2-shell,
  .contact-shell,
  .ok-checkout-main,
  .homefeed__inner,
  .homefeed--taxonomy,
  .ok-product-shell
) {
  width: min(var(--ok-premium-shell), calc(100% - (var(--ok-premium-page-x) * 2))) !important;
  max-width: var(--ok-premium-shell) !important;
  margin-inline: auto !important;
}

body :where(
  .ok-pricing-header h1,
  .ok-pricing-header h2,
  .ok-subscription-benefits h2,
  .ok-subscription-faq h2,
  .ok-on-demand-copy h3,
  .ok-profile-hero h1,
  .ok-checkout-main h1,
  .okb-policy-hero h1,
  .okb-studio-v2-heading h1,
  .okb-studio-v2-heading h2,
  .contact-card h1,
  .ok-stock-banner__content h1
) {
  max-width: min(1120px, 100%) !important;
  margin-inline: auto !important;
  font-size: clamp(36px, 5.6vw, 76px) !important;
  line-height: 1.08 !important;
}

body :where(
  .ok-subscription-benefits h2,
  .ok-subscription-faq h2,
  .ok-on-demand-copy h3
) {
  font-size: clamp(34px, 4.8vw, 64px) !important;
}

body :where(
  .ok-pricing-header p,
  .ok-subscription-benefits-head p,
  .ok-on-demand-copy p,
  .ok-profile-hero p,
  .ok-checkout-lead,
  .okb-policy-hero p,
  .okb-studio-v2-heading p,
  .contact-subtitle,
  .ok-stock-banner__content p
) {
  max-width: min(760px, 100%) !important;
  margin-inline: auto !important;
  line-height: 1.6 !important;
}

body .ok-pricing-wrap .ok-offer-timer {
  width: min(760px, calc(100vw - 40px)) !important;
  max-width: min(760px, calc(100vw - 40px)) !important;
  margin-inline: auto !important;
  overflow: hidden !important;
}

body .ok-pricing-wrap .ok-offer-timer-grid {
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body .ok-pricing-wrap .ok-offer-timer-grid div {
  min-width: 0 !important;
  overflow: hidden !important;
}

@media (max-width: 760px) {
  body :where(
    .ok-pricing-header,
    .ok-credit-plans,
    .ok-on-demand-section,
    .ok-enterprise-credit,
    .ok-subscription-benefits,
    .ok-subscription-faq,
    .ok-profile-shell,
    .okb-policy-shell,
    .okb-studio-v2-shell,
    .contact-shell,
    .ok-checkout-main,
    .homefeed__inner,
    .homefeed--taxonomy,
    .ok-product-shell
  ) {
    width: min(100% - 24px, var(--ok-premium-shell)) !important;
  }

  body :where(
    .ok-pricing-header h1,
    .ok-pricing-header h2,
    .ok-subscription-benefits h2,
    .ok-subscription-faq h2,
    .ok-on-demand-copy h3,
    .ok-profile-hero h1,
    .ok-checkout-main h1,
    .okb-policy-hero h1,
    .okb-studio-v2-heading h1,
    .okb-studio-v2-heading h2,
    .contact-card h1,
    .ok-stock-banner__content h1
  ) {
    font-size: clamp(32px, 10vw, 48px) !important;
    line-height: 1.12 !important;
  }

  body .ok-product-page .ok-product-preview-box img,
  body .ok-product-page .ok-product-preview-box picture,
  body .ok-product-page .ok-product-preview-box picture img,
  body .ok-product-page .ok-product-preview-box video {
    max-height: min(72vh, var(--ok-product-preview-mobile-max-height, 560px)) !important;
  }

  body .ok-pricing-wrap .ok-offer-timer {
    width: min(320px, calc(100vw - 68px)) !important;
    max-width: min(320px, calc(100vw - 68px)) !important;
    padding: 12px 10px !important;
  }

  body .ok-pricing-wrap .ok-offer-timer-grid {
    gap: 5px !important;
  }

  body .ok-pricing-wrap .ok-offer-timer-grid div {
    padding: 8px 2px 7px !important;
  }

  body .ok-pricing-wrap .ok-offer-timer-grid strong {
    font-size: 17px !important;
  }

  body .ok-pricing-wrap .ok-offer-timer-grid span {
    font-size: 7px !important;
    letter-spacing: 0 !important;
  }
}

body .homefeed--taxonomy,
body .homefeed--search {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

body .homefeed--search > .asset-search-header,
body .homefeed--search > .homefeed-category-shell {
  width: min(80%, 1800px) !important;
  max-width: 1800px !important;
  margin-inline: auto !important;
}

body .homefeed--taxonomy > .asset-search-header,
body .homefeed--taxonomy > .homefeed-category-shell,
body .homefeed--taxonomy > .homefeed-grid,
body .homefeed--taxonomy > .pagination,
body .homefeed--taxonomy > .feed-empty {
  width: min(80%, 1800px) !important;
  max-width: 1800px !important;
  margin-inline: auto !important;
}

@media (max-width: 760px) {
  body .homefeed--taxonomy > .asset-search-header,
  body .homefeed--taxonomy > .homefeed-category-shell,
  body .homefeed--taxonomy > .homefeed-grid,
  body .homefeed--taxonomy > .pagination,
  body .homefeed--taxonomy > .feed-empty,
  body .homefeed--search > .asset-search-header,
  body .homefeed--search > .homefeed-category-shell {
    width: calc(100% - 16px) !important;
  }
}
