/* ==========================================================================
   SD Digital: artigos (blog), 23/11/2026
   Complemento de sd-premium.css. Usa só as variáveis do :root de lá.
   Leitura: coluna de cerca de 68 caracteres, entrelinha 1,75, respiro nos
   títulos, tabelas e caixas de exemplo discretas.
   ========================================================================== */

/* ------------------------------------------------------ barra de leitura */
.b-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.b-progress i { display: block; height: 100%; background: var(--silver-h); transform-origin: 0 50%; transform: scaleX(0); }

/* ------------------------------------------- grade: sumário + coluna de texto */
.b-layout { display: grid; grid-template-columns: 210px minmax(0, 660px); column-gap: clamp(56px, 7vw, 104px); justify-content: center; }

/* ------------------------------------------------------- topo do artigo */
.b-hero { padding: 152px 0 56px; }
.b-hero::before { top: -4%; }
.b-hero::after { -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 20%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse 60% 70% at 50% 20%, #000 10%, transparent 70%); }
.b-hero-copy { grid-column: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; min-width: 0; }
.b-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); }
.b-crumbs a { color: var(--muted); transition: color .25s; }
.b-crumbs a:hover { color: var(--text); }
.b-crumbs > span:last-child { color: var(--muted); }
.b-h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(36px, 4.8vw, 60px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.b-dek { margin: 0; font-size: clamp(18px, 1.55vw, 21px); line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.b-meta { width: 100%; margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; row-gap: 8px; font-size: 13px; color: var(--dim); }
.b-meta > span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 12px 0; border-radius: 50%; background: var(--dim); vertical-align: middle; }
.b-meta a { color: var(--text); }

/* ---------------------------------------------------------------- corpo */
.b-body { position: relative; padding: clamp(24px, 3vw, 40px) 0 clamp(56px, 6vw, 80px); }

/* sumário fixo (telas largas) */
.b-toc { position: sticky; top: 112px; align-self: start; max-height: calc(100vh - 140px); overflow-y: auto; scrollbar-width: none; }
.b-toc::-webkit-scrollbar { display: none; }
.b-toc-title { margin: 6px 0 18px; font: 500 11px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.b-toc ol, .b-toc-m ol { list-style: none; margin: 0; padding: 0; }
.b-toc ol { border-left: 1px solid var(--line); }
.b-toc a { display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 1px solid transparent; font-size: 13.5px; line-height: 1.45; color: var(--dim); transition: color .25s, border-color .25s; }
.b-toc a:hover { color: var(--muted); }
.b-toc a.is-active { color: var(--text); border-left-color: var(--text); }

/* sumário recolhível (telas estreitas) */
.b-toc-m { display: none; margin: 0 0 40px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.b-toc-m summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font: 500 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.b-toc-m summary::-webkit-details-marker { display: none; }
.b-toc-m summary i { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); position: relative; }
.b-toc-m summary i::before, .b-toc-m summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 1.5px; background: var(--text); transform: translate(-50%, -50%); }
.b-toc-m summary i::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .4s var(--ease); }
.b-toc-m[open] summary i::after { transform: translate(-50%, -50%) rotate(0deg); }
.b-toc-m ol { padding: 4px 18px 14px; border-top: 1px solid var(--line); }
.b-toc-m li + li { border-top: 1px solid var(--line); }
.b-toc-m a { display: block; padding: 11px 0; font-size: 15px; line-height: 1.4; color: var(--muted); }

/* ---------------------------------------------------------------- texto */
.b-prose { min-width: 0; font-size: 18px; line-height: 1.75; color: var(--muted); color: color-mix(in srgb, var(--text) 82%, var(--bg)); text-wrap: pretty; }
.b-prose p { margin: 0 0 1.3em; }
.b-prose .b-lede { font-size: 1.14em; line-height: 1.65; color: var(--text); }
.b-prose h2 { margin: 2.4em 0 .75em; font: 600 clamp(26px, 2.5vw, 34px)/1.16 var(--display); letter-spacing: -0.025em; color: var(--text); text-wrap: balance; scroll-margin-top: 104px; }
.b-prose h3 { margin: 1.9em 0 .55em; font: 600 clamp(19px, 1.7vw, 22px)/1.3 var(--display); letter-spacing: -0.015em; color: var(--text); text-wrap: balance; scroll-margin-top: 104px; }
.b-prose h2 + h3 { margin-top: 1.2em; }
.b-prose strong { font-weight: 600; color: var(--text); }
.b-prose em { font-style: italic; }
.b-prose a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--dim); transition: text-decoration-color .25s; }
.b-prose a:hover { text-decoration-color: var(--text); }

