:root {
  --ground: #faf9f6; --ground-2: #f0eee8; --paper: #fff; --ink: #101010; --muted: #5b5b56;
  --rule: #d8d6ce; --blue: #0000ff; --blue-tint: #ebebff; --on-blue-2: #d4d4ff;
  --bad: #c4221c; --bad-tint: #fbeceb;
  --sans: Helvetica, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.plus { color: var(--blue); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }

.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  height: 64px; padding: 0 var(--pad); background: rgba(250,249,246,.94); border-bottom: 1px solid var(--rule); backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 22px; letter-spacing: -.04em; text-decoration: none; }
/* Way back to the site: logo → home, crumb → tools index. */
.crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumbs .sep { color: var(--rule); }
.crumb { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.crumb:hover { color: var(--blue); }
.steps-mini { font-family: var(--mono); font-size: 12px; color: var(--muted); }

main { max-width: 820px; margin: 0 auto; padding: 44px var(--pad) 110px; }
.bar { height: 3px; background: var(--rule); margin-bottom: 40px; }
.bar i { display: block; height: 100%; background: var(--blue); transition: width .3s ease; }
.eyebrow { color: var(--muted); font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
h1 { margin: 16px 0 0; font-size: clamp(38px, 7vw, 66px); font-weight: 700; letter-spacing: -.055em; line-height: .98; text-wrap: balance; }
h2 { margin: 12px 0 0; font-size: clamp(28px, 4.6vw, 42px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; text-wrap: balance; }
h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
p { margin: 16px 0 0; max-width: 660px; }
.lead { font-size: 20px; color: var(--muted); line-height: 1.5; }
.fine { color: var(--muted); font-size: 14px; }
strong { font-weight: 700; }

.why { margin-top: 28px; padding: 18px 20px; border-left: 3px solid var(--blue); background: var(--paper); }
.why .mono { color: var(--blue); text-transform: uppercase; }
.why p { margin-top: 6px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; margin-top: 28px; border: 1px solid var(--ink); }
.compare > div { padding: 20px; }
.compare > div + div { border-left: 1px solid var(--ink); }
.compare .big { font-size: 34px; font-weight: 700; letter-spacing: -.05em; font-variant-numeric: tabular-nums; margin-top: 10px; }
.compare ul { margin: 12px 0 0; padding-left: 18px; font-size: 15px; }
.compare .good { background: var(--blue); color: #fff; }
.compare .good .fine { color: var(--on-blue-2); }
@media (max-width: 600px) { .compare { grid-template-columns: 1fr; } .compare > div + div { border-left: 0; border-top: 1px solid var(--ink); } }

.list { margin: 22px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.list li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ground-2); }
.list li::before { content: ""; width: 11px; height: 11px; margin-top: .5em;
  background: linear-gradient(var(--blue) 0 0) center/100% 2px no-repeat, linear-gradient(var(--blue) 0 0) center/2px 100% no-repeat; }

textarea { width: 100%; min-height: 190px; margin-top: 18px; padding: 14px; border: 1px solid var(--ink); border-radius: 0;
  background: var(--paper); font-family: var(--mono); font-size: 14px; line-height: 1.7; resize: vertical; }
textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ink); }
input[type=number] { width: 220px; height: 48px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); font-size: 17px; }
.count { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); min-height: 1.4em; }
.count .ok { color: var(--ink); }
.count .err { color: var(--bad); }

.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 14px 22px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--blue); border-color: var(--blue); }
.btn[disabled] { opacity: .35; cursor: not-allowed; background: var(--ink); border-color: var(--ink); }
.btn::after { content: "→"; }
.link { border: 0; border-bottom: 1px solid currentColor; background: none; padding: 6px 0; font-weight: 700; font-size: 15px; cursor: pointer; }
.link:hover { color: var(--blue); }

