/*
 * /en/blog (+ category and tag archives) and /en/blog/<slug>: blog templates
 * (Paper p-C-1 "Blog index /blog" and "Blog article template", desktop 1440 +
 * mobile 390). Values from get_jsx / get_computed_styles.
 */

/* ── Byline (index featured card + article header) ─────────────────── */
.byline { display: flex; align-items: center; gap: 12px; padding-top: 4px; font-size: 14px; line-height: 18px; }
.byline__avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.byline__name { font-weight: 600; }
.byline__meta { color: var(--muted); }
.byline--lg { gap: 16px; padding-top: 8px; }
.byline--lg .byline__avatar { width: 48px; height: 48px; }
.byline__who { display: flex; flex-direction: column; gap: 2px; }
.byline--lg .byline__name { font-size: 15px; line-height: 20px; }
.byline__role { color: var(--muted); font-size: 14px; line-height: 18px; }
.byline__rule { width: 1px; height: 32px; background: var(--line-input); }

/* ══ Index ═══════════════════════════════════════════════════════════ */
.blog-head { border-bottom: 1px solid var(--line); }
.blog-head__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding-top: 96px; padding-bottom: 40px; }
.blog-head__copy { display: flex; flex-direction: column; gap: 20px; max-width: 820px; }
.blog-head__eyebrow { color: var(--deep-green); font-size: 13px; }
.blog-head__eyebrow a { color: inherit; }
.blog-head__title { font-family: var(--font-display); font-size: clamp(48px, 30.17px + 4.57vw, 96px); font-weight: 800; letter-spacing: -0.04em; line-height: 0.917; }
.blog-head__sub { max-width: 560px; color: var(--muted); font-size: 19px; line-height: 29px; }
.blog-head__tools { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.blog-head__chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.blog-search { position: relative; width: 100%; max-width: 280px; }
.blog-search__icon { position: absolute; left: 14px; top: 50%; margin-top: -8px; color: var(--muted); pointer-events: none; }
.blog-search__input {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px 10px 38px;
  border: 1px solid var(--line-input);
  border-radius: var(--radius-pill);
  background: var(--white);
  font-size: 14px;
  line-height: 18px;
}
.blog-search__input::placeholder { color: var(--placeholder); opacity: 1; }
.blog-search__input:focus { outline: none; border-color: var(--deep-green); box-shadow: 0 0 0 3px rgb(22 190 121 / 0.35); }

/* Featured post */
.bfeat__inner { display: flex; align-items: center; gap: 56px; padding-top: 56px; padding-bottom: 72px; }
.bfeat__img { flex-shrink: 0; width: 760px; height: 428px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-tile); background: var(--white); }
.bfeat__body { flex: 1 1 0; display: flex; flex-direction: column; gap: 20px; }
.bfeat__tags { display: flex; align-items: center; gap: 10px; }
.bfeat__cat, .bcard__cat, .read__cat { color: var(--deep-green); font-size: 13px; font-weight: 600; line-height: 16px; }
.bfeat__title { font-family: var(--font-display); font-size: 38px; font-weight: 800; letter-spacing: -0.025em; line-height: 42px; }
.bfeat__sum { color: var(--muted); font-size: 17px; line-height: 26px; }

/* Post list */
.blist { padding-bottom: 72px; }
.blist__label { padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.bcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 28px; }
.bcard { display: flex; flex-direction: column; gap: 18px; }
.bcard__img { width: 100%; height: 236px; object-fit: cover; border: 1px solid var(--line); border-radius: 22px; background: var(--paper-2); }
.bcard__text { display: flex; flex-direction: column; gap: 18px; }
.bcard__title { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.015em; line-height: 30px; }
.bcard__meta { color: var(--muted); font-size: 14px; line-height: 18px; }
.blist__empty { margin-top: 28px; color: var(--muted); font-size: 17px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 48px; }
.pager__info { color: var(--muted); font-size: 14px; }
.bfeat__img, .bcard__img, .read__img { transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .bfeat__inner:hover .bfeat__img, .bcard:hover .bcard__img, .read:hover .read__img { transform: scale(1.02); }
  .bcard:hover .bcard__title, .bfeat__inner:hover .bfeat__title, .read:hover .read__title { text-decoration: underline 2px; text-underline-offset: 4px; }
}
@media (prefers-reduced-motion: reduce) { .bfeat__img, .bcard__img, .read__img { transition: none; transform: none !important; } }
.bsearch { padding-top: 40px; }

