/* Blog do Sr. Mercado: só o que é do blog (Artefatos/bloco-3-2, R8).
   Cabeçalho, rodapé, fontes, tokens, .wrap, .btn, .h2/.h3 e o tema vêm do CSS do site
   (/_casca/site.css), carregado antes deste. Sem estilo inline: a CSP do blog é
   style-src 'self'. O CSS do site traz o preflight do Tailwind (zera listas, sublinhado
   de link, margens e peso de título): o que o texto do post precisa está declarado aqui. */

/* Tipografia */
.pagina { padding-top: 2.5rem; }
.titulo { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.02; letter-spacing: -.03em; margin: 1.5rem 0 0; max-width: 52rem; text-wrap: balance; }
.pagina .lead { margin-top: 1.25rem; }
.meta, .sutil { color: var(--ink-subtle); font-size: .9rem; }
.forte { font-weight: 600; margin: 0 0 .5rem; }
.vazio { margin-top: 3rem; color: var(--ink-muted); }

.migalha ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; color: var(--ink-subtle); font-size: .9rem; }
.migalha li + li::before { content: '/'; margin-right: .5rem; }
.migalha a { text-decoration: none; }
.migalha a:hover { color: var(--ink); }

/* Temas */
.temas { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; }
.temas a { padding: .35rem .85rem; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; }
.temas a span { color: var(--ink-subtle); }
.temas a:hover, .temas a[aria-current='page'] { border-color: var(--ink); }

