:root {
  --design-width:min(1600px,calc(100% - clamp(32px,6vw,96px)));
  --font-sans:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --color-primary:#064e3b;
  --color-primary-strong:#053f32;
  --color-accent:#0d9488;
  --color-accent-strong:#087a6c;
  --color-text:#142f29;
  --color-muted:#52677a;
  --color-on-dark:#ffffff;
  --color-mask:#000000;
  --color-surface:#ffffff;
  --color-canvas:#f5f8f7;
  --color-surface-soft:#f4f8f6;
  --color-surface-strong:#e6f3ee;
  --color-border:#cbded6;
  --color-border-strong:#9dbbb1;
  --color-danger:#991b1b;
  --color-danger-soft:#fff1f2;
  --color-warning:#8a5a08;
  --color-warning-soft:#f5f0e6;
  --color-lilac:#eee9f8;
  --shadow-card:0 8px 28px rgba(6,78,59,.06);
  --shadow-control:0 0 0 4px rgba(13,148,136,.14);
  --radius-control:10px;
  --radius-button:11px;
  --control-height:46px;
  --action-background:var(--color-accent);
  --action-hover:var(--color-primary);
  --action-text:var(--color-on-dark);
  --theme-secondary:var(--color-accent);
  --theme-highlight:var(--color-accent);
  --theme-gradient:linear-gradient(135deg,var(--color-primary),var(--color-accent));

  /* Compatibilidade: todos os módulos consomem a mesma fonte de verdade. */
  --primary:var(--color-primary);
  --accent:var(--color-accent);
  --text:var(--color-text);
  --ink:var(--color-text);
  --muted:var(--color-muted);
  --line:var(--color-border);
  --paper:var(--color-canvas);
  --white:var(--color-surface);
  --mint:var(--color-surface-strong);
  --lilac:var(--color-lilac);
  --cream:var(--color-warning-soft);
  --danger:var(--color-danger);
  --green:var(--color-primary);
  --green2:var(--color-accent);
  --surface-soft:var(--color-surface-soft);
  --surface-strong:var(--color-surface-strong);
}

html { font-family:var(--font-sans); }
body,button,input,select,textarea { font:inherit; }

button,.button,.btn,input[type="submit"],input[type="button"] {
  min-height:var(--control-height);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 17px;
  border:1px solid transparent;
  border-radius:var(--radius-button);
  color:var(--action-text);
  background:var(--action-background);
  font-size:13px;
  font-weight:750;
  line-height:1.2;
  text-decoration:none;
  cursor:pointer;
}
button:hover,.button:hover,.btn:hover,input[type="submit"]:hover,input[type="button"]:hover {
  color:var(--action-text);
  background:var(--action-hover);
}
button.secondary,.button.secondary,.button-secondary,.btn.ghost,.quiet {
  border-color:var(--line);
  color:var(--primary);
  background:var(--color-surface);
}
button.secondary:hover,.button.secondary:hover,.button-secondary:hover,.btn.ghost:hover,.quiet:hover {
  border-color:var(--accent);
  color:var(--primary);
  background:var(--surface-soft);
}
button.danger,.button.danger,.danger { color:var(--color-on-dark); background:var(--danger); }
button:disabled,.button[aria-disabled="true"] { opacity:.58; cursor:not-allowed; }

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea {
  width:100%;
  min-height:var(--control-height);
  padding:11px 13px;
  border:1px solid var(--color-border-strong);
  border-radius:var(--radius-control);
  color:var(--text);
  background:var(--color-surface);
  line-height:1.45;
}
textarea { min-height:110px; resize:vertical; }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:.85; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):hover,select:hover,textarea:hover { border-color:var(--accent); }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,select:focus,textarea:focus {
  border-color:var(--accent);
  outline:0;
  box-shadow:var(--shadow-control);
}
input[type="checkbox"],input[type="radio"] { accent-color:var(--accent); }
:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }

.theme-deep_purple {
  --color-primary:#352044; --color-primary-strong:#211b27; --color-accent:#9e6b22; --color-accent-strong:#7c5118;
  --color-text:#211b27; --color-muted:#665d6c; --color-canvas:#fcfafd; --color-surface-soft:#f4eff6;
  --color-surface-strong:#e9dfee; --color-border:#dcd2e1; --color-border-strong:#b7a8c0;
  --green:#56366b; --green2:#8a668f; --mint:#f4eff6; --lilac:#eee6f2; --cream:#fcf5e9;
  --action-background:#56366b; --action-hover:#352044; --action-text:#ffffff;
  --theme-secondary:#8a668f; --theme-highlight:#d69e4c;
  --theme-gradient:linear-gradient(135deg,#352044,#56366b 58%,#8a668f);
  --shadow-card:0 8px 28px rgba(53,32,68,.09); --shadow-control:0 0 0 4px rgba(138,102,143,.18);
}
.theme-soft_lilac {
  --color-primary:#4a3348; --color-primary-strong:#322331; --color-accent:#80546a; --color-accent-strong:#633e52;
  --color-text:#322331; --color-muted:#6f526c; --color-canvas:#fdfbfc; --color-surface-soft:#f7f1f3;
  --color-surface-strong:#eadfea; --color-border:#e2d5e6; --color-border-strong:#b9a0c9;
  --green:#6f526c; --green2:#b9829a; --mint:#f3e4e8; --lilac:#d4c1dd; --cream:#fbf5ea;
  --action-background:#6f526c; --action-hover:#4a3348; --action-text:#ffffff;
  --theme-secondary:#b9829a; --theme-highlight:#c49a5a;
  --theme-gradient:linear-gradient(135deg,#4a3348,#6f526c 55%,#b9829a);
  --shadow-card:0 8px 28px rgba(74,51,72,.09); --shadow-control:0 0 0 4px rgba(185,130,154,.2);
}
.theme-vibrant_violet {
  --color-primary:#32134f; --color-primary-strong:#241c2b; --color-accent:#c044c9; --color-accent-strong:#8c278f;
  --color-text:#241c2b; --color-muted:#6d6275; --color-canvas:#fcfaff; --color-surface-soft:#f4eefa;
  --color-surface-strong:#eadcf4; --color-border:#ddd0e8; --color-border-strong:#b99bcf;
  --green:#6936a3; --green2:#c044c9; --mint:#f4eefa; --lilac:#eadcf4; --cream:#faeafa;
  --action-background:#c044c9; --action-hover:#6936a3; --action-text:#ffffff;
  --theme-secondary:#9b5de5; --theme-highlight:#d65acf;
  --theme-gradient:linear-gradient(135deg,#32134f,#6936a3 55%,#c044c9);
  --shadow-card:0 8px 28px rgba(50,19,79,.1); --shadow-control:0 0 0 4px rgba(192,68,201,.18);
}

.theme-deep_purple,.theme-soft_lilac,.theme-vibrant_violet {
  --primary:var(--color-primary); --accent:var(--color-accent); --text:var(--color-text); --ink:var(--color-text);
  --muted:var(--color-muted); --paper:var(--color-canvas); --line:var(--color-border);
  --surface-soft:var(--color-surface-soft); --surface-strong:var(--color-surface-strong);
}

.institution-detail.theme-deep_purple,.theme-deep_purple .project-standard {
  --institution-ink:#211b27; --institution-muted:#665d6c; --institution-line:#dcd2e1; --institution-forest:#352044;
  --institution-green:#56366b; --institution-teal:#d69e4c; --institution-teal-dark:#9e6b22; --institution-green-tint:#f4eff6; --institution-teal-tint:#fcf5e9;
  --project-ink:#211b27; --project-muted:#665d6c; --project-line:#dcd2e1; --project-forest:#352044;
  --project-green:#56366b; --project-teal:#d69e4c; --project-teal-dark:#9e6b22; --project-green-tint:#f4eff6; --project-teal-tint:#fcf5e9;
}
.institution-detail.theme-soft_lilac,.theme-soft_lilac .project-standard {
  --institution-ink:#322331; --institution-muted:#6f526c; --institution-line:#e2d5e6; --institution-forest:#4a3348;
  --institution-green:#6f526c; --institution-teal:#b9829a; --institution-teal-dark:#80546a; --institution-green-tint:#f7f1f3; --institution-teal-tint:#f3e4e8;
  --project-ink:#322331; --project-muted:#6f526c; --project-line:#e2d5e6; --project-forest:#4a3348;
  --project-green:#6f526c; --project-teal:#b9829a; --project-teal-dark:#80546a; --project-green-tint:#f7f1f3; --project-teal-tint:#f3e4e8;
}
.institution-detail.theme-vibrant_violet,.theme-vibrant_violet .project-standard {
  --institution-ink:#241c2b; --institution-muted:#6d6275; --institution-line:#ddd0e8; --institution-forest:#32134f;
  --institution-green:#6936a3; --institution-teal:#c044c9; --institution-teal-dark:#8c278f; --institution-green-tint:#f4eefa; --institution-teal-tint:#faeafa;
  --project-ink:#241c2b; --project-muted:#6d6275; --project-line:#ddd0e8; --project-forest:#32134f;
  --project-green:#6936a3; --project-teal:#c044c9; --project-teal-dark:#8c278f; --project-green-tint:#f4eefa; --project-teal-tint:#faeafa;
}

/* Identidade em Rede: cores extraídas da referência visual da marca. */
.theme-network_identity {
  --brand-purple:#210d40; --brand-violet:#5d43aa; --brand-lilac:#ccb9f8;
  --brand-pale-lilac:#e8dffd; --brand-peach:#fdca9f; --brand-cream:#faf1eb;
  --color-primary:#503590; --color-primary-strong:#210d40;
  --color-accent:var(--brand-violet); --color-accent-strong:#503590;
  --color-text:#261b34; --color-muted:#504559; --color-canvas:#ffffff;
  --color-surface:#ffffff; --color-surface-soft:#f2edf9;
  --color-surface-strong:var(--brand-pale-lilac); --color-lilac:var(--brand-lilac);
  --color-border:#d8cde5; --color-border-strong:#89789f;
  --color-warning-soft:var(--brand-cream);
  --action-background:var(--color-accent-strong); --action-hover:var(--brand-purple); --action-text:#ffffff;
  --theme-secondary:var(--brand-violet); --theme-highlight:var(--brand-peach);
  --theme-gradient:linear-gradient(135deg,#210d40,#5d43aa 58%,#8b6fd1);
  --shadow-card:0 8px 28px rgba(33,13,64,.09); --shadow-control:0 0 0 4px rgba(93,67,170,.18);
  --primary:var(--color-primary); --accent:var(--color-accent); --text:var(--color-text); --ink:var(--color-text);
  --muted:var(--color-muted); --paper:var(--color-canvas); --line:var(--color-border);
  --green:var(--brand-violet); --green2:var(--brand-violet); --mint:var(--color-surface-soft);
  --lilac:var(--brand-pale-lilac); --cream:var(--brand-cream);
  --surface-soft:var(--color-surface-soft); --surface-strong:var(--color-surface-strong);
}
.institution-detail.theme-network_identity,.theme-network_identity .project-standard {
  --institution-ink:#251833; --institution-muted:#64566f; --institution-line:#dcd1ec;
  --institution-forest:#210d40; --institution-green:#5d43aa; --institution-teal:#fdca9f;
  --institution-teal-dark:#503590; --institution-green-tint:#f5f0fd; --institution-teal-tint:#faf1eb;
  --project-ink:#251833; --project-muted:#64566f; --project-line:#dcd1ec;
  --project-forest:#210d40; --project-green:#5d43aa; --project-teal:#fdca9f;
  --project-teal-dark:#503590; --project-green-tint:#f5f0fd; --project-teal-tint:#faf1eb;
}
body.theme-network_identity .site-footer h2 { color:var(--color-on-dark); font-size:14px; line-height:1.4; margin:0 0 16px; }
