/** Sonar · mesa marinho e papel prensado. O produto público se apresenta
 * somente como Sonar; o comportamento da leitura segue intacto. */

/* As fontes vêm de `/fonts`, servidas por esta casa com a licença OFL ao lado
   (`public/fonts/licenses/`). Regra 13: fonte de fundição paga sem licença web
   em site de produção é passivo jurídico de quatro a cinco dígitos em dólar, e
   o default aqui é sempre licença aberta. */
@font-face {
  font-family: "Young Serif";
  src: url("/fonts/YoungSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Literata";
  src: url("/fonts/Literata-Variable.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #0E1528;
  --surface-0: #0E1528;
  --surface-1: #1E2A44;
  --surface-2: #243451;
  --surface-3: #2C3F6E;
  --navy-2: #1E2A44;
  --navy-3: #243451;
  --accent: #EDE4D3;
  --white: #FFF9EE;
  --txt: #EDE4D3;
  --txt-mid: #D6C9AE;
  --txt-faint: #B9AF9E;
  --border: rgba(237, 228, 211, 0.14);
  --border-2: rgba(237, 228, 211, 0.23);
  --border-3: rgba(237, 228, 211, 0.35);
  --accent-soft: rgba(237, 228, 211, 0.10);
  --accent-line: rgba(237, 228, 211, 0.42);
  --gauge-track: rgba(237, 228, 211, 0.12);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, 0.08);
  --bad-line: rgba(255, 107, 107, 0.22);
  --neutral: #B9AF9E;
  --market-band: rgba(106, 128, 179, 0.48);
  --market-mark: #AFC2EB;
  --tok-key: #8FB8FF;                         /* só dentro de snippet de código */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  /* O corpo e Literata, que e a fonte de TEXTO do DS. Inter volta pontualmente
     em campo, botao e navegacao, que e o papel dela. */
  font-family: "Literata", Georgia, serif;
  background: var(--navy); color: var(--txt);
  font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
/* `.mono` sobreviveu ao nome: o papel dela e DADO, e o DS desta casa nao tem
   mono. Literata com numeral tabular faz o mesmo trabalho, alinhar coluna de
   numero, dentro do sistema. */
.mono { font-family: "Literata", Georgia, serif; font-variant-numeric: tabular-nums; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.s-top { display: flex; align-items: center; justify-content: space-between; padding: 28px 0 0; }
.s-word { display: inline-flex; align-items: center; width: 128px; min-height: 38px; text-decoration: none; }
.s-word img { display: block; width: 100%; height: auto; }
.s-langs { display: flex; gap: 4px; font-size: 12px; }
.s-langs a { color: var(--txt-faint); text-decoration: none; text-transform: uppercase; letter-spacing: 0.08em; padding: 8px; min-height: 36px; display: inline-flex; align-items: center; }
.s-langs a.on { color: var(--accent); }
.s-langs a:hover { color: var(--txt); }

/* ---------- screens ---------- */
.screen { display: none; }
.screen.active { display: block; }

/* ---------- input ---------- */
.hero { padding: 72px 0 40px; max-width: 640px; }
.eyebrow { font-family: "Literata", Georgia, serif; font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.eyebrow-sub { font-family: "Literata", Georgia, serif; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--txt-faint); margin-bottom: 22px; }
/* O DISPLAY e Young Serif, com o tracking e a entrelinha que o R6 cravou. Ele
   estava em Inter 300 com -0,025em, que e sans de interface fazendo papel de
   display: a mesma coisa que a peritagem de 22/08 apontou na home, e o Founder
   descreveu como "a letra nao e a que a gente aprovou". Inter fica so em
   controle de interface, que aqui e campo, botao e navegacao. */
.hero h1 {
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(30px, 5.4vw, 50px);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 24px;
  max-width: 18ch;
  text-wrap: balance;
}
.hero .lead { font-size: 17px; color: var(--txt-mid); line-height: 1.7; max-width: 56ch; margin-bottom: 36px; }
.form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.field { width: 100%; background: var(--surface-1); border: 1px solid var(--border-2); border-radius: 10px; color: var(--txt); font-size: 16px; padding: 16px 18px; outline: none; transition: border-color 0.15s; font-family: inherit;  font-family: "Inter", system-ui, sans-serif;}
.field::placeholder { color: var(--txt-faint); }
.field:focus { border-color: var(--accent-line); }
.field.city { font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: var(--navy); font-size: 15px; font-weight: 600; letter-spacing: 0.01em; padding: 16px 28px; border: none; border-radius: 10px; cursor: pointer; text-decoration: none; transition: opacity 0.15s, transform 0.05s; font-family: inherit;  font-family: "Inter", system-ui, sans-serif;}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 11px 16px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--txt); border: 1px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--accent-line); opacity: 1; }
.disclaimer { font-size: 12.5px; color: var(--txt-faint); margin-top: 18px; max-width: 52ch; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 4px; }