/* A lista como linha do tempo: eixo laranja, um marco por post. */
.tl-posts { position: relative; list-style: none; margin: 3rem 0 0; padding: 0 0 0 2.25rem; max-width: 46rem; }
.tl-posts::before { content: ''; position: absolute; left: .6rem; top: .5rem; bottom: .5rem; width: 4px; border-radius: 2px; background: #fca311; }
.tl-posts > li { position: relative; padding-bottom: 2.5rem; }
.tl-posts > li::before { content: ''; position: absolute; left: -2.25rem; top: .3rem; width: 1.45rem; height: 1.45rem; border-radius: 999px; background: var(--accent); border: 4px solid var(--surface); }
.tl-posts time { color: var(--ink-subtle); font-size: .9rem; }
.tl-posts h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.15; letter-spacing: -.02em; margin: .35rem 0 .5rem; }
.tl-posts h2 a { text-decoration: none; }
.tl-posts h2 a:hover { text-decoration: underline; text-decoration-color: #fca311; text-decoration-thickness: 3px; text-underline-offset: .18em; }
.tl-posts p { margin: 0; color: var(--ink-muted); }
.tl-posts .meta { margin-top: .5rem; }

.paginas { display: flex; justify-content: space-between; align-items: center; max-width: 46rem; margin-top: 1rem; color: var(--ink-subtle); }
.paginas a { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }

/* Post */
.post-topo .meta { margin-top: 1rem; }
.post-topo .meta a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.capa { margin: 2.25rem 0 0; }
.capa img { display: block; width: 100%; border-radius: 1.25rem; border: 1px solid var(--line); }
.post-grade { margin-top: 2.5rem; }
.corpo { max-width: 42rem; }
.corpo h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 1.95rem); line-height: 1.15; letter-spacing: -.02em; margin: 3rem 0 1rem; }
.corpo h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; margin: 2rem 0 .75rem; }
.corpo h4 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.corpo p { margin: 0 0 1.1rem; }
.corpo a { text-decoration: underline; text-decoration-color: #fca311; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.corpo ul, .corpo ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.corpo ul { list-style: disc; }
.corpo ol { list-style: decimal; }
.corpo li { margin-bottom: .5rem; }
.corpo blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid #fca311; color: var(--ink-muted); }
.corpo code { font-size: .92em; background: var(--surface-sunken); padding: .1rem .35rem; border-radius: .3rem; }
.corpo pre { overflow-x: auto; background: var(--surface-sunken); padding: 1rem; border-radius: .75rem; }
.corpo pre code { background: none; padding: 0; }
.corpo table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.corpo th, .corpo td { border-bottom: 1px solid var(--line); padding: .6rem .75rem; text-align: left; }
.corpo picture img { border-radius: 1rem; }
.corpo hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* Sumário. Desktop (>= 1024px): coluna à direita, grudada abaixo do cabeçalho enquanto o
   texto rola. Celular: barra grudada sob o cabeçalho (4.25rem) que abre a lista e mostra a
   seção atual (sumario.js). Uma lista de cada vez na tela. */
.sumario ol, .sumario-movel ol { list-style: decimal; margin: 0; padding-left: 1.1rem; color: var(--ink-muted); font-size: .95rem; }
.sumario li, .sumario-movel li { margin: 0 0 .55rem; }
.sumario a, .corpo .sumario-movel a { color: inherit; text-decoration: none; }
.sumario a:hover, .corpo .sumario-movel a:hover { color: var(--ink); text-decoration: underline; }
.sumario a[aria-current], .corpo .sumario-movel a[aria-current] { color: var(--ink); font-weight: 600; }
.corpo h2[id], .corpo h3[id] { scroll-margin-top: 6rem; }

.lateral { display: none; }
.sumario-movel-nav { position: sticky; top: 4.25rem; z-index: 20; margin: 0 0 2.25rem; }
.sumario-movel { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #fca311; border-radius: .9rem; }
.sumario-movel summary { display: flex; align-items: center; gap: .6rem; min-height: 3rem; padding: .5rem 2.75rem .5rem 1rem; cursor: pointer; list-style: none; position: relative; }
.sumario-movel summary::-webkit-details-marker { display: none; }
.sumario-movel summary::after { content: ''; position: absolute; right: 1.1rem; top: 50%; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform 160ms; }
.sumario-movel[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.sumario-atual { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-muted); font-size: .9rem; }
.sumario-atual:not(:empty)::before { content: '·'; margin-right: .6rem; }
.sumario-movel ol { max-height: 60dvh; overflow-y: auto; padding: .25rem 1rem 1rem 2.1rem; }
@media (max-width: 1023.98px) { .corpo h2[id], .corpo h3[id] { scroll-margin-top: 8.5rem; } }

@media (min-width: 1024px) {
  .post-grade.com-sumario { display: grid; grid-template-columns: minmax(0, 42rem) minmax(13rem, 17rem); justify-content: space-between; column-gap: 4rem; align-items: start; }
  .sumario-movel-nav { display: none; }
  .lateral { display: block; position: sticky; top: 6.25rem; }
  .sumario { border-left: 4px solid #fca311; padding: .25rem 0 .25rem 1.25rem; max-height: calc(100dvh - 8rem); overflow-y: auto; }
  .sumario .forte { margin: 0 0 .9rem; }
}

.fontes ul { font-size: .95rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { display: inline; font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 600; margin: 0; }
.faq summary::after { content: '+'; position: absolute; right: .25rem; top: 50%; translate: 0 -50%; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { color: var(--ink-muted); }

.corpo .aviso { margin-top: 2.5rem; color: var(--ink-subtle); font-size: .95rem; }
.chamada { margin-top: 2.5rem; padding: 1.75rem; border: 1px solid var(--line); border-radius: 1.25rem; }
.chamada p:not(.h3) { color: var(--ink-muted); margin: .5rem 0 1.25rem; }
.relacionados { margin-top: 5rem; }

/* Faixa da pré-visualização (página de revisão) */
.faixa-revisao { margin: 0 0 1.5rem; padding: 1rem 1.25rem; border-radius: 1rem; background: #fca311; color: #000; }
.faixa-revisao p { margin: 0; }

/* Casca de reserva (blog-service/src/casca.js): só aparece se o blog nunca recebeu a
   casca do site. Mínima de propósito. */
.reserva-topo { border-bottom: 1px solid var(--line); }
.reserva-topo .wrap { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; }
.reserva-marca { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-decoration: none; }
.reserva-rodape { margin-top: 6rem; border-top: 1px solid var(--line); padding-block: 2rem; color: var(--ink-muted); font-size: .875rem; }
.pular { position: absolute; left: -999px; }
.pular:focus { left: 1rem; top: .75rem; background: var(--surface); padding: .5rem .75rem; border-radius: .5rem; z-index: 50; }
