/* ==========================================================================
   sesgo.ai blog — editorial stylesheet
   Shares tokens, nav, footer, btn, reveal from /styles.css
   Visual language: editorial, hairline borders, no heavy shadows, generous
   whitespace, typographic hierarchy aligned with landing primitives.
   ========================================================================== */

/* ==========================================================================
   Listing — hero
   ========================================================================== */

.blog-hero {
  padding: calc(var(--nav-h) + 4rem) 0 3rem;
  background: var(--surface);
}

.blog-hero__bg { display: none; } /* remove old decorative gradient — editorial only */

.blog-hero__container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-hero__content {
  max-width: 860px;
}

.blog-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--eyebrow);
  color: var(--accent);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1.1rem;
}

.blog-hero__title {
  font-family: var(--font-display);
  font-size: var(--display-xl);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0;
  max-width: 22ch;
}

.blog-hero__subtitle,
.blog-hero__lede {
  font-family: var(--font-main);
  color: var(--muted);
  font-size: var(--body-lg);
  line-height: 1.55;
  margin: 1.25rem 0 0;
  max-width: 52ch;
}

/* ── Filter chips ─────────────────────────────────────────────────────────── */

.blog-filters {
  width: 100%;
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding: 1.2rem 0 0;
}

.blog-filters__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-filter {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
  cursor: pointer;
  white-space: nowrap;
}

.blog-filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.blog-filter--active,
.blog-filter[aria-current="page"],
.blog-filter--active:hover,
.blog-filter[aria-current="page"]:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ==========================================================================
   Listing — content
   ========================================================================== */

.blog-list {
  padding: 2rem 0 4rem;
}

/* ── Featured post ────────────────────────────────────────────────────────── */

.blog-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  margin: 0 0 3rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.blog-featured__link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

.blog-featured__body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  order: 1;
}

.blog-featured__visual {
  position: relative;
  order: 2;
  min-height: 320px;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), #e0e7ff);
}

.blog-featured__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(5, 13, 29, 0.86);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
}

.blog-featured__tag,
.blog-card__tag {
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-display);
}

.blog-featured__title {
  font-family: var(--font-display);
  font-size: var(--display-md);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  max-width: 20ch;
}

.blog-featured__excerpt {
  font-family: var(--font-main);
  color: var(--muted);
  font-size: var(--body-lg);
  line-height: 1.55;
  margin: 0;
  max-width: 46ch;
}

.blog-featured__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--body-sm);
  color: var(--subtle);
}

.blog-card__dot {
  color: var(--subtle);
}

.blog-featured__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}

.blog-featured:hover .blog-featured__cta {
  border-bottom-color: var(--accent);
}

/* ── Card grid ────────────────────────────────────────────────────────────── */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 3rem;
  padding-top: 1.5rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  background: transparent;
  transition: none;
}

.blog-card__link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

