/* blog.css — public Blog index + single-article reading view.
   Loaded alongside guides.css (shared public nav) and app.css (brand tokens,
   .nav-ghost/.nav-cta buttons). Brand: Playfair Display headings, DM Sans body,
   ink/slate/sky/frost/rule/body tokens. */

/* ────────────────────────── Index: hero ────────────────────────── */
.blog-hero { max-width: 760px; margin: 0 auto; padding: 56px 24px 8px; text-align: center; }
.blog-hero .eyebrow {
  font-family: 'DM Sans', sans-serif; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sky); margin: 0 0 10px;
}
.blog-hero h1 {
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 38px;
  line-height: 1.12; color: var(--ink); margin: 0 0 14px;
}
.blog-hero p {
  font-family: 'DM Sans', sans-serif; font-size: 17px; line-height: 1.6;
  color: var(--body); margin: 0 auto; max-width: 580px;
}

/* ────────────────────────── Index: post list ───────────────────── */
.blog-index { max-width: 760px; margin: 0 auto; padding: 28px 24px 56px; }
.blog-cards { display: flex; flex-direction: column; }
.blog-card {
  display: block; padding: 26px 0; border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.blog-card:first-child { border-top: 1px solid var(--rule); }
.blog-card:hover h2 { color: var(--sky); }
.bc-eyebrow {
  font-family: 'DM Sans', sans-serif; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--sky); margin: 0 0 8px;
}
.blog-card h2 {
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 24px;
  line-height: 1.2; color: var(--ink); margin: 0 0 8px; transition: color .15s ease;
}
.bc-excerpt {
  font-family: 'DM Sans', sans-serif; font-size: 16px; line-height: 1.55;
  color: var(--body); margin: 0 0 10px; max-width: 640px;
}
.bc-date {
  font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--slate);
  margin: 0; opacity: .8;
}
.blog-empty {
  max-width: 760px; margin: 0 auto; padding: 48px 24px; text-align: center;
  font-family: 'DM Sans', sans-serif; font-size: 17px; color: var(--slate);
}

/* ────────────────────────── Article: header ────────────────────── */
.blog-article { padding-bottom: 64px; }
.blog-article-head { max-width: 720px; margin: 0 auto; padding: 52px 24px 0; }
.blog-article-head .eyebrow {
  font-family: 'DM Sans', sans-serif; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sky); margin: 0 0 12px;
}
.blog-article-head h1 {
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 40px;
  line-height: 1.12; color: var(--ink); margin: 0 0 14px;
}
.blog-article-meta {
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--slate);
  margin: 0; opacity: .85;
}

/* ──────────────── Article: prose / reading column ───────────────── */
/* Constrained measure (~680px) for comfortable line length. */
.blog-prose {
  max-width: 680px; margin: 0 auto; padding: 28px 24px 0;
  font-family: 'DM Sans', sans-serif; font-size: 18px; line-height: 1.7;
  color: var(--body);
}
.blog-prose > :first-child { margin-top: 0; }
.blog-prose p { margin: 0 0 22px; }
.blog-prose h2 {
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 26px;
  line-height: 1.25; color: var(--ink); margin: 42px 0 14px;
}
.blog-prose h3 {
  font-family: 'Playfair Display', serif; font-weight: 600; font-size: 21px;
  line-height: 1.3; color: var(--ink); margin: 32px 0 12px;
}
.blog-prose strong { color: var(--ink); font-weight: 600; }
.blog-prose em { font-style: italic; }
.blog-prose a { color: var(--sky); text-decoration: underline; text-underline-offset: 2px; }
.blog-prose a:hover { color: var(--slate); }
.blog-prose ul, .blog-prose ol { margin: 0 0 22px; padding-left: 24px; }
.blog-prose li { margin: 0 0 8px; }
.blog-prose hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* Tables — bordered, brand-aligned, horizontally scrollable on small screens. */
.blog-prose .table-wrap { overflow-x: auto; margin: 0 0 26px; }
.blog-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.blog-prose th, .blog-prose td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top;
}
.blog-prose thead th {
  font-family: 'DM Sans', sans-serif; font-weight: 600; color: var(--ink);
  background: var(--frost); border-bottom: 1.5px solid var(--rule);
  font-size: 13px; letter-spacing: 0.02em;
}
.blog-prose tbody td { color: var(--body); }