/* listas */
.b-prose ul, .b-prose ol { list-style: none; margin: 0 0 1.5em; padding: 0; }
.b-prose li { position: relative; margin: .6em 0; padding-left: 26px; }
.b-prose ul > li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--silver); }
.b-prose ol { counter-reset: b-n; }
.b-prose ol > li { counter-increment: b-n; padding-left: 42px; }
.b-prose ol > li::before { content: counter(b-n); position: absolute; left: 0; top: .18em; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2);
  font: 600 12px/24px var(--body); text-align: center; color: var(--text); background: var(--surface); }

/* citação */
.b-prose blockquote { position: relative; margin: 2.2em 0; padding: 6px 0 6px 30px; }
.b-prose blockquote::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: var(--silver); }
.b-prose blockquote p { margin: 0; font: 500 clamp(26px, 2.8vw, 34px)/1.2 var(--display); letter-spacing: -0.03em; color: var(--text); }
.b-prose blockquote cite { display: block; margin-top: 14px; font: 400 14px/1.5 var(--body); font-style: normal; color: var(--dim); }

/* tabela */
.b-table { margin: 1.8em 0 2em; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
.b-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.b-table th { padding: 14px 18px; text-align: left; vertical-align: bottom; font: 500 11px/1.4 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); background: var(--surface); border-bottom: 1px solid var(--line); }
.b-table td { padding: 13px 18px; vertical-align: top; color: var(--muted); border-top: 1px solid var(--line); }
.b-table tbody tr:first-child td { border-top: 0; }
.b-table td:first-child { color: var(--text); }
.b-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.b-table td.r { white-space: nowrap; }
.b-table strong { color: var(--text); }
.b-table tr:has(strong) td { background: var(--surface); }

/* caixa de exemplo */
.b-box { position: relative; margin: 2.2em 0; padding: clamp(24px, 3vw, 34px); border-radius: var(--radius); border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); overflow: hidden; isolation: isolate; }
.b-box::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2) 30%, var(--muted) 50%, var(--line-2) 70%, transparent); opacity: .7; }
.b-box-label { display: inline-flex; align-items: center; gap: 10px; font: 500 11px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.b-box-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--silver); }
.b-box .b-box-title { margin: 14px 0 16px; font: 600 clamp(19px, 1.7vw, 22px)/1.3 var(--display); letter-spacing: -0.015em; color: var(--text); }
.b-box-label + p:not(.b-box-title) { margin-top: 16px; }
.b-box p { font-size: 16px; line-height: 1.7; }
.b-box > :last-child { margin-bottom: 0; }
.b-box .b-table { margin: 1.4em 0; background: var(--bg); }
.b-box .b-table:last-child { margin-bottom: 0; }

/* fórmula */
.b-formula { position: relative; margin: 1.8em 0; padding: 22px 26px 22px 30px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.b-formula::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 2px; border-radius: 0 2px 2px 0; background: var(--silver); }
.b-prose .b-formula p { margin: 0; }
.b-prose .b-formula-eq { font: 500 clamp(17px, 1.6vw, 20px)/1.45 var(--display); letter-spacing: -0.01em; color: var(--text); }
.b-prose .b-formula p + p { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--dim); }

/* perguntas frequentes dentro do texto */
.b-prose .b-faq { max-width: none; margin: 0; }
.b-prose .b-faq summary { color: var(--text); }
.b-prose .b-faq details p { font-size: 16.5px; line-height: 1.7; max-width: none; }
.b-prose .b-faq details p:last-child { margin-bottom: 26px; }