/* Card visual: image container replacing the old coloured rule */
.blog-card__visual {
  order: -1;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  margin-bottom: 0.2rem;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.blog-card:hover .blog-card__image {
  transform: scale(1.02);
}

/* Hide any decorative shapes from the old design */
.blog-card__shape { display: none; }

.blog-card__visual--blue     { background: #2563eb; }
.blog-card__visual--teal     { background: #0d9488; }
.blog-card__visual--indigo   { background: #6366f1; }
.blog-card__visual--violet   { background: #7c3aed; }
.blog-card__visual--amber    { background: #d97706; }
.blog-card__visual--rose     { background: #e11d48; }
.blog-card__visual--emerald  { background: #059669; }
.blog-card__visual--slate    { background: #475569; }

/* Featured tile hosts a full-bleed image */
.blog-featured__visual.blog-card__visual {
  order: 2;
  width: auto;
  aspect-ratio: auto;
  height: 100%;
  min-height: 320px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  margin-bottom: 0;
}

.blog-featured__visual .blog-card__image {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.blog-featured__visual.blog-card__visual--blue    { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.blog-featured__visual.blog-card__visual--teal    { background: linear-gradient(135deg, #ccfbf1, #99f6e4); }
.blog-featured__visual.blog-card__visual--indigo  { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.blog-featured__visual.blog-card__visual--violet  { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.blog-featured__visual.blog-card__visual--amber   { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.blog-featured__visual.blog-card__visual--rose    { background: linear-gradient(135deg, #ffe4e6, #fecdd3); }
.blog-featured__visual.blog-card__visual--emerald { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.blog-featured__visual.blog-card__visual--slate   { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); }

/* ── Card body ────────────────────────────────────────────────────────────── */

.blog-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.012em;
  color: var(--text);
  margin: 0;
  transition: color 180ms ease;
}

.blog-card__excerpt {
  font-family: var(--font-main);
  font-size: var(--body-md);
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  max-width: 46ch;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.15rem;
  font-family: var(--font-display);
  font-size: var(--body-sm);
  color: var(--subtle);
}

.blog-card__date time { color: inherit; }

.blog-card:hover .blog-card__title {
  color: var(--accent);
}

/* ==========================================================================
   Listing — final CTA (dark editorial strip, centered)
   ========================================================================== */

.blog-final-cta {
  margin-top: var(--space-section);
  padding: 0;
  background: var(--ink);
  color: #fff;
}

.blog-final-cta > .container {
  max-width: none;
  padding: 0;
}

.blog-cta-card {
  background: var(--ink);
  color: #fff;
  max-width: 1240px;
  margin-inline: auto;
  padding: var(--space-section) 2rem;
  text-align: center;
}

.blog-cta-card .cta-card__content {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.blog-cta-card .cta-card__title {
  font-family: var(--font-display);
  font-size: var(--display-md);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: #fff;
  margin: 0;
  max-width: 20ch;
}

.blog-cta-card .cta-card__text {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--body-lg);
  line-height: 1.55;
  margin: 0;
  max-width: 50ch;
}

.blog-cta-card .cta-card__actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}

.blog-final-cta .btn--white {
  background: #fff;
  color: var(--ink);
  border: 1px solid #fff;
  box-shadow: inset 0 1.5px rgba(255, 255, 255, 0.3);
}

.blog-final-cta .btn--white:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: #fff;
  color: var(--ink);
}

.blog-final-cta .btn--secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.blog-final-cta .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #fff;
  color: #fff;
  box-shadow: none;
}

@media (max-width: 640px) {
  .blog-cta-card {
    padding: 3.25rem 1.25rem;
  }

  .blog-cta-card .cta-card__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
  }

  .blog-cta-card .cta-card__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Breadcrumb (post pages)
   ========================================================================== */

.breadcrumb {
  padding: calc(var(--nav-h) + 1.4rem) 0 1.4rem;
  border-bottom: 1px solid var(--line-soft);
}

.breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--muted);
}

.breadcrumb__list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb__list li + li::before {
  content: "/";
  color: var(--subtle);
  margin-right: 0.1rem;
}

.breadcrumb__list a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.breadcrumb__list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.breadcrumb__list li[aria-current="page"],
.breadcrumb__list .breadcrumb__current {
  color: var(--text);
  font-weight: 500;
}

/* ==========================================================================
   Post page — hero
   ========================================================================== */

.post { display: block; }

.post-hero {
  position: relative;
  overflow: hidden;
  background: var(--surface-soft);
  border-top: 3px solid var(--accent);
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

.post-hero--blue    { border-top-color: #2563eb; }
.post-hero--teal    { border-top-color: #0d9488; }
.post-hero--indigo  { border-top-color: #6366f1; }
.post-hero--violet  { border-top-color: #7c3aed; }
.post-hero--amber   { border-top-color: #d97706; }
.post-hero--rose    { border-top-color: #e11d48; }
.post-hero--emerald { border-top-color: #059669; }
.post-hero--slate   { border-top-color: #475569; }

.post-hero__visual {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
          mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
}

.post-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.post-hero__tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 1.1rem;
}

.post-hero__tag--blue    { color: #2563eb; }
.post-hero__tag--teal    { color: #0d9488; }
.post-hero__tag--indigo  { color: #6366f1; }
.post-hero__tag--violet  { color: #7c3aed; }
.post-hero__tag--amber   { color: #d97706; }
.post-hero__tag--rose    { color: #e11d48; }
.post-hero__tag--emerald { color: #059669; }
.post-hero__tag--slate   { color: #475569; }

.post-hero__title {
  font-family: var(--font-display);
  font-size: var(--display-xl);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 1.5rem;
  max-width: 20ch;
}

.post-hero__lead {
  font-family: var(--font-main);
  font-size: var(--body-lg);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 60ch;
}

.post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--body-sm);
  color: var(--muted);
}

.post-hero__author {
  color: var(--text);
  font-weight: 500;
}

.post-hero__date,
.post-hero__read {
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   Post page — layout (TOC left + article)
   ========================================================================== */

.post-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
  max-width: 1060px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.post-toc {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  align-self: start;
  padding: 0 0 0 1rem;
  border-left: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--muted);
  max-height: calc(100vh - var(--nav-h) - 4rem);
  overflow-y: auto;
}

.post-toc__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: var(--subtle);
  font-weight: 600;
  margin: 0 0 0.9rem;
}

.post-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-toc__list li a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  transition: color 150ms ease;
}

.post-toc__list li a:hover,
.post-toc__list li a.active,
.post-toc__list li a[aria-current="true"] {
  color: var(--accent);
}

.post-toc__list li.is-sub a {
  padding-left: 0.85rem;
  font-size: 0.84rem;
}

/* ==========================================================================
   Post page — body typography
   ========================================================================== */

.post-body {
  max-width: 68ch;
  font-family: var(--font-main);
  color: var(--text);
  font-size: var(--body-lg);
  line-height: 1.75;
}

.post-body > * + * {
  margin-top: 1.15rem;
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 3rem 0 1.1rem;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 2rem 0 0.75rem;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}

.post-body h4 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.6rem 0 0.5rem;
}

.post-body p {
  color: var(--text);
  margin: 0 0 1.15rem;
}

.post-body > p:last-child { margin-bottom: 0; }

.post-body strong { color: var(--text); font-weight: 600; }
.post-body em { font-style: italic; }

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 180ms ease, color 180ms ease;
}

.post-body a:hover {
  text-decoration-color: var(--accent);
}

.post-body ul,
.post-body ol {
  margin: 0 0 1.25rem 1.2rem;
  padding-left: 0.3rem;
  color: var(--text);
}

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }

.post-body li {
  margin-bottom: 0.45rem;
  line-height: 1.6;
}

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

/* Pullquote treatment inside posts (editorial, centred, blue quote marks) */
.post-body blockquote,
.post-body .post-pullquote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 1.25rem 0 1.25rem 1.5rem;
  margin: 2rem 0;
  border-left: 3px solid var(--accent);
  background: transparent;
}

.post-body blockquote p {
  margin: 0;
}

.post-body blockquote p + p {
  margin-top: 0.75rem;
}

.post-body blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-main);
  font-style: normal;
  font-size: 0.88rem;
  color: var(--muted);
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.12em 0.36em;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--line-soft);
}

.post-body pre {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}

.post-body pre code {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: inherit;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4rem 0;
}

.post-body figure {
  margin: 2rem 0;
}

.post-body figure img,
.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}

.post-body figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--subtle);
  text-align: left;
}

/* Ordered steps — simplified typographic numbering */
.post-body .post-steps {
  list-style: decimal;
  padding-left: 1.4rem;
  margin: 1.25rem 0 1.5rem;
}

.post-body .post-steps > li {
  margin-bottom: 0.85rem;
  line-height: 1.65;
}

.post-body .post-steps > li::marker {
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-display);
}

/* Plain bullet list with subtle marker */
.post-body .post-bullets {
  list-style: disc;
}

/* Tables */
.post-body .post-table-wrap {
  margin: 1.75rem 0;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.post-body table,
.post-body .post-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-main);
  font-size: var(--body-md);
  margin: 1.5rem 0;
}

.post-body .post-table-wrap > table,
.post-body .post-table-wrap > .post-table {
  margin: 0;
}

.post-body table th,
.post-body table td,
.post-body .post-table th,
.post-body .post-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}

.post-body table th,
.post-body .post-table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 0.92rem;
  letter-spacing: -0.005em;
}

.post-body table tr:last-child td,
.post-body .post-table tr:last-child td {
  border-bottom: 0;
}

.post-body .post-table__caption,
.post-body table caption {
  caption-side: bottom;
  text-align: left;
  padding: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--subtle);
}

/* ==========================================================================
   Post page — TL;DR callout (left rule, no background)
   ========================================================================== */

.post-tldr {
  margin: 0 0 2.5rem;
  padding: 0.3rem 0 0.3rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: transparent;
}

.post-tldr__title {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75rem;
  font-style: italic;
}

.post-tldr__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.post-tldr__list li {
  position: relative;
  padding-left: 1rem;
  font-family: var(--font-main);
  font-size: var(--body-md);
  line-height: 1.55;
  color: var(--text);
}

.post-tldr__list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.post-tldr__list li strong {
  color: var(--text);
  font-weight: 600;
}

/* ==========================================================================
   Post page — callouts
   ========================================================================== */

.post-callout {
  margin: 1.5rem 0;
  padding: 1rem 0 1rem 1.25rem;
  border-left: 2px solid var(--accent);
  background: transparent;
  font-family: var(--font-main);
  font-size: var(--body-md);
  line-height: 1.6;
  color: var(--text);
}

.post-callout__title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.post-callout p { margin: 0; }
.post-callout p + p { margin-top: 0.5rem; }

.post-callout--info {
  border-left-color: var(--accent);
}

.post-callout--warn {
  border-left-color: #d97706;
}

.post-callout--warn .post-callout__title {
  color: #b45309;
}

/* ==========================================================================
   Post page — FAQ accordion
   ========================================================================== */

.post-faq {
  margin-top: 3.5rem;
}

.post-faq__title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 1.5rem;
}

.post-faq__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.post-faq__item {
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.post-faq__item > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.3rem 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 180ms ease;
}

.post-faq__item > summary::-webkit-details-marker {
  display: none;
}

.post-faq__item > summary::after {
  content: "+";
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 200ms ease;
}

.post-faq__item[open] > summary::after {
  content: "\2212";
}

.post-faq__item > summary:hover {
  color: var(--accent);
}

.post-faq__item > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.post-faq__body {
  padding: 0 0 1.4rem;
  font-family: var(--font-main);
  font-size: var(--body-md);
  line-height: 1.65;
  color: var(--muted);
  max-width: 62ch;
}

.post-faq__body > * + * {
  margin-top: 0.75rem;
}

/* ==========================================================================
   Post page — author
   ========================================================================== */

.post-author {
  margin: 4rem 0 0;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.post-author__card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  max-width: 760px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.post-author__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.post-author__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.post-author__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.post-author__role {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.post-author__bio {
  font-family: var(--font-main);
  font-size: var(--body-md);
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  max-width: 62ch;
}

.post-author__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  align-self: flex-start;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: text-decoration 150ms ease;
}

.post-author__link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Post page — related posts
   ========================================================================== */

.post-related {
  padding: 4rem 0 2rem;
}

.post-related__title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 2rem;
}

.post-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 2.5rem;
}

/* Related cards reuse .blog-card markup; inherit editorial styling above.
   The post pages wrap the visual+body inside <a class="blog-card">; ensure the
   card still looks editorial without a wrapping __link. */
.post-related__grid .blog-card {
  text-decoration: none;
  color: inherit;
}

.post-related__grid .blog-card:hover .blog-card__title {
  color: var(--accent);
}

/* ==========================================================================
   Post page — CTA (dark editorial strip, reuses .cta-card markup)
   ========================================================================== */

.post-cta {
  margin: 0;
}

.post-cta .cta-card {
  display: block;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 0;
  padding: var(--space-section) 0;
  margin: 0;
  overflow: visible;
}

.post-cta .cta-card__content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: left;
}

.post-cta .cta-card__title {
  font-family: var(--font-display);
  font-size: var(--display-md);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0;
  max-width: 18ch;
}

.post-cta .cta-card__text {
  font-family: var(--font-main);
  font-size: var(--body-lg);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 1rem 0 0;
  max-width: 42ch;
}

.post-cta .cta-card__actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem 2.5rem;
  }

  .post-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 3rem;
  }
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 3rem 2rem;
  }

  .post-toc {
    position: static;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 1.25rem 0;
    margin-bottom: 1.5rem;
  }

  .post-body {
    max-width: none;
  }
}

@media (max-width: 860px) {
  .blog-featured {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: 2.5rem 0;
  }

  .blog-featured__body { order: 2; }

  .blog-featured__visual.blog-card__visual {
    order: 1;
    min-height: 220px;
  }

  .blog-featured__cta { margin-left: 0; }

  .post-related__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .blog-hero {
    padding-top: calc(var(--nav-h) + 2.4rem);
  }

  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .blog-featured__title {
    font-size: clamp(1.65rem, 4.5vw, 2rem);
  }

  .post-hero {
    padding: clamp(3rem, 9vw, 5rem) 0 clamp(2.25rem, 6vw, 3.5rem);
  }

  .post-hero__title {
    max-width: none;
  }

  .post-hero__meta {
    gap: 0.4rem 0.8rem;
    font-size: 0.82rem;
  }

  .post-body {
    font-size: var(--body-md);
  }

  .post-author__card {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .post-author__avatar {
    width: 56px;
    height: 56px;
    font-size: 1rem;
  }

  .post-cta .cta-card__content {
    padding: 0 1.5rem;
  }
}

/* ==========================================================================
   Accessibility — reduced motion / perf-lite
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .blog-filter,
  .blog-featured__cta,
  .blog-card__title,
  .post-body a,
  .post-faq__item > summary,
  .post-faq__item > summary::after,
  .post-toc__list li a,
  .breadcrumb__list a {
    transition: none;
  }
}

html.perf-lite .blog-filter,
html.perf-lite .blog-featured__cta,
html.perf-lite .blog-card__title,
html.perf-lite .post-faq__item > summary,
html.perf-lite .post-faq__item > summary::after {
  transition: none;
}

/* ==========================================================================
   Content-visibility for long post bodies
   ========================================================================== */

@supports (content-visibility: auto) {
  .post-faq,
  .post-related,
  .post-author {
    content-visibility: auto;
    contain-intrinsic-size: 480px;
  }
}
