/**
 * Editorial styling for existing WordPress page/post HTML
 * (legacy Elementor-exported content + classic pages).
 * Does not change text — only presentation.
 */

.bmd-entry__content,
.page-content {
  width: min(100% - 2.25rem, var(--bmd-width));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem);
}

/* Front page: more editorial breathing room */
.bmd-front .bmd-entry__content {
  width: min(100% - 2.25rem, var(--bmd-width-wide));
  padding-top: clamp(3rem, 7vw, 5.5rem);
}

.bmd-entry__content > h1:first-of-type,
.bmd-front .bmd-entry__content > h2:first-child + h1,
.bmd-front .bmd-entry__content > h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.98;
  max-width: 14ch;
  margin: 0 0 1.5rem;
}

.bmd-entry__content > h2:first-child {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bmd-muted);
  max-width: none;
}

.bmd-entry__content h2 {
  font-size: clamp(1.85rem, 3.8vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: clamp(3rem, 7vw, 5.5rem) 0 1rem;
  max-width: 18ch;
}

.bmd-entry__content h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
  max-width: 28ch;
}

.bmd-entry__content h4,
.bmd-entry__content h5 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 1.5rem 0 0.5rem;
}

.bmd-entry__content p {
  max-width: 62ch;
  margin: 0 0 1.15rem;
  color: var(--bmd-ink-soft);
  font-size: 1.05rem;
}

.bmd-entry__content p b,
.bmd-entry__content p strong {
  color: var(--bmd-ink);
  font-weight: 600;
}

/* Numbered authority strip pattern (homepage h1 numbers + h5 labels) */
.bmd-front .bmd-entry__content h1:not(:first-of-type) {
  display: inline-block;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  margin: 2.5rem 1rem 0.25rem 0;
  max-width: none;
  font-variant-numeric: tabular-nums;
  color: var(--bmd-accent);
}

.bmd-front .bmd-entry__content h1:not(:first-of-type) + h5 {
  display: inline-block;
  max-width: 16ch;
  margin: 0 2rem 1.5rem 0;
  vertical-align: middle;
  font-weight: 500;
  color: var(--bmd-ink);
}

.bmd-entry__content ul,
.bmd-entry__content ol {
  max-width: 62ch;
  margin: 0 0 1.5rem;
  padding-left: 1.2rem;
  color: var(--bmd-ink-soft);
}

.bmd-entry__content li { margin: 0.4rem 0; }

.bmd-entry__content a:not(.bmd-btn):not(.bmd-form-submit) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* Arrow CTAs in legacy copy */
.bmd-entry__content p > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--bmd-radius-pill);
  background: var(--bmd-ink);
  color: var(--bmd-cream) !important;
  text-decoration: none !important;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.3;
  transition: transform 0.25s var(--bmd-ease), background 0.25s var(--bmd-ease);
}
.bmd-entry__content p > a:hover {
  transform: translateY(-1px);
  background: #000;
}
.bmd-entry__content p > a br { display: none; }

/* Hide noisy leftover back-home crumbs from old Elementor exports */
.bmd-entry__content > h2:has(> a[href*="betterminddaily.com"]:only-child),
.bmd-entry__content > h2 > a[href="https://betterminddaily.com"],
.bmd-entry__content > h2 > a[href="https://betterminddaily.com/"] {
  /* keep visible but quieter if present */
}
.bmd-entry__content > h2:first-child > a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: var(--bmd-muted) !important;
  background: none !important;
  padding: 0 !important;
  border-radius: 0;
}
.bmd-entry__content > h2:first-child > a:hover {
  background: none !important;
  color: var(--bmd-ink) !important;
  transform: none;
}

/* Images in content */
.bmd-entry__content img {
  border-radius: var(--bmd-radius-soft);
  margin: 1.5rem 0;
}

/* Instagram / embeds */
.bmd-entry__content iframe,
.bmd-entry__content .sbi_wrap,
.bmd-entry__content #sb_instagram {
  max-width: 100%;
  margin: 2.5rem 0;
}

/* Forms inside entry content */
.bmd-entry__content .bmd-form-wrap,
.bmd-entry__content .bmd-form-section {
  width: min(100%, 42rem);
  margin-top: 2rem;
}

.bmd-form-section {
  width: min(100% - 2.25rem, var(--bmd-width));
  margin: 0 auto;
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}
.bmd-form-section h2 {
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

/* About / pricing / contact long-form rhythm */
.bmd-entry__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
}
.bmd-entry__content th,
.bmd-entry__content td {
  border-bottom: 1px solid var(--bmd-line);
  padding: 0.85rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

@media (max-width: 720px) {
  .bmd-front .bmd-entry__content h1:not(:first-of-type) {
    display: block;
    margin-bottom: 0.15rem;
  }
  .bmd-front .bmd-entry__content h1:not(:first-of-type) + h5 {
    display: block;
    margin-bottom: 1.75rem;
  }
}
