/* Sem Ódio: a tela do testador e a documentação da API (views/apps/sem-odio.eta, public/js/sem-odio.js).
   Tema escuro. Mobile-first: uma coluna, e duas (fala e resposta lado a lado) a partir de 900 px. Alvos de toque de 44 px, campos com
   16 px (o iOS não dá zoom). A cor do projeto vem de --accent (livre) e --accent-2 (sinalizada), definidas no <html>. */
:root {
	color-scheme: dark;
	--bg: #060908;
	--ink: #e8efe9;
	--ink-2: #aab7ae;
	--ink-3: #8b988f;
	--line: rgb(255 255 255 / .12);
	--card: rgb(255 255 255 / .045);
	--ok: var(--accent);
	--bad: var(--accent-2);
	--radius: 18px;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font); }
a { color: var(--ok); text-underline-offset: .18em; }
code { padding: .08em .35em; border-radius: 6px; background: rgb(255 255 255 / .08); font: 500 .88em var(--mono); overflow-wrap: anywhere; }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--ok) 80%, #fff); outline-offset: 3px; }
.skip { position: absolute; left: .6rem; top: -4rem; z-index: 300; padding: .55rem .9rem; border-radius: 10px; background: var(--ok); color: #04130d; font-weight: 700; text-decoration: none; }
.skip:focus { top: .6rem; }

/* fundo */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--ok) 9%, transparent), transparent 60%), var(--bg); }
.bg i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(90px); will-change: transform; animation: drift 28s ease-in-out infinite alternate; }
.bg i:nth-child(1) { background: var(--ok); top: -20vmax; left: -12vmax; opacity: .16; }
.bg i:nth-child(2) { background: var(--bad); right: -18vmax; top: 30vh; opacity: .1; animation-duration: 34s; animation-delay: -9s; }
@keyframes drift { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.12); } }

