/* Blog: index and articles. Sections alternate paper and white; cards and screens are flat,
   with a thin edge. Wine marks navigation and the Workspace, coral the Extensão. */
.blog-page { --cta-fill: var(--action-wine); --on-brand: var(--on-plum); --blog-accent: var(--prompt-wine-light); --blog-max: 1120px; background: var(--ground-raised); }
html[data-site-theme="night"] .blog-page { --cta-fill: var(--prompt-wine-light); --blog-accent: #edbdce; }
.blog-page .wrap { max-width: var(--blog-max); }
.blog-page :is(figure, details) { margin: 0; }
.blog-page :is(h1, h2, h3) { color: var(--on-ground); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.post-category { font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--blog-accent); }
.post-facts { font-size: 13px; color: var(--on-ground-faint); font-variant-numeric: tabular-nums; }

/* Index */
.blog-hero { padding: clamp(40px, 5vw, 76px) 0 clamp(28px, 3.4vw, 44px); background: var(--ground); }
.blog-hero h1 { font-size: clamp(38px, 4.8vw, 62px); line-height: 1.04; letter-spacing: -.045em; }
.blog-lead { margin-top: 18px; max-width: 52ch; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; }

.blog-featured { padding-bottom: clamp(52px, 6.4vw, 92px); background: var(--ground); }
.post-feature { position: relative; display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 56px); }
.post-feature-cover { overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--ground-hairline); border-radius: 18px; background: var(--ground-tint); }
.post-feature-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-feature h2 { margin: 12px 0 14px; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.14; letter-spacing: -.035em; }
.post-feature-text > p:not([class]) { font-size: 17px; line-height: 1.6; max-width: 46ch; }
.post-byline-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 22px; font-size: 14px; color: var(--on-ground-faint); }
.post-byline-mini img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; margin-right: 2px; }
.post-feature h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-feature h2 a:focus-visible, .post-card h3 a:focus-visible { outline: none; }
.post-feature:has(a:focus-visible), .post-card:has(a:focus-visible) { outline: 2px solid var(--brand); outline-offset: 6px; border-radius: 18px; }

.blog-list { padding-block: clamp(52px, 6.4vw, 92px); }
.blog-list-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 32px; margin-bottom: clamp(28px, 3.4vw, 44px); }
.blog-list-head h2, .post-related h2 { font-size: clamp(26px, 2.7vw, 38px); line-height: 1.12; letter-spacing: -.035em; }
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-cats a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid var(--ground-line); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--on-ground); transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.blog-cats a span { font-size: 12px; color: var(--on-ground-faint); font-variant-numeric: tabular-nums; }
.blog-cats a[aria-current] { border-color: var(--action-wine); background: var(--action-wine); color: #fff; }
.blog-cats a[aria-current] span { color: rgb(255 255 255 / 72%); }
html[data-site-theme="night"] .blog-cats a[aria-current] { border-color: var(--prompt-wine-light); background: var(--prompt-wine-light); }
@media (hover: hover) and (pointer: fine) {
  .blog-cats a:not([aria-current]):hover { border-color: var(--on-ground-faint); }
}

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 52px) clamp(20px, 2.4vw, 32px); }
.post-grid:not([data-filtered]) > [data-featured] { display: none; }
.post-card { position: relative; display: flex; flex-direction: column; gap: 18px; border-radius: 18px; }
.post-card-cover { overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--ground-hairline); border-radius: 14px; background: var(--ground-tint); }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms var(--ease); }
.post-card h3 { margin: 8px 0 10px; font-size: 19px; line-height: 1.3; letter-spacing: -.015em; }
.post-card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.55; }
.post-card .post-facts { margin-top: 12px; }
@media (hover: hover) and (pointer: fine) {
  html:not([data-motion="paused"]) .post-card:hover .post-card-cover img { transform: scale(1.03); }
  .post-card:hover h3 a, .post-feature:hover h2 a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
}
@media (prefers-reduced-motion: reduce) { .post-card-cover img { transition: none; } }

.blog-list + .decision { background: var(--ground); }