/* Lead magnet: checklist */
.magnet { padding-top: 24px; padding-bottom: 120px; }
.magnet__box { display: flex; align-items: center; gap: 64px; padding: 56px 64px; border-radius: 32px; background: var(--deep-green); color: var(--paper); overflow: clip; }
.magnet__sheet {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 22px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 18px 40px rgb(14 27 22 / 0.35);
  transform: rotate(-4deg);
}
.magnet__sheet-title { color: var(--ink); font-family: var(--font-display); font-size: 17px; font-weight: 800; line-height: 22px; }
.magnet__row { display: flex; align-items: center; gap: 10px; }
.magnet__box-i { flex-shrink: 0; width: 16px; height: 16px; border: 2px solid var(--line-input); border-radius: 5px; }
.magnet__box-i.is-done { border: 0; background: var(--emerald); }
.magnet__bar { flex-shrink: 0; width: var(--w); height: 6px; border-radius: 3px; background: var(--line-input); }
.magnet__copy { flex: 1 1 0; display: flex; flex-direction: column; gap: 14px; }
.magnet__eyebrow { color: var(--label-on-green); font-size: 13px; }
.magnet__title { font-family: var(--font-display); font-size: 44px; font-weight: 800; letter-spacing: -0.025em; line-height: 46px; }
.magnet__sub { color: var(--text-on-green); font-size: 17px; line-height: 26px; }
.magnet__form { flex: 0 0 340px; display: flex; flex-direction: column; gap: 10px; }
.magnet__field { display: flex; flex-direction: column; gap: 4px; }
.magnet__label { color: var(--text-on-green); font-size: 13px; font-weight: 600; line-height: 16px; }
.magnet__input {
  width: 100%;
  min-height: 48px;
  padding: 15px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 18px;
}
.magnet__input::placeholder { color: var(--placeholder); opacity: 1; }
.magnet__input:focus { outline: none; box-shadow: 0 0 0 3px var(--emerald); }
.magnet__input[aria-invalid='true'] { border-color: var(--amber); }
.magnet__note { color: var(--text-on-green); font-size: 12px; line-height: 17px; }
.magnet__note.is-error { color: var(--amber); font-weight: 600; }
.magnet__note.is-ok { color: var(--paper); font-size: 14px; font-weight: 600; }

/* ══ Article ═════════════════════════════════════════════════════════ */
/* Two columns: the rail (.post-side) and the article (.post-main). The rail's
   inner stack (back button, breadcrumb, contents) sticks below the fixed nav
   for the whole article, desktop and tablet. */
.post-grid { display: flex; gap: 120px; padding-top: 80px; padding-bottom: 96px; }
.post-rail { flex: 0 0 260px; }
.post-side__stick { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 48px; }
.post-main { flex: 1 1 0; min-width: 0; }
.post-head { padding-bottom: 48px; }
.post-head__rail { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.post-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 18px 10px 14px;
  border: 1px solid var(--line-input);
  border-radius: var(--radius-pill);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
  transition: border-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.post-back:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .post-back:hover { border-color: var(--ink); } }
.crumbs { display: flex; align-items: center; gap: 8px; padding-left: 4px; font-size: 14px; line-height: 18px; }
.crumbs__item { color: var(--muted); font-weight: 500; text-decoration: none; }
.crumbs__item--here { color: var(--deep-green); font-weight: 600; }
.crumbs__sep { color: var(--crumb-sep); }
.post-head__main { flex: 1 1 0; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.post-head__title { max-width: 880px; font-family: var(--font-display); font-size: clamp(32px, 21.6px + 2.67vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.034; }
.post-head__dek { max-width: 680px; color: var(--muted); font-size: 21px; line-height: 31px; }

.post-cover { padding-bottom: 72px; }
.post-cover__img { width: 100%; height: 506px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-card); }

.post-toc__desk { display: flex; flex-direction: column; gap: 4px; }
.post-toc__label { padding-bottom: 12px; color: var(--muted); }
.post-toc__list { display: flex; flex-direction: column; gap: 4px; }
.post-toc__link {
  display: block;
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: border-color var(--dur-hover) ease, color var(--dur-hover) ease;
}
.post-toc__link.is-current { border-left-color: var(--emerald); color: var(--ink); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .post-toc__link:hover { color: var(--ink); } }
.post-toc__cta { align-self: flex-start; margin-top: 28px; }
.post-col { flex: 0 1 680px; min-width: 0; display: flex; flex-direction: column; }

/* Prose: the rendered markdown */
.prose { display: flex; flex-direction: column; gap: 28px; font-size: 19px; line-height: 32px; }
.prose > * { margin: 0; }
.prose h2 { padding-top: 20px; font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 40px; scroll-margin-top: 112px; }
.prose h3 { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 28px; scroll-margin-top: 112px; }
.prose a { color: var(--deep-green); text-decoration: underline 1px; text-underline-offset: 3px; }
.prose a.btn { color: var(--ink); text-decoration: none; }
.prose strong { font-weight: 700; }
.prose ul { padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; }
.prose ul li::marker { color: var(--emerald); }
.prose ol { list-style: none; padding: 0; counter-reset: step; }
.prose ol > li {
  counter-increment: step;
  position: relative;
  padding: 18px 0 18px 52px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 17px;
  line-height: 27px;
}
.prose ol > li:last-child { border-bottom: 1px solid var(--line); }
.prose ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 18px;
  width: 32px;
  color: var(--emerald);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 28px;
}
.prose ol > li strong { color: var(--ink); }
.prose blockquote {
  padding: 22px 24px;
  border-left: 4px solid var(--emerald);
  border-radius: 4px 16px 16px 4px;
  background: var(--paper-2);
  font-size: 17px;
  line-height: 27px;
}
.prose figure img { border-radius: var(--radius-card); }
.prose figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 20px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 24px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose hr { border: 0; border-top: 1px solid var(--line); }

