/* =========================================================
   Páginas de artigo (ex.: /insalubridade-farmaceutico/)
   Complementa style.css — componentes próprios do artigo (prefixo a-)
   ========================================================= */

/* ---------- Abertura ---------- */
.a-hero { padding-block: clamp(3.5rem, 8vw, 6rem); border-bottom: 1px solid var(--line); }
.a-hero .split { align-items: center; }
.a-hero__title { font: 500 clamp(1.9rem, 4.2vw, 3rem)/1.18 var(--font-title); color: #fff; }
.a-hero .lead { margin-top: 1.5rem; max-width: 36rem; }
.a-hero__byline { margin-top: 1.5rem; font-size: .875rem; color: var(--muted); }
.a-hero__text { margin-top: 1rem; max-width: 36rem; }
.a-hero__cta { margin-top: 1.75rem; } /* botão de WhatsApp na abertura */

.a-cover { max-width: 480px; width: 100%; justify-self: center; }
.a-cover img {
  width: 100%; aspect-ratio: 1;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.a-cover--photo { max-width: 560px; }
.a-cover--photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.a-cover--wide { max-width: 560px; }
.a-cover--wide img { aspect-ratio: 16 / 9; object-fit: cover; }

/* Destaque "Bônus" abaixo do título — rola até a calculadora */
.a-bonus {
  display: grid; gap: .35rem;
  margin-top: 1.75rem; padding: 1.25rem 1.5rem;
  background: rgba(207, 174, 102, .08);
  border: 1px solid rgba(207, 174, 102, .45); border-radius: var(--radius);
  transition: background-color .2s, border-color .2s, transform .2s;
}
.a-bonus:hover { background: rgba(207, 174, 102, .14); border-color: var(--gold); transform: translateY(-1px); }
.a-bonus__tag {
  justify-self: start;
  padding: .2rem .6rem;
  font-size: .65rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bg); background: var(--gold); border-radius: 999px;
}
.a-bonus__title { margin-top: .25rem; font: 500 1.2rem/1.3 var(--font-title); color: #fff; }
.a-bonus__text { font-size: .9rem; color: var(--muted); }
.a-bonus__cta { margin-top: .4rem; font-size: .9rem; font-weight: 600; color: var(--gold); }

/* Foto no meio do texto */
.a-photo { margin: 2rem 0; }
.a-photo img { width: 100%; height: auto; border-radius: var(--radius); }

/* Imagem de documento (ex.: trecho da NR-15) — fundo claro, legível */
.a-doc { margin: 1.5rem 0 2rem; }
.a-doc img {
  width: 100%;
  padding: 1rem;
  background: #fff;
  border-radius: var(--radius);
}
.a-doc figcaption { margin-top: .75rem; font-size: .8rem; color: var(--muted); }

/* ---------- Corpo do texto ---------- */
.a-body { max-width: 46rem; padding-block: clamp(3rem, 7vw, 5rem); font-size: 1.04rem; }
.a-body > p, .a-body section > p { margin-top: 1rem; color: #d3dbe6; }
.a-body section { padding-top: 2.5rem; }
.a-body h2 {
  margin: 1rem 0 1.25rem;
  font: 500 clamp(1.4rem, 2.8vw, 1.85rem)/1.3 var(--font-title); color: #fff;
}
.a-body h3 { margin: 2.5rem 0 .25rem; font-size: 1.15rem; font-weight: 600; color: #fff; }

.a-label {
  display: block; margin-bottom: .75rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
}

.a-answer { padding-left: 1rem; border-left: 2px solid var(--gold); }
.a-answer strong { color: var(--gold-light); }
.a-takeaway { font-weight: 500; color: #fff !important; }

/* ---------- Citação de jurisprudência ---------- */
.a-juris {
  margin: 2rem 0;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.a-juris blockquote { margin: 0; }
.a-juris blockquote p { font-size: .9rem; line-height: 1.75; color: var(--muted); }
.a-juris blockquote strong { color: var(--text); font-weight: 600; }
.a-juris__ref { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }

/* ---------- Lista de atividades ---------- */
.a-items { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.a-items li { display: grid; gap: .25rem 1.5rem; padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.a-items li:first-child { border-top: 1px solid var(--line); }
@media (min-width: 640px) { .a-items li { grid-template-columns: 10rem 1fr; } }
.a-items strong { font-size: .95rem; color: var(--gold-light); }
.a-items span { font-size: .95rem; color: #d3dbe6; }

/* ---------- Conta ---------- */
.a-calc {
  margin: 1.75rem 0;
  padding: .5rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.a-calc p { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: .8rem; margin: 0; }
.a-calc p + p { border-top: 1px dashed var(--line); }
.a-calc span { font-size: .9rem; color: var(--muted); }
.a-calc strong { font-variant-numeric: tabular-nums; }
.a-calc .a-calc__result { border-top: 1px solid var(--gold); }
.a-calc__result strong { font: 500 1.4rem/1.2 var(--font-title); color: var(--gold); }

/* ---------- Prazos ---------- */
.a-facts {
  display: grid; gap: 1px; margin: 1.5rem 0;
  background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 640px) { .a-facts { grid-template-columns: 1fr 1fr; } }
.a-facts > div { padding: 1.5rem; background: var(--bg); }
.a-facts strong { display: block; font: 500 1.6rem/1.2 var(--font-title); color: var(--gold); }
.a-facts span { display: block; margin-top: .5rem; font-size: .9rem; color: var(--muted); }

/* ---------- Perguntas ---------- */
.a-questions { list-style: none; padding: 0; margin: 1.5rem 0; }
.a-questions li {
  position: relative;
  padding: .85rem 0 .85rem 2.25rem;
  border-bottom: 1px solid var(--line);
  color: #fff;
}
.a-questions li::before {
  content: "?";
  position: absolute; left: 0; top: .85rem;
  display: grid; place-items: center;
  width: 1.4rem; height: 1.4rem;
  border: 1px solid var(--gold); border-radius: 50%;
  font-size: .75rem; color: var(--gold);
}

/* ---------- Exemplo prático ---------- */
.a-example {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line); border-left: 2px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0;
}
.a-example > p { font-size: .97rem; color: #d3dbe6; }
.a-example > p + p, .a-example > .a-calc + p { margin-top: .75rem; }
.a-example .a-label { margin-bottom: .6rem; }
.a-example .a-calc { margin: 1rem 0; background: var(--bg); }
.a-example .a-calc:last-child { margin-bottom: 0; }
.a-body a:not(.btn):not(.a-bonus) { color: var(--gold); border-bottom: 1px solid rgba(207, 174, 102, .4); }
.a-body a:not(.btn):not(.a-bonus):hover { border-color: var(--gold); }

/* ---------- Lista com marcação ---------- */
.a-checklist { list-style: none; padding: 0; margin: 1rem 0; }
.a-checklist li { position: relative; padding: .45rem 0 .45rem 1.6rem; color: #d3dbe6; }
.a-checklist li::before {
  content: ""; position: absolute; left: .2rem; top: .95rem;
  width: .55rem; height: .3rem;
  border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg);
}

/* ---------- Ficha (ex.: anotação do trabalhador) ---------- */
.a-sheet { margin: 1rem 0 0; }
.a-sheet div { display: grid; gap: .1rem 1rem; padding-block: .6rem; border-bottom: 1px dashed var(--line); }
.a-sheet div:last-child { border-bottom: 0; }
@media (min-width: 640px) { .a-sheet div { grid-template-columns: 11rem 1fr; } }
.a-sheet dt { font-size: .82rem; color: var(--muted); }
.a-sheet dd { margin: 0; font-size: .95rem; color: #fff; }

/* ---------- Lista em etiquetas ---------- */
.a-tags { list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.a-tags li {
  padding: .45rem .9rem;
  font-size: .88rem; line-height: 1.4; color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}

/* ---------- Frase em destaque ---------- */
.a-quote {
  margin: 1.25rem 0;
  font: 500 clamp(1.25rem, 2.6vw, 1.6rem)/1.35 var(--font-title);
  color: var(--gold-light);
}

/* ---------- Tabela ---------- */
.a-table {
  margin: 1.75rem 0; overflow-x: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.a-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.a-table th, .a-table td { padding: .95rem 1.25rem; text-align: left; border-bottom: 1px solid var(--line); }
.a-table tbody tr:last-child > * { border-bottom: 0; }
.a-table thead th {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); background: var(--surface);
}
.a-table tbody th { font-weight: 500; color: #fff; }
.a-table td { color: var(--muted); font-variant-numeric: tabular-nums; }
.a-table td:last-child { text-align: right; }
.a-table thead th:last-child { text-align: right; }
.a-table .is-hl { background: rgba(207, 174, 102, .08); }
.a-table .is-hl th, .a-table .is-hl td { color: var(--gold); font-weight: 600; }

/* ---------- Autor ---------- */
.a-author {
  display: flex; align-items: center; gap: 1.25rem;
  margin-top: 3.5rem; padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.a-author img { width: 72px; height: 72px; object-fit: cover; object-position: 50% 20%; border-radius: 50%; }
.a-author .a-label { margin-bottom: .25rem; }
.a-author__name { font: 500 1.1rem/1.3 var(--font-title); color: #fff; }
.a-author .muted { font-size: .875rem; }

.a-disclaimer { margin-top: 2rem !important; font-size: .8rem; color: var(--muted) !important; }

/* ---------- Chamada final ---------- */
.a-cta { text-align: center; }
.a-cta .muted { margin: 1rem auto 2rem; max-width: 36rem; }
.a-cta .muted + .muted { margin-top: -1rem; } /* dois parágrafos seguidos ficam com 1rem entre eles */
.a-cta .a-cta__nota { margin: 1.5rem auto 0; max-width: 34rem; font-size: .8rem; color: var(--muted); } /* aviso abaixo do botão */

/* ---------- Calculadora ---------- */
.calc-form { display: grid; gap: 1.1rem; }
.calc-form .btn { justify-self: start; }
.calc-form input[type="date"] { color-scheme: dark; min-height: 3rem; }
.calc-form [aria-invalid="true"] { border-color: #f0a0a0; }
.calc-form .form__status:empty { display: none; }

.calc-choice { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.calc-choice legend { width: 100%; margin-bottom: .5rem; padding: 0; font-size: .8rem; color: var(--muted); }
.calc-choice label { position: relative; cursor: pointer; }
.calc-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.calc-choice span {
  display: inline-block; min-width: 6rem; padding: .7rem 1.25rem; text-align: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  transition: border-color .2s, background-color .2s, color .2s;
}
.calc-choice input:checked + span { border-color: var(--gold); background: rgba(207, 174, 102, .12); color: var(--gold-light); }
.calc-choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }

.calc-result { margin-top: 2.5rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.calc-result:focus { outline: none; }

.calc-total {
  padding: 1.5rem;
  background: rgba(207, 174, 102, .08);
  border: 1px solid rgba(207, 174, 102, .45); border-radius: var(--radius);
  text-align: center;
}
.calc-total span { display: block; font-size: .95rem; color: var(--text); }
.calc-total strong {
  display: block; margin-top: .35rem;
  font: 500 clamp(2rem, 7vw, 2.75rem)/1.15 var(--font-title); color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.calc-total small { display: block; margin-top: .35rem; font-size: .8rem; color: var(--muted); }

.calc-seguro {
  margin-top: 1rem; padding: 1rem 1.25rem;
  font-size: .95rem; color: var(--text);
  border: 1px dashed rgba(207, 174, 102, .45); border-radius: var(--radius);
}
.calc-seguro strong { color: var(--gold-light); }

.calc-loss__intro { margin: 2rem 0 1rem; font-weight: 500; color: #fff; }
.calc-loss { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
@media (min-width: 560px) { .calc-loss { grid-template-columns: 1fr 1fr; } }
.calc-loss li {
  display: grid; gap: .15rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.calc-loss span { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.calc-loss strong { font-size: 1.3rem; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.calc-loss small { font-size: .8rem; line-height: 1.45; color: var(--muted); }
.calc-loss__inss { border-style: dashed !important; grid-column: 1 / -1; }

.calc-detail__title { margin: 2.25rem 0 .5rem; font: 500 1.15rem/1.3 var(--font-title); color: #fff; }
.calc-detail { margin: 0; }
.calc-detail div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-block: .8rem; border-bottom: 1px solid var(--line);
}
.calc-detail dt { font-size: .95rem; }
.calc-detail dt small { display: block; margin-top: .1rem; font-size: .8rem; color: var(--muted); }
.calc-detail dd { margin: 0; white-space: nowrap; font-weight: 500; font-variant-numeric: tabular-nums; }
.calc-detail .calc-detail__total { border-bottom: 0; border-top: 1px solid var(--gold); margin-top: -1px; }
.calc-detail__total dt, .calc-detail__total dd { color: var(--gold); font-weight: 600; }

.calc-note { margin-top: 1.25rem; font-size: .9rem; color: var(--muted); }
.calc-note strong { color: #fff; }
.calc-cta { margin-top: 2rem; }
.calc-disclaimer { margin-top: 1.25rem; font-size: .8rem; color: var(--muted); }

/* ---------- Texto justificado (laterais alinhadas) ---------- */
/* Ative com class="a-justificado" no <main>. Só o texto corrido: títulos, listas curtas e botões continuam à esquerda. */
.a-justificado .a-hero .lead, .a-justificado .a-hero p.muted,
.a-justificado .a-body > p, .a-justificado .a-body section > p,
.a-justificado .a-items span, .a-justificado .a-example > p, .a-justificado .a-facts span,
.a-justificado .a-prof p, .a-justificado .a-ctabox p {
  text-align: justify;
}
@media (max-width: 640px) {
  /* Em colunas estreitas, a separação de sílabas evita espaços grandes entre as palavras */
  .a-justificado .a-hero .lead, .a-justificado .a-hero p.muted,
  .a-justificado .a-body > p, .a-justificado .a-body section > p,
  .a-justificado .a-items span, .a-justificado .a-example > p, .a-justificado .a-facts span,
  .a-justificado .a-prof p, .a-justificado .a-ctabox p {
    -webkit-hyphens: auto; hyphens: auto;
  }
}

/* ---------- Ícone em círculo (profissões) ---------- */
.a-icone {
  display: grid; place-items: center; flex-shrink: 0;
  width: 2.5rem; height: 2.5rem;
  color: var(--gold);
  border: 1px solid rgba(207, 174, 102, .6); border-radius: 50%;
}
.a-icone svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.a-icone--num { font: 500 1.15rem/1 var(--font-title); } /* número do passo no lugar do ícone */

/* Índice da abertura: atalhos para cada tópico */
.a-indice {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: var(--radius);
}
.a-indice .panel__title { font-size: 1.1rem; }
.a-indice ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .55rem; }
.a-indice a {
  display: grid; grid-template-columns: 2.5rem 1fr auto; align-items: center; gap: .9rem;
  padding: .7rem 1rem;
  font-size: .95rem; font-weight: 500; line-height: 1.4; color: #fff;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, background-color .2s, transform .2s;
}
.a-indice a::after { content: "↓"; color: var(--gold); }
.a-indice a:hover { border-color: var(--gold); background: rgba(207, 174, 102, .08); transform: translateX(2px); }

/* ---------- Profissões ---------- */
.a-profs { display: grid; gap: 1rem; margin: 1.5rem 0 0; }
.a-prof {
  display: grid; grid-template-columns: 3rem 1fr; gap: 1.25rem; align-items: start;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s;
}
.a-prof:target, .a-prof:hover { border-color: rgba(207, 174, 102, .5); }
.a-prof .a-icone { width: 3rem; height: 3rem; }
.a-prof .a-icone svg { width: 1.5rem; height: 1.5rem; }
.a-body .a-prof h3 { margin: .55rem 0 .5rem; }
.a-prof p { font-size: .97rem; color: #d3dbe6; }
.a-prof__foto { margin: 1.25rem 0 0; }
.a-prof__foto img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.a-body a.a-prof__link { display: inline-block; margin-top: 1rem; font-size: .9rem; font-weight: 500; }
.a-prof p + p { margin-top: .75rem; }
.a-prof .a-checklist { margin: .75rem 0; }
.a-prof .a-example { margin: 1.25rem 0 0; background: var(--bg); }

/* Chamada no meio do texto */
.a-ctabox {
  display: grid; gap: 1rem; justify-items: start;
  margin: 2rem 0 0; padding: 1.5rem;
  background: rgba(207, 174, 102, .08);
  border: 1px solid rgba(207, 174, 102, .45); border-radius: var(--radius);
}
.a-ctabox p { font-weight: 500; color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
  .a-indice { padding: 1.5rem 1.25rem; }
  .a-prof { grid-template-columns: 1fr; gap: .75rem; padding: 1.25rem; } /* ícone acima do título; texto e foto na largura toda */
  .a-prof .a-icone { width: 2.5rem; height: 2.5rem; }
  .a-body .a-prof h3 { margin-top: 0; }
  .a-prof .a-icone svg { width: 1.25rem; height: 1.25rem; }
  .a-ctabox { padding: 1.25rem; }
  .a-ctabox .btn { width: 100%; }
  .a-hero__cta.btn { width: 100%; padding-inline: 1rem; font-size: .92rem; line-height: 1.3; text-align: center; text-wrap: balance; }
  .a-juris { padding: 1.4rem; }
  .a-doc img { padding: .5rem; }
  .a-calc { padding-inline: 1rem; }
  .a-calc p { flex-direction: column; gap: .15rem; }
  .a-example { padding: 1.15rem; }
  .calc-form .btn, .calc-cta { width: 100%; }
  .calc-choice label { flex: 1; }
  .calc-choice span { width: 100%; }
}

/* ---------- Impressão ---------- */
@media print {
  :root { --text: #1d2635; --muted: #4f5b6d; --line: #d9dee6; --gold: #8a6a2c; --gold-light: #8a6a2c; --surface: #f5f6f8; --bg: #fff; --bg-alt: #fff; }
  body { background: #fff; color: var(--text); font-size: 11pt; }
  .header, .fab, .a-cta, .skip-link, .footer, .a-bonus, #calculadora, .a-indice, .a-ctabox { display: none !important; }
  h1, h2, h3, strong, .a-hero__title, .a-takeaway, .a-questions li, .a-author__name { color: #111 !important; }
  .a-body > p, .a-body section > p, .a-items span { color: var(--text) !important; }
  .split { display: block; }
  .split > * + * { margin-top: 1.25rem; }
  .a-juris, .a-doc, .a-cover, .a-calc, .a-facts { break-inside: avoid; }
}
