/* Blog-only styles for elkhorngrowth.com.
   Loaded after base.css, color.css, polish.css and round3.css.
   All selectors are scoped to body.blog-page so shared CSS is unchanged.

   Theme tokens reused from the main site (css/base.css + css/color.css):
   --font-ui (Public Sans), --font-serif (Libre Caslon, emphasis only),
   --font-mono (IBM Plex Mono), --cream #F9F4EA, --green #0A382F,
   --gold #CD9635, --gold-soft / --gold-ink, --fg / --mut / --dim / --line,
   --card, --radius-card 20px, --radius-pill 99px, --max 1180px,
   --header-h 68px, --ember gradient.

   Type scale (blog, mobile-first) — not the homepage hero h1
   (clamp(40px, 7.4vw, 108px)), which is too large for long article titles:
   page/index h1  clamp(24px, 3.8vw, 40px) / 1.2
   post h1        clamp(24px, 3.6vw, 40px) / 1.22
   post-list h2   clamp(18px, 2.2vw, 22px) / 1.3   (matches .card-title / h3)
   prose h2       clamp(20px, 2.4vw, 26px) / 1.25
   lede           clamp(16.5px, 1.5vw, 20px) like main .lede
   eyebrow/meta   12px mono / 14px muted, like main .eyebrow and .fine
*/

/* ---------- Heading policy: no mid-word breaks ---------- */
.blog-page h1,
.blog-page h2,
.blog-page h3,
.blog-page .page-title,
.blog-page .post-title,
.blog-page .post-list h2,
.blog-page .prose h2 {
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: -.03em;
  text-wrap: balance;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  max-width: none;
}

/* Compounds like "estate-planning" / "living-trust" must stay on one line.
   A hard hyphen is otherwise a legal wrap opportunity even with hyphens: none. */
.blog-page .nowrap {
  white-space: nowrap;
}

/* Kill the homepage hero size (and the 640px override of clamp(34px, 9.6vw, 56px))
   so long blog titles stay readable on a 390px phone. */
.blog-page h1,
.blog-page .page-title,
.blog-page .blog-head h1 {
  font: 500 clamp(24px, 3.8vw, 40px)/1.2 var(--font-ui);
  letter-spacing: -.035em;
  color: var(--fg);
  margin: 0;
}

.blog-page .post-title,
.blog-page article .blog-head h1 {
  font: 500 clamp(24px, 3.6vw, 40px)/1.22 var(--font-ui);
  letter-spacing: -.03em;
}

@media (max-width: 640px) {
  .blog-page h1,
  .blog-page .page-title,
  .blog-page .blog-head h1,
  .blog-page .post-title,
  .blog-page article .blog-head h1 {
    font-size: clamp(24px, 6.2vw, 28px);
    line-height: 1.22;
  }
}

/* ---------- Page frame ---------- */
.blog-page .page-section {
  padding-top: 48px;
  padding-bottom: 24px;
  min-height: 0;
}

.blog-page .blog-head {
  max-width: 70ch;
  margin-bottom: 28px;
}

.blog-page .blog-head .lede {
  margin: 16px 0 0;
  max-width: 58ch;
  font-size: clamp(16.5px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--mut);
  text-wrap: balance;
  text-align: left;
}

/* Breadcrumbs: compact, same family as .fine / .muted */
.blog-page .crumbs {
  margin: 0 0 18px;
  font: 500 13px/1.45 var(--font-ui);
  letter-spacing: 0;
  color: var(--dim);
  text-wrap: pretty;
  max-width: 70ch;
}
.blog-page .crumbs a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(249, 244, 234, .28);
}
.blog-page .crumbs a:hover { color: var(--fg); border-bottom-color: var(--gold-soft); }
.blog-page .crumbs [aria-current="page"] { color: var(--mut); }

