/* =========================================================
   MANUAL DO FAZENDEIRO (03/12/2026)
   Carrega depois do styles.css e do blog.css (mesmas cores e fontes).
   A página é gerada por _ferramentas/gerar-manual.js.
   ========================================================= */

.mn { padding: 40px 0 128px; }
.mn-cab { max-width: 880px; margin-bottom: 48px; }
.mn-cab .migalha { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }
.mn-cab .migalha a { color: var(--ink-soft); text-decoration: none; }
.mn-cab h1 { font-size: 56px; line-height: 1.15; letter-spacing: -.04em; text-wrap: balance; }
.mn-lead { margin-top: 24px; font-size: 20px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; max-width: 720px; }
.mn-data { margin-top: 16px; font-size: 14px; color: var(--ink-soft); }

.mn-grade { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; }

/* ---------- índice lateral ---------- */
.mn-indice { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; padding: 24px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.mn-indice summary { list-style: none; font-family: var(--f-tit); font-weight: 500; font-size: 16px; color: var(--ink); cursor: default; pointer-events: none; }
.mn-indice summary::-webkit-details-marker { display: none; }
.mn-indice ol { list-style: none; margin: 0; padding: 0; }
.mn-indice > details > ol > li { margin-top: 16px; }
.mn-indice > details > ol > li > span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: 4px; }
.mn-indice ol ol a { display: block; padding: 4px 12px; margin-left: -12px; border-radius: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); text-decoration: none; transition: background .2s, color .2s; }
.mn-indice ol ol a.ativo { background: var(--verde-dil); color: var(--green-deep); font-weight: 500; }
@media (hover: hover) { .mn-indice ol ol a:hover { color: var(--green); } }

/* ---------- corpo ---------- */
.mn-corpo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.mn-grupo { padding: 48px; border-radius: 32px; background: #fff; border: 1px solid var(--line); }
.mn-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--amber-deep); }
.mn-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--amber-light), var(--amber-deep)); }
.mn-sec { scroll-margin-top: 24px; padding-top: 32px; }
.mn-sec + .mn-sec { margin-top: 32px; border-top: 1px solid var(--line); }
.mn-grupo > .mn-sec:first-of-type { padding-top: 16px; }
.mn-sec h2 { font-size: 32px; line-height: 1.3; letter-spacing: -.03em; text-wrap: balance; }
.mn-sec h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.03em; margin-top: 32px; }
.mn-sec h2 + *, .mn-sec h3 + * { margin-top: 16px; }
.mn-sec p, .mn-sec li, .mn-sec dd { font-size: 18px; line-height: 1.6; letter-spacing: -.01em; text-wrap: pretty; }
.mn-sec p + p, .mn-sec p + ul, .mn-sec ul + p, .mn-sec p + ol { margin-top: 16px; }
.mn-sec ul, .mn-sec ol { padding-left: 24px; display: grid; gap: 8px; }
.mn-sec li::marker { color: var(--green); }
.mn-sec b { color: var(--ink); font-weight: 600; }
.mn-sec a { color: var(--green); }

.mn-passos { list-style: none; padding: 0 !important; counter-reset: p; gap: 12px !important; }
.mn-passos li { counter-increment: p; position: relative; padding: 16px 16px 16px 64px; border-radius: 16px; background: var(--cream); }
.mn-passos li::before { content: counter(p); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-family: var(--f-tit); font-weight: 600; font-size: 16px; }

.mn-dica { margin-top: 24px !important; padding: 16px 20px; border-radius: 16px; border-left: 4px solid var(--green); background: var(--verde-dil); color: var(--green-deep); font-size: 16px !important; }

.mn-glossario { display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; }
.mn-glossario dt { font-family: var(--f-tit); font-weight: 500; font-size: 18px; color: var(--ink); }
.mn-glossario dd { margin: 0; }

