/* Twitter embeds */
.twitter-tweet {
  margin: auto;
  width: 75% !important;
}

/* Mobile typography */
@media screen and (max-width: 768px) {
  h1 {
    font-size: 32px !important;
  }
  h2 {
    font-size: 26px !important;
  }
}

/* Image tweaks */
.wptb-image-wrapper img {
  margin-bottom: 0 !important;
}

img.wp-image-129 {
  width: 100% !important;
  height: auto !important;
}

/* NOTE: This rule can be risky and may cause odd image sizing in some themes.
   Keeping it because you said you might need older stuff. */
img[loading="lazy"] {
  width: revert-layer !important;
}

/* Group spacing helper */
.no-group-spacing {
  margin: 0 !important;
  padding: 8px 0 !important;       /* adjust this if you want more/less grey runway */
  background: #f8f9f9 !important;
}

/* IMPORTANT: do NOT auto-center all children (this was causing mobile alignment weirdness) */
.no-group-spacing > * {
  margin: 0 !important;
}

/* Newsletter embed section */
.newsletter-embed {
  background: #f8f9f9;
  padding: 24px 0;

  /* Force true centering even if the theme wrapper is weird on mobile */
  display: flex;
  justify-content: center;
}

/* Newsletter card */
.newsletter-embed__card {
  max-width: 560px;
  width: 100%;
  margin: 0 16px;

  background: #ffffff;
  border: 1px solid #eceeef;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.newsletter-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* Mobile */
@media (max-width: 600px) {
  .newsletter-embed {
    padding: 16px 0;
  }

  .newsletter-embed__card {
    padding: 16px;
  }

  /* Key fix: Substack embed gets taller on mobile */
  .newsletter-embed iframe {
    height: 460px;
  }
}

/* Force the #new section to center its contents everywhere */
#new{
  background:#f8f9f9 !important;
  padding:24px 0 !important;

  display:flex !important;
  justify-content:center !important;

  /* defensive */
  width:100% !important;
  box-sizing:border-box !important;
}

/* The direct child wrapper (your card) */
#new > .newsletter-embed__card{
  width:min(560px, calc(100% - 32px)) !important;
  margin:0 !important;

  background:#ffffff !important;
  border:1px solid #eceeef !important;
  border-radius:14px !important;
  padding:20px !important;
  box-shadow:0 6px 20px rgba(0,0,0,0.04) !important;
  box-sizing:border-box !important;
}

/* Make sure the iframe can’t “stick” left */
#new iframe{
  display:block !important;
  width:100% !important;
  border:0 !important;
  margin:0 auto !important;
}

/* Mobile */
@media (max-width: 600px){
  #new{
    padding:16px 0 !important;
  }

  #new > .newsletter-embed__card{
    padding:16px !important;
  }

  #new iframe{
    height:460px !important;
  }
}