.table-wrap { overflow-x: auto; margin-top: 22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase; color: var(--muted); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--ink); }
td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--ground-2); vertical-align: top; }
td .fine { font-size: 12.5px; }
tr.warn td { color: var(--bad); }
.tag { display: inline-block; padding: 2px 7px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.tag.forte { background: var(--ink); color: #fff; }
.tag.indicio { border: 1px solid var(--ink); }
.tag.comum { border: 1px solid var(--rule); color: var(--muted); }
.tag.igual { border: 1px dashed var(--rule); color: var(--muted); }
.trait.igual h3 { color: var(--muted); }
.tag.bom { background: var(--blue); color: #fff; }
.tag.ruim { background: var(--bad-tint); color: var(--bad); }

.trait { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.trait:first-child { border-top: 1px solid var(--ink); }
.trait .attr { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.trait h3 { margin-top: 6px; font-size: 22px; letter-spacing: -.03em; }
.trait .ev { margin-top: 6px; color: var(--muted); font-size: 15px; }
.trait.anti h3 { color: var(--bad); }

.bigline { margin-top: 26px; font-size: clamp(54px, 11vw, 104px); font-weight: 700; letter-spacing: -.07em; line-height: .9; font-variant-numeric: tabular-nums; }
.bands { margin-top: 22px; }
.band { display: grid; grid-template-columns: 170px 1fr 90px; gap: 12px; align-items: center; padding: 7px 0; font-size: 15px; }
.band .track { height: 14px; background: var(--ground-2); }
.band .track i { display: block; height: 100%; background: var(--blue); }
.band b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 400; }
@media (max-width: 560px) { .band { grid-template-columns: 1fr 70px; } .band .track { grid-column: 1 / -1; grid-row: 2; } }

.icp { margin-top: 26px; padding: 30px; background: var(--blue); color: #fff; }
.icp .mono { color: var(--on-blue-2); text-transform: uppercase; }
.icp p { font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; letter-spacing: -.035em; line-height: 1.2; max-width: none; margin-top: 10px; }
.todo { counter-reset: t; margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.todo li { counter-increment: t; display: grid; grid-template-columns: 40px 1fr; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.todo li::before { content: "0" counter(t); font-family: var(--mono); font-size: 13px; color: var(--blue); padding-top: 3px; }
.cta { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; border: 1px solid var(--ink); }
.cta a { display: block; padding: 20px; text-decoration: none; }
.cta a + a { border-left: 1px solid var(--ink); }
.cta a:hover { background: var(--blue); color: #fff; }
.cta a:hover .fine { color: var(--on-blue-2); }
.cta strong { display: block; font-size: 18px; letter-spacing: -.02em; }
@media (max-width: 640px) { .cta { grid-template-columns: 1fr; } .cta a + a { border-left: 0; border-top: 1px solid var(--ink); } }
.notice { margin-top: 22px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--rule); font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 12px 16px; background: var(--ink); color: #fff; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── Header privacy link ── */
.top-right { display: flex; align-items: center; gap: 18px; }
.privacy-link { font-family: var(--mono); font-size: 12px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.privacy-link:hover { color: var(--blue); border-color: var(--blue); }

/* ── Reassurance on the opening screen ── */
.assure { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 24px 0 0; padding: 0; list-style: none; font-size: 15px; }
.assure li::before { content: "+"; margin-right: 8px; color: var(--blue); font-weight: 700; }

.section-title { margin-top: 38px; }
.actions.tight { margin-top: 12px; }
code { font-family: var(--mono); font-size: .9em; background: var(--ground-2); padding: 1px 4px; }

/* ── What makes a good customer: dimensions ── */
.dims { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 26px; border-top: 1px solid var(--ink); }
.dim { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--rule); }
.dim:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--rule); }
.dim .mono { color: var(--blue); text-transform: uppercase; }
.dim h3 { margin-top: 6px; font-size: 18px; }
.dim p { margin-top: 6px; }
@media (max-width: 640px) { .dims { grid-template-columns: 1fr; } .dim:nth-child(even) { padding-left: 0; border-left: 0; } }

/* ── Value today × potential matrix ── */
.matrix { display: grid; grid-template-columns: 28px 1fr 1fr; grid-template-rows: auto auto auto; margin-top: 18px; }
.matrix .axis-y { grid-column: 1; grid-row: 1 / span 2; writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); text-align: center; }
.matrix .axis-x { grid-column: 2 / span 2; grid-row: 3; padding-top: 8px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); text-align: center; }
.matrix .cell { padding: 18px; border: 1px solid var(--rule); margin: 0 -1px -1px 0; background: var(--paper); }
.matrix .cell h3 { margin-top: 4px; font-size: 22px; letter-spacing: -.03em; }
.matrix .cell p { margin-top: 8px; font-size: 14.5px; }
.matrix .cell .mono { color: var(--muted); text-transform: uppercase; font-size: 11px; }
.matrix .verdict-line { font-weight: 700; }
.matrix .comfy { grid-column: 2; grid-row: 1; }
.matrix .star { grid-column: 3; grid-row: 1; background: var(--blue); color: #fff; border-color: var(--blue); position: relative; z-index: 1; }
.matrix .star .mono { color: var(--on-blue-2); }
.matrix .drain { grid-column: 2; grid-row: 2; background: var(--bad-tint); }
.matrix .drain h3 { color: var(--bad); }
.matrix .bet { grid-column: 3; grid-row: 2; }
@media (max-width: 640px) {
  .matrix { grid-template-columns: 1fr; }
  .matrix .axis-y, .matrix .axis-x { display: none; }
  .matrix .cell { grid-column: 1 !important; grid-row: auto !important; }
  .matrix .star { order: -1; }
}

/* ── Data reassurance next to the CNPJ input ── */
.safe { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--ink); background: var(--paper); }
.safe .mono { text-transform: uppercase; }
.safe p { margin-top: 6px; font-size: 15px; }

/* ── Privacy panel ── */
.privacy { margin-top: 70px; border-top: 1px solid var(--ink); padding-top: 14px; }
.privacy summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; }
.privacy summary::before { content: "+ "; color: var(--blue); }
.privacy[open] summary::before { content: "– "; }
.privacy summary::-webkit-details-marker { display: none; }
.privacy .list { font-size: 15px; }

/* ══ TAM simulator ══ */
main.wide { max-width: 1180px; }
.intro { max-width: 820px; }
.nest { margin-top: 26px; max-width: 700px; }
.nest .lvl { display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: center; margin-top: 8px; }
.nest .lvl b { font-family: var(--mono); font-size: 13px; }
.nest .lvl div { padding: 10px 12px; font-size: 14.5px; }
.nest .tam div { background: var(--ground-2); }
.nest .sam div { background: var(--blue-tint); width: 70%; }
.nest .som div { background: var(--blue); color: #fff; width: 32%; }
@media (max-width: 560px) { .nest .sam div, .nest .som div { width: 100%; } }

.sim { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 44px; margin-top: 48px; align-items: start; }
@media (max-width: 900px) { .sim { grid-template-columns: 1fr; } }
.block { padding: 22px 0 26px; border-top: 1px solid var(--ink); }
.block h2 { font-size: 26px; margin: 6px 0 0; }
.block > p { font-size: 15px; margin-top: 8px; }
.block .mono.num { color: var(--blue); text-transform: uppercase; }

.search { width: 100%; height: 46px; margin-top: 14px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); font-size: 16px; }
.search:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ink); }
.sections { margin-top: 10px; max-height: 420px; overflow: auto; border: 1px solid var(--rule); background: var(--paper); }
.sec { border-bottom: 1px solid var(--ground-2); }
.sec > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary .letter { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 16px; }
.sec > summary .cnt { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; }
.sec label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 12px 7px 38px; font-size: 14.5px; cursor: pointer; }
.sec label:hover, .sec > summary:hover { background: var(--ground); }
.sec label .code { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 20px; padding-top: 2px; }
input[type=checkbox] { accent-color: var(--blue); width: 16px; height: 16px; margin-top: 3px; flex: none; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; min-height: 30px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--ink); color: #fff; font-size: 13px; border: 0; cursor: pointer; }
.pill::after { content: "×"; opacity: .7; }
.pill:hover { background: var(--bad); }
.hint { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 12px; }

