:root{
  /* Background retouch (1 = ligado / 0 = desligado) */
  --bg-retouch: .58;
  --bg-retouch-grid: calc(var(--bg-retouch) * .042);
  --bg-retouch-glow: calc(var(--bg-retouch) * .34);
  --bg-retouch-accent: calc(var(--bg-retouch) * .10);
  --bg-retouch-grid-rgb: 22 54 40;
  --bg-retouch-glow-rgb: 255 255 255;

  --bg: #f3fbf6;
  --bg2:#eefaf2;

  --surface: rgba(255,255,255,.90);
  --surface2: rgba(255,255,255,.82);

  --text: #0b1220;
  --muted: rgba(11,18,32,.62);

  --accent: #0b8638;
  --accent2:#10b964;

  --accent-rgb: 22 163 74;
  --accent2-rgb: 16 185 129;

  --stroke: rgba(11,18,32,.09);
  --stroke2: rgba(11,18,32,.13);

  --radius: 8px;
  --shadow: 0 18px 54px rgba(2,6,23,.10);
  --shadow2: 0 8px 22px rgba(2,6,23,.08);
  --ring: 0 0 0 1px var(--stroke2), 0 0 0 5px rgb(var(--accent-rgb) / .12);

  --max: 100%;

  /* Tipografia base (evita “micro UI”) */
  --font-size: 14px;
  --line: 1.35;
}

html[data-theme="dark"]{
  --bg-retouch-grid: calc(var(--bg-retouch) * .030);
  --bg-retouch-glow: calc(var(--bg-retouch) * .16);
  --bg-retouch-accent: calc(var(--bg-retouch) * .14);
  --bg-retouch-grid-rgb: 100 116 139;
  --bg-retouch-glow-rgb: 186 230 253;

  --bg: #080f1a;
  --bg2:#0b1220;

  --surface: rgba(15,23,42,.74);
  --surface2: rgba(15,23,42,.64);

  --text: #e5edf5;
  --muted: rgba(182,196,212,.82);

  --stroke: rgba(148,163,184,.20);
  --stroke2: rgba(148,163,184,.28);

  --shadow: 0 20px 68px rgba(0,0,0,.48);
  --shadow2: 0 10px 28px rgba(0,0,0,.34);
  --ring: 0 0 0 1px rgba(148,163,184,.28), 0 0 0 5px rgb(var(--accent-rgb) / .16);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-size: var(--font-size);
  line-height: var(--line);
  color: var(--text);
  background:
    radial-gradient(1250px 520px at 50% -12%, rgb(var(--bg-retouch-glow-rgb) / var(--bg-retouch-glow)), transparent 64%),
    linear-gradient(155deg, rgb(var(--accent-rgb) / calc(var(--bg-retouch) * .08)), transparent 38%, rgb(var(--accent2-rgb) / calc(var(--bg-retouch) * .09)) 100%),
    repeating-linear-gradient(90deg, rgb(var(--bg-retouch-grid-rgb) / var(--bg-retouch-grid)) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg,  rgb(var(--bg-retouch-grid-rgb) / var(--bg-retouch-grid)) 0 1px, transparent 1px 34px),
    radial-gradient(900px 520px at 6% 88%, rgb(var(--accent-rgb)/var(--bg-retouch-accent)), transparent 62%),
    radial-gradient(900px 520px at 94% 86%, rgb(var(--accent2-rgb)/var(--bg-retouch-accent)), transparent 62%),
    radial-gradient(1200px 700px at 15% 15%, rgb(var(--accent2-rgb)/.12), transparent 60%),
    radial-gradient(1100px 700px at 85% 20%, rgb(var(--accent-rgb)/.10), transparent 60%),
    radial-gradient(900px 700px at 70% 85%, rgb(var(--accent2-rgb)/.10), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

a{ color: inherit; }
::selection{ background: rgb(var(--accent-rgb)/.25); }

:focus-visible{
  outline: none;
  box-shadow: var(--ring);
  border-color: rgb(var(--accent-rgb)/.35);
}

/* Melhora legibilidade em textos “muted” no dark */
html[data-theme="dark"] .muted{
  color: color-mix(in srgb, var(--muted) 88%, #f1f5f9);
}