/* ---------- teatro (loading) ---------- */
.theater { padding: 80px 0; max-width: 600px; margin: 0 auto; }
.theater .eyebrow { margin-bottom: 18px; }
.theater-host { font-size: 22px; font-weight: 300; color: var(--white); margin-bottom: 36px; letter-spacing: -0.01em; }
.th-site { display: flex; align-items: center; gap: 12px; padding: 15px 18px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 26px; position: relative; overflow: hidden; }
.th-site-ico { color: var(--txt-faint); display: flex; flex-shrink: 0; }
.th-url { font-family: "Literata", Georgia, serif; font-size: 14px; color: var(--txt); }
.th-scan { position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--accent-soft), transparent); animation: scan 1.8s ease-in-out infinite; }
@keyframes scan { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }
.th-engines { display: flex; gap: 26px; align-items: center; justify-content: center; margin-bottom: 30px; }
.th-eng { width: 28px; height: 28px; opacity: 0.22; filter: grayscale(1); transition: opacity 0.4s, filter 0.4s; color: var(--txt-mid); }
.th-eng svg { width: 100%; height: 100%; }
.th-eng.lit { opacity: 1; filter: grayscale(0); }
.th-prog { height: 4px; background: var(--surface-2); border-radius: 100px; overflow: hidden; }
.th-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 100px; transition: width 0.6s cubic-bezier(.2,.7,.2,1); }
.th-step { font-family: "Literata", Georgia, serif; font-size: 13px; color: var(--txt-mid); margin-top: 14px; letter-spacing: 0.02em; }

/* ---------- resultado ---------- */
.result { padding: 48px 0 80px; max-width: 920px; margin: 0 auto; }
.score-hero { display: grid; grid-template-columns: minmax(220px, 5fr) 7fr; gap: 32px; align-items: center; padding: 8px 0 8px; }
.score-hero-l { text-align: center; }
.score-sub { font-family: "Literata", Georgia, serif; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--txt-faint); margin-bottom: 12px; }
.gauge { position: relative; width: 212px; height: 212px; margin: 0 auto 14px; }
.gauge-svg { position: absolute; inset: 0; }
.g-svg { width: 100%; height: 100%; }
.gauge-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-num .big { font-family: "Literata", Georgia, serif; font-size: 60px; font-weight: 500; color: var(--white); line-height: 1; }
.gauge-num .of { font-family: "Literata", Georgia, serif; font-size: 12px; color: var(--txt-faint); margin-top: 6px; letter-spacing: 0.05em; }
.level-chip { display: inline-block; font-family: "Literata", Georgia, serif; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 100px; padding: 7px 16px; }
#r-host { font-family: "Literata", Georgia, serif; font-size: 12px; letter-spacing: 0.04em; color: var(--txt-mid); margin-top: 14px; }

/* régua de mercado */
.score-hero-r { min-width: 0; }
.mkt-lead { font-size: 12px; color: var(--txt-faint); text-transform: uppercase; letter-spacing: 0.1em; font-family: "Literata", Georgia, serif; margin-bottom: 14px; }
.mkt-track { position: relative; height: 8px; background: var(--surface-2); border-radius: 100px; }
.mkt-band { position: absolute; top: 0; height: 100%; background: var(--market-band); border-radius: 100px; background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255,255,255,.05) 4px 6px); }
.mkt-you { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.mkt-flag { display: block; width: 3px; height: 18px; background: var(--accent); border-radius: 2px; position: relative; }
.mkt-flag::after { content: ""; position: absolute; top: -7px; left: 50%; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 6px solid var(--accent); }
.mkt-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--txt-mid); margin-top: 14px; }
.mkt-cap b { color: var(--txt); }
.mkt-basis { color: var(--txt-faint); font-size: 11.5px; }
.mkt-verdict { font-weight: 500; }
.mkt-verdict.mkt-above { color: var(--accent); }
.mkt-verdict.mkt-within { color: var(--market-mark); }
.mkt-verdict.mkt-below { color: var(--bad); }
.mkt-note { font-size: 12.5px; color: var(--txt-faint); line-height: 1.6; margin-top: 12px; max-width: 52ch; }