/* Article */
.post-head { padding: clamp(28px, 4vw, 56px) 0 clamp(28px, 3.4vw, 44px); background: var(--ground); }
.post-head > .wrap > * { max-width: 860px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--on-ground-faint); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ground-line); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--on-ground-soft); }
.crumbs a:hover { color: var(--on-ground); }
.post-head h1 { margin-top: 14px; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.08; letter-spacing: -.042em; }
.post-lead { margin-top: 20px; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; max-width: 62ch; }
.post-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ground-hairline); }
.post-byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.post-byline b { display: block; font-size: 15px; font-weight: 600; color: var(--on-ground); }
.post-byline span { display: block; font-size: 13px; color: var(--on-ground-faint); }
.post-byline .post-facts { margin-left: auto; font-size: 14px; }
.post-byline .post-facts span { display: inline; }

/* The cover closes the beige header; the white text area starts below it. */
.post-cover { padding-bottom: clamp(36px, 4.5vw, 64px); background: var(--ground); }
/* As wide as the title column: most covers are 696 or 1216 pixels wide and blur when stretched further. */
.post-cover img { width: min(860px, 100% - 2 * var(--gutter)); margin-left: max(var(--gutter), (100% - var(--blog-max)) / 2); aspect-ratio: 2 / 1; height: auto; object-fit: cover; border: 1px solid var(--ground-hairline); border-radius: 18px; background: var(--ground-tint); }

.post-layout { display: grid; grid-template-columns: minmax(0, 720px) minmax(240px, 290px); justify-content: space-between; gap: 56px; padding-block: clamp(40px, 5vw, 72px) clamp(56px, 6.4vw, 92px); }
.post-aside { grid-column: 2; grid-row: 1; position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 22px; }
.post-body { grid-column: 1; grid-row: 1; min-width: 0; }

.post-toc summary { list-style: none; font-size: 14px; font-weight: 600; color: var(--on-ground); }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc ol { margin-top: 12px; border-left: 2px solid var(--ground-line); }
.post-toc a { display: block; margin-left: -2px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--on-ground-soft); transition: color 150ms ease, border-color 150ms ease; }
.post-toc .toc-3 a { padding-left: 28px; font-size: 13px; }
.post-toc a:hover { color: var(--on-ground); }
.post-toc a[aria-current] { border-color: var(--action-wine); color: var(--on-ground); font-weight: 600; }
html[data-site-theme="night"] .post-toc a[aria-current] { border-color: #edbdce; }
@media (min-width: 1024px) { .post-toc summary { pointer-events: none; } }

.post-product { padding: 22px; border: 1px solid var(--ground-hairline); border-radius: 16px; background: var(--ground); }
.post-product-label { font-size: 13px; font-weight: 600; color: var(--blog-accent); }
.post-product b { display: block; margin-top: 8px; font-size: 18px; font-weight: 600; color: var(--on-ground); letter-spacing: -.01em; }
.post-product p:not([class]) { margin-top: 8px; font-size: 14px; line-height: 1.55; }
.post-product .btn { width: 100%; min-height: 46px; margin-top: 18px; padding-inline: 16px; font-size: 15px; white-space: normal; text-align: center; line-height: 1.2; }
.post-product:has(a[href^="/extension"]) .btn { --cta-fill: var(--action-coral); --on-brand: var(--on-coral); }

/* Article text */
.post-body { font-size: 18px; line-height: 1.75; color: var(--on-ground-soft); }
.post-body > :is(h2, h3) { scroll-margin-top: 96px; color: var(--on-ground); letter-spacing: -.025em; }
.post-body > h2 { margin: 1.9em 0 .55em; font-size: clamp(24px, 2.3vw, 30px); line-height: 1.2; }
.post-body > h3 { margin: 1.6em 0 .45em; font-size: 21px; line-height: 1.3; }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.1em; color: inherit; }
.post-body strong { font-weight: 600; color: var(--on-ground); }
.post-body a { color: var(--blog-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body > :is(ul, ol) { margin: 0 0 1.3em; padding-left: 1.3em; }
.post-body > ul { list-style: disc; }
.post-body > ol { list-style: decimal; }
.post-body li { margin-bottom: .5em; padding-left: .2em; }
.post-body > ul > li::marker { color: var(--action-coral); }
.post-body > ol > li::marker { color: var(--blog-accent); font-weight: 600; }
.post-body blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--action-coral); color: var(--on-ground); }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--ground-line); }
.post-source { font-size: 14px; line-height: 1.6; color: var(--on-ground-faint); }
.post-table { margin: 1.4em 0 1.8em; overflow-x: auto; border: 1px solid var(--ground-hairline); border-radius: 14px; }
.post-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.post-table th { padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; color: var(--on-ground-faint); background: var(--ground); border-bottom: 1px solid var(--ground-hairline); }
.post-table td { padding: 14px 16px; vertical-align: top; border-bottom: 1px solid var(--ground-hairline); }
.post-table tr:last-child td { border-bottom: 0; }
.post-table td:first-child { min-width: 8.5em; }

