/* Dia do Salário — tipografia de leitura, sem webfont, sem barra fixa. */
:root {
  --bg: #f3eee4;
  --paper: #fffdf8;
  --ink: #1b1814;
  --muted: #5a544b;
  --line: #d8d0c4;
  --accent: #0c4a35;
  --accent-soft: #e6f0ea;
  --warn-bg: #f7efe4;
  --warn-ink: #5c3a14;
  --focus: #0b4f8a;
  --ad-bg: #ece7dd;
  --max: 42rem;
  --max-wide: 58rem;
  --space: clamp(1rem, 2.5vw, 1.5rem);
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  hanging-punctuation: first allow-end last;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-size: 1.0625rem;
}

img, svg { max-width: 100%; height: auto; }

a {
  color: var(--focus);
  text-underline-offset: 0.15em;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-200%);
  background: var(--paper);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(100% - 2 * var(--space), var(--max));
  margin-inline: auto;
}

.wrap-wide {
  width: min(100% - 2 * var(--space), var(--max-wide));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header .bar {
  width: min(100% - 2 * var(--space), var(--max-wide));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.85rem;
}

.marca {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.marca:hover { text-decoration: underline; }

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a { color: var(--ink); text-decoration: none; }
.menu a:hover, .menu a[aria-current="page"] { text-decoration: underline; }

main { padding-bottom: 4rem; }

.hero {
  padding-top: 1.75rem;
  padding-bottom: 0.5rem;
}

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 0.6rem;
}

h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  margin: 2.75rem 0 0.8rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.6rem 0 0.5rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.tool {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 1.15rem 1.15rem 1.35rem;
  margin: 0 auto 1.5rem;
  width: min(100% - 2 * var(--space), var(--max-wide));
}

.resposta {
  padding: 1rem 1.1rem;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  margin-bottom: 1rem;
}

.resposta[data-status="hoje"] { background: #e2f1e6; border-left-color: #1b6b3a; }

.resposta h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 600;
}

.hoje-em { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.95rem; min-height: 2lh; }

.resposta-titulo {
  margin: 0 0 0.3rem;
  font-size: clamp(1.35rem, 3.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.25;
  min-height: 2lh;
}

.resposta-detalhe { margin: 0; min-height: 3lh; }

/* Altura reservada para o texto que o script preenche (evita CLS). */
@media (min-width: 40rem) {
  .hoje-em, .resposta-titulo { min-height: 1lh; }
  .resposta-detalhe { min-height: 2lh; }
}

.campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.85rem;
  margin: 0 0 1rem;
}

.campos label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.92rem;
}

select {
  font: inherit;
  color: inherit;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #77716a;
  background: #fff;
  border-radius: 0;
}

.datas-legenda { margin: 0 0 0.5rem; }

.datas-mes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 40rem) {
  .datas-mes { grid-template-columns: 1fr 1fr; }
}

.carta {
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  background: #fff;
}

.carta--clt { border-color: var(--accent); border-width: 2px; }

.carta .rotulo {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.carta strong { font-size: 1.15rem; display: block; min-height: 2lh; }

@media (min-width: 40rem) {
  .carta strong { min-height: 1lh; }
}

.nota {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 0.95rem;
}

.nota[hidden] { display: none; }

.contagem-box { margin-top: 0.85rem; }
.contagem-box summary { cursor: pointer; font-weight: 600; min-height: 2.75rem; padding-block: 0.6rem; }
.contagem { margin: 0.2rem 0 0; padding-left: 0; list-style: none; }
.contagem li { margin: 0.15rem 0; }
.contagem .is-fifth { font-weight: 700; }
.contagem .is-skipped { color: var(--muted); }

pre {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.92em; }

.fontes li { margin-bottom: 0.4rem; }

.prose p, .prose li { max-width: 42rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }

blockquote {
  margin: 1rem 0 1.2rem;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--accent);
  font-size: 1.02rem;
}

blockquote p { margin: 0 0 0.4rem; }
blockquote footer { color: var(--muted); font-size: 0.9rem; }

.fonte { font-size: 0.92rem; }

.tabela-wrap {
  overflow: auto;
  margin: 1rem 0 1.4rem;
  border: 1px solid var(--line);
  background: #fff;
  max-width: 100%;
}

.tabela-wrap:focus-visible { outline-offset: -3px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  position: static;
}

tr.is-current td { background: var(--accent-soft); font-weight: 600; }
tr:nth-child(even) td { background: #faf8f3; }
tr.is-current:nth-child(even) td { background: var(--accent-soft); }
caption {
  text-align: left;
  font-weight: 600;
  padding: 0.6rem 0.7rem;
  caption-side: top;
}

.ad-slot {
  display: grid;
  place-items: center;
  margin: 2rem auto;
  background: var(--ad-bg);
  color: #5f5a52;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px dashed #b9b2a6;
}

/* Espaço reservado com tamanho fixo: o anúncio, quando entrar, não empurra o texto (CLS). */
.ad-slot--topo { width: min(100% - 2 * var(--space), 320px); height: 100px; }

@media (min-width: 48rem) {
  .ad-slot--topo { width: 728px; height: 90px; }
}

.ad-slot--meio { width: 100%; max-width: 336px; height: 280px; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0;
}

.faq summary {
  cursor: pointer;
  padding-right: 0.5rem;
  font-weight: 600;
  padding: 0.65rem 0;
  min-height: 2.75rem;
}

.faq details p { margin: 0 0 0.9rem; }

.aviso-legal {
  font-size: 0.92rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 1.25rem 0 2rem;
  font-size: 0.92rem;
}

.site-footer .bar {
  width: min(100% - 2 * var(--space), var(--max-wide));
  margin-inline: auto;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
}

.site-footer a { color: var(--ink); }

.placeholder { font-family: ui-monospace, monospace; font-size: 0.9em; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

main section[id], main h2[id], main h3[id] { scroll-margin-top: 1rem; }

@media print {
  .ad-slot, .site-header nav, .skip-link { display: none !important; }
  body { background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

.pagina { padding-top: 1.75rem; min-height: 60vh; }
.pagina h1 { margin-bottom: 1rem; }
p code, li code { overflow-wrap: anywhere; }

@media (max-width: 30rem) {
  table { font-size: 0.88rem; }
  th, td { padding: 0.45rem 0.45rem; }
}
