/* ============================================================
   Protótipo · Controle Ambiental de Obras
   Mesma linguagem do site da pesquisa: papel, verde-mata,
   Fraunces + Instrument Sans. Mobile-first.
   ============================================================ */

:root {
  --paper: #f5f2ea;
  --paper-deep: #ede8dc;
  --ink: #1c2b23;
  --ink-dim: rgba(28, 43, 35, 0.62);
  --pine: #1e4034;
  --pine-deep: #143026;
  --moss: #3d6b52;
  --sand: #c8b89a;
  --clay: #c4652a;
  --clay-deep: #a54f1c;
  --rust: #8c2f1b;
  --line: rgba(30, 64, 52, 0.16);
  --radius: 10px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Instrument Sans", "Segoe UI", sans-serif;
  /* status IDA — sempre acompanhados de texto, nunca cor sozinha */
  --st-otimo: #2f6b50;
  --st-bom: #8a6d1f;
  --st-regular: #a54f1c;
  --st-critico: #8c2f1b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(30, 64, 52, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ---------- banner protótipo ---------- */
.proto-banner {
  display: flex; justify-content: center; align-items: center; gap: 14px;
  background: var(--clay); color: #fff; font-size: 13.5px;
  padding: 8px 14px; text-align: center;
}
.proto-banner button {
  background: none; border: none; color: #fff; font-size: 18px;
  cursor: pointer; line-height: 1; padding: 2px 6px;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--pine); color: var(--paper);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 18px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  background: none; border: none; color: var(--paper); cursor: pointer;
  font-family: var(--font-display); font-size: 17px;
}
.brand-mark { color: var(--sand); font-size: 13px; }
.brand-name em { font-style: italic; color: var(--sand); }

.steps { display: flex; align-items: center; gap: 6px; font-size: 12px; flex-wrap: wrap; }
.step {
  display: inline-flex; align-items: center; gap: 5px;
  color: rgba(245, 242, 234, 0.55);
}
.step b { font-weight: 500; }
.step.on { color: var(--sand); font-weight: 600; }
.step.done { color: rgba(245, 242, 234, 0.8); }
.step-sep { color: rgba(245, 242, 234, 0.3); }
@media (max-width: 640px) { .step b { display: none; } .step.on b { display: inline; } }

/* ---------- layout ---------- */
.app { max-width: 760px; margin: 0 auto; padding: 30px 18px 70px; }
.screen h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(26px, 5.4vw, 36px); line-height: 1.12;
  color: var(--pine-deep); margin-bottom: 10px;
}
.screen h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(19px, 3.6vw, 23px); color: var(--pine-deep);
}
.eyebrow {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--clay-deep); font-weight: 600; margin-bottom: 10px;
}
.sub { color: var(--ink-dim); margin-bottom: 22px; }
.mt { margin-top: 34px; margin-bottom: 14px; }

/* ---------- cards de obra ---------- */
.cards { display: grid; gap: 14px; }
.card {
  text-align: left; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 20px; cursor: pointer;
  font: inherit; color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--moss); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(30, 64, 52, 0.1); }
.card-tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--moss);
  border: 1px solid var(--moss); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px;
}
.card h3 { font-family: var(--font-display); font-weight: 500; font-size: 21px; color: var(--pine-deep); margin-bottom: 6px; }
.card-line { font-size: 14.5px; }
.card-line.dim { color: var(--ink-dim); }
.card-go { display: inline-block; margin-top: 12px; font-weight: 600; color: var(--clay-deep); font-size: 14.5px; }

.aux-links { margin-top: 20px; }
.link-btn {
  background: none; border: none; font: inherit; font-weight: 600;
  color: var(--pine); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; font-size: 15px; padding: 4px 0;
}

/* ---------- exigências (inteligência regulatória) ---------- */
.intel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.intel-badge {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: right; color: var(--clay-deep); font-weight: 600; line-height: 1.5;
}
.exig {
  background: #fff; border: 1.5px solid var(--line); border-left: 4px solid var(--moss);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px;
}
.exig-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 8px; }
.exig-esfera { font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pine); }
.exig-orgao { font-size: 13px; color: var(--ink-dim); }
.exig ul { padding-left: 20px; font-size: 14.5px; }
.exig li { margin-bottom: 4px; }