/* Closing disclaimer / aside — italic note set off from the body. */
.blog-prose blockquote {
  margin: 32px 0 0; padding: 16px 20px; border-left: 3px solid var(--sky);
  background: var(--frost); border-radius: 0 6px 6px 0;
  font-size: 15px; line-height: 1.6; color: var(--slate);
}
.blog-prose blockquote p { margin: 0; }

/* ────────────────────────── Article: footer ────────────────────── */
.blog-article-foot { max-width: 680px; margin: 0 auto; padding: 36px 24px 0; }
.blog-back {
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
  color: var(--sky); text-decoration: none;
}
.blog-back:hover { color: var(--slate); }

/* ────────────────────────── Responsive ─────────────────────────── */
@media (max-width: 600px) {
  .blog-hero h1, .blog-article-head h1 { font-size: 30px; }
  .blog-prose { font-size: 17px; }
  .blog-prose h2 { font-size: 23px; }
  .blog-card h2 { font-size: 21px; }
}

/* ───────────────────── Single article: share row ───────────────────── */
.blog-share { margin: 0 0 28px; padding: 0 0 24px; border-bottom: 1px solid var(--rule); }
.blog-share-label {
  font-family: 'DM Sans', sans-serif; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--sky); margin: 0 0 12px;
}
.blog-share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bsh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: var(--frost); color: var(--slate);
  border: 1px solid var(--rule); cursor: pointer; text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  -webkit-appearance: none; appearance: none;
}
.bsh-btn svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.bsh-btn:hover { background: var(--sky); color: #fff; border-color: var(--sky); transform: translateY(-1px); }
.bsh-btn:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.blog-share-status {
  font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--slate);
  margin: 10px 0 0; min-height: 1.1em;
}
@media (max-width: 520px) { .bsh-btn { width: 38px; height: 38px; } }

