/* Blog article column — Tailwind Play has no Typography plugin, so `.prose` is a no-op.
   Only unclassed tags and our blog-* helpers get these rules. Tailwind-designed
   html_blog pages already have utilities; a higher-specificity `.blog-article h2`
   would override `text-white` in the TOC and paint lists as white cards. */
.prose,
.blog-article {
  --blog-ink: var(--color-primary, #0b1f33);
  --blog-accent: var(--color-secondary, #1f4e79);
  --blog-muted: #475569;
  --blog-line: #e2e8f0;
  --blog-soft: #f8fafc;
}

.blog-article nav :where(h1, h2, h3, p, ul, ol, li) {
  margin: 0;
  padding: unset;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

.blog-article nav li {
  list-style: none;
}

.blog-article nav li::before {
  content: none !important;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.blog-article-col {
  min-width: 0;
}

.blog-article-col h2,
.blog-article-col h3,
.blog-layout h2[id],
.blog-layout h3[id],
main h2[id],
main h3[id] {
  scroll-margin-top: 7rem;
}

.blog-toc {
  min-width: 0;
}

.blog-toc-label {
  margin: 0 0 0.85rem;
  color: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blog-toc a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 0.45rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-underline-offset: 2px;
}

.blog-toc a.is-parent {
  font-weight: 650;
}

.blog-toc a.is-active,
.blog-toc a.is-active:hover {
  color: #fff !important;
  background: var(--color-secondary, #1f4e79) !important;
  font-weight: 650;
  box-shadow: none;
}

@media (min-width: 1024px) {
  .blog-layout {
    display: grid !important;
    grid-template-columns: 16.5rem minmax(0, 1fr);
    gap: 2.5rem 3rem;
    align-items: start;
  }

  .blog-toc,
  .blog-article nav.blog-toc,
  .blog-article nav {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 7rem);
    overflow: auto;
  }
}

.blog-check {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
  border: 1.5px solid var(--blog-accent);
  border-radius: 0.2rem;
  background: #fff;
}

.prose > .lead,
.blog-article > .lead,
.blog-article .lead:not([class]),
.blog-article p.lead {
  margin: 0 0 1.75rem;
  padding: 1rem 0 1rem 1.15rem;
  border-left: 4px solid var(--blog-accent);
  color: #334155;
  font-size: 1.2rem;
  line-height: 1.7;
}

.prose h2:not([class]),
.blog-article h2:not([class]),
.blog-article h2.blog-h2 {
  margin: 2.75rem 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid var(--blog-accent);
  color: var(--blog-ink);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  scroll-margin-top: 7rem;
}

.prose h3:not([class]),
.blog-article h3:not([class]),
.blog-article h3.blog-h3 {
  margin: 2rem 0 0.7rem;
  color: var(--blog-ink);
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.4;
  scroll-margin-top: 7rem;
}

.prose p:not([class]),
.blog-article p:not([class]),
.blog-article p.blog-p {
  margin: 0 0 1.15rem;
  color: var(--blog-muted);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.prose p:not([class]) > strong:first-child,
.blog-article p:not([class]) > strong:first-child,
.blog-article p.blog-p > strong:first-child {
  color: var(--blog-ink);
}

.prose p:not([class]):has(> strong:first-child),
.blog-article p:not([class]):has(> strong:first-child),
.blog-article p.blog-p:has(> strong:first-child) {
  margin-bottom: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--blog-line);
  border-radius: 0.85rem;
  background: var(--blog-soft);
}

.prose p:not([class]):has(> strong:first-child) > strong:first-child,
.blog-article p:not([class]):has(> strong:first-child) > strong:first-child,
.blog-article p.blog-p:has(> strong:first-child) > strong:first-child {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.blog-prop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}

@media (min-width: 768px) {
  .blog-prop-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.blog-prop-card {
  padding: 1rem 1.15rem;
  border: 1px solid var(--blog-line);
  border-radius: 0.85rem;
  background: var(--blog-soft);
}

.blog-prop-label {
  margin: 0 0 0.35rem !important;
  color: var(--blog-ink) !important;
  font-size: 0.95rem;
  font-weight: 700;
}

.blog-prop-body {
  margin: 0 !important;
}

.prose ul:not([class]),
.prose ol:not([class]),
.blog-article ul:not([class]),
.blog-article ol:not([class]),
.blog-article ul.blog-ul,
.blog-article ol.blog-ol {
  margin: 0.85rem 0 1.5rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--blog-line);
  border-radius: 0.85rem;
  background: #fff;
}

.prose ul:not([class]) > li,
.prose ol:not([class]) > li,
.blog-article ul:not([class]) > li,
.blog-article ol:not([class]) > li,
.blog-article ul.blog-ul > li,
.blog-article ol.blog-ol > li {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0.8rem 1rem 0.8rem 2.55rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--blog-muted);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.prose ul:not([class]) > li:last-child,
.prose ol:not([class]) > li:last-child,
.blog-article ul:not([class]) > li:last-child,
.blog-article ol:not([class]) > li:last-child,
.blog-article ul.blog-ul > li:last-child,
.blog-article ol.blog-ol > li:last-child {
  border-bottom: 0;
}

.prose ul:not([class]) > li::before,
.blog-article ul:not([class]) > li::before,
.blog-article ul.blog-ul > li::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: 1.05rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--blog-accent);
}

.prose ol:not([class]),
.blog-article ol:not([class]),
.blog-article ol.blog-ol {
  counter-reset: blog-step;
}

.prose ol:not([class]) > li,
.blog-article ol:not([class]) > li,
.blog-article ol.blog-ol > li {
  counter-increment: blog-step;
}

.prose ol:not([class]) > li::before,
.blog-article ol:not([class]) > li::before,
.blog-article ol.blog-ol > li::before {
  content: counter(blog-step);
  position: absolute;
  top: 0.7rem;
  left: 0.75rem;
  display: flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--blog-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.prose table:not([class]),
.blog-article table:not([class]),
.blog-article table.blog-table {
  width: 100%;
  margin: 1rem 0 1.5rem;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--blog-line);
  border-radius: 0.85rem;
  font-size: 0.95rem;
}

.prose table:not([class]) th,
.blog-article table:not([class]) th,
.blog-article table.blog-table th {
  padding: 0.7rem 0.9rem;
  background: var(--blog-soft);
  color: var(--blog-ink);
  font-weight: 650;
  text-align: left;
}

.prose table:not([class]) td,
.blog-article table:not([class]) td,
.blog-article table.blog-table td {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--blog-line);
}

.prose blockquote:not([class]),
.blog-article blockquote:not([class]),
.blog-article blockquote.blog-quote {
  margin: 1.25rem 0 1.5rem;
  padding: 0.85rem 1.1rem;
  border-left: 4px solid var(--blog-accent);
  background: var(--blog-soft);
  color: #334155;
  font-size: 1.05rem;
}

.prose img:not([class]),
.blog-article img:not([class]) {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.25rem 0 1.5rem;
  border-radius: 0.85rem;
}

.prose a:not([class]),
.blog-article a:not([class]) {
  color: var(--blog-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose h2.blog-h2[id*="faq"] ~ h3.blog-h3,
.blog-article h2.blog-h2[id*="faq"] ~ h3.blog-h3,
.prose h2:not([class])[id*="faq"] ~ h3:not([class]),
.blog-article h2:not([class])[id*="faq"] ~ h3:not([class]) {
  margin: 1rem 0 0;
  padding: 1rem 1.15rem 0.35rem;
  border: 1px solid var(--blog-line);
  border-bottom: 0;
  border-radius: 0.85rem 0.85rem 0 0;
  background: #fff;
}

.prose h2.blog-h2[id*="faq"] ~ h3.blog-h3 + p.blog-p,
.blog-article h2.blog-h2[id*="faq"] ~ h3.blog-h3 + p.blog-p,
.prose h2:not([class])[id*="faq"] ~ h3:not([class]) + p:not([class]),
.blog-article h2:not([class])[id*="faq"] ~ h3:not([class]) + p:not([class]) {
  margin: 0 0 0.85rem;
  padding: 0 1.15rem 1rem;
  border: 1px solid var(--blog-line);
  border-top: 0;
  border-radius: 0 0 0.85rem 0.85rem;
  background: #fff;
}

.blog-faq-item {
  margin: 0 0 0.85rem;
  overflow: hidden;
  border: 1px solid var(--blog-line);
  border-radius: 0.85rem;
  background: #fff;
}

.blog-faq-item h3 {
  margin: 0 !important;
  padding: 1rem 1.15rem 0.35rem;
  border: 0 !important;
}

.blog-faq-item p {
  margin: 0 !important;
  padding: 0 1.15rem 1rem;
}