/* ---------- tabelas ---------- */
.mn-busca { position: relative; display: block; max-width: 360px; margin-top: 24px; }
.mn-busca .i { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; stroke: var(--ink-soft); fill: none; stroke-width: 2; }
.mn-busca input { width: 100%; height: 48px; padding: 0 16px 0 44px; border-radius: 12px; border: 1px solid rgba(27, 36, 23, .16); background: var(--cream); font: inherit; font-size: 16px; color: var(--ink); }
.mn-busca input:focus { outline: 2px solid var(--green); outline-offset: 1px; background: #fff; }
.mn-tabela { margin-top: 16px; overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.mn-tabela table { width: 100%; border-collapse: collapse; font-size: 16px; }
.mn-tabela thead th { position: sticky; top: 0; background: var(--cream-2); font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; white-space: nowrap; }
.mn-tabela th, .mn-tabela td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mn-tabela tbody th { font-weight: 500; color: var(--ink); text-align: left; }
.mn-tabela td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mn-tabela tbody tr:last-child > * { border-bottom: 0; }
.mn-tabela tbody tr:nth-child(even) { background: var(--cream); }
.mn-tabela tr[hidden] { display: none; }
.mn-vazio { padding: 16px; font-size: 16px; color: var(--ink-soft); }
/* tabelas longas ficam com altura limitada e rolam por dentro */
#t-plantas, #t-arvores, #t-animais, #t-construcoes { min-width: 640px; }
.mn-tabela:has(#t-plantas), .mn-tabela:has(#t-arvores), .mn-tabela:has(#t-animais), .mn-tabela:has(#t-construcoes) { max-height: 560px; overflow-y: auto; }
.mn-tabela td { white-space: nowrap; }
#t-construcoes td:last-child, #t-veiculos td:nth-child(4), #t-veiculos td:last-child { min-width: 260px; white-space: normal; }
.mn-tabela tbody th { min-width: 140px; }

/* ---------- celular e tablet ---------- */
@media (max-width: 1024px) {
  .mn-grade { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .mn-indice { position: static; max-height: none; padding: 16px 20px; }
  .mn-indice summary { pointer-events: auto; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
  .mn-indice summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); rotate: 45deg; translate: 0 -2px; transition: rotate .2s; }
  .mn-indice details[open] summary::after { rotate: 225deg; translate: 0 2px; }
}
@media (max-width: 767px) {
  .mn { padding: 24px 0 64px; }
  .mn-cab { margin-bottom: 32px; }
  .mn-cab h1 { font-size: 36px; }
  .mn-lead { margin-top: 16px; font-size: 18px; }
  .mn-grupo { padding: 24px 20px; border-radius: 24px; }
  .mn-sec h2 { font-size: 24px; }
  .mn-sec p, .mn-sec li, .mn-sec dd { font-size: 16px; }
  .mn-busca { max-width: none; }
  .mn-passos li { padding: 12px 12px 12px 56px; }
  .mn-passos li::before { left: 12px; top: 12px; }
  .mn-glossario { grid-template-columns: 1fr; gap: 4px; }
  .mn-glossario dd { margin-bottom: 12px; }
  .mn-tabela table { font-size: 14px; }
  .mn-tabela th, .mn-tabela td { padding: 10px 12px; }
  .mn-tabela:has(#t-plantas), .mn-tabela:has(#t-arvores), .mn-tabela:has(#t-animais), .mn-tabela:has(#t-construcoes) { max-height: 480px; }
}

/* 03/12: barras de rolagem finas e arredondadas, nas cores do site (índice e tabelas) */
/* Firefox usa as propriedades padrão; Chrome/Edge/Safari usam as ::-webkit (se as duas existirem, o Chrome ignora as -webkit) */
@supports not selector(::-webkit-scrollbar) { .mn-indice, .mn-tabela { scrollbar-width: thin; scrollbar-color: rgba(46, 125, 50, .45) transparent; } }
.mn-indice::-webkit-scrollbar, .mn-tabela::-webkit-scrollbar { width: 6px; height: 6px; }
.mn-indice::-webkit-scrollbar-track, .mn-tabela::-webkit-scrollbar-track { background: transparent; margin: 16px; }
.mn-indice::-webkit-scrollbar-thumb, .mn-tabela::-webkit-scrollbar-thumb { background: rgba(46, 125, 50, .35); border-radius: 999px; }
.mn-indice::-webkit-scrollbar-thumb:hover, .mn-tabela::-webkit-scrollbar-thumb:hover { background: var(--green); }
.mn-tabela::-webkit-scrollbar-corner { background: transparent; }
/* o índice ganha um respiro à direita pra barra não encostar nos links */
.mn-indice { padding-right: 16px; scrollbar-gutter: stable; }
