/* PeritoMCP — tokens e base compartilhados (site, entrada, app e páginas legais). */
:root {
  color-scheme: light;
  --bg: #f6f5f0;
  --bg-elev: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f2f1eb;
  --surface-3: #e9e8e0;
  --border: #e3e1d8;
  --border-strong: #d2cfc3;
  --text: #121c1a;
  --text-2: #4f5b57;
  --text-3: #85908b;
  --brand: #0e5a48;
  --brand-hover: #0a4a3b;
  --brand-ink: #ffffff;
  --brand-soft: #e1eee8;
  --brand-text: #0e5a48;
  --gold: #a9853f;
  --gold-soft: #f4ecdc;
  --amber: #a86a12;   --amber-soft: #fbf0dc;
  --rose: #b4372f;    --rose-soft: #fbe7e4;
  --blue: #2a5ea8;    --blue-soft: #e4ecf8;
  --violet: #6545a8;  --violet-soft: #ece6f8;
  --green: #18794e;   --green-soft: #e0f1e7;
  --muted-soft: #eeede7;
  --shadow-sm: 0 1px 2px rgba(18, 28, 26, .06);
  --shadow-md: 0 1px 2px rgba(18, 28, 26, .05), 0 8px 24px -12px rgba(18, 28, 26, .16);
  --shadow-lg: 0 2px 4px rgba(18, 28, 26, .04), 0 30px 60px -24px rgba(18, 28, 26, .28);
  --ring: 0 0 0 3px rgba(14, 90, 72, .22);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f0e;
  --bg-elev: #0f1413;
  --surface: #131918;
  --surface-2: #19211f;
  --surface-3: #212b29;
  --border: #232d2b;
  --border-strong: #31403c;
  --text: #e9efec;
  --text-2: #a6b2ae;
  --text-3: #6f7d78;
  --brand: #4cc79b;
  --brand-hover: #6dd6b0;
  --brand-ink: #06140f;
  --brand-soft: rgba(76, 199, 155, .12);
  --brand-text: #6fd8b2;
  --gold: #d6b26a;
  --gold-soft: rgba(214, 178, 106, .13);
  --amber: #e7a94a;   --amber-soft: rgba(231, 169, 74, .13);
  --rose: #f0796f;    --rose-soft: rgba(240, 121, 111, .13);
  --blue: #7fa9ec;    --blue-soft: rgba(127, 169, 236, .13);
  --violet: #b19af0;  --violet-soft: rgba(177, 154, 240, .13);
  --green: #5fd39a;   --green-soft: rgba(95, 211, 154, .13);
  --muted-soft: rgba(255, 255, 255, .06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 40px 80px -30px rgba(0, 0, 0, .85);
  --ring: 0 0 0 3px rgba(76, 199, 155, .3);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 15px; line-height: 1.55; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--brand-soft); color: var(--text); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
[x-cloak], [hidden] { display: none !important; }
body { overflow-x: clip; }
/* Destaque nos títulos: mesma fonte do texto, só na cor da marca (a serifada itálica destoava). */
.serif { font-family: inherit; font-weight: inherit; font-style: normal; color: var(--brand); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); }
.skip-link:focus { top: 16px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; font-size: 14px; font-weight: 550; line-height: 1; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
  background: transparent; color: var(--text);
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -8px var(--brand); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover:not(:disabled) { opacity: .9; }
.btn-secondary { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-2); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { color: var(--rose); }
.btn-danger:hover:not(:disabled) { background: var(--rose-soft); }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); transition: background-color .18s, color .18s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* Formulários */
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 550; color: var(--text-2); }
.field small, .hint { font-size: 12px; font-weight: 400; color: var(--text-3); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 400; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--text-3); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); font-weight: 400; }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand); }
.form-error { padding: 10px 12px; border-radius: 10px; background: var(--rose-soft); color: var(--rose); font-size: 13px; }
.form-error:empty { display: none; }

/* Selos */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--muted-soft); color: var(--text-2); }
.pill svg { width: 13px; height: 13px; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.rose { background: var(--rose-soft); color: var(--rose); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.pill.brand { background: var(--brand-soft); color: var(--brand-text); }

/* Marca */
.brand:not(.pill) { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 14px -8px var(--brand); }
.brand-mark svg { width: 18px; height: 18px; stroke-width: 2; }
.brand b { font-weight: 500; color: var(--text-2); }

/* Animações */
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
