:root {
  --ink: #16212b;
  --muted: #5b6875;
  --line: #e3e8ec;
  --bg: #f6f8f9;
  --card: #ffffff;
  --brand: #0f766e;
  --brand-ink: #0b5952;
  --brand-soft: #e6f4f2;
  --err: #b42318;
  --radius: 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--brand-ink); }
img, svg { max-width: 100%; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* Topo */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.logo-mark { width: 30px; height: 30px; color: var(--brand); }
.top-link { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.top-link:hover { color: var(--brand-ink); }

/* Navegação estrutural */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 18px 0 0; font-size: 0.85rem; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 6px; }
.crumbs a { color: var(--muted); }

/* Títulos e texto */
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.2; letter-spacing: -0.02em; margin: 14px 0 8px; }
h2 { font-size: 1.4rem; line-height: 1.3; margin: 2.2em 0 0.5em; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: 1.6em 0 0.4em; }
.lead { font-size: 1.08rem; color: var(--muted); margin: 0 0 22px; }
.meta { font-size: 0.85rem; color: var(--muted); margin: -12px 0 20px; }
.note { font-size: 0.9rem; color: var(--muted); }

/* Calculadora */
.calc, .res {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px 18px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
label small { font-weight: 400; color: var(--muted); }
label[hidden] { display: none; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; grid-column: 1 / -1; }
label.check input { width: 18px; height: 18px; margin-top: 3px; }
input, select {
  font: inherit;
  font-weight: 400;
  padding: 11px 12px;
  border: 1px solid #cdd5dc;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  min-height: 46px;
  width: 100%;
}
input:focus, select:focus { outline: 3px solid rgba(15, 118, 110, 0.22); border-color: var(--brand); }
button {
  margin-top: 20px;
  width: 100%;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}
button:hover { background: var(--brand-ink); }
.err { color: var(--err); font-weight: 600; margin: 12px 0 0; }
.private { font-size: 0.85rem; color: var(--muted); margin: 10px 2px 0; }

/* Resultado */
.res { margin-top: 18px; scroll-margin-top: 16px; }
.res-hero { background: var(--brand-soft); border-radius: 12px; padding: 18px; text-align: center; margin-bottom: 14px; }
.res-hero span { display: block; color: var(--brand-ink); font-weight: 600; }
.res-hero strong { display: block; font-size: clamp(1.9rem, 6vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.2; }
.res-hero small { color: var(--muted); }
.res h3 { margin-top: 1.2em; }

/* Tabelas */
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
td, th { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--bg); font-size: 0.85rem; color: var(--muted); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table { min-width: 460px; }

/* Conteúdo */
article { margin-top: 10px; }
article p, article li { max-width: 72ch; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details div { padding: 10px 0 14px; }

/* Cartões (home) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--brand); }
.card strong { display: block; font-size: 1.05rem; margin-bottom: 4px; color: var(--brand-ink); }
.card span { color: var(--muted); font-size: 0.92rem; }
.related { margin-top: 2.4em; }

/* Anúncios */
.ad { margin: 22px 0; min-height: 100px; }

/* Rodapé */
.foot { margin-top: 56px; border-top: 1px solid var(--line); background: var(--card); padding: 26px 0 34px; font-size: 0.88rem; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.foot a { color: var(--muted); }
.countries a { margin-right: 12px; }
.countries span { margin-right: 8px; }
.copy { margin: 10px 0 0; }

@media (max-width: 520px) {
  .calc, .res { padding: 16px; }
  .wrap { padding: 0 14px; }
}