/* topo */
.wrap { width: min(1180px, 100%); margin: 0 auto; padding-inline: clamp(1rem, 4vw, 1.75rem); }
.top { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgb(6 9 8 / .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.6rem; }
.brand { display: inline-flex; flex: none; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand__mark { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 12px; color: #04130d; background: linear-gradient(135deg, var(--ok), var(--bad)); }
.top__tools { display: flex; align-items: center; gap: .4rem; justify-content: flex-end; }
.tool { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.tool[aria-pressed="false"] { color: var(--ink-3); background: transparent; text-decoration: line-through; }
.pill { display: inline-flex; align-items: center; white-space: nowrap; min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ink); font-size: .92rem; font-weight: 600; text-decoration: none; }
.pill--ghost { border-color: var(--line); background: transparent; color: var(--ink-2); }
.pill:hover { background: color-mix(in srgb, var(--ok) 22%, transparent); }
@media (max-width: 540px) { .pill--ghost { display: none; } }
@media (max-width: 380px) { .pill { padding-inline: .75rem; font-size: .86rem; } .brand__name { font-size: .95rem; } }

/* abertura */
.main { flex: 1; padding-bottom: 3rem; }
.hero { padding: clamp(1.6rem, 6vw, 3.2rem) 0 1.4rem; max-width: 46rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: .82rem; }
.pulse { width: .55rem; height: .55rem; border-radius: 50%; background: var(--ok); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 .6rem transparent; } }
.hero__title { margin: 0; font-size: clamp(2rem, 6.4vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; }
.grad { background: linear-gradient(90deg, var(--ok), var(--bad)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { margin: 1rem 0 0; color: var(--ink-2); font-size: clamp(1rem, 2.4vw, 1.18rem); }
.notice { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }

/* cartões e controles */
.card { padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgb(255 255 255 / .06), rgb(255 255 255 / .025)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 18px 50px -26px rgb(0 0 0 / .85); }
.label { display: block; margin-bottom: .45rem; color: var(--ink); font-weight: 700; }
.textarea { display: block; width: 100%; min-height: 9rem; padding: .85rem 1rem; resize: vertical; border: 1px solid var(--line); border-radius: 14px; background: rgb(0 0 0 / .32); color: var(--ink); font: 400 1rem/1.55 var(--font); }
.textarea::placeholder { color: var(--ink-3); }
.textarea:focus { border-color: var(--ok); }
.lab { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.lab__row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: .45rem; }
.lab__row p { margin: 0; font-size: .86rem; }
.count { color: var(--ink-3); font: 500 .8rem var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.examples { margin-top: 1rem; }
.examples__title { margin: 0 0 .5rem; color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.examples__list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 .84rem/1.3 var(--font); }
.chip b { font-family: var(--mono); font-weight: 700; }
.chip--btn { min-height: 2.75rem; padding-inline: 1rem; cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.chip--btn:hover { transform: translateY(-1px); background: rgb(255 255 255 / .09); }
.chip--ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 11%, transparent); }
.chip--bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 11%, transparent); }
.dial { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.dial__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.dial__head .label { margin: 0; }
.dial__out { color: var(--ink-2); font: 500 .85rem var(--mono); }
.dial__out b { color: var(--ink); }
.range { width: 100%; height: 2.75rem; margin: .2rem 0 0; background: transparent; accent-color: var(--ok); cursor: pointer; }
.dial__scale { display: flex; justify-content: space-between; margin-top: -.3rem; color: var(--ink-3); font-size: .76rem; }
.dial .muted { margin: .5rem 0 0; font-size: .86rem; }
.lab__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 1.2rem; margin-top: 1.3rem; }
.switch { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; color: var(--ink); font-weight: 500; cursor: pointer; }
.switch input { width: 1.35rem; height: 1.35rem; accent-color: var(--ok); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.75rem; padding: 0 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 700 .95rem var(--font); cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.btn:hover { background: rgb(255 255 255 / .1); }
.btn:active { transform: scale(.98); }
.btn--small { min-height: 2.75rem; padding-inline: 1rem; }
.btn--primary { border-color: transparent; background: linear-gradient(135deg, var(--ok), color-mix(in srgb, var(--ok) 60%, var(--bad))); color: #04130d; }
.btn--primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--ok), color-mix(in srgb, var(--ok) 60%, var(--bad))); }
.btn--big { min-height: 3.2rem; padding-inline: 1.6rem; font-size: 1.02rem; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* resultado: cada estado mostra só o seu bloco */
.result { min-height: 24rem; }
.result__title { margin: 0 0 1rem; font-size: 1.05rem; color: var(--ink-2); font-weight: 700; }
.state { display: none; }
.result[data-state="empty"] .state--empty, .result[data-state="loading"] .state--loading, .result[data-state="error"] .state--error { display: grid; }
.result[data-state="free"] .state--done, .result[data-state="flagged"] .state--done { display: grid; gap: 1.2rem; }
.result[aria-busy="true"] .state--done { opacity: .55; transition: opacity .2s; }
.state--empty, .state--error { justify-items: center; gap: .6rem; padding: 2rem 1rem; text-align: center; }
.state h3 { margin: 0; font-size: 1.15rem; }
.state p { margin: 0; max-width: 28rem; }
.orb { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.orb--soft { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.orb .i { width: 1.7rem; height: 1.7rem; }

/* skeleton (no lugar do spinner) */
.sk { border-radius: 12px; background: linear-gradient(90deg, rgb(255 255 255 / .06) 25%, rgb(255 255 255 / .13) 50%, rgb(255 255 255 / .06) 75%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
.state--loading { gap: 1rem; }
.sk--banner { height: 5.2rem; }
.sk--line { height: 1rem; width: 70%; }
.sk--bar { height: .7rem; border-radius: 999px; }
.sk--chips { height: 2.2rem; width: 55%; }
.sk--text { height: 6rem; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* veredito */
.verdict { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.result[data-state="free"] { --c: var(--ok); }
.result[data-state="flagged"] { --c: var(--bad); }
.verdict__icon { display: grid; place-items: center; flex: none; width: 3.2rem; height: 3.2rem; border-radius: 50%; color: #04130d; background: var(--c); }
.verdict__icon .i { width: 1.6rem; height: 1.6rem; stroke-width: 2.6; }
.verdict__kicker { margin: 0; color: var(--ink-2); font-size: .82rem; font-weight: 600; }
.verdict__title { margin: .1rem 0 0; font-size: clamp(1.2rem, 4vw, 1.5rem); line-height: 1.2; letter-spacing: -.02em; }
.verdict__sub { margin: .2rem 0 0; color: var(--ink-2); font: 500 .85rem var(--mono); }
.gauge__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-weight: 600; }
.gauge__top b { color: var(--c); font: 800 1.6rem/1 var(--font); font-variant-numeric: tabular-nums; }
.gauge__bar { height: .8rem; margin-top: .5rem; overflow: hidden; border-radius: 999px; background: rgb(255 255 255 / .1); }
.gauge__bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--c); transform-origin: 0 50%; transform: scaleX(var(--w, 0)); transition: transform .6s var(--ease); }
.gauge__note { margin: .5rem 0 0; font-size: .85rem; }
.block h4 { margin: 0 0 .5rem; color: var(--ink-2); font-size: .86rem; font-weight: 700; letter-spacing: .02em; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.marked { margin: 0; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: rgb(0 0 0 / .28); white-space: pre-wrap; overflow-wrap: anywhere; }
.marked mark { padding: .05em .25em; border-radius: .3em; color: var(--ink); background: color-mix(in srgb, var(--bad) 45%, transparent); box-shadow: inset 0 -2px 0 var(--bad); cursor: help; }
.marked mark.is-weak { background: color-mix(in srgb, #f59e0b 28%, transparent); box-shadow: inset 0 -2px 0 #f59e0b; }
.matches { display: grid; gap: .5rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.matches li { display: grid; gap: .15rem; padding: .6rem .8rem; border-left: 3px solid var(--bad); border-radius: 0 10px 10px 0; background: rgb(255 255 255 / .04); font-size: .9rem; }
.matches li.is-weak { border-left-color: #f59e0b; }
.matches q { font-weight: 600; }
.matches .why { color: var(--ink-2); }
.matches .meta { color: var(--ink-3); font: 500 .76rem var(--mono); }

/* pedido e resposta */
.io { margin-top: 1rem; }
.io__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.io__head h2 { margin: 0; font-size: 1.2rem; }
.io__head p { margin: .2rem 0 0; font-size: .92rem; }
.tabs { display: flex; gap: .3rem; margin: 1rem 0 0; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { min-height: 2.75rem; padding: 0 1rem; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-2); font: 600 .92rem var(--font); white-space: nowrap; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ok); }
.code { margin-top: .8rem; max-height: 26rem; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: rgb(0 0 0 / .4); }
.code pre { margin: 0; padding: 1rem; font: 400 .84rem/1.6 var(--mono); tab-size: 2; white-space: pre; }
.code code { padding: 0; background: none; font: inherit; overflow-wrap: normal; }
.code--static { max-height: none; }
.j-key { color: #8fd1ff; }
.j-str { color: #a7f3d0; }
.j-num { color: #fcd34d; }
.j-bool { color: #f9a8d4; }
.j-null { color: var(--ink-3); }
.io__meta { margin: .7rem 0 0; color: var(--ink-3); font: 500 .8rem var(--mono); overflow-wrap: anywhere; }

/* documentação */
.docs { margin-top: clamp(2.4rem, 6vw, 4rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; scroll-margin-top: 4.5rem; } /* minmax(0, …): a tabela larga rola dentro do cartão e não alarga a coluna */
.docs__title { margin: 0; font-size: clamp(1.5rem, 4.4vw, 2.2rem); letter-spacing: -.03em; }
.docs__lead { margin: 0; max-width: 46rem; color: var(--ink-2); }
.doc h3 { margin: 0 0 .7rem; font-size: 1.1rem; }
.doc p { margin: 0 0 .8rem; }
.doc .code { margin-top: .6rem; }
.scroll { overflow-x: auto; border-radius: 12px; }
.table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.path { white-space: nowrap; }
.method { display: inline-block; padding: .15rem .55rem; border-radius: 6px; font: 700 .76rem var(--mono); color: #04130d; background: var(--ok); }
.method--post { background: #fcd34d; }
.doc--care { border-color: color-mix(in srgb, #f59e0b 45%, transparent); }
.care { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }

/* rodapé, avisos */
.foot { border-top: 1px solid var(--line); color: var(--ink-3); font-size: .85rem; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.5rem; padding-block: 1.1rem; }
.foot a { color: var(--ink-2); }
.toasts { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 400; display: grid; gap: .5rem; width: min(440px, calc(100% - 1.6rem)); transform: translateX(-50%); pointer-events: none; }
.toast { padding: .75rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 12px; background: #11201a; box-shadow: 0 16px 40px -16px #000; font-size: .92rem; animation: toast-in .3s var(--ease) both; }
.toast--err { border-left-color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (min-width: 900px) {
	.lab { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
	.result { position: sticky; top: 4.8rem; }
}
@media (max-width: 480px) {
	.verdict { align-items: flex-start; }
	.lab__actions .btn { width: 100%; }
}
html[data-motion="reduced"] .bg i, html[data-motion="reduced"] .pulse, html[data-motion="reduced"] .sk, html[data-motion="reduced"] .toast, html[data-motion="reduced"] .gauge__bar i, html[data-motion="reduced"] .chip--btn { animation: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .bg i, .pulse, .sk, .toast, .gauge__bar i, .chip--btn { animation: none; transition: none; } html { scroll-behavior: auto; } }
