/* ---------- Desktop layout: article column + sticky sidebar ---------- */
@media (min-width: 1200px) {
  main.page:has(> .bpt-post) {
    display: grid;
    grid-template-columns: minmax(0, 1050fr) minmax(0, 350fr);
  }
  main.page:has(> .bpt-post) > * { grid-column: 1 / -1; }
  main.page > .bpt-hero { grid-row: 1; }
  main.page > .bpt-post { grid-column: 1; grid-row: 2; position: relative; }
  /* Sidebar sits in the right column, alongside post, author and share (167 + 66px) */
  .bpt-post > .bpt-aside { position: absolute; top: 0; left: 100%; width: calc(100% / 3); bottom: -233px; }
  main.page > .bpt-author { grid-column: 1; grid-row: 3; }
  main.page > .bpt-share { grid-column: 1; grid-row: 4; }
  main.page > .bpt-related { grid-row: 5; }
  main.page > .bpt-banner { grid-row: 6; }
}

/* ---------- Hero ---------- */
.bpt-hero { overflow: hidden; padding-top: var(--header-h); }
.bpt-hero__content { padding: 60px; display: flex; flex-direction: column; gap: 32px; }
.bpt-crumbs { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 16px; line-height: 25px; letter-spacing: -0.16px; font-weight: 500; color: var(--muted); }
.bpt-crumbs img { width: 5px; height: 9px; flex: none; }
.bpt-crumbs a { transition: color 0.2s var(--ease); }
.bpt-crumbs a:hover { color: var(--ink); }
.bpt-crumbs__current { color: var(--ink); }
.bpt-hero__text { display: flex; flex-direction: column; gap: 24px; }
.bpt-hero__desc { display: flex; flex-direction: column; gap: 16px; max-width: 950px; }
.bpt-hero__title { text-wrap: wrap; font-size: 48px; line-height: 53px; letter-spacing: -1.92px; font-weight: 500; color: var(--ink); }
.bpt-hero__lead { font-size: 18px; line-height: 24px; font-weight: 400; color: var(--ink-60); }
.bpt-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 40px; }
.bpt-meta__item { display: flex; flex-direction: column; gap: 12px; }
.bpt-meta__label { font-size: 12px; line-height: 14px; font-weight: 400; color: var(--ink-60); }
.bpt-meta__row { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 17px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.bpt-meta__row img.bpt-meta__pfp { width: 20px; height: 20px; border-radius: 24px; object-fit: cover; }
.bpt-meta__dot { width: 3px; height: 3px; }
.bpt-hero__banner { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 733; object-fit: cover; }

/* ---------- Sidebar: table of contents + CTA ---------- */
.bpt-aside { background: var(--surface); border-right: 1px solid var(--line); }
.bpt-aside__sticky { position: sticky; top: var(--header-h); padding: 60px 40px 40px; display: flex; flex-direction: column; gap: 40px; }
.bpt-toc__title { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--ink); }
.bpt-toc__list { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.bpt-toc__link {
  display: block; padding: 8px 0 8px 14px; border-left: 2px solid transparent;
  font-size: 14px; line-height: 17px; font-weight: 500; color: var(--ink-60);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.bpt-toc__link:hover { color: var(--ink); }
.bpt-toc__link.is-active { color: var(--ink); border-left-color: var(--ink); }

.bpt-cta { background: var(--white); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; }
.bpt-cta__title { font-size: 24px; line-height: 32px; letter-spacing: -1px; font-weight: 500; color: var(--ink); }
.bpt-cta__title span { display: block; color: var(--ink-60); }
.bpt-cta__text { margin-top: 12px; font-size: 14px; line-height: 19px; letter-spacing: -0.28px; font-weight: 400; color: var(--muted); }
.bpt-cta .btn { margin-top: 24px; width: 100%; }
.bpt-cta__note { margin-top: 12px; text-align: center; font-size: 12px; line-height: 14px; font-weight: 400; color: var(--muted); }

/* ---------- Post body ---------- */
.bpt-post { padding: 0; }
.bpt-prose { box-sizing: border-box; padding: 64px; max-width: 1050px; font-size: 16px; line-height: 21.7px; font-weight: 400; letter-spacing: 0; color: var(--ink); }
.bpt-prose > * + * { margin-top: 20px; }
.bpt-prose strong { font-weight: 600; }
.bpt-prose .muted { color: var(--ink-60); }
.bpt-prose h2 { margin-top: 48px; font-size: 40px; line-height: 48px; letter-spacing: -2px; font-weight: 500; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 20px); }
.bpt-prose h3 { margin-top: 40px; font-size: 24px; line-height: 32px; letter-spacing: -1px; font-weight: 500; color: var(--ink); }
.bpt-prose h2 + *, .bpt-prose h3 + * { margin-top: 20px; }
.bpt-prose ul { list-style: disc; padding-left: 20px; margin-top: 32px; }
.bpt-prose li::marker { color: var(--ink); }
.bpt-prose img { width: 540px; height: 100px; object-fit: fill; }

/* ---------- Author ---------- */
.bpt-author { padding: 40px 60px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bpt-author__inner { display: flex; align-items: center; gap: 24px; }
.bpt-author__pfp { width: 87px; height: 87px; border-radius: 9999px; object-fit: cover; flex: none; }
.bpt-author__label { font-size: 20px; line-height: 26px; letter-spacing: -0.4px; font-weight: 500; color: var(--ink); }
.bpt-author__name { margin-top: 12px; font-size: 16px; line-height: 25px; letter-spacing: -0.16px; font-weight: 500; color: var(--ink); }

/* ---------- Share ---------- */
.bpt-share { padding: 20px 60px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.bpt-share__label { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 17px; font-weight: 400; color: var(--muted); }
.bpt-share__label img { width: 11px; height: 12px; }
.bpt-share__icons { display: flex; align-items: center; gap: 6px; }
.bpt-share__icons a { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 6px; transition: opacity 0.2s var(--ease); }
.bpt-share__icons a:hover { opacity: 0.6; }
.bpt-share__icons img { width: 14px; height: auto; }

/* ---------- Related posts ---------- */
.bpt-related { overflow: hidden; border-top: 1px solid var(--line); }
.bpt-related .t-h2 { color: var(--ink); }
.bpt-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.bpt-card { display: flex; flex-direction: column; padding: 40px; border-right: 1px solid var(--line); min-width: 0; background: var(--white); transition: background-color 0.2s var(--ease); }
.bpt-card:last-child { border-right: 0; }
.bpt-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 24px; }
.bpt-card__date { font-size: 12px; line-height: 14px; font-weight: 400; color: var(--ink); }
.bpt-card__tag { padding: 4px 7px; border: 1px solid var(--line); font-size: 12px; line-height: 14px; font-weight: 400; color: var(--ink); white-space: nowrap; }
.bpt-card__image { display: block; margin-top: 25px; width: 100%; height: auto; aspect-ratio: 387 / 202; object-fit: cover; }
.bpt-card__title { margin-top: 20px; font-size: 20px; line-height: 26px; letter-spacing: -0.4px; font-weight: 500; color: var(--ink); transition: color 0.2s var(--ease); }
.bpt-card__slug { margin-top: 12px; font-size: 14px; line-height: 19px; letter-spacing: -0.28px; font-weight: 400; color: var(--muted); }
.bpt-card:hover .bpt-card__title { color: var(--ink-60); }

/* ---------- Banner ---------- */
.bpt-banner { position: relative; overflow: hidden; padding: 120px 60px; display: flex; justify-content: center; border-top: 1px solid var(--line); }
.bpt-banner__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.bpt-banner__inner { position: relative; max-width: 500px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.bpt-banner__title { font-size: 44px; line-height: 48px; letter-spacing: -1.76px; font-weight: 500; color: var(--ink); }
.bpt-banner__text { margin-top: 12px; font-size: 16px; line-height: 21.7px; font-weight: 400; color: var(--ink); }
.bpt-banner .btn { margin-top: 32px; }

/* ---------- Tablet ---------- */
@media (max-width: 1199px) {
  .bpt-hero__content { padding: 60px 40px; }
  .bpt-hero__lead { font-size: 16px; line-height: 22px; }
  .bpt-aside { border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .bpt-aside__sticky { position: static; padding: 40px 20px; }
  .bpt-toc__title { font-size: 16px; line-height: 17px; }
  .bpt-author__label { font-size: 18px; line-height: 23px; }
  .bpt-toc__link { font-size: 16px; line-height: 19px; -webkit-line-clamp: unset; display: block; }
  .bpt-cta { display: none; }
  .bpt-prose { padding: 60px 40px; }
  .bpt-prose h2 { font-size: 32px; line-height: 38px; letter-spacing: -1.5px; }
  .bpt-prose h3 { font-size: 20px; line-height: 27px; letter-spacing: -0.6px; }
  .bpt-author { padding: 40px; }
  .bpt-share { padding: 20px 40px; }
  .bpt-related__grid { grid-template-columns: repeat(2, 1fr); }
  .bpt-card { padding: 27px; border-bottom: 1px solid var(--line); }
  .bpt-card:nth-child(2n) { border-right: 0; }
  .bpt-card:last-child:nth-child(odd) { border-right: 1px solid var(--line); }
  .bpt-card__title { font-size: 18px; line-height: 23px; }
  .bpt-banner { padding: 116px 40px; }
  .bpt-banner__title { font-size: 36px; line-height: 40px; letter-spacing: -1.4px; }
}

/* ---------- Phone ---------- */
@media (max-width: 809px) {
  .bpt-hero__content { padding: 40px 20px; gap: 24px; }
  .bpt-crumbs { font-size: 16px; }
  .bpt-crumbs__current, .bpt-crumbs__sep--last { display: none; }
  .bpt-hero__title { font-size: 40px; line-height: 44px; letter-spacing: -1.6px; }
  .bpt-hero__lead { font-size: 14px; line-height: 19px; }
  .bpt-aside__sticky { padding: 32px 20px; }
  .bpt-prose { padding: 48px 20px; }
  .bpt-meta { flex-wrap: nowrap; overflow: hidden; gap: 40px; }
  .bpt-meta__item { flex: none; }
  .bpt-prose h2 { font-size: 28px; line-height: 34px; letter-spacing: -1.2px; }
  .bpt-prose img { width: 100%; height: auto; aspect-ratio: 540 / 100; }
  .bpt-author { padding: 32px 20px; }
  .bpt-author__inner { gap: 16px; }
  .bpt-author__pfp { width: 64px; height: 64px; }
  .bpt-author__label { font-size: 18px; line-height: 23px; }
  .bpt-share { padding: 20px; }
  .bpt-related__grid { grid-template-columns: 1fr; }
  .bpt-card, .bpt-card:last-child:nth-child(odd) { padding: 20px; border-right: 0; }
  .bpt-card__image { margin-top: 20px; }
  .bpt-banner { padding: 38px 20px; }
}
