/* Calculadora publica de preco (trefato.com.br/calculadora/, 2026-11-20). Vem depois do guia.css
   (topo, rodape, cores e tema claro/escuro por html[data-theme]) e traz o fundo com brilho violeta
   e os cartoes da Home (contraste.css), sem WebGL. */
.c-page { --glass: #FFFFFF; --glass-line: var(--line); --field: #FFFFFF; --ok: #059669; --bad: #DC2626; --amber: #B45309;
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 30px 60px -40px rgba(18, 21, 48, .35); }
html[data-theme="escuro"] .c-page { --glass: rgba(255, 255, 255, .045); --glass-line: rgba(238, 235, 255, .12); --field: rgba(255, 255, 255, .04);
  --ok: #34D399; --bad: #F87171; --amber: #FBBF24; --shadow: 0 30px 60px -40px rgba(0, 0, 0, .7); }
html[data-theme="escuro"] .c-page { background: var(--ink); }

/* fundo: brilho violeta e hexagonos, como a Home */
.c-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55vw 45vh at 88% 4%, rgba(91, 75, 255, .16), transparent 70%),
    radial-gradient(45vw 55vh at 0% 60%, rgba(139, 92, 246, .08), transparent 70%); }
.c-bg::after { content: ""; position: absolute; inset: 0; opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='254' viewBox='0 0 220 254'%3E%3Cg fill='none' stroke='%235B4BFF' stroke-opacity='.06' stroke-width='1.2'%3E%3Cpath d='M110 12l86 50v100l-86 50-86-50V62z'/%3E%3Cpath d='M190 150l60 35v70l-60 35-60-35v-70z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 440px 508px;
  -webkit-mask-image: radial-gradient(60% 50% at 85% 10%, #000, transparent 75%); mask-image: radial-gradient(60% 50% at 85% 10%, #000, transparent 75%); }
html[data-theme="escuro"] .c-bg {
  background:
    radial-gradient(60vw 50vh at 85% 6%, rgba(91, 75, 255, .32), transparent 70%),
    radial-gradient(50vw 60vh at 0% 70%, rgba(139, 92, 246, .16), transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, var(--navy) 55%, var(--ink) 100%); }
html[data-theme="escuro"] .c-bg::after { filter: brightness(2.4) saturate(.4); }
.c-page main { position: relative; isolation: isolate; }

.c-wrap { max-width: 76rem; margin: 0 auto; padding: 32px var(--gut) 24px; }

/* topo */
.c-hero { max-width: 50rem; margin-bottom: clamp(28px, 4vw, 44px); }
.c-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 6px 14px 6px 10px; border-radius: 99px;
  background: var(--lav); color: var(--violet-tx); font: 600 .8125rem/1.2 var(--int); letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(91, 75, 255, .18); }
.c-kicker::before { content: ""; width: 10px; height: 11px; background: linear-gradient(160deg, #8B5CF6, var(--violet)); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
html[data-theme="escuro"] .c-kicker { background: rgba(139, 92, 246, .16); color: #C9C1FF; box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .25); }
.c-hero h1 { margin: 0 0 16px; font: 800 clamp(2rem, 4.6vw, 3.5rem)/1.04 var(--jak); letter-spacing: -.035em; text-wrap: balance; }
html[data-theme="escuro"] .c-hero h1 { background: linear-gradient(100deg, #fff 30%, #C9C1FF 75%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.c-lead { margin: 0; max-width: 44rem; font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.6; color: var(--tx2); }

/* duas colunas: formulario e resultado */
.c-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.c-out { display: grid; gap: 16px; min-width: 0; }

.c-form, .c-cmp, .c-costs { background: var(--glass); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--glass-line), var(--shadow); }
html[data-theme="escuro"] :is(.c-form, .c-cmp, .c-costs) { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.c-form { padding: clamp(20px, 2.6vw, 30px); display: grid; gap: 18px; min-width: 0; }
.c-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.c-form h2, .c-cmp h2, .c-costs h2 { margin: 0; font: 800 1.375rem/1.2 var(--jak); letter-spacing: -.02em; }
.c-form-note { margin: -12px 0 0; font-size: .9375rem; color: var(--mut); }
.c-reset { border: 0; background: none; padding: 6px 0; color: var(--violet-tx); font: 600 .875rem/1 var(--int); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: .9375rem; color: var(--tx); }

.c-seg { display: flex; flex-wrap: wrap; gap: 0; }
.c-seg legend { width: 100%; }
.c-seg label { position: relative; }
.c-seg input, .c-ch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.c-seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); background: var(--field); font-weight: 500; font-size: .9375rem; color: var(--tx2); cursor: pointer; }
.c-seg label:first-of-type span { border-radius: 10px 0 0 10px; }
.c-seg label:last-of-type span { border-radius: 0 10px 10px 0; border-left: 0; }
.c-seg input:checked + span { background: var(--violet); border-color: var(--violet); color: #fff; }
.c-seg input:focus-visible + span, .c-ch:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 2px; }

.c-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; }
.c-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; min-width: 0; }
.c-field label { font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.c-input { box-sizing: border-box; width: 100%; min-width: 0; display: flex; align-items: center; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); transition: border-color .15s, box-shadow .15s; }
.c-input:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91, 75, 255, .18); }
.c-input input { flex: 1 1 0; width: 0; min-width: 0; height: 46px; padding: 0 12px; border: 0; background: transparent; color: var(--tx); font: 500 1.0625rem/1 var(--int); font-variant-numeric: tabular-nums; outline: none; }
.c-input input::placeholder { color: var(--mut); opacity: .7; }
.c-pre { padding-left: 12px; color: var(--mut); font-size: .9375rem; }
.c-pre + input { padding-left: 6px; }
.c-unit { padding-right: 12px; color: var(--mut); font-size: .875rem; white-space: nowrap; }
.c-hint { margin: 0; font-size: .8125rem; line-height: 1.4; color: var(--mut); }
.c-err { margin: 0; font-size: .8125rem; line-height: 1.4; color: var(--bad); font-weight: 500; }
.c-field:has([aria-invalid="true"]) .c-input { border-color: var(--bad); }