/* ---------- radar regulatório ---------- */
.radar {
  margin-top: 22px; background: var(--paper-deep);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.radar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.radar-selo { font-size: 12px; font-weight: 700; color: var(--st-otimo); white-space: nowrap; }
.radar-sub { font-size: 13.5px; color: var(--ink-dim); margin: 8px 0 14px; }
.radar-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.radar-data { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--clay-deep); width: 62px; }
.radar-mudanca { font-size: 13.5px; line-height: 1.5; }
.radar-impacto { font-size: 12.5px; color: var(--moss); font-weight: 600; margin-top: 2px; }

/* ---------- tela radar (diários municipais) ---------- */
.passos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.passo { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; }
.passo-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--pine); color: var(--sand);
  font-family: var(--font-display); font-weight: 600; margin-bottom: 10px;
}
.passo h3 { font-size: 14.5px; font-weight: 700; color: var(--pine-deep); margin-bottom: 6px; }
.passo p { font-size: 13px; color: var(--ink-dim); line-height: 1.55; }

.fontes { display: flex; flex-direction: column; gap: 8px; }
.fonte {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px;
}
.fonte-nome { font-weight: 700; font-size: 14px; }
.fonte-detalhe { font-size: 12.5px; color: var(--ink-dim); }
.fonte-ultima { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--st-otimo); white-space: nowrap; }
@media (max-width: 560px) { .fonte { flex-direction: column; align-items: flex-start; gap: 6px; } }

