/* Codifigata Consenso. Colors follow the Codifigata theme, overridable via custom properties. */
.cfcons {
  --cfcons-ink: #1e1e3f;
  --cfcons-muted: #55557a;
  --cfcons-line: #e3e4ec;
  --cfcons-bg: #ffffff;
  --cfcons-accent: #2f8f6c;
  --cfcons-accent-soft: #4bb590;
  position: fixed;
  z-index: 2147483000;
  inset: auto 16px 16px 16px;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
  font-family: inherit;
}
.cfcons[hidden] { display: none; }
.cfcons-box {
  position: relative;
  pointer-events: auto;
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid var(--cfcons-line);
  border-radius: 24px;
  background: var(--cfcons-bg);
  color: var(--cfcons-ink);
  box-shadow: 0 30px 60px rgba(30, 30, 63, 0.18);
  font-size: 15px;
  line-height: 1.55;
}
.cfcons-step[hidden] { display: none; }
.cfcons-title {
  margin: 0 40px 8px 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  outline: none;
}
.cfcons-text { margin: 0; color: var(--cfcons-muted); }
.cfcons-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 14px; }
.cfcons-links a { color: var(--cfcons-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cfcons-links a:hover { color: var(--cfcons-accent); }
.cfcons-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.cfcons-btn {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--cfcons-ink);
  border-radius: 999px;
  background: var(--cfcons-ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cfcons-btn:hover { background: #2b2b55; }
.cfcons-btn-alt { grid-column: 1 / -1; background: transparent; color: var(--cfcons-ink); border-color: var(--cfcons-line); }
.cfcons-btn-alt:hover { background: #f4f5f8; }
.cfcons-x {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--cfcons-line);
  border-radius: 999px;
  background: #fff;
  color: var(--cfcons-ink);
  cursor: pointer;
}
.cfcons-x:hover { background: #f4f5f8; }
.cfcons-cats { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.cfcons-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--cfcons-line);
  border-radius: 16px;
}
.cfcons-cat-text { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.cfcons-cat-name { font-weight: 700; }
.cfcons-cat-desc { color: var(--cfcons-muted); font-size: 14px; }
.cfcons-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: #c9cad6;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cfcons-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}
.cfcons-switch:checked { background: var(--cfcons-accent); }
.cfcons-switch:checked::after { transform: translateX(18px); }
.cfcons-switch:disabled { opacity: 0.55; cursor: not-allowed; }
.cfcons :focus-visible,
.cfcons-open:focus-visible { outline: 3px solid var(--cfcons-accent-soft); outline-offset: 2px; }
.cfcons .cfcons-title:focus-visible { outline: none; }
.cfcons-open { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cfcons-open:hover { color: #2f8f6c; }
.cfcons-table-wrap { overflow-x: auto; }
@media (max-width: 480px) {
  .cfcons-box { max-height: calc(100dvh - 20px); }
  .cfcons { inset: auto 10px 10px 10px; }
  .cfcons-box { padding: 20px 18px; border-radius: 20px; }
}
@media (max-width: 340px) {
  .cfcons-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cfcons-switch, .cfcons-switch::after { transition: none; }
}