/* atalho do custo por hora */
.c-mh { grid-column: 1 / -1; margin-top: -6px; border-radius: 14px; background: var(--note-bg); box-shadow: inset 0 0 0 1px var(--note-line); }
.c-mh summary, .c-more summary { cursor: pointer; list-style: none; font-weight: 600; font-size: .9rem; color: var(--violet-tx); }
.c-mh summary { padding: 11px 14px; }
.c-mh summary::-webkit-details-marker, .c-more summary::-webkit-details-marker { display: none; }
.c-mh summary::before, .c-more summary::before { content: "+"; display: inline-block; width: 1em; margin-right: 6px; font-weight: 500; }
.c-mh[open] summary::before, .c-more[open] summary::before { content: "−"; }
.c-mh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 10px; padding: 0 14px; }
.c-mh-grid label { display: grid; gap: 4px; font-size: .8125rem; font-weight: 600; color: var(--tx2); }
.c-mh-grid .c-input { min-height: 42px; }
.c-mh-grid .c-input input { height: 40px; font-size: .9375rem; }
.c-mh-out { margin: 10px 14px 12px; font-size: .875rem; color: var(--tx2); }
.c-mh-use { margin: -4px 14px 14px; min-height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--violet); color: #fff; font: 600 .875rem/1 var(--int); cursor: pointer; }

/* canais */
.c-chs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.c-chs legend { grid-column: 1 / -1; }
.c-ch { position: relative; display: grid; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); cursor: pointer; transition: border-color .15s, background-color .15s; }
.c-ch b { font: 700 .9375rem/1.25 var(--jak); }
.c-ch small { font-size: .78rem; line-height: 1.35; color: var(--mut); }
.c-ch:hover { border-color: var(--violet); }
.c-ch.on, .c-ch:has(input:checked) { border-color: var(--violet); background: var(--lav); box-shadow: inset 0 0 0 1px var(--violet); }
html[data-theme="escuro"] :is(.c-ch.on, .c-ch:has(input:checked)) { background: rgba(139, 92, 246, .18); }

.c-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--tx2); cursor: pointer; }
.c-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--violet); flex: none; }

.c-more { border-top: 1px solid var(--line); padding-top: 14px; }
.c-more summary { padding: 4px 0; }
.c-more .c-grid { margin-top: 14px; }

.c-go { display: none; width: 100%; min-height: 50px; font-size: 1rem; cursor: pointer; }

