/* Public content layouts. Titles, dates and labels may be edited without limits. */
.site-header,
.site-main,
.site-footer,
.primary-nav {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* A flex or grid child must be allowed to shrink before its text can wrap. */
:is(.navbar-inner, .topbar-inner, .footer-main, .footer-cta-inner,
    .bf-hero-grid, .bf-trust-item, .bf-stat, .bf-hiw-grid, .bf-steps,
    .bf-why-split, .bf-why-item, .bf-plans-grid, .bf-calc-wrap,
    .bf-calc-fields, .bf-calc-result, .bf-support-item, .service-main-box,
    .publications-grid, .services-grid, .blog-grid, .process-grid,
    .content-layout, .service-content-grid, .contact-grid) > * {
  min-width: 0;
}

.site-header .site-logo {
  min-width: 0;
  max-width: 260px;
  flex: 0 1 260px;
}
.logo-copy { min-width: 0; }
.logo-copy strong { white-space: normal; line-height: 1.2; }
.logo-copy small { line-height: 1.5; }
.logo-mark { flex-shrink: 0; }
.nav-cta { min-width: 0; flex: 0 1 250px; }
.nav-cta .btn { min-width: 0; }
.topbar-inner { flex-wrap: wrap; }
.topbar-links a { min-width: 0; }
.btn > :is(svg, i) { flex-shrink: 0; }

.bf-hero-badge, .section-tag, .eyebrow {
  max-width: 100%;
  white-space: normal;
  line-height: 1.5;
}
.bf-stat-ic, .bf-trust-ic, .bf-why-ic, .bf-support-item > i {
  flex-shrink: 0;
}
.bf-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bf-step-ic { max-width: 100%; }
.bf-why-split { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }

/* Put the editable badge in normal flow, so a multiline badge reserves space. */
.bf-plan-flag {
  position: static;
  transform: none;
  align-self: center;
  max-width: 100%;
  white-space: normal;
  line-height: 1.45;
  margin: 0 0 18px;
  padding: 7px 14px;
}
.bf-plan-price { max-width: 100%; line-height: 1.25; }
.bf-calc-wrap > * { min-width: 0; }
.bf-calc-annual, .blog-meta, .publication-card-footer {
  flex-wrap: wrap;
  gap: 10px;
}
.bf-calc-annual > * { min-width: 0; }

/* Keep the calendar, copy and action independent of the edited text length. */
.bf-deadline {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 240px);
  align-items: center;
}
.bf-deadline > * { min-width: 0; }
.bf-deadline-cal { width: 100%; height: auto; }
.bf-cal-month { line-height: 1.4; padding: 8px 10px; letter-spacing: .03em; }
.bf-cal-day { line-height: 1.15; padding: 10px; }
.bf-deadline > .btn { width: 100%; }
.bf-support-item { max-width: 100%; }
.premium-footer .footer-main.container {
  grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr) !important;
}
.premium-footer .footer-contact li > i { flex: 0 0 18px; }
.premium-footer .footer-contact b { min-width: 0; }
.premium-footer .footer-bottom.container > div { flex-wrap: wrap; }
.site-footer .site-logo { min-width: 0; max-width: 100%; }
.page-hero h1, .entry-title { max-width: 100%; }

@media (max-width: 1100px) {
  .premium-footer .footer-main.container {
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1050px) {
  .site-header .site-logo { max-width: calc(100% - 60px); flex: 1 1 auto; }
  .menu-toggle { flex: 0 0 44px; }
  .navbar-inner { gap: 16px; }
  .drawer-brand { min-width: 0; flex: 1; }
  .drawer-close { flex: 0 0 42px; }
  /* Scroll the whole drawer if an edited brand or footer outgrows a short screen. */
  .primary-nav { overflow-y: auto !important; overscroll-behavior: contain; }
  .primary-nav .nav-menu { flex: 1 0 auto; overflow: visible; min-height: 0; }
  .drawer-head { position: sticky; top: 0; z-index: 3; }
  .drawer-contact a { overflow-wrap: anywhere; }
}

@media (max-width: 900px) {
  .bf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bf-why-split { grid-template-columns: minmax(0, 1fr); }
  .bf-deadline {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }
  .bf-deadline-cal { width: min(128px, 100%); }
  .bf-deadline > .btn { width: auto; }
}

@media (max-width: 720px) {
  .premium-footer .footer-main.container { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 600px) {
  .home .bf-trust-bar, .home .bf-steps { grid-template-columns: minmax(0, 1fr); }
  .home .bf-trust-item:last-child { grid-column: auto; }
  .home .bf-trust-item { padding: 16px; gap: 12px; }
  .home .bf-trust-item strong { font-size: 14px; }
  .home .bf-trust-item span:not(.bf-trust-ic) { font-size: 13px; }
  .home .bf-step { text-align: left; }
  .home .bf-step-ic { margin-left: 0; }
  .bf-deadline > .btn { width: 100%; }
  .bf-calc-annual { align-items: flex-start; }
  .mobile-sticky-cta a { min-width: 0; }
}