.blog-page .post-meta {
  margin: 14px 0 0;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---------- Post list (index): card stack, 60–70ch measure ---------- */
.blog-page .post-list {
  list-style: none;
  margin: 0;
  padding: 0 0 24px;
  max-width: 70ch;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-page .post-list li,
.blog-page .post-list li.card {
  padding: 22px 24px;
  margin: 0;
  border-top: 0;
  border-bottom: 0;
}

.blog-page .post-list h2 {
  font: 500 clamp(18px, 2.2vw, 22px)/1.3 var(--font-ui);
  letter-spacing: -.02em;
  margin: 0;
}

.blog-page .post-list h2 a {
  color: var(--fg);
  text-decoration: none;
}
.blog-page .post-list h2 a:hover {
  color: var(--gold-soft);
}

.blog-page .post-list .post-meta { margin-top: 8px; }

.blog-page .post-list p.sum {
  margin: 10px 0 0;
  color: var(--mut);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Article prose ---------- */
.blog-page .prose {
  max-width: 68ch;
  padding-bottom: 32px;
  color: var(--mut);
  font-size: 17px;
  line-height: 1.6;
}

.blog-page .prose > * + * { margin-top: 1rem; }

.blog-page .prose h2 {
  font: 500 clamp(20px, 2.4vw, 26px)/1.25 var(--font-ui);
  letter-spacing: -.02em;
  color: var(--fg);
  margin-top: 2.25rem;
  margin-bottom: 0;
}

.blog-page .prose p { margin: 1rem 0 0; color: var(--mut); }
.blog-page .prose a { color: var(--gold-soft); text-underline-offset: 3px; }
.blog-page .prose a:hover { color: var(--fg); }
.blog-page .prose sup a {
  text-decoration: none;
  font-weight: 600;
  color: var(--gold-soft);
}

.blog-page .prose ul,
.blog-page .prose ol {
  margin: 1rem 0 0;
  padding-left: 1.3rem;
  color: var(--mut);
}
.blog-page .prose ul { list-style: disc; }
.blog-page .prose ol { list-style: decimal; }
.blog-page .prose li + li { margin-top: 0.45rem; }
.blog-page .prose li::marker { color: var(--gold-soft); }

/* Short-answer callout — uses --card / gold-ink, same radius family as .card */
.blog-page .answer {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  margin: 0 0 1.5rem;
  color: var(--cream);
}
.blog-page .answer strong {
  display: block;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.7rem;
}

.blog-page .prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 1.25rem;
}
.blog-page .prose th,
.blog-page .prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.85rem 0.7rem 0;
  border-top: 1px solid var(--line);
  color: var(--mut);
}
.blog-page .prose th {
  font-weight: 600;
  color: var(--fg);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.blog-page .sources {
  font-size: 14.5px;
  color: var(--dim);
  padding-left: 1.3rem;
}
.blog-page .sources li { overflow-wrap: anywhere; }

.blog-page .notice {
  font-size: 14px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  margin-top: 2.25rem;
  max-width: 70ch;
}

.blog-page .post-cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.blog-page .post-cta .more {
  color: var(--cream);
  font-weight: 500;
  text-underline-offset: 4px;
}

.blog-page .related {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  max-width: 68ch;
}
.blog-page .related h2 {
  font: 500 1.05rem/1.3 var(--font-ui);
  letter-spacing: -.02em;
  color: var(--fg);
  margin: 0 0 12px;
}
.blog-page .related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.blog-page .related a {
  color: var(--gold-soft);
  text-underline-offset: 3px;
}

/* ---------- Index closing CTA (not the homepage .cta-band 96px headline) ---------- */
.blog-page .blog-cta {
  position: relative;
  margin: 12px 16px 24px;
  padding: 40px 24px 44px;
  border-radius: 24px;
  border: 1px solid rgba(232, 197, 122, .14);
  background: #0A382F;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
}
.blog-page .blog-cta .wrap {
  position: relative;
  z-index: 2;
  width: min(70ch, 100%);
  margin-inline: 0;
}
.blog-page .blog-cta h2 {
  font: 500 clamp(24px, 3.2vw, 36px)/1.15 var(--font-ui);
  letter-spacing: -.035em;
  color: var(--cream);
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}
.blog-page .blog-cta p {
  margin: 14px 0 22px;
  max-width: 54ch;
  color: rgba(249, 244, 234, .88);
  font-size: 16.5px;
  line-height: 1.5;
}
.blog-page .blog-cta .btn-row,
.blog-page .blog-cta .cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.blog-page .blog-cta .cta-link {
  color: var(--cream);
  font-weight: 500;
  text-underline-offset: 4px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.blog-page .blog-cta :focus-visible { outline-color: #E8C57A; }

@media (min-width: 761px) {
  .blog-page .blog-cta { margin: 24px auto 48px; padding: 56px 40px; max-width: calc(var(--max) + 0px); }
  .blog-page .page-section { padding-top: 64px; }
}

/* ---------- Sticky booking bar clearance ----------
   Main-site .m-book (polish.css): 10px + 48px pill + 10px + 1px border = 69px,
   plus env(safe-area-inset-bottom).
   Body padding reserves that space so the last post, sources and footer
   can scroll fully above the bar. Footer’s extra 96px from polish.css is
   reset here to avoid a double gap. */
@media (max-width: 760px) {
  body.blog-page {
    padding-bottom: calc(69px + env(safe-area-inset-bottom, 0px));
  }
  body.blog-page .footer {
    padding-bottom: 36px;
  }
  body.blog-page .m-book .pill {
    white-space: nowrap;
  }
}

/* Horizontal overflow guard for long source URLs, tables, crumbs */
.blog-page .wrap,
.blog-page .prose,
.blog-page .blog-head,
.blog-page .post-list,
.blog-page .crumbs {
  min-width: 0;
  max-width: 100%;
}
.blog-page .prose { max-width: 68ch; }
.blog-page .post-list,
.blog-page .blog-head { max-width: 70ch; }

@media (max-width: 640px) {
  .blog-page .post-list li,
  .blog-page .post-list li.card { padding: 14px 16px; }
  .blog-page .blog-cta { margin: 8px 12px 16px; padding: 32px 18px 36px; }
  .blog-page .prose th,
  .blog-page .prose td { padding-right: 0.5rem; }
  .blog-page .page-section { padding-top: 16px; }
  .blog-page .blog-head { margin-bottom: 16px; }
  .blog-page .post-list { gap: 10px; padding-bottom: 16px; }
}