/* blocos */
.block { margin-top: 44px; }
.block-title { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--white); margin-bottom: 18px; }
.block-hint { font-size: 13px; color: var(--txt-faint); line-height: 1.6; margin-bottom: 16px; }
.r-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.r-grid2 .block { margin-top: 44px; }
@media (max-width: 720px) { .r-grid2 { grid-template-columns: 1fr; } }

/* split site vs autoridade */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .split { grid-template-columns: 1fr; } }
.split-item { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.split-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.split-label { min-width: 0; font-size: 14px; font-weight: 500; color: var(--txt); }
.split-num { flex-shrink: 0; font-size: 26px; font-weight: 500; color: var(--white); }
.split-hint { font-size: 12.5px; color: var(--txt-faint); line-height: 1.55; margin-top: 12px; }
.bar { height: 6px; background: var(--surface-2); border-radius: 100px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 100px; width: 0; transition: width 0.9s cubic-bezier(.2,.7,.2,1); }
.bar.incon > span { background: var(--txt-faint); }

/* raio-x mockup */
.ai-screen { background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 16px; overflow: hidden; }
.ai-bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface-3); }
.ai-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #3a4150; }
.ai-bar-label { margin-left: 8px; font-size: 11px; color: var(--txt-faint); letter-spacing: 0.04em; }
.ai-body { padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.ai-msg { display: flex; gap: 11px; align-items: flex-start; }
.ai-ava { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-ava svg { width: 15px; height: 15px; }
.guest-ava { background: var(--surface-0); border: 1px solid var(--border-2); font-family: "Literata", Georgia, serif; font-size: 11px; color: var(--txt-mid); }
.ai-ava.brand { background: var(--surface-0); border: 1px solid var(--border-2); }
.ai-ava.sereia { color: var(--accent); }
.ai-bubble { background: var(--surface-0); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 12px 15px; font-size: 14px; color: var(--txt); line-height: 1.55; max-width: 86%; }
.ai-bubble.bot { color: var(--txt-mid); }
.ai-bubble mark.comp { color: #fff; font-weight: 500; background: var(--bad-soft); border-bottom: 1.5px solid var(--bad); padding: 1px 4px; border-radius: 3px; }
.ai-bubble mark.you { color: var(--navy); font-weight: 600; background: var(--accent); padding: 1px 5px; border-radius: 3px; }
.ai-verdict { padding: 11px 14px; background: var(--bad-soft); border: 1px solid var(--bad-line); border-radius: 8px; font-size: 13px; color: var(--txt-mid); line-height: 1.5; }
.ai-verdict .v-bad { color: var(--bad); font-weight: 500; }
.ai-verdict strong { color: var(--accent); }
.ai-incon { padding: 22px 20px; font-size: 14px; color: var(--txt-mid); line-height: 1.65; }
.micro-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--accent); text-decoration: none; font-weight: 500; }
.micro-cta .arr { transition: transform 0.2s; }
.micro-cta:hover .arr { transform: translateY(3px); }

/* públicos */
.pub-group { margin-bottom: 18px; }
.pub-seg { font-family: "Literata", Georgia, serif; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--txt-faint); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border-2); border-radius: 100px; padding: 9px 16px; font-size: 13.5px; color: var(--txt-mid); background: var(--surface-1); }
.chip .ico { font-family: "Literata", Georgia, serif; font-size: 13px; font-weight: 600; }
.chip.yes { color: var(--txt); border-color: var(--accent-line); }
.chip.yes .ico { color: var(--accent); }
.chip.no .ico { color: var(--bad); }
.chip.unk { opacity: 0.6; }
.chip.unk .ico { color: var(--txt-faint); }

