/* Checa Brasil — layout e tema. Sem dependências externas. */

:root {
  --ink: #17241c;
  --ink-soft: #3e5148;
  --muted: #5d6e65;
  --paper: #f3eee4;
  --paper-2: #e8e1d3;
  --card: #fffcf6;
  --line: #d9d0c0;
  --green: #0c6844;
  --green-dark: #094c32;
  --green-soft: #e4f3ec;
  --amber: #b56a00;
  --amber-soft: #f8ead0;
  --terra: #a33b28;
  --terra-soft: #f8e4df;
  --ad: #ece6d9;
  --shadow: 0 10px 30px rgba(23, 36, 28, 0.07);
  --radius: 18px;
  --max: 1120px;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(12, 104, 68, 0.06), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(181, 106, 0, 0.07), transparent 45%),
    var(--paper);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--green-dark); }
a:hover { color: var(--green); }
img, svg { max-width: 100%; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 20;
}
.skip:focus { left: 0.6rem; top: 0.6rem; }

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

/* Header */
.site-header {
  background: rgba(255, 252, 246, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-name span { display: block; font-weight: 500; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--sans); }

nav.main-nav { display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem; align-items: center; }
nav.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
nav.main-nav a[aria-current="page"] { color: var(--green-dark); }
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-weight: 600;
}

/* Ads placeholders */
.ad-slot {
  background: repeating-linear-gradient(-45deg, var(--ad), var(--ad) 8px, #e6e0d3 8px, #e6e0d3 16px);
  border: 1px dashed #c9bfad;
  color: var(--muted);
  text-align: center;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.ad-slot.leader { min-height: 90px; margin: 1rem auto; width: min(var(--max), calc(100% - 2rem)); }
.ad-slot.box { min-height: 250px; margin: 1.5rem 0; }
.ad-slot.inline { min-height: 100px; margin: 1.25rem 0; }

/* Hero / cards */
.hero { padding: 2.4rem 0 1.2rem; }
.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}
h1, h2, h3, .serif { font-family: var(--serif); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 600; margin: 0 0 0.8rem; }
h2 { font-size: 1.65rem; font-weight: 600; margin: 2rem 0 0.8rem; }
h3 { font-size: 1.2rem; margin: 1.4rem 0 0.5rem; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 42rem; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0 1rem;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tool-card:hover { transform: translateY(-3px); border-color: #c3b8a3; color: inherit; }
.tool-card .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
  margin-bottom: 0.4rem;
}
.tool-card h2 { font-size: 1.2rem; margin: 0; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin: 1rem 0 1.5rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem 1rem;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field.wide { grid-column: 1 / -1; }
label { font-weight: 600; font-size: 0.92rem; }
.hint { font-size: 0.82rem; color: var(--muted); font-weight: 400; }
input, select, textarea {
  font: inherit;
  border: 1px solid #cfc5b4;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(12, 104, 68, 0.25);
  border-color: var(--green);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
button, .btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-primary, button[type="submit"] { background: var(--green); color: #fff; }
.btn-primary:hover, button[type="submit"]:hover { background: var(--green-dark); }
.btn-ghost, button[type="button"].ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper-2); }

.status {
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-weight: 600;
}
.status.info { background: var(--amber-soft); color: #6a4200; }
.status.ok { background: var(--green-soft); color: var(--green-dark); }
.status.err { background: var(--terra-soft); color: var(--terra); }
.status[hidden], [hidden] { display: none !important; }

.result {
  margin-top: 1rem;
}
.kv {
  display: grid;
  grid-template-columns: minmax(140px, 32%) 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}
.kv div { display: contents; }
.kv dt { color: var(--muted); font-weight: 600; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.kv dd { margin: 0; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--green-soft);
  color: var(--green-dark);
}
.pill.off { background: var(--terra-soft); color: var(--terra); }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
th, td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); }
th { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.prose { max-width: 46rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem 1rem;
  margin: 0.55rem 0;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 0.6rem 0 0.2rem; color: var(--ink-soft); }

.notice {
  background: var(--amber-soft);
  border-left: 4px solid var(--amber);
  padding: 0.8rem 1rem;
  border-radius: 0 12px 12px 0;
  color: #5a3b00;
  margin: 1rem 0;
}

.pix-out {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.2rem;
  align-items: start;
}
.qr-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem;
  display: grid;
  place-items: center;
}
.payload {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  word-break: break-all;
  background: #f7f3ea;
  border-radius: 12px;
  padding: 0.8rem;
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: #171e1a;
  color: #d7ddd9;
  padding: 2rem 0 2.4rem;
}
.site-footer a { color: #d6efe3; }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.4rem;
}
.site-footer h2 { font-size: 1rem; color: #fff; margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.25rem 0; }
.fine { font-size: 0.82rem; color: #b5bfb9; margin-top: 1.5rem; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  nav.main-nav { display: none; }
  nav.main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 1rem;
    top: 64px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    box-shadow: var(--shadow);
    min-width: 200px;
  }
  .foot-grid, .pix-out, .kv { grid-template-columns: 1fr; }
  .kv dt { border-top: 0; padding-bottom: 0; }
}
@media print {
  .site-header, .site-footer, .ad-slot, .actions, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; }
}

.nav-drop { position: relative; }
.nav-drop > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after { content: " ▾"; font-size: 0.75em; }
.nav-drop-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.15rem 1.1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 0.8rem 1.2rem;
  min-width: 700px;
  box-shadow: var(--shadow);
  z-index: 15;
}
.nav-drop-panel h3 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.nav-drop-panel a { display: block; padding: 0.18rem 0; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.92rem; }
.nav-drop-panel a:hover, .nav-drop-panel a[aria-current="page"] { color: var(--green-dark); }
.cat-head { margin: 2.2rem 0 0.3rem; font-size: 1.35rem; }
.cat-lead { margin: 0 0 0.8rem; color: var(--muted); }
.fontes-oficiais { font-size: 0.92rem; background: var(--green-soft); border-radius: 14px; padding: 0.9rem 1rem; margin: 1rem 0; }
.fontes-oficiais a { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .nav-drop-panel { min-width: 0; position: static; grid-template-columns: 1fr 1fr; box-shadow: none; border: 0; padding: 0.5rem 0 0; }
}