.fila { display: flex; flex-direction: column; gap: 10px; }
.fila-item { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.fila-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.fila-status {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.fila-status.st-triagem { background: rgba(196, 101, 42, 0.14); color: var(--clay-deep); }
.fila-status.st-validacao { background: rgba(138, 109, 31, 0.16); color: var(--st-bom); }
.fila-status.st-aplicada { background: rgba(47, 107, 80, 0.13); color: var(--st-otimo); }
.fila-data { font-size: 12px; color: var(--ink-dim); font-weight: 600; }
.fila-titulo { font-weight: 600; font-size: 14.5px; line-height: 1.45; }
.fila-nota { font-size: 13px; color: var(--moss); font-weight: 600; margin-top: 5px; }

/* ---------- programas ---------- */
.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.prog-card {
  text-align: left; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 16px; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.15s, background 0.15s;
}
.prog-card:hover { border-color: var(--moss); }
.prog-card.on { border-color: var(--pine); background: #eef3ee; box-shadow: inset 0 0 0 1px var(--pine); }
.prog-sigla {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: var(--clay-deep); letter-spacing: 0.04em;
}
.prog-sigla.sm { font-size: 13px; }
.prog-nome { font-weight: 600; font-size: 14.5px; line-height: 1.35; color: var(--ink); }
.prog-meta { font-size: 12.5px; color: var(--ink-dim); }
.prog-check { font-size: 13px; font-weight: 600; color: var(--moss); margin-top: 4px; }
.prog-card.on .prog-check { color: var(--pine); }

/* ---------- botões ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
  font: inherit; font-weight: 600; font-size: 15.5px;
  border-radius: var(--radius); padding: 13px 22px; cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.btn.primary { background: var(--clay); color: #fff; border: none; box-shadow: 0 3px 0 var(--clay-deep); }
.btn.primary:hover { background: var(--clay-deep); }
.btn.primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--pine); border: 1.5px solid var(--pine); }
.btn.ghost:hover { background: var(--pine); color: var(--paper); }

/* ---------- vistoria ---------- */
.field-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px;
  color: var(--ink-dim); margin-bottom: 12px;
}
.fill-bar {
  position: relative; height: 26px; background: rgba(30, 64, 52, 0.1);
  border-radius: 999px; overflow: hidden; margin: 8px 0 6px;
}
.fill-bar .fill { height: 100%; background: linear-gradient(90deg, var(--moss), var(--pine)); transition: width 0.3s; }
.fill-bar span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.demo-fill { margin-bottom: 18px; color: var(--clay-deep); }

.alerta {
  border-radius: var(--radius); padding: 12px 16px; font-size: 14.5px;
  margin-bottom: 10px; line-height: 1.5;
}
.alerta.critico { background: rgba(140, 47, 27, 0.1); border: 1.5px solid rgba(140, 47, 27, 0.45); color: var(--rust); }
.alerta.bloqueio { background: rgba(196, 101, 42, 0.12); border: 1.5px solid rgba(196, 101, 42, 0.5); color: var(--clay-deep); font-weight: 600; }
.alerta em { display: block; font-size: 12.5px; opacity: 0.8; }

.prog-sec { margin-top: 30px; }
.prog-sec-head {
  display: flex; gap: 12px; align-items: baseline;
  border-bottom: 2px solid var(--pine); padding-bottom: 8px; margin-bottom: 14px;
}
.base-legal { font-size: 12.5px; color: var(--ink-dim); }

.item {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
}
.item.item-nc { border-color: rgba(140, 47, 27, 0.5); background: #fdf6f3; }
.item-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.item-q { font-weight: 600; font-size: 15px; line-height: 1.45; }
.peso {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
}
.peso-critico, .peso-bloqueante { background: rgba(140, 47, 27, 0.12); color: var(--rust); }
.peso-alto { background: rgba(196, 101, 42, 0.14); color: var(--clay-deep); }
.peso-medio { background: rgba(138, 109, 31, 0.14); color: var(--st-bom); }
.peso-informativo { background: rgba(30, 64, 52, 0.08); color: var(--ink-dim); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 14.5px; font-weight: 600;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 9px 20px; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.chip:hover { border-color: var(--moss); }
.chip.on { background: var(--pine); border-color: var(--pine); color: #fff; }

.ctl {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff;
  padding: 10px 12px; margin-top: 2px;
}
.ctl:focus { outline: none; border-color: var(--pine); }
select.ctl, input.ctl { max-width: 340px; }
.num-wrap { display: flex; align-items: center; gap: 8px; }
.ctl.num { max-width: 130px; }
.unit { font-size: 13.5px; color: var(--ink-dim); font-weight: 600; }
.ctl.obs { max-width: none; margin-top: 10px; border-color: rgba(140, 47, 27, 0.4); background: #fff; }

.item-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.foto-btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1.5px dashed var(--line); background: transparent; color: var(--ink-dim);
  border-radius: 8px; padding: 7px 12px;
}
.foto-btn.com-foto { border-style: solid; border-color: var(--moss); color: var(--moss); background: #eef3ee; }

.res-badge { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.res-badge.ok { color: var(--st-otimo); }
.res-badge.warn { color: var(--st-bom); }
.res-badge.bad { color: var(--rust); }
.res-badge.na { color: var(--ink-dim); }

.item-base { font-size: 12px; color: var(--ink-dim); margin-top: 8px; }

.assinar {
  margin-top: 36px; background: var(--paper-deep);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.text-label { display: block; font-weight: 600; font-size: 14.5px; margin: 12px 0 6px; }

/* ---------- resultado ---------- */
.ida-hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 34px;
  background: var(--pine); color: var(--paper);
  border-radius: var(--radius); padding: 26px 28px; margin-top: 8px;
}
.ida-valor { font-family: var(--font-display); font-size: 74px; font-weight: 600; line-height: 1; color: var(--sand); }
.ida-sub { display: block; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 6px; color: rgba(245, 242, 234, 0.75); }
.status-chip {
  font-size: 15px; font-weight: 700; padding: 10px 18px; border-radius: 999px;
  background: var(--paper); border: 2px solid currentColor;
}
.status-chip.otimo { color: var(--st-otimo); }
.status-chip.bom { color: var(--st-bom); }
.status-chip.regular { color: var(--st-regular); }
.status-chip.critico { color: var(--st-critico); }

/* barras — série única, tom único, rótulo direto */
.chart-bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 58px 1fr 34px; align-items: center; gap: 10px; }
.bar-label { font-size: 13px; font-weight: 700; color: var(--ink); text-align: right; }
.bar-track { height: 14px; background: rgba(30, 64, 52, 0.08); border-radius: 4px; overflow: hidden; }
.bar { height: 100%; background: var(--pine); border-radius: 0 4px 4px 0; min-width: 2px; transition: width 0.4s ease; }
.bar.clay { background: var(--clay-deep); }
.bar-val { font-size: 13.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.nc-card {
  background: #fff; border: 1.5px solid rgba(140, 47, 27, 0.35);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
}
.nc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.nc-q { font-weight: 600; font-size: 14.5px; }
.nc-obs { font-size: 13.5px; color: var(--ink-dim); font-style: italic; margin-top: 4px; }

/* ---------- dashboard ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 10px; }
.tile {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.tile-num { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 600; color: var(--pine-deep); font-variant-numeric: tabular-nums; }
.tile-label { font-size: 12.5px; color: var(--ink-dim); letter-spacing: 0.03em; }

.chart-card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; }
.spark { width: 100%; height: auto; }
.spark-line { fill: none; stroke: var(--pine); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .dot { fill: var(--pine); stroke: #fff; stroke-width: 2; }
.spark .hit { fill: transparent; cursor: pointer; }
.spark-val { font-size: 11px; font-weight: 600; fill: var(--ink); text-anchor: middle; font-family: var(--font-body); }
.spark-x { font-size: 10px; fill: var(--ink-dim); text-anchor: middle; font-family: var(--font-body); }
.ref-line { stroke: var(--clay); stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.7; }
.ref-label { font-size: 9.5px; fill: var(--clay-deep); font-family: var(--font-body); }
.spark-pt .dot { transition: r 0.1s; }
.spark-pt:hover .dot { r: 5.5; }

/* ---------- relatório (documento) ---------- */
.doc {
  background: #fff; border: 1.5px solid var(--line); border-radius: 4px;
  padding: clamp(22px, 5vw, 46px); margin-top: 18px;
  box-shadow: 0 10px 30px rgba(30, 64, 52, 0.1);
}
.doc-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  border-bottom: 3px double var(--pine); padding-bottom: 18px; margin-bottom: 22px;
}
.doc-tipo { font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--clay-deep); font-weight: 700; margin-bottom: 6px; }
.doc-head h1 { font-family: var(--font-display); font-size: 26px; font-weight: 500; color: var(--pine-deep); }
.doc-meta { font-size: 13px; color: var(--ink-dim); }
.doc-meta b { color: var(--ink); display: inline-block; min-width: 58px; }
.doc-sec { margin-bottom: 26px; }
.doc-sec h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--pine-deep); margin-bottom: 12px; }
.doc-ida { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }
.doc-ida-num { font-family: var(--font-display); font-size: 58px; font-weight: 600; color: var(--pine); line-height: 1; }
.doc-formula { font-size: 12px; color: var(--ink-dim); font-style: italic; margin-top: 4px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc-table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-dim); border-bottom: 1.5px solid var(--pine); padding: 6px 8px;
}
.doc-table td { border-bottom: 1px solid var(--line); padding: 8px; vertical-align: top; }
.doc-sign { border-top: 1px solid var(--ink); max-width: 380px; margin-top: 40px; padding-top: 8px; font-size: 12.5px; color: var(--ink-dim); }
.sign-name { font-family: var(--font-display); font-size: 19px; color: var(--ink); font-style: italic; }
.doc-foot { font-size: 11px; color: var(--ink-dim); border-top: 1px solid var(--line); padding-top: 12px; text-align: center; }

/* ---------- relatório completo ---------- */
.doc-p { font-size: 13.5px; margin-bottom: 10px; line-height: 1.65; }
.doc-formula.center { text-align: center; font-size: 13px; margin: 12px 0; }
.doc-sec h3 {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 700;
  color: var(--pine-deep); margin: 16px 0 8px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.res-ida { font-size: 12px; font-weight: 700; color: var(--clay-deep); white-space: nowrap; }
.norma-bloco { margin-bottom: 14px; }
.norma { border-left: 3px solid var(--sand); padding: 2px 0 2px 12px; margin-bottom: 10px; }
.norma-ref { font-size: 12.5px; font-weight: 700; color: var(--pine); }
.norma-txt { font-size: 12.5px; color: var(--ink); line-height: 1.6; }
.res-bloco { margin-bottom: 18px; }
.cel-base { font-size: 10.5px; color: var(--ink-dim); }
.linha-nc td { background: #fdf3ef; }
.nc-doc { margin-bottom: 16px; break-inside: avoid; }
.nc-doc-titulo {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--rust); background: rgba(140, 47, 27, 0.08);
  border-left: 3px solid var(--rust); padding: 6px 10px; margin-bottom: 0;
}
.nc-tabela th {
  width: 160px; text-transform: none; letter-spacing: 0; font-size: 12px;
  color: var(--ink-dim); border-bottom: 1px solid var(--line); vertical-align: top;
}
.nc-tabela td { font-size: 12.5px; }
.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.foto-fig { break-inside: avoid; }
.foto-ev { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); display: block; }
.foto-fig figcaption { font-size: 11px; color: var(--ink-dim); margin-top: 5px; line-height: 1.45; }

/* ---------- fotos reais + marca ---------- */
.foto-real { position: relative; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: #dfe6e0; }
.foto-real img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.foto-real .foto-stamp {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(20, 48, 38, 0.85); color: var(--paper);
  font-family: Consolas, monospace; font-size: 9.5px; line-height: 1.5;
  padding: 4px 8px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px;
}
.foto-real .foto-stamp span:last-child { color: var(--sand); }
.foto-real.foto-falha img { display: none; }
.foto-real.foto-falha::before { content: "📷 foto indisponível"; display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; color: var(--ink-dim); font-size: 13px; }

.doc-brand {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px;
}
.doc-logo {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--pine-deep);
  border: 1.5px dashed var(--line); border-radius: 6px; padding: 8px 16px; text-align: center;
}
.doc-logo small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 9.5px; color: var(--ink-dim); }
.doc-brand-contato { font-size: 11px; color: var(--ink-dim); text-align: right; line-height: 1.6; }

/* ---------- mapa de pontos + offline ---------- */
.mapa-svg { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }
.mapa-fig { margin-top: 16px; }
.offline-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(138, 109, 31, 0.12); border: 1px solid rgba(138, 109, 31, 0.4);
  color: var(--st-bom); font-weight: 600; font-size: 12px;
  border-radius: 999px; padding: 4px 12px;
}