/* pilares */
.pillar { padding: 16px 0; border-bottom: 1px solid var(--border); }
.pillar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pillar-name { font-size: 15px; font-weight: 500; color: var(--txt); display: inline-flex; align-items: center; gap: 8px; }
.tip { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-2); font-size: 11px; color: var(--txt-faint); cursor: pointer; background: none; padding: 0; flex-shrink: 0; transition: color .15s, border-color .15s; }
.tip:hover, .tip:active { color: var(--accent); border-color: var(--accent-line); }
.tip-pop { margin: 4px 0 14px; padding: 11px 13px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 8px; font-size: 12.5px; line-height: 1.55; color: var(--txt-mid); }
.tip-pop[hidden] { display: none; }
.p4-tag { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 4px; padding: 2px 6px; }
.pillar-meta { display: flex; align-items: baseline; gap: 12px; flex-shrink: 0; }
.pillar-weight { font-size: 11px; color: var(--txt-faint); }
.pillar-score { font-size: 16px; font-weight: 500; color: var(--white); }
.pillar-toggle { background: none; border: none; font-family: inherit; font-size: 12px; color: var(--txt-faint); cursor: pointer; margin-top: 6px; padding: 8px 0; min-height: 32px; }
.pillar-toggle:hover { color: var(--accent); }
.checks { display: none; margin-top: 12px; flex-direction: column; gap: 7px; }
.pillar.open .checks { display: flex; }
.ck-row { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--txt-mid); }
.ck-detail { font-size: 11.5px; color: var(--txt-faint); }
.ck { font-family: "Literata", Georgia, serif; font-size: 12px; width: 14px; flex-shrink: 0; text-align: center; }
.ck.ok { color: var(--accent); }
.ck.no { color: var(--bad); }
.ck.nul { color: var(--txt-faint); }
.p4-note { font-size: 12.5px; color: var(--accent); line-height: 1.5; margin-bottom: 6px; }

