/* Artigo do blog */

.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--green); transform: scaleX(0); transform-origin: 0 50%; }

/* Abertura */
.article-hero { padding-bottom: clamp(56px, 6vw, 88px); }
.article-hero--image { display: flex; align-items: flex-end; min-height: clamp(480px, 46vw, 640px); }
.article-hero--image .article-title, .article-hero--image .byline--hero { text-shadow: 0 2px 18px rgba(11, 34, 50, .55); }
.article-hero--image .article-cat { background: rgba(11, 34, 50, .55); backdrop-filter: blur(4px); }
.article-hero__inner > * { max-width: 1000px; }
.crumbs__clip { display: inline-block; max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.article-cat {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 4px;
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--green-on-dark); text-decoration: none;
}
.article-cat:hover { border-color: var(--green-on-dark); color: var(--white); }
.article-title { margin-top: 22px; max-width: 980px; font-size: clamp(32px, 3.9vw, 56px); line-height: 1.08; letter-spacing: -.025em; color: var(--white); }
.byline--hero { display: flex; align-items: center; gap: 12px; margin-top: 30px; font-size: 15px; color: var(--on-dark-2); }
.byline--hero img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, .2); }
.byline--hero a { color: var(--white); font-weight: 500; text-decoration: none; }
.byline--hero a:hover { text-decoration: underline; text-underline-offset: 3px; }


/* Corpo: índice fixo + coluna de leitura */
.article-layout { display: grid; grid-template-columns: 232px minmax(0, 660px); gap: 0 clamp(48px, 6vw, 96px); padding-top: clamp(48px, 5vw, 80px); }
.article-toc nav { position: sticky; top: 96px; }
.article-toc h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.article-toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); counter-reset: toc; }
.article-toc li { border-bottom: 1px solid var(--line-soft); }
.article-toc a { position: relative; display: block; padding: 10px 0; font-size: 14px; line-height: 1.4; color: var(--ink); text-decoration: none; transition: color .2s ease, padding-left .3s var(--ease-out); }
.article-toc a::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--green); transform: scaleY(0); transition: transform .3s var(--ease-out); }
.article-toc a:hover { color: var(--ink-strong); }
.article-toc a[aria-current] { padding-left: 14px; color: var(--ink-strong); font-weight: 600; }
.article-toc a[aria-current]::before { transform: scaleY(1); }

.prose { font-size: 18px; line-height: 1.75; color: #33475A; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose > p:first-child { font-size: 20px; line-height: 1.7; color: var(--ink-strong); }
.prose h2 { margin-top: 2.4em; font-size: clamp(25px, 2.3vw, 31px); line-height: 1.2; letter-spacing: -.018em; scroll-margin-top: 96px; }
.prose h3 { margin-top: 1.9em; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.3; letter-spacing: -.01em; }
.prose h4 { margin-top: 1.6em; font-size: 18px; line-height: 1.35; }
.prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose strong { font-weight: 600; color: var(--ink-strong); }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink-strong); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .6em; }
.prose li::marker { color: var(--green-ink); }
.prose ol li::marker { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.prose ul { list-style: none; padding-left: 1.4em; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ""; position: absolute; left: -1.15em; top: .72em; width: 7px; height: 7px; border-radius: 1px; background: var(--green); }
.prose blockquote {
  position: relative; margin: 2em 0; padding: 28px 32px; border-radius: 8px; background: var(--surface);
  font-family: var(--font-display); font-size: 20px; line-height: 1.55; color: var(--ink-strong);
}
.prose blockquote p { margin: 0; }

.a-table { margin: 2.2em 0; overflow-x: auto; }
.a-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.a-table caption { caption-side: top; padding-bottom: 14px; text-align: left; font-family: var(--font-display); font-size: 18px; font-weight: 500; color: var(--ink-strong); }
.a-table caption span { display: block; margin-top: 2px; font-family: var(--font-text); font-size: 14px; font-weight: 400; color: var(--muted); }
.a-table thead th { padding: 12px 16px; background: var(--navy-900); color: var(--white); font-size: 13.5px; font-weight: 600; text-align: left; }
.a-table thead th:first-child { border-radius: 6px 0 0 0; }
.a-table thead th:last-child { border-radius: 0 6px 0 0; }
.a-table tbody th, .a-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.a-table tbody th { font-weight: 600; color: var(--ink-strong); white-space: nowrap; }
.a-table td.num { font-family: var(--font-display); font-weight: 500; font-size: 17px; color: var(--ink-strong); white-space: nowrap; }
.gr { display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 2px; vertical-align: 1px; }
.gr-1 { background: #3AAA35; } .gr-2 { background: #E0B53A; } .gr-3 { background: #D9822B; } .gr-4 { background: #C2473A; }

.a-figure { margin: 2.2em 0; }
.a-figure img { width: 100%; height: auto; border-radius: 8px; }
.a-figure--portrait img { width: auto; max-width: 100%; max-height: min(78vh, 720px); margin: 0 auto; }

.a-close { margin-top: 3em; padding: clamp(28px, 3.4vw, 44px); border-radius: 8px; background: var(--navy-900); color: #C9D5E0; }
.a-close > * + * { margin-top: 1em; }
.a-close h2 { margin-top: 0; color: var(--white); }
.a-close strong { color: var(--white); }
.a-close a { color: var(--green-on-dark); }
.a-close a:hover { color: var(--white); }

/* Fim do artigo */
.article-end { display: grid; grid-template-columns: 232px minmax(0, 660px); gap: 0 clamp(48px, 6vw, 96px); padding-bottom: var(--section); }
.article-end > * { grid-column: 2; }
.author { margin-top: clamp(56px, 6vw, 80px); padding-top: 28px; border-top: 1px solid var(--ink-strong); }
.author__label { margin: 0 0 20px; font-size: 13px; font-weight: 600; color: var(--muted); }
.author__card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; }
.author__card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.author__name { font-family: var(--font-display); font-size: 20px; font-weight: 500; color: var(--ink-strong); }
.author__bio { margin: 8px 0 10px; font-size: 15.5px; line-height: 1.7; }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.post-nav__next { grid-column: 2; text-align: right; }
.post-nav__next .post-nav__dir { flex-direction: row-reverse; }
.post-nav a { display: block; padding: 22px 24px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; transition: border-color .2s ease, background-color .2s ease; }
.post-nav a:hover { border-color: var(--ink-strong); background: var(--surface); }
.post-nav__dir { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.post-nav__dir .ic { width: 16px; height: 16px; stroke-width: 2; }
.post-nav__title { display: block; margin-top: 6px; font-family: var(--font-display); font-size: 18px; line-height: 1.4; color: var(--ink-strong); }

@media (max-width: 1024px) {
  .article-layout, .article-end { grid-template-columns: minmax(0, 1fr); }
  .article-end > * { grid-column: 1; }
  .article-toc nav { position: static; margin-bottom: 40px; }
  .prose, .article-end { max-width: 660px; }
}
@media (max-width: 640px) {
  .prose { font-size: 17px; }
  .prose > p:first-child { font-size: 18.5px; }
  .prose blockquote { padding: 22px; font-size: 18px; }
  .crumbs__clip { max-width: 22ch; }
  .author__card { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
  .author__card img { width: 64px; height: 64px; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav__next { grid-column: 1; }
}
