/* Arguente — sistema visual
   Neutros suaves, verde de destaque, ícones sólidos e superfícies "liquid glass". */

:root {
  color-scheme: light;
  --bg: #F4F5F2;
  --blob-1: rgba(96, 196, 96, .16);
  --blob-2: rgba(170, 182, 172, .30);
  --blob-3: rgba(102, 45, 145, .06);
  --surface: rgba(255, 255, 255, .62);
  --surface-strong: rgba(255, 255, 255, .86);
  --surface-sunken: rgba(29, 31, 30, .045);
  --glass-border: rgba(255, 255, 255, .78);
  --glass-edge: rgba(29, 31, 30, .07);
  --glass-highlight: rgba(255, 255, 255, .9);
  --glass-sheen: rgba(255, 255, 255, .55);
  --shadow: 0 10px 34px rgba(28, 40, 33, .09), 0 1px 3px rgba(28, 40, 33, .07);
  --shadow-lg: 0 24px 60px rgba(28, 40, 33, .16), 0 2px 8px rgba(28, 40, 33, .08);
  --text: #1C1E1D;
  --text-2: #5C625E;
  --text-3: #8C928E;
  --sep: rgba(29, 31, 30, .09);
  /* Sistema visual Arguente 2.0: --accent é o verde de texto e links; --acao, o verde dos botões
     (verde 700, o mesmo dos ícones do menu: contraste de 5,6:1 com o texto branco, WCAG AA). */
  --accent: #2C772C;
  --accent-strong: #215921;
  --accent-soft: rgba(96, 196, 96, .16);
  --accent-contrast: #163C16;
  --acao: #2C772C;
  --acao-forte: #215921;
  --acao-texto: #FFFFFF;
  --certifica: #662D91;
  --certifica-soft: rgba(102, 45, 145, .10);
  --warn: #99510B;
  --warn-soft: rgba(229, 122, 16, .13);
  --danger: #BD3B35;
  --danger-soft: rgba(189, 59, 53, .11);
  --user-bubble: rgba(29, 31, 30, .065);
  --focus: 0 0 0 3px rgba(96, 196, 96, .45);
  --paper: #FFFFFF;
  --paper-text: #1B1B1B;

  --r-xl: 28px;
  --r-lg: 22px;
  --r: 16px;
  --r-sm: 11px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-doc: "Times New Roman", Times, "Liberation Serif", serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --topbar-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0D0F0E;
    --blob-1: rgba(96, 196, 96, .12);
    --blob-2: rgba(90, 104, 96, .20);
    --blob-3: rgba(102, 45, 145, .12);
    --surface: rgba(34, 38, 36, .55);
    --surface-strong: rgba(38, 42, 40, .88);
    --surface-sunken: rgba(255, 255, 255, .05);
    --glass-border: rgba(255, 255, 255, .09);
    --glass-edge: rgba(0, 0, 0, .4);
    --glass-highlight: rgba(255, 255, 255, .12);
    --glass-sheen: rgba(255, 255, 255, .06);
    --shadow: 0 10px 34px rgba(0, 0, 0, .38), 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
    --text: #ECEEEC;
    --text-2: #A6ACA8;
    --text-3: #767C78;
    --sep: rgba(255, 255, 255, .08);
    --accent: #8FD68F;
    --accent-strong: #BFE3BF;
    --accent-soft: rgba(96, 196, 96, .16);
    --accent-contrast: #0F2410;
    --acao: #2C772C;
    --acao-forte: #215921;
    --acao-texto: #FFFFFF;
    --certifica: #B88ADB;
    --certifica-soft: rgba(184, 138, 219, .16);
    --warn: #F19337;
    --warn-soft: rgba(229, 122, 16, .16);
    --danger: #EE7B74;
    --danger-soft: rgba(238, 123, 116, .14);
    --user-bubble: rgba(255, 255, 255, .075);
    --focus: 0 0 0 3px rgba(96, 196, 96, .45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D0F0E;
  --blob-1: rgba(96, 196, 96, .12);
  --blob-2: rgba(90, 104, 96, .20);
  --blob-3: rgba(102, 45, 145, .12);
  --surface: rgba(34, 38, 36, .55);
  --surface-strong: rgba(38, 42, 40, .88);
  --surface-sunken: rgba(255, 255, 255, .05);
  --glass-border: rgba(255, 255, 255, .09);
  --glass-edge: rgba(0, 0, 0, .4);
  --glass-highlight: rgba(255, 255, 255, .12);
  --glass-sheen: rgba(255, 255, 255, .06);
  --shadow: 0 10px 34px rgba(0, 0, 0, .38), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
  --text: #ECEEEC;
  --text-2: #A6ACA8;
  --text-3: #767C78;
  --sep: rgba(255, 255, 255, .08);
  --accent: #8FD68F;
  --accent-strong: #BFE3BF;
  --accent-soft: rgba(96, 196, 96, .16);
  --accent-contrast: #0F2410;
  --acao: #2C772C;
  --acao-forte: #215921;
  --acao-texto: #FFFFFF;
  --certifica: #B88ADB;
  --certifica-soft: rgba(184, 138, 219, .16);
  --warn: #F19337;
  --warn-soft: rgba(229, 122, 16, .16);
  --danger: #EE7B74;
  --danger-soft: rgba(238, 123, 116, .14);
  --user-bubble: rgba(255, 255, 255, .075);
  --focus: 0 0 0 3px rgba(96, 196, 96, .45);
}

/* ---------------------------------------------------------------- Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }  /* no iOS, só o body não impede a rolagem lateral */
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;  /* "hidden" criaria uma área de rolagem própria e anularia a trilha fixa (sticky) */
}
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 12% 8%, var(--blob-1), transparent 70%),
    radial-gradient(34% 30% at 92% 18%, var(--blob-2), transparent 70%),
    radial-gradient(44% 38% at 62% 96%, var(--blob-3), transparent 72%);
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 100; background: var(--surface-strong); padding: 8px 12px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

svg.i { width: 20px; height: 20px; flex: none; fill: currentColor; display: inline-block; vertical-align: middle; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 28px; height: 28px; }
svg.i.xl { width: 40px; height: 40px; }

/* ---------------------------------------------------------------- Liquid glass */

.glass {
  position: relative;
  background: var(--surface);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  backdrop-filter: blur(24px) saturate(185%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 var(--glass-edge);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, var(--glass-sheen) 0%, transparent 38%, transparent 70%, var(--glass-sheen) 100%);
  opacity: .7;
}
.glass > * { position: relative; }

.field, .select, .textarea {
  width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--glass-border);
  background: var(--surface);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05), inset 0 1px 0 var(--glass-highlight), 0 1px 2px rgba(0, 0, 0, .04);
  padding: 11px 14px;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.field:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.field.erro { border-color: var(--danger); }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238C928E'%3E%3Cpath d='M12 15.6a1 1 0 0 1-.7-.3l-5-5a1 1 0 1 1 1.4-1.4l4.3 4.3 4.3-4.3a1 1 0 1 1 1.4 1.4l-5 5a1 1 0 0 1-.7.3Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
.label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