/* ---------- consulta regulatória ---------- */
.consulta-form { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.consulta-form .q { margin-bottom: 14px; }
@media (max-width: 560px) { .consulta-form { grid-template-columns: 1fr; } }
.fineprint-esq { font-size: 12.5px; color: var(--ink-dim); margin-top: 16px; font-style: italic; }

.busca-passos { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.busca-passo {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 13px 16px; font-size: 14.5px; color: var(--ink-dim);
  opacity: 0.5; transition: opacity 0.3s;
}
.busca-passo.ativo { opacity: 1; border-color: var(--clay); color: var(--ink); }
.busca-passo.ativo .busca-icone { animation: girar 1s linear infinite; display: inline-block; }
.busca-passo.feito { opacity: 1; color: var(--ink); }
.busca-passo.feito .busca-icone { color: var(--st-otimo); font-weight: 700; }
@keyframes girar { to { transform: rotate(360deg); } }

.selo {
  border-radius: var(--radius); padding: 12px 16px; font-size: 14px; font-weight: 600;
  margin: 6px 0 16px; line-height: 1.5;
}
.selo-ok { background: rgba(47, 107, 80, 0.1); border: 1.5px solid rgba(47, 107, 80, 0.4); color: var(--st-otimo); }
.selo-draft { background: rgba(196, 101, 42, 0.1); border: 1.5px solid rgba(196, 101, 42, 0.45); color: var(--clay-deep); }
.exig-draft { border-left-color: var(--clay); border-style: dashed; }

/* ---------- padrão RMPA ---------- */
.id-blocos { display: grid; gap: 10px; margin-bottom: 24px; }
.id-bloco { border: 1.5px solid var(--line); border-radius: 6px; padding: 12px 16px; background: #fbfaf6; }
.id-bloco h3 {
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--clay-deep); margin-bottom: 6px;
}
.id-bloco p { font-size: 12.5px; line-height: 1.6; }
.doc-sub {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--pine); margin: 14px 0 8px;
}
.doc-lista { padding-left: 20px; font-size: 12.5px; line-height: 1.7; margin-bottom: 10px; }
.pea-cron th, .pea-cron td { text-align: center; padding: 5px 4px; font-size: 10.5px; }
.pea-cron .pea-atual { background: rgba(196, 101, 42, 0.16); }
.finalizar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }

/* ---------- footer ---------- */
.proto-foot { text-align: center; font-size: 12.5px; color: var(--ink-dim); padding: 26px 18px 40px; }

/* ---------- print: só o documento ---------- */
@media print {
  .proto-banner, .topbar, .no-print, .proto-foot { display: none !important; }
  body { background: #fff; }
  .app { padding: 0; max-width: none; }
  .doc { border: none; box-shadow: none; padding: 0; }
  .doc-sec { break-inside: avoid-page; }
  .doc-sec:has(.res-bloco), .doc-sec:has(.foto-grid) { break-inside: auto; }
  .res-bloco, .nc-doc, .foto-fig, .norma { break-inside: avoid; }
  .doc-table { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
