


.blog {
  position: relative;
  z-index: var(--z-content);
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) var(--section-y);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


.blog__header { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.blog__title { font-size: var(--fs-display); }
.blog__lede { margin-top: 1rem; font-size: var(--fs-lead); color: var(--ink-2); max-width: 62ch; }

.blog-search { max-width: 28rem; margin-bottom: 2rem; }
.blog-search__input {
  width: 100%;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-sm);
}
.blog-search__input::placeholder { color: var(--ink-3); }
.blog-search__input:focus-visible { border-color: var(--accent-bg); }
.blog-search__empty { color: var(--ink-2); margin-bottom: 2rem; }
.blog-empty { font-size: var(--fs-lead); color: var(--ink-2); }

.blog-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.blog-card { min-width: 0; }
.blog-card[hidden] { display: none; }
.blog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.blog-card__link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-bg); }
.blog-card__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.blog-card__body { display: flex; flex-direction: column; gap: 0.55rem; padding: 1.15rem 1.25rem 1.4rem; }
.blog-card__meta { font-size: var(--fs-xs); color: var(--ink-3); }
.blog-card__title { font-size: var(--fs-h3); line-height: 1.25; color: var(--ink); }
.blog-card__excerpt {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.blog-disclaimer {
  width: min(calc(100% - 2 * var(--gutter)), 46rem);
  margin: 2.5rem auto 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  line-height: 1.6;
}
.blog-disclaimer p { margin: 0; }
.blog-disclaimer a { color: var(--accent); }


.post { max-width: 46rem; margin-inline: auto; }

.post__crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.post__crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; color: var(--line); }
.post__crumbs a { color: var(--ink-2); text-decoration: none; }
.post__crumbs a:hover { color: var(--accent); text-decoration: underline; }
.post__crumbs [aria-current] {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post__meta { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 0.9rem; }
.post__title { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.post__lede { margin-top: 1.1rem; font-size: var(--fs-lead); color: var(--ink-2); }

.post__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.25rem 0 0; padding: 0; }
.post__tags li {
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--accent-wash);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 600;
}


.post__hero {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0;
}
@media (min-width: 900px) {
  .post__hero { margin-inline: -6rem; }
}
.post__hero img,
.post__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-card);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}

.post__toc {
  margin: 0 0 2.25rem;
  padding: 1.15rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
}
.post__toc-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.6rem;
}
.post__toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; font-size: var(--fs-sm); }
.post__toc a { color: var(--ink-2); text-decoration: none; }
.post__toc a:hover { color: var(--accent); text-decoration: underline; }


.post__body { font-size: 1.0625rem; line-height: 1.75; color: var(--ink); }
.post__body > * + * { margin-top: 1.15em; }
.post__body h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-top: 2.2em; scroll-margin-top: 88px; }
.post__body h3 { font-size: var(--fs-h3); margin-top: 1.8em; scroll-margin-top: 88px; }
.post__body h4 { font-size: 1.05rem; margin-top: 1.5em; }
.post__body ul,
.post__body ol { padding-left: 1.35rem; }
.post__body li + li { margin-top: 0.4em; }
.post__body li::marker { color: var(--accent); }
.post__body strong { font-weight: 700; }
.post__body blockquote {
  margin-inline: 0;
  padding: 0.9rem 1.25rem;
  border-left: 3px solid var(--accent-bg);
  background: var(--accent-wash);
  border-radius: 0 var(--r-inner) var(--r-inner) 0;
  color: var(--ink-2);
}
.post__body hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.25em; }
.post__body code {
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--surface-2);
}
.post__body pre { overflow-x: auto; padding: 1rem; border-radius: var(--r-inner); background: var(--surface-2); }
.post__body pre code { padding: 0; background: none; }


.post__body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.post__body th,
.post__body td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post__body th { font-weight: 700; background: var(--surface-2); white-space: nowrap; }

.post__figure { margin: 2em 0; }
.post__figure figcaption,
.post__hero figcaption { margin-top: 0.6rem; font-size: var(--fs-xs); color: var(--ink-3); text-align: center; }

.post__credit { white-space: nowrap; }
.post__credit a { color: var(--ink-2); }


.post__faq { margin-top: 3rem; }
.post__faq h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-bottom: 1rem; scroll-margin-top: 88px; }
.post__faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--surface);
}
.post__faq-item + .post__faq-item { margin-top: 0.65rem; }
.post__faq-item summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 600;
  list-style-position: inside;
}
.post__faq-item summary::marker { color: var(--accent); }
.post__faq-item p { padding: 0 1.2rem 1.1rem; color: var(--ink-2); line-height: 1.65; }


.post__cta {
  margin-top: 3rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: var(--r-card);
  background: var(--sand);
  border: 1px solid var(--sand-line);
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}
.post__cta-title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--ink); }
.post__cta-text { color: var(--ink-2); }
.post__cta-button {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.4rem;
  border-radius: var(--r-pill);
  background: var(--accent-bg);
  color: var(--accent-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.post__cta-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }


.post__related { max-width: var(--container); margin: clamp(3rem, 7vw, 4.5rem) auto 0; }
.post__related h2 { font-size: var(--fs-h2); margin-bottom: 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  .blog-card__link,
  .post__cta-button { transition: none; }
  .blog-card__link:hover,
  .post__cta-button:hover { transform: none; }
}