/* resultado: cartao escuro com o preco */
.c-results { display: grid; gap: 16px; min-width: 0; }
.c-main { position: relative; overflow: hidden; padding: clamp(22px, 2.8vw, 32px); border-radius: 24px; color: #EEF0F7;
  background: radial-gradient(120% 80% at 100% 0%, rgba(139, 92, 246, .35), transparent 60%), linear-gradient(160deg, #1D1A4E, var(--navy) 62%);
  box-shadow: 0 0 0 1px rgba(196, 181, 253, .18), 0 40px 80px -40px rgba(91, 75, 255, .75); }
.c-main::after { content: ""; position: absolute; right: -60px; top: -70px; width: 260px; height: 300px; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 116'%3E%3Cpath d='M50 3l45 26v58l-45 26-45-26V29z' fill='none' stroke='%23C4B5FD' stroke-opacity='.35' stroke-width='1'/%3E%3C/svg%3E") center / contain no-repeat; }
.c-main > * { position: relative; z-index: 1; }
.c-main-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.c-main-k { margin: 0; font: 600 .9375rem/1.3 var(--int); color: #C3C8DB; }
.c-chip { padding: 5px 10px; border-radius: 99px; background: rgba(238, 235, 255, .1); color: #E4DFFF; font-size: .8125rem; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(238, 235, 255, .16); }
.c-price { margin: 10px 0 18px; font: 800 clamp(2.75rem, 6vw, 4rem)/1 var(--jak); letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, #fff 35%, #D4CDFF 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.c-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: rgba(238, 235, 255, .08); gap: 2px; }
.c-bar span { flex: 0 0 calc(var(--w) * 1%); min-width: 3px; }
.s-cost { background: #94A3C4; }
.s-fee { background: #F59E0B; }
.s-ship { background: #60A5FA; }
.s-tax { background: #F472B6; }
.s-profit { background: linear-gradient(90deg, #34D399, #10B981); }
.c-legend { list-style: none; margin: 10px 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8125rem; color: #C3C8DB; }
.c-legend li { display: flex; align-items: center; gap: 6px; }
.c-legend i { width: 10px; height: 10px; border-radius: 3px; }
.c-legend b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }

.c-dl { margin: 0; display: grid; }
.c-dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid var(--row-line, var(--line)); }
.c-dl dt { display: grid; gap: 2px; font-size: .9375rem; }
.c-dl dt small { font-size: .8125rem; color: var(--mut); line-height: 1.35; }
.c-dl dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-dl .c-dl-sum dt, .c-dl .c-dl-sum dd { font: 800 1.0625rem/1.3 var(--jak); }
.c-main .c-dl { --row-line: rgba(238, 235, 255, .12); --mut: #AEB5C8; }
.c-main .c-dl-sum dd { color: #6EE7B7; }

.c-sugs { margin-top: 16px; }
.c-sugs p { margin: 0 0 8px; font-size: .8125rem; color: #AEB5C8; font-weight: 600; }
.c-sugs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.c-sugs li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(238, 235, 255, .06); box-shadow: inset 0 0 0 1px rgba(238, 235, 255, .1); }
.c-sugs li.on { background: rgba(139, 92, 246, .28); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .5); }
.c-sugs b { font: 700 1rem/1.2 var(--jak); color: #fff; font-variant-numeric: tabular-nums; }
.c-sugs span { font-size: .75rem; color: #C3C8DB; }

.c-real { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: rgba(16, 185, 129, .1); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .3); }
.c-real.is-neg { background: rgba(239, 68, 68, .12); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .4); }
.c-real-k { margin: 0 0 8px; font: 700 1rem/1.3 var(--jak); color: #fff; }
.c-real dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.c-real dt { font-size: .75rem; color: #C3C8DB; }
.c-real dd { margin: 0; font: 700 1.0625rem/1.3 var(--jak); color: #fff; font-variant-numeric: tabular-nums; }
.c-real.is-neg dd { color: #FCA5A5; }
.c-real-note { margin: 8px 0 0; font-size: .8125rem; color: #D7DBEA; }
.c-warn { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(245, 158, 11, .14); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .4); color: #FDE6B5; font-size: .875rem; }
.c-warn a { color: #fff; }
.c-na-big { margin: 12px 0 0; font: 700 1.125rem/1.4 var(--jak); color: #FDE6B5; }

/* todos os canais e custo */
.c-cmp, .c-costs { padding: clamp(18px, 2.4vw, 26px); min-width: 0; }
.c-sub { margin: 4px 0 12px; font-size: .875rem; color: var(--mut); }
.c-table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
.c-table th, .c-table td { padding: 10px 8px; text-align: right; border-top: 1px solid var(--line); vertical-align: top; }
.c-table thead th { border-top: 0; font-size: .75rem; font-weight: 600; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.c-table th:first-child { text-align: left; padding-left: 0; }
.c-table td:last-child, .c-table thead th:last-child { padding-right: 0; }
.c-table td small { display: block; font-size: .75rem; color: var(--mut); font-weight: 500; }
.c-table td small.c-flag { color: var(--amber); }
.c-table td.is-neg, .c-table td.is-neg small { color: var(--bad); }
.c-table tbody th { white-space: nowrap; }
.c-table tbody th button { border: 0; background: none; padding: 0; color: var(--tx); font: 700 .9375rem/1.3 var(--jak); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.c-table tbody th button:hover { text-decoration-color: var(--violet); color: var(--violet-tx); }
.c-table tbody tr.on th button { color: var(--violet-tx); text-decoration: none; }
.c-table tbody tr.on { background: linear-gradient(90deg, var(--lav), transparent); }
html[data-theme="escuro"] .c-table tbody tr.on { background: linear-gradient(90deg, rgba(139, 92, 246, .2), transparent); }
.c-table .c-na { text-align: left; color: var(--mut); }
.c-costs .c-dl > div:first-child { border-top: 0; }
.c-costs h2 { margin-bottom: 6px; }

/* chamada para a Trefato */
.c-cta { position: relative; overflow: hidden; padding: clamp(22px, 2.8vw, 30px); border-radius: 22px; color: #fff;
  background: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27220%27 height=%27254%27 viewBox=%270 0 220 254%27%3E%3Cpath d=%27M110 12l86 50v100l-86 50-86-50V62z%27 fill=%27none%27 stroke=%27%23ffffff%27 stroke-opacity=%27.14%27 stroke-width=%271.3%27/%3E%3C/svg%3E") right -60px center / 240px no-repeat, linear-gradient(135deg, #5B4BFF 0%, #7C4DFF 55%, #8B5CF6 100%);
  box-shadow: 0 30px 60px -30px rgba(91, 75, 255, .8); }
.c-cta-t { margin: 0 0 8px; font: 800 clamp(1.25rem, 2.2vw, 1.5rem)/1.2 var(--jak); letter-spacing: -.02em; max-width: 26ch; }
.c-cta p { margin: 0; color: #E9E6FF; font-size: .9375rem; max-width: 46ch; }
.c-cta .c-cta-t { margin: 0 0 8px; color: #fff; font: 800 clamp(1.25rem, 2.2vw, 1.5rem)/1.2 var(--jak); max-width: 26ch; }
.c-cta-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 16px; }
.c-cta .c-cta-btn { background: #fff; color: #2E1F9E; border-color: #fff; box-shadow: 0 14px 30px -14px rgba(11, 15, 25, .7); }
.c-cta .c-cta-btn:hover { background: var(--lav); }
html[data-theme="escuro"] .c-cta .c-cta-btn:hover { background: #EEEBFF; }
.c-cta-link { color: #fff; font-weight: 600; font-size: .9375rem; }
.c-fine { margin: 0; font-size: .8125rem; line-height: 1.5; color: var(--mut); }
.c-noscript { padding: 12px 16px; border-radius: 12px; background: var(--note-bg); }

/* como a conta e feita e perguntas */
.c-how { margin-top: clamp(48px, 7vw, 80px); }
.c-how h2, .c-faq h2 { margin: 0 0 18px; font: 800 clamp(1.5rem, 3vw, 2.125rem)/1.15 var(--jak); letter-spacing: -.025em; }
.c-how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.c-how-grid > div { padding: 22px; border-radius: 20px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); }
.c-how h3 { margin: 0 0 8px; font: 700 1.125rem/1.3 var(--jak); }
.c-how p { margin: 0; font-size: .9375rem; line-height: 1.6; color: var(--tx2); }
.c-faq { margin-top: clamp(40px, 6vw, 64px); max-width: 48rem; padding-bottom: 32px; }

@media (max-width: 1023px) {
  .c-app { grid-template-columns: minmax(0, 1fr); }
  .c-go { display: inline-flex; }
  .c-how-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .c-wrap { padding-top: 20px; }
  .c-grid { grid-template-columns: minmax(0, 1fr); }
  .c-chs { grid-template-columns: minmax(0, 1fr); }
  .c-sugs ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .c-sugs li { padding: 8px 10px; }
  .c-real dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* tabela vira cartoes */
  .c-table thead { display: none; }
  .c-table, .c-table tbody, .c-table tr { display: block; }
  .c-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 12px 10px; margin: 0 -10px; border-top: 1px solid var(--line); border-radius: 12px; }
  .c-table tbody tr:first-child { border-top: 0; }
  .c-table th, .c-table td { display: block; padding: 0; border: 0; text-align: left; }
  .c-table th { grid-column: 1 / -1; }
  .c-table td::before { content: attr(data-label); display: block; font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); font-weight: 600; }
  .c-table .c-na { grid-column: 1 / -1; }
}