/* Inline free-check card (from ::: cta-audit) */
.post-check { display: flex; align-items: center; gap: 24px; padding: 28px 30px; border-radius: 22px; background: var(--ink); color: var(--paper); }
.post-check__text { flex: 1 1 0; color: var(--text-on-ink); font-size: 16px; line-height: 24px; }
.post-check__text a { color: var(--paper); }
.post-check__btn { flex-shrink: 0; padding: 14px 22px; font-size: 15px; }

/* FAQ rows (from the h2#faq section) */
.post-faq .faq__q { font-size: 20px; }
.post-faq .faq__a { font-size: 17px; line-height: 27px; }

/* Author box */
.author { display: flex; align-items: center; gap: 22px; margin-top: 28px; padding-top: 32px; border-top: 1px solid var(--line); }
.author__img { flex-shrink: 0; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.author__text { display: flex; flex-direction: column; gap: 6px; }
.author__label { color: var(--muted); }
.author__name { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 28px; }
.author__name a { color: inherit; text-decoration: none; }
.author__bio { color: var(--text-3); font-size: 15px; line-height: 23px; }

/* Keep reading */
.reads { padding-top: 80px; padding-bottom: 96px; }
.reads__head { display: flex; align-items: flex-end; justify-content: space-between; }
.reads__title { font-family: var(--font-display); font-size: 36px; font-weight: 800; letter-spacing: -0.02em; line-height: 40px; }
.reads__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 28px; }
.read { display: flex; align-items: center; gap: 24px; }
.read__img { flex-shrink: 0; width: 240px; height: 150px; object-fit: cover; border: 1px solid var(--line); border-radius: 18px; }
.read__text { display: flex; flex-direction: column; gap: 8px; }
.read__title { font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 26px; }
.read__meta { color: var(--muted); font-size: 13px; line-height: 16px; }