/* quem escreve */
.b-author { margin-top: clamp(64px, 8vw, 96px); display: grid; grid-template-columns: 72px 1fr; gap: 24px; padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.b-author-mark .x-coin { width: 72px; }
.b-author-mark .x-coin::before { inset: -30%; }
.b-prose .b-author p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }
.b-prose .b-author .b-author-name { font: 600 19px/1.2 var(--display); letter-spacing: -0.015em; color: var(--text); }
.b-prose .b-author .b-author-role { margin: 4px 0 14px; font-size: 13px; color: var(--dim); }
.b-author-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; }
.b-prose .b-author-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text); }
.b-author-links svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.b-author-links a:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------- cartões */
.b-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.b-card { display: flex; flex-direction: column; min-height: 320px; padding: clamp(28px, 3.2vw, 40px); }
.b-card-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; color: var(--dim); }
.b-card-tag { display: inline-flex; align-items: center; gap: 10px; font: 500 11px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.b-card-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--silver); box-shadow: 0 0 12px var(--muted); }
.b-card .b-card-title { margin: auto 0 0; padding-top: 48px; font: 600 clamp(24px, 2.3vw, 31px)/1.12 var(--display); letter-spacing: -0.03em; color: var(--text); text-wrap: balance; }
.b-card .b-card-sum { margin: 14px 0 0; max-width: 520px; font-size: 15.5px; line-height: 1.6; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.b-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.b-card-go { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.b-card-go svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.b-card:hover .b-card-go svg { transform: translateX(4px); }

/* lista de artigos */
.b-hero-list { padding-bottom: clamp(56px, 7vw, 88px); }
.b-list { padding-top: 0; }

/* continue lendo */
.b-more { padding-top: clamp(64px, 7vw, 104px); border-top: 1px solid var(--line); }
.b-more .x-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px 40px; margin-bottom: clamp(36px, 4vw, 56px); }
.b-more .x-h2 { font-size: clamp(32px, 3.6vw, 48px); }
.b-more-cta { flex-direction: row !important; }

/* ------------------------------------------------------------ responsivo */
@media (max-width: 1099px) {
  .b-layout { grid-template-columns: minmax(0, 680px); }
  .b-hero-copy { grid-column: 1; }
  .b-toc { display: none; }
  .b-toc-m { display: block; }
}
@media (max-width: 991px) {
  .b-hero { padding-top: 124px; }
}
@media (max-width: 760px) {
  .b-grid { grid-template-columns: 1fr; }
  .b-card { min-height: 0; }
  .b-card .b-card-title { padding-top: 36px; }
}
@media (max-width: 600px) {
  .b-hero { padding: 112px 0 40px; }
  .b-hero-copy { gap: 20px; }
  .b-prose { font-size: 17px; line-height: 1.72; }
  .b-prose .b-lede { font-size: 1.1em; }
  .b-prose h2 { margin-top: 2.1em; }
  .b-formula { padding: 18px 18px; }
  .b-box { margin-left: calc(var(--gutter) * -0.4); margin-right: calc(var(--gutter) * -0.4); }
  .b-table th, .b-table td { padding: 12px 14px; }
  .b-table table { font-size: 14px; }
  .b-author { grid-template-columns: 1fr; gap: 18px; }
  .b-author-mark .x-coin { width: 60px; margin: 0; }
  /* tabela de texto vira lista de cartões */
  .b-table--stack { border: 0; border-radius: 0; background: none; overflow: visible; }
  .b-table--stack table, .b-table--stack tbody, .b-table--stack tr, .b-table--stack td { display: block; width: 100%; }
  .b-table--stack thead { display: none; }
  .b-table--stack tr { margin-bottom: 10px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
  .b-table--stack td { display: grid; grid-template-columns: minmax(96px, 36%) 1fr; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
  .b-table--stack tbody tr td:first-child { display: block; padding: 8px 0 10px; border-top: 0; font-weight: 600; }
  .b-table--stack td::before { content: attr(data-label); font: 500 10.5px/1.55 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
  .b-table--stack td:first-child::before { display: none; }
  .b-table--stack .r { text-align: left; white-space: normal; }
}
