/* Blog article reading layout — shared by every blog post.
   Goals: one aligned column from headline to body, comfortable type size and
   line length, clear section breaks, and a contents list for longer articles. */

:root {
  --bp-ink: #1f2937;
  --bp-navy: #0e1f38;
  --bp-muted: #5b6676;
  --bp-gold: #9c8b5e;
  --bp-blue: #137bb6;
  --bp-line: rgba(14, 31, 56, 0.1);
  --bp-col: 660px;      /* reading column: about 72 characters at 18px */
  --bp-side: 290px;
  --bp-gap: 72px;
}

/* ── One container for headline and body ── */
body .post-hero .post-hero-inner,
body .post-layout {
  width: 100% !important;
  max-width: calc(var(--bp-col) + var(--bp-gap) + var(--bp-side) + 10%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 5% !important;
  padding-right: 5% !important;
  box-sizing: border-box !important;
}

body .post-hero h1,
body .post-hero .intro {
  max-width: 760px;
}

body .post-hero .intro {
  font-size: 1.15rem !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.86) !important;
}

body .post-layout {
  display: grid !important;
  grid-template-columns: minmax(0, var(--bp-col)) var(--bp-side) !important;
  column-gap: var(--bp-gap) !important;
  justify-content: space-between;
  align-items: start;
}

/* ── Body text ── */
body .post-body {
  min-width: 0;
  color: var(--bp-ink);
}

body .post-body > p,
body .post-body > ul,
body .post-body > ol,
body .post-body .post-section p,
body .post-body .post-section li {
  font-size: 1.125rem !important;
  line-height: 1.7 !important;
  color: var(--bp-ink);
}

body .post-body > p {
  margin-bottom: 1.35em !important;
}

body .post-body > ul,
body .post-body > ol {
  margin: 0 0 1.5em !important;
  padding-left: 1.4em !important;
}

body .post-body li {
  margin-bottom: 0.55em;
  padding-left: 0.2em;
}

body .post-body li::marker {
  color: var(--bp-gold);
}

body .post-body a:not([class]) {
  color: var(--bp-navy);
  text-decoration: underline;
  text-decoration-color: var(--bp-gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

body .post-body a:not([class]):hover {
  color: var(--bp-blue);
  text-decoration-color: var(--bp-blue);
}

body .post-body strong {
  color: var(--bp-navy);
}

/* ── Section headings ── */
body .post-body h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.05rem) !important;
  line-height: 1.2 !important;
  color: var(--bp-navy) !important;
  margin: 3rem 0 1rem !important;
  scroll-margin-top: 110px;
}

body .post-body > h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  background: var(--bp-gold);
  margin-bottom: 1.1rem;
}

body .post-body h3 {
  font-size: 1.3rem !important;
  line-height: 1.3 !important;
  color: var(--bp-navy) !important;
  margin: 2.2rem 0 0.7rem !important;
  scroll-margin-top: 110px;
}

/* ── Summary and takeaway panels ── */
body .post-body .article-summary,
body .post-body .key-takeaway {
  padding: 1.6rem 1.8rem !important;
  border-radius: 0 12px 12px 0 !important;
  margin: 0 0 2rem !important;
}

body .post-body .key-takeaway {
  margin-top: 2.5rem !important;
}

body .post-body .article-summary p:last-child,
body .post-body .key-takeaway p:last-child {
  font-size: 1.06rem !important;
  line-height: 1.65 !important;
}

/* ── Byline ── */
body .post-body .bp-byline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 2.2rem !important;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--bp-line);
  font-size: 0.92rem !important;
  line-height: 1.45 !important;
  color: var(--bp-muted) !important;
}

body .post-body .bp-byline img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 46px;
  border: 1px solid var(--bp-line);
}

body .post-body .bp-byline .bp-author {
  display: block;
  font-weight: 600;
  color: var(--bp-navy);
}

body .post-body .bp-byline .bp-author a {
  color: inherit !important;
  text-decoration: none !important;
}

/* The article repeats the headline's intro line as its first paragraph. */
body .post-body .bp-duplicate-intro {
  display: none !important;
}

/* ── Questions ── */
body .post-body .faq-card summary {
  font-size: 1.05rem !important;
  line-height: 1.4 !important;
}

body .post-body .faq-card .faq-body {
  font-size: 1.02rem !important;
  line-height: 1.7 !important;
  color: var(--bp-ink) !important;
}

/* ── Contents list ── */
.bp-toc {
  border: 1px solid var(--bp-line);
  border-radius: 14px;
  background: #fff;
  padding: 1.3rem 1.4rem 1.1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 16px rgba(14, 31, 56, 0.05);
}

.bp-toc-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bp-gold);
  margin: 0 0 0.8rem;
}

.bp-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bp-toc li {
  margin: 0;
}

.bp-toc a {
  display: block;
  padding: 0.42rem 0 0.42rem 0.85rem;
  border-left: 2px solid var(--bp-line);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--bp-muted);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.bp-toc a:hover,
.bp-toc a.is-current {
  color: var(--bp-navy);
  border-left-color: var(--bp-gold);
}

.bp-toc a.is-current {
  font-weight: 600;
}

.bp-toc-meta {
  margin: 0.9rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--bp-line);
  font-size: 0.8rem;
  color: var(--bp-muted);
}

details.bp-toc {
  display: none;
}

details.bp-toc summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
}

details.bp-toc summary::-webkit-details-marker {
  display: none;
}

details.bp-toc summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--bp-gold);
}

details.bp-toc[open] summary::after {
  content: "–";
}

details.bp-toc[open] summary {
  margin-bottom: 0.8rem;
}

/* ── Reading progress ── */
.bp-progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 0;
  background: var(--bp-blue);
  z-index: 2000;
  pointer-events: none;
}

/* ── Tablet and phone: one column, contents list above the article ── */
@media (max-width: 1000px) {
  body .post-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: calc(var(--bp-col) + 10%) !important;
    row-gap: 2.5rem !important;
  }

  aside.bp-toc {
    display: none;
  }

  details.bp-toc {
    display: block;
    margin-bottom: 2rem;
  }
}

@media (max-width: 600px) {
  body .post-body > p,
  body .post-body > ul,
  body .post-body > ol,
  body .post-body .post-section p,
  body .post-body .post-section li {
    font-size: 1.0625rem !important;
    line-height: 1.68 !important;
  }

  body .post-hero .intro {
    font-size: 1.05rem !important;
  }

  body .post-body h2 {
    margin-top: 2.4rem !important;
  }

  body .post-body .article-summary,
  body .post-body .key-takeaway {
    padding: 1.3rem 1.25rem !important;
  }
}

@media print {
  .bp-progress,
  .bp-toc,
  .post-sidebar {
    display: none !important;
  }
}