/* After the text: share, author, related reading */
.post-foot { display: grid; gap: 28px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--ground-line); }
.post-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.post-share p { margin: 0; font-size: 15px; font-weight: 600; color: var(--on-ground); }
.post-share > div { display: flex; flex-wrap: wrap; gap: 8px; }
.post-share :is(a, button) { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--ground-line); border-radius: 999px; background: none; font-size: 14px; font-weight: 500; line-height: 1; color: var(--on-ground); text-decoration: none; }
.post-share :is(a, button):hover { border-color: var(--on-ground-faint); }
.post-author { display: flex; align-items: center; gap: 18px; padding: 22px; border: 1px solid var(--ground-hairline); border-radius: 16px; background: var(--ground); }
.post-author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.post-author p { margin: 0; font-size: 13px; color: var(--on-ground-faint); }
.post-author b { display: block; margin-top: 2px; font-size: 18px; font-weight: 600; color: var(--on-ground); }
.post-author span { display: block; font-size: 14px; color: var(--on-ground-soft); line-height: 1.4; }
.post-author .link-arrow { min-height: 36px; margin-top: 6px; font-size: 14px; text-decoration: none; color: var(--on-ground); }

.post-related { padding-block: clamp(52px, 6.4vw, 92px); background: var(--ground); }
.post-related h2 { margin-bottom: clamp(28px, 3.4vw, 44px); }

@media (max-width: 1023px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 760px; }
  .post-aside { display: contents; }
  .post-toc { grid-row: 1; padding: 0 18px; border: 1px solid var(--ground-line); border-radius: 14px; }
  .post-toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; }
  .post-toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 180ms var(--ease); }
  .post-toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
  .post-toc ol { margin: 0 0 16px; }
  .post-body { grid-row: 2; }
  .post-product { grid-row: 3; }
  .post-feature { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-body { font-size: 17px; line-height: 1.7; }
  .post-cover img { aspect-ratio: 16 / 10; border-radius: 14px; }
  .post-byline .post-facts { flex-basis: 100%; margin-left: 0; }
  .post-author { align-items: flex-start; }
  .post-author img { width: 56px; height: 56px; }
  .blog-list-head { align-items: start; }
  .blog-cats { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .blog-cats a { flex: none; }
}

/* Blog header: the Leadzy logo with the Blog tag, home and categories, search, the way back to the site. */
.blog-brand { gap: 10px; }
.blog-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--action-wine); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
html[data-site-theme="night"] .blog-pill { background: var(--prompt-wine-light); }
.blog-nav .nav-links a[aria-current="page"] { color: var(--on-ground); background-color: var(--ground-tint); }
.blog-search { position: relative; display: flex; align-items: center; width: clamp(220px, 26vw, 340px); margin-right: 6px; }
.blog-search .i { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--on-ground-faint); pointer-events: none; }
.blog-search input { width: 100%; height: 42px; padding: 0 14px 0 38px; border: 1px solid var(--ground-line); border-radius: 999px; background: var(--ground-raised); font: inherit; font-size: 15px; color: var(--on-ground); transition: border-color 150ms ease; }
.blog-search input::placeholder { color: var(--on-ground-faint); }
.blog-search input:hover { border-color: var(--on-ground-faint); }
.blog-search input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.blog-search input::-webkit-search-cancel-button { cursor: pointer; }
.blog-site-link .i { width: 16px; height: 16px; }
.blog-mega-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 2.1fr); }
.blog-mega-grid .mega-item span { font-size: 13px; color: #7a7075; }
.blog-empty { padding: 40px 0 8px; font-size: 17px; color: var(--on-ground-soft); }

.blog-mobile .blog-search { width: 100%; margin: 12px 0 8px; }
.blog-mobile .blog-search input { background: #fff; border-color: #e3ddd8; color: var(--ink-on-light); }
.blog-mobile details .mega-item { display: flex; flex-direction: row; justify-content: space-between; padding: 12px 0; }

@media (max-width: 980px) { .blog-nav .nav-row > .blog-search { display: none; } }
@media (max-width: 600px) { .blog-nav .blog-site-link { display: none; } }