.chips { display: flex; flex-wrap: wrap; margin-top: 12px; }
.chip { min-height: 40px; padding: 8px 12px; margin: 0 -1px -1px 0; border: 1px solid var(--rule); background: var(--paper); cursor: pointer; font-size: 14px; }
.chip:hover { background: var(--ground-2); }
.chip[aria-pressed="true"] { position: relative; z-index: 1; background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.chip small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; opacity: .75; }
.chips.uf .chip { min-width: 50px; text-align: center; font-family: var(--mono); font-size: 13px; }

.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field-row label { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field-row input { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 0; background: var(--paper); font-size: 16px; font-variant-numeric: tabular-nums; }
.field-row input:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.money { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.money span { font-weight: 700; }
.money input { width: 200px; height: 50px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); font-size: 18px; font-variant-numeric: tabular-nums; }
.slider { margin-top: 18px; }
.slider .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.slider .lbl label { font-size: 15px; font-weight: 700; }
.slider .lbl output { font-size: 22px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.slider input[type=range] { width: 100%; margin-top: 8px; accent-color: var(--blue); }
.slider p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* Results */
.results { position: sticky; top: 84px; border: 1px solid var(--ink); background: var(--paper); }
@media (max-width: 900px) { .results { position: static; } }
.res-head { padding: 20px 22px 18px; border-bottom: 1px solid var(--ink); }
.res-head .mono { text-transform: uppercase; color: var(--muted); }
.res-empty { padding: 26px 22px; color: var(--muted); }
.stage { padding: 16px 22px; border-bottom: 1px solid var(--rule); }
.stage .top-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stage .mono { text-transform: uppercase; }
.stage .val { font-size: 30px; font-weight: 700; letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stage .co { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.stage p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.stage.som { background: var(--blue); color: #fff; }
.stage.som .co, .stage.som p { color: var(--on-blue-2); }
.reality { padding: 16px 22px; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.reality.above { background: var(--bad-tint); }
.reality.below { background: var(--ground); }
.reality strong { display: block; font-size: 16px; }
.breakdown { padding: 16px 22px; }
.breakdown h3 { font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; }
.brow { display: grid; grid-template-columns: 1fr 60px; gap: 10px; padding: 4px 0; font-size: 13.5px; }
.brow .t { height: 6px; background: var(--ground-2); grid-column: 1 / -1; margin-top: -2px; }
.brow .t i { display: block; height: 100%; background: var(--blue); }
.brow b { text-align: right; font-weight: 400; font-variant-numeric: tabular-nums; }
.res-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 16px 22px; border-top: 1px solid var(--ink); }
.res-actions .btn { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.res-actions .btn::after { content: ""; }
.sources { margin-top: 56px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--muted); max-width: 860px; }
.hint.pad { padding: 0 12px; }
.field-label { display: block; margin-top: 14px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); }
.field-label + .search { margin-top: 6px; }
.block h2 label { cursor: pointer; }
.hint.warn { color: var(--bad); }

/* ── Mobile results peek ── */
.peek { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--blue); color: #fff; text-decoration: none;
  font-size: 15px; line-height: 1.3; box-shadow: 0 -4px 16px rgba(16,16,16,.14); }
.peek b { font-variant-numeric: tabular-nums; }
.peek-cta { flex: none; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 961px) { .peek { display: none !important; } }
@media (max-width: 960px) { .toast { bottom: 84px; } }