/* ── Blog tool CTA (links a post to its tool + feature-card stats) ───────── */
.blog-tool-cta {
  margin: 2.5rem 0 2rem;
  padding: 1.75rem 1.75rem 1.5rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--sky);
  border-radius: 10px;
  background: var(--frost);
}
.blog-tool-cta .btc-kicker {
  margin: 0 0 .35rem;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sky);
}
.blog-tool-cta .btc-title {
  margin: 0 0 .5rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--ink);
}
.blog-tool-cta .btc-copy {
  margin: 0 0 1.1rem;
  color: var(--body);
  font-size: .98rem;
}
/* badge = Estimates::aggregateBadge() output (brings its own inline styles); just space it */
.blog-tool-cta .btc-badge { margin: 0 0 1.25rem; }
.blog-tool-cta .btc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .75rem;
}
.blog-tool-cta .btc-btn {
  display: inline-block;
  padding: .6rem 1.15rem;
  background: var(--sky);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  border-radius: 7px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.blog-tool-cta .btc-btn:hover { background: var(--slate); }
.blog-tool-cta .btc-btn-secondary {
  background: transparent;
  color: var(--sky);
  box-shadow: inset 0 0 0 1.5px var(--sky);
}
.blog-tool-cta .btc-btn-secondary:hover { background: var(--ice); color: var(--slate); }
@media (max-width: 560px) {
  .blog-tool-cta { padding: 1.4rem 1.25rem 1.25rem; }
  .blog-tool-cta .btc-actions { gap: .5rem; }
  .blog-tool-cta .btc-btn { width: 100%; text-align: center; }
}

/* ── Blog search + category filtering ───────────────────────────────────── */
.blog-search {
  display: flex;
  gap: .5rem;
  max-width: 30rem;
  margin: 1.5rem auto 0;
}
.blog-search input[type="search"] {
  flex: 1;
  padding: .65rem .9rem;
  font-size: 1rem;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.blog-search input[type="search"]:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--ice);
}
.blog-search button {
  padding: .65rem 1.25rem;
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  background: var(--sky);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.blog-search button:hover { background: var(--slate); }

.blog-filterbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin: 0 auto 1.75rem;
  padding: .75rem 1rem;
  background: var(--frost);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.blog-filterbar .bf-label { font-weight: 600; color: var(--ink); }
.blog-filterbar .bf-count { color: var(--body); font-size: .9rem; }
.blog-filterbar .bf-clear {
  margin-left: auto;
  color: var(--sky);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
}
.blog-filterbar .bf-clear:hover { text-decoration: underline; }

/* category eyebrow on a post becomes a link back to its category list */
.blog-article-head .eyebrow a.blog-cat-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.blog-article-head .eyebrow a.blog-cat-link:hover { border-bottom-color: currentColor; }

@media (max-width: 560px) {
  .blog-search { flex-direction: column; }
  .blog-search button { width: 100%; }
}

/* ── Topic browse strip (blog index) ────────────────────────────────────── */
.blog-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0 auto 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.blog-topics .bt-label {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--slate);
  margin-right: .25rem;
}
.blog-topics .bt-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .7rem;
  font-size: .85rem;
  color: var(--slate);
  background: var(--frost);
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.blog-topics .bt-chip:hover { border-color: var(--sky); color: var(--ink); }
.blog-topics .bt-chip.is-active { background: var(--sky); border-color: var(--sky); color: #fff; }
.blog-topics .bt-n {
  font-size: .72rem;
  opacity: .7;
  font-variant-numeric: tabular-nums;
}

/* ── Tags / hashtags (post page) ────────────────────────────────────────── */
.blog-tags {
  max-width: 680px;
  margin: 2rem auto 0;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.blog-tags .blog-tag {
  padding: .25rem .65rem;
  font-size: .85rem;
  color: var(--sky);
  background: var(--ice);
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.blog-tags .blog-tag:hover { background: var(--sky); color: #fff; }

/* ── Email subscribe block (index + post) ───────────────────────────────── */
.blog-subscribe {
  max-width: 40rem;
  margin: 2.5rem auto 0;
  padding: 1.75rem;
  background: var(--frost);
  border: 1px solid var(--rule);
  border-radius: 12px;
  text-align: center;
}
.blog-subscribe .bsub-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0 0 .35rem;
}
.blog-subscribe .bsub-sub { color: var(--body); margin: 0 0 1.1rem; font-size: .98rem; }
.blog-subscribe .bsub-form {
  display: flex;
  gap: .5rem;
  max-width: 26rem;
  margin: 0 auto .6rem;
}
.blog-subscribe .bsub-input {
  flex: 1;
  padding: .65rem .9rem;
  font-size: 1rem;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.blog-subscribe .bsub-input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px var(--ice); }
.blog-subscribe .bsub-input.is-invalid { border-color: var(--error); }
.blog-subscribe .bsub-btn {
  padding: .65rem 1.4rem;
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  background: var(--sky);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.blog-subscribe .bsub-btn:hover { background: var(--slate); }
.blog-subscribe .bsub-fine { font-size: .8rem; color: var(--body); margin: .25rem 0 0; }
.blog-subscribe .bsub-fine a { color: var(--sky); }
.blog-subscribe .bsub-err { color: var(--error); font-size: .85rem; margin: 0 0 .5rem; }
.blog-subscribe .bsub-done {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
@media (max-width: 560px) {
  .blog-subscribe { padding: 1.4rem 1.25rem; }
  .blog-subscribe .bsub-form { flex-direction: column; }
  .blog-subscribe .bsub-btn { width: 100%; }
}

/* Related-articles block — in-article internal linking at the foot of a post.
   Reuses .blog-cards/.blog-card (cards self-divide via their own --rule borders),
   so only the wrapper spacing is defined here. */
.blog-related { margin-top: 36px; }
.blog-related > .eyebrow { margin: 0 0 4px; }