/* ══ Tablet ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1199px) {
  .blog-head__inner { flex-direction: column; align-items: flex-start; }
  .blog-head__tools { align-items: flex-start; }
  .blog-head__chips { justify-content: flex-start; }
  .bfeat__inner { flex-direction: column; align-items: stretch; }
  .bfeat__img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .bcards { grid-template-columns: repeat(2, 1fr); }
  .magnet__box { flex-wrap: wrap; padding: 48px; gap: 40px; }
  .magnet__form { flex-basis: 100%; }
  .post-grid { gap: 48px; }
  .post-rail { flex-basis: 200px; }
  .reads__list { grid-template-columns: 1fr; }
}

/* ══ Mobile board (390) ═══════════════════════════════════════════════ */
@media (max-width: 767px) {
  .byline { gap: 10px; font-size: 13px; line-height: 17px; }
  .byline__avatar { width: 30px; height: 30px; }

  .blog-head { border-bottom: 0; }
  .blog-head__inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 48px 20px 24px; }
  .blog-head__copy { gap: 16px; }
  .blog-head__eyebrow { font-size: 12px; }
  .blog-head__title { letter-spacing: -0.035em; line-height: 48px; }
  .blog-head__sub { font-size: 16px; line-height: 24px; }
  .blog-head__tools { align-items: stretch; gap: 12px; padding-top: 8px; }
  .blog-head__chips { justify-content: flex-start; }
  .blog-search { max-width: none; }

  .bfeat__inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 16px 40px; }
  .bfeat__img { width: 100%; height: 200px; border-radius: 22px; }
  .bfeat__body { gap: 12px; padding: 4px 4px 0; }
  .bfeat__title { font-size: 26px; letter-spacing: -0.02em; line-height: 31px; }
  .bfeat__sum { font-size: 15px; line-height: 23px; }

  .blist { padding-bottom: 40px; }
  .blist__label { padding: 0 4px 12px; border-top: 0; font-size: 12px; }
  .bcards { grid-template-columns: 1fr; gap: 0; margin-top: 0; }
  .bcard { flex-direction: row; gap: 14px; padding: 16px 4px; border-top: 1px solid var(--line); }
  .bcard:last-child { border-bottom: 1px solid var(--line); }
  .bcard__img { flex-shrink: 0; width: 104px; height: 78px; border-radius: 12px; }
  .bcard__text { flex: 1 1 0; gap: 6px; }
  .bcard__cat { font-size: 12px; line-height: 15px; }
  .bcard__title { font-size: 16px; letter-spacing: 0; line-height: 21px; }
  .bcard__meta { font-size: 12px; line-height: 16px; }

  .magnet { padding: 0 0 64px; }
  .magnet__box { flex-direction: column; align-items: stretch; gap: 14px; padding: 28px 22px; border-radius: var(--radius-card); }
  .magnet__copy { gap: 14px; }
  .magnet__eyebrow { font-size: 12px; }
  .magnet__title { font-size: 30px; letter-spacing: -0.02em; line-height: 33px; }
  .magnet__sub { font-size: 15px; line-height: 23px; }
  .magnet__form { flex: none; }

  .post-grid { flex-direction: column; gap: 0; padding: 0 0 48px; }
  .post-rail { flex: none; }
  .post-side__stick { position: static; gap: 0; padding: 36px 20px 16px; }
  .post-head { padding: 0 20px 24px; }
  .post-head__rail { flex: none; flex-direction: row; align-items: center; gap: 14px; padding-top: 0; }
  .post-back { padding: 8px 14px 8px 12px; }
  .crumbs { gap: 6px; padding-left: 0; }
  .post-head__main { gap: 16px; }
  .post-head__title { letter-spacing: -0.025em; line-height: 36px; }
  .post-head__dek { font-size: 17px; line-height: 26px; }
  .byline--lg { gap: 12px; padding-top: 4px; }
  .byline--lg .byline__avatar { width: 40px; height: 40px; }
  .byline--lg .byline__name { font-size: 14px; line-height: 18px; }
  .byline--lg .byline__meta { font-size: 13px; line-height: 17px; }

  .post-cover { padding: 0 16px; }
  .post-cover__img { height: auto; aspect-ratio: 16 / 9; border-radius: 20px; }

  .post-toc__mob { margin: 20px 16px 0; border: 1px solid var(--line-input); border-radius: 14px; }
  .post-toc__sum { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 13px 16px; font-size: 14px; font-weight: 600; line-height: 18px; list-style: none; cursor: pointer; }
  .post-toc__sum::-webkit-details-marker { display: none; }
  .post-toc__mob[open] .post-toc__sum span { transform: rotate(180deg); }
  .post-toc__mlist { display: flex; flex-direction: column; padding: 0 16px 12px; }
  .post-toc__mlist a { display: block; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 20px; text-decoration: none; }
  .post-col { flex: none; padding: 32px 20px 0; }

  .prose { gap: 22px; font-size: 17px; line-height: 28px; }
  .prose h2 { padding-top: 8px; font-size: 26px; letter-spacing: -0.015em; line-height: 31px; }
  .prose h3 { font-size: 19px; line-height: 24px; }
  .prose ol > li { padding: 14px 0 14px 34px; font-size: 16px; line-height: 24px; }
  .prose ol > li::before { top: 14px; width: 20px; font-size: 18px; line-height: 24px; }
  .prose blockquote { padding: 18px; border-radius: 4px 14px 14px 4px; font-size: 15px; line-height: 24px; }
  .post-check { flex-direction: column; align-items: stretch; gap: 12px; padding: 22px; border-radius: 20px; }
  .post-check__text { font-size: 14px; line-height: 21px; }
  .post-check__btn { width: 100%; padding: 14px; }
  .post-faq .faq__q { font-size: 18px; }
  .post-faq .faq__a { font-size: 16px; line-height: 25px; }

  .author { gap: 14px; margin-top: 22px; padding-top: 24px; }
  .author__img { width: 64px; height: 64px; }
  .author__text { gap: 4px; }
  .author__name { font-size: 18px; line-height: 22px; }
  .author__bio { font-size: 13px; line-height: 19px; }

  .reads { padding: 40px 0 48px; }
  .reads__head { padding: 0 4px 10px; }
  .reads__title { font-size: 24px; letter-spacing: 0; line-height: 30px; }
  .reads__list { grid-template-columns: 1fr; gap: 0; margin-top: 0; }
  .read { gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); }
  .read__img { width: 96px; height: 72px; border: 0; border-radius: 12px; }
  .read__text { gap: 4px; }
  .read__title { font-size: 15px; line-height: 20px; }
  .read__meta { font-size: 12px; line-height: 16px; }
}