/* prova técnica · carrossel de abas (setas + fade + snap) */
.proof { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ptabs-wrap { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); background: var(--surface-1); }
.ptabs {
  display: flex; gap: 0; flex: 1; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.ptabs::-webkit-scrollbar { display: none; }
.ptab { white-space: nowrap; scroll-snap-align: center; padding: 13px 18px; font-family: inherit; font-size: 13px; color: var(--txt-faint); background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.ptab:hover { color: var(--txt-mid); }
.ptab.on { color: var(--accent); border-bottom-color: var(--accent); }
.ptab-nav { flex-shrink: 0; width: 38px; background: var(--surface-1); border: none; color: var(--txt-mid); font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 0.15s; }
.ptab-nav:hover { color: var(--accent); }
.ptab-nav:active { color: var(--accent); }
.ptab-nav.prev { border-right: 1px solid var(--border); }
.ptab-nav.next { border-left: 1px solid var(--border); }
@media (min-width: 721px) { .ptab-nav { display: none; } } /* desktop: 4 abas cabem, setas só no mobile */
.ppane { display: none; padding: 22px 20px; }
.ppane.on { display: block; }
.ppane[data-pane="matrix"] { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pane-title { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 14px; }

/* cards de motor */
.quant { font-size: 13px; color: var(--accent); letter-spacing: 0.02em; margin-bottom: 16px; }
.eng-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.eng-card { border: 1px solid var(--border-2); border-radius: 12px; padding: 14px 16px; background: var(--surface-1); }
.eng-card.cites { border-color: var(--accent-line); }
.eng-card.absent { border-color: var(--bad-line); }
.eng-card.untested { opacity: 0.6; }
.eng-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.eng-logo { width: 20px; height: 20px; display: flex; flex-shrink: 0; }
.eng-logo svg { width: 100%; height: 100%; }
.eng-name { font-size: 13.5px; color: var(--txt); font-weight: 500; }
.eng-count { display: flex; align-items: baseline; gap: 6px; }
.eng-count b { font-size: 24px; font-weight: 500; color: var(--accent); }
.eng-count span { font-size: 11px; color: var(--txt-faint); }
.eng-card.absent .eng-count b { color: var(--bad); }
.eng-card.untested .eng-count b { color: var(--txt-faint); }
.eng-status { margin-top: 10px; font-size: 11px; color: var(--txt-faint); }
.eng-card.cites .eng-status { color: var(--accent); }
.eng-card.absent .eng-status { color: var(--bad); }

/* matriz */
.matrix { width: 100%; min-width: 320px; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { padding: 11px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.matrix th { font-family: "Literata", Georgia, serif; font-size: 11px; font-weight: 500; color: var(--txt-faint); letter-spacing: 0.04em; }
.matrix th:first-child, .matrix td.mx-p { text-align: left; }
.matrix td.mx-p { color: var(--txt); font-weight: 500; white-space: nowrap; }
.matrix td.mx-yes { color: var(--accent); font-weight: 700; }
.matrix td.mx-no { color: var(--bad); font-weight: 700; }
.matrix td.mx-na { color: var(--txt-faint); }

/* inspetor técnico */
.tech-inspect { display: flex; flex-direction: column; gap: 10px; }
.tech-row { background: var(--surface-0); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.tech-r-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tech-r-label { font-size: 13px; color: var(--txt); flex: 1; }
.tech-r-state { font-size: 11px; }
.tech-row.has .tech-r-state { color: var(--accent); }
.tech-row.missing .tech-r-state { color: var(--bad); }
.tech-row.nul .tech-r-state { color: var(--txt-faint); }
.tech-code { display: block; font-size: 12px; color: var(--txt-mid); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 11px; overflow-x: auto; }
.tech-row.missing .tech-code { color: var(--txt-faint); text-decoration: line-through; text-decoration-color: var(--bad-line); }

/* fontes */
.srcs { display: flex; flex-wrap: wrap; gap: 8px; }
.src { display: inline-block; font-size: 12px; color: var(--txt-mid); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 5px 11px; }

/* cidade tardia */
.city-need { background: var(--surface-1); border: 1px solid var(--border-2); border-radius: 12px; padding: 16px 18px; margin-bottom: 8px; font-size: 13px; color: var(--txt-mid); }
.city-need form { display: flex; gap: 10px; margin-top: 12px; }
.city-need .field { font-size: 14px; padding: 11px 14px; }

.result-foot { font-size: 12px; color: var(--txt-faint); line-height: 1.6; margin-top: 36px; border-left: 2px solid var(--border-2); padding-left: 14px; }

/* gate */
.gate { margin-top: 52px; background: linear-gradient(180deg, var(--surface-1), var(--surface-0)); border: 1px solid var(--border-2); border-radius: 16px; padding: 36px 32px; scroll-margin-top: 24px; }
.gate-title { font-size: 22px; font-weight: 500; color: var(--white); letter-spacing: -0.01em; margin-bottom: 12px; line-height: 1.3; }
.gate-lead { font-size: 15px; color: var(--txt-mid); line-height: 1.65; margin-bottom: 24px; max-width: 60ch; }
.gate-tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.gate-tab { flex: 1; text-align: center; padding: 12px; border: 1px solid var(--border-2); border-radius: 10px; font-size: 13.5px; color: var(--txt-mid); cursor: pointer; background: transparent; font-family: inherit; transition: all 0.15s; }
.gate-tab.on { border-color: var(--accent-line); color: var(--white); background: var(--accent-soft); }
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-row { display: none; flex-direction: column; gap: 12px; }
.gate-row.on { display: flex; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gate-consent { font-size: 12px; color: var(--txt-faint); margin-top: 4px; line-height: 1.5; }
.gate-msg { font-size: 14px; color: var(--accent); margin-top: 12px; min-height: 20px; line-height: 1.5; }
.gate-msg.error { color: var(--bad); }
.rescan-row { text-align: center; margin-top: 40px; }
.rescan-link { font-size: 13px; color: var(--txt-faint); text-decoration: none; display: inline-block; padding: 8px 4px; }
.rescan-link:hover { color: var(--accent); }

.foot { text-align: center; padding: 40px 0 48px; font-family: "Literata", Georgia, serif; font-size: 11px; letter-spacing: 0.1em; color: var(--txt-faint); }
.foot a { color: var(--txt-faint); text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* ---------- responsivo ---------- */
@media (max-width: 720px) {
  .score-hero { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .score-hero-r { text-align: left; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .gate { padding: 28px 22px; }
  .gauge { width: 196px; height: 196px; }
  .gauge-num .big { font-size: 52px; }
  .city-need form { flex-direction: column; }
  .eng-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .th-scan { animation: none; }
  .bar > span, .th-fill, #g-prog { transition: none; }
}

/* Papel Prensado: o Sonar sobre a mesa, sem mudar seu motor ou seus estados. */
body { background: var(--irs-c-marinho-900); }
.wrap { max-width: 1080px; }
.s-top { padding-top: 32px; }
.s-word { width: clamp(136px, 40vw, 176px); }
.s-langs a.on { color: var(--white); box-shadow: inset 0 -1px var(--txt-mid); }
.s-langs a:focus-visible, .s-word:focus-visible, .foot a:focus-visible { outline: 2px solid var(--txt); outline-offset: 4px; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(32px, 5vw, 75px);
  max-width: none;
  margin: clamp(44px, 5vw, 76px) 0 80px;
  padding: clamp(40px, 5vw, 70px);
  overflow: hidden;
  border-radius: 24px;
  color: #1E2A44;
  background: linear-gradient(145deg, #FFF9EE 0%, #EDE4D3 62%, #E2D7C1 100%);
  box-shadow: inset 0 1px 1px #fff9, 0 2px 3px #0005, 0 30px 60px -22px #000a;
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url('/brand/papel-grao.svg') repeat;
  background-size: 300px;
  opacity: .18;
  pointer-events: none;
  content: '';
}
.hero::after {
  position: absolute;
  top: -132px;
  right: -132px;
  width: min(48vw, 460px);
  height: min(48vw, 460px);
  border: 1px solid #1E2A4428;
  border-radius: 50%;
  box-shadow: 0 0 0 34px #1E2A440b, 0 0 0 68px #1E2A4408, 0 0 0 102px #1E2A4405;
  pointer-events: none;
  content: '';
}
.hero > * { position: relative; z-index: 1; min-width: 0; }
.hero .eyebrow {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  min-height: 72px;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 999px;
  color: var(--irs-broche-texto);
  background: var(--irs-broche-fundo);
  box-shadow: var(--irs-broche-relevo), 0 2px 3px #0005, 0 20px 28px -16px #0009;
  font: 400 16px/1 "Young Serif", Georgia, serif;
  letter-spacing: -.02em;
  text-transform: none;
  text-shadow: var(--irs-broche-gravado);
}
.hero .eyebrow-sub { color: #5A5446; font-family: "Inter", system-ui, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .11em; margin-bottom: 17px; }
.hero h1 { max-width: 18ch; color: #1E2A44; font-size: clamp(34px, 3.5vw, 47px); margin-bottom: 20px; }
.hero .lead { max-width: 63ch; color: #45473F; font-size: 15.5px; line-height: 1.58; margin-bottom: 0; }
.hero .form { max-width: 570px; }
.hero .field { padding: 15px 16px; }
.hero .field {
  border: 1px solid #1E2A4440;
  border-radius: 16px;
  color: #1E2A44;
  background: #FFF9EE;
  box-shadow: inset 0 1px 3px #1E2A4410;
}
.hero .field::placeholder { color: #666A70; }
.hero .field:focus-visible { outline: 2px solid #2C3F6E; outline-offset: 2px; border-color: #2C3F6E; }
.hero .btn {
  width: fit-content;
  min-height: 54px;
  margin-top: 6px;
  padding-inline: 30px;
  border-radius: 999px;
  color: #EDE4D3;
  background: #1E2A44;
  box-shadow: 0 3px 0 #0E1528, 0 14px 22px -12px #0008;
}
.hero .btn:hover { opacity: 1; transform: translateY(-2px); }
.hero .btn:focus-visible { outline: 2px solid var(--irs-c-marinho-700); outline-offset: 4px; }
.btn:focus-visible, .gate-tab:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.hero .disclaimer { color: #5A5446; margin-top: 18px; }
.hero .err { color: #9A2929; }

.theater-host, .gate-title, .block-title, .pane-title { font-family: "Young Serif", Georgia, serif; font-weight: 400; }
.theater-host { font-size: clamp(26px, 4vw, 38px); }
.result { padding-top: clamp(56px, 7vw, 96px); }
.score-hero { padding: 34px; border-radius: var(--irs-card-radius); background: var(--irs-card); box-shadow: var(--irs-sh-card); }
.split-item, .eng-card, .city-need { border-radius: 16px; }
.ai-screen, .proof, .gate { border-radius: 24px; }
.gate { background: var(--irs-card); box-shadow: var(--irs-sh-card); }
.gate-title { font-size: clamp(25px, 3vw, 32px); }
.btn, .gate-tab, .field { border-radius: 16px; }
.btn { box-shadow: inset 0 1px 1px #fffa, 0 3px 0 #8C7E62, 0 14px 22px -12px #000b; }
.btn:hover { transform: translateY(-2px); opacity: 1; }
.btn-ghost { box-shadow: none; }
.level-chip, .chip { border-radius: 999px; }
.gate-tab.on { color: var(--irs-texto); }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero .lead { max-width: 60ch; }
}

@media (max-width: 560px) {
  .hero { margin: 46px -6px 64px; padding: 34px 26px 42px; }
  .hero::after { top: -80px; right: -90px; width: 220px; height: 220px; }
  .hero .eyebrow { width: 70px; min-width: 70px; min-height: 70px; margin-bottom: 24px; font-size: 15px; }
  .hero h1 { font-size: clamp(34px, 9.5vw, 46px); }
  .hero .lead { font-size: 16px; }
  .hero .btn { width: 100%; }
  .score-hero { padding: 28px 20px; }
}

/* O resultado inteiro e uma folha legivel sobre a mesa marinho.
   Os aliases locais mantem os estados do Sonar e passam a ler os tokens
   semanticos oficiais do Papel Prensado, inclusive em modo claro/escuro. */
.result {
  color-scheme: light;
  --irs-folha: var(--irs-c-papel-100);
  --irs-card: var(--irs-c-base-branco);
  --irs-campo: var(--irs-c-papel-200);
  --irs-texto: var(--irs-c-marinho-700);
  --irs-texto-2: var(--irs-c-ardosia-500);
  --irs-texto-nota: var(--irs-c-sepia-700);
  --irs-texto-inverso: var(--irs-c-papel-300);
  --irs-borda: rgba(30,42,68,0.14);
  --irs-borda-forte: rgba(30,42,68,0.28);
  --irs-acao: var(--irs-c-marinho-700);
  --irs-acao-texto: var(--irs-c-papel-300);
  --irs-selecao: rgba(44,63,110,0.10);
  --irs-rebaixo: var(--irs-c-marinho-700);
  --irs-foco: var(--irs-c-marinho-500);
  --irs-erro: var(--irs-c-sinal-erro);
  --irs-erro-fundo: var(--irs-c-sinal-erroFundo);
  --irs-grao-opacidade: 0.30;
  --irs-sombra-cor: 60,40,20;
  --surface-0: var(--irs-folha);
  --surface-1: var(--irs-card);
  --surface-2: var(--irs-c-papel-200);
  --surface-3: var(--irs-c-papel-300);
  --white: var(--irs-texto);
  --txt: var(--irs-texto);
  --txt-mid: var(--irs-texto-2);
  --txt-faint: var(--irs-texto-nota);
  --border: var(--irs-borda);
  --border-2: var(--irs-borda-forte);
  --border-3: var(--irs-borda-forte);
  --accent: var(--irs-acao);
  --accent-soft: var(--irs-selecao);
  --accent-line: var(--irs-borda-forte);
  --gauge-track: var(--irs-c-papel-300);
  --bad: var(--irs-erro);
  --bad-soft: var(--irs-erro-fundo);
  --bad-line: var(--irs-borda-forte);
  --market-band: var(--irs-c-marinho-200);
  --market-mark: var(--irs-c-marinho-500);
  position: relative;
  isolation: isolate;
  max-width: 960px;
  padding: clamp(28px, 5vw, 56px);
  margin: clamp(32px, 5vw, 64px) auto 80px;
  color: var(--irs-texto);
  background: var(--irs-folha);
  border: 1px solid var(--irs-borda);
  border-radius: var(--irs-folha-radius);
  box-shadow: var(--irs-sh-folha);
}
.result::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url('/brand/papel-grao.svg') repeat;
  background-size: 300px;
  opacity: var(--irs-grao-opacidade);
  pointer-events: none;
  content: '';
}
.result .score-hero,
.result .split-item,
.result .eng-card,
.result .proof,
.result .gate,
.result .city-need { border: 1px solid var(--irs-borda); box-shadow: var(--irs-sh-card); }
.result .score-hero { background: var(--irs-card); }
.result .ai-screen { background: var(--irs-folha); border: 1px solid var(--irs-borda-forte); }
.result .ai-bar { background: var(--irs-c-papel-300); }
.result .ai-bar .dot { background: var(--irs-c-sepia-500); }
.result .ai-bubble { background: var(--irs-card); border-color: var(--irs-borda-forte); }
.result .ai-bubble.bot { background: var(--irs-c-papel-200); }
.result .ai-ava.brand { background: var(--irs-rebaixo); }
.result .ai-ava.guest-ava { background: var(--irs-card); }
.result .ai-bubble mark.comp { color: var(--irs-erro); }
.result .ai-bubble mark.you { color: var(--irs-texto-inverso); }
.result .gate { background: var(--irs-card); }
.result .field { background: var(--irs-campo); color: var(--irs-texto); }
.result .field::placeholder { color: var(--irs-texto-nota); }
.result .field:focus-visible,
.result .btn:focus-visible,
.result .gate-tab:focus-visible,
.result .ptab:focus-visible,
.result .ptab-nav:focus-visible,
.result .tip:focus-visible,
.result .pillar-toggle:focus-visible { outline: 2px solid var(--irs-foco); outline-offset: 2px; }
.result .btn { background: var(--irs-acao); color: var(--irs-acao-texto); box-shadow: none; }
.result .btn-ghost { background: transparent; color: var(--irs-texto); border: 1px solid var(--irs-borda-forte); }
.result .gate-tab.on { background: var(--irs-selecao); border-color: var(--irs-borda-forte); }
.result .rescan-link { color: var(--irs-texto-2); }
.result .block-title { font-size: clamp(18px, 2vw, 22px); letter-spacing: -0.01em; }
.result .pane-title { font-size: 18px; }
.ai-screen, .ai-body, .ai-msg, .ai-bubble, .split-item, .eng-card, .proof, .gate { min-width: 0; }
.ai-bubble, .ai-bar-label, .src, .th-url, .tech-code { overflow-wrap: anywhere; }
.src { max-width: 100%; }

/* O consentimento e compartilhado com o site Sereia. Nesta pagina ele
   recebe o envelope do Sonar sem alterar a regra de consentimento. */
body .sereia-consent {
  background: var(--irs-c-papel-100);
  color: var(--irs-c-marinho-700);
  border-color: rgba(30,42,68,0.28);
  box-shadow: var(--irs-sh-overlay);
}
body .sereia-consent-texto { color: var(--irs-c-ardosia-500); }
body .sereia-consent-texto a { color: var(--irs-c-marinho-500); }
body .sereia-consent-btn { color: var(--irs-c-marinho-700); border-color: rgba(30,42,68,0.28); }
body .sereia-consent-btn--aceitar { color: var(--irs-c-papel-300); background: var(--irs-c-marinho-700); border-color: var(--irs-c-marinho-700); }
body .sereia-consent-btn:focus-visible { outline-color: var(--irs-c-marinho-500); }

@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .result { margin-inline: -4px; padding: 24px 18px 32px; border-radius: var(--irs-radius-lg); }
  .result .score-hero { padding: 24px 16px; }
  .result .gate { padding: 24px 16px; }
  .ai-body { padding: 18px 14px; }
  .ai-msg { gap: 8px; }
  .ai-bubble { max-width: calc(100% - 36px); padding: 10px 12px; }
  .pillar-head { flex-wrap: wrap; align-items: flex-start; }
  .pillar-name { min-width: 0; flex-wrap: wrap; }
  .pillar-meta { margin-left: auto; }
  .eng-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
  .gate-tabs { flex-wrap: wrap; }
  .gate-tab { flex-basis: 145px; }
  .ptab-nav { display: none; }
  .ptabs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .ptab { white-space: normal; min-height: 50px; padding: 10px 8px; line-height: 1.25; }
}
