.rlly-consent-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  width: min(430px, calc(100vw - 24px));
  pointer-events: none;
}

.rlly-consent-dialog {
  position: relative;
  width: 100%;
  max-height: min(72vh, 560px);
  overflow: auto;
  padding: 18px;
  color: var(--ink, #0a0a0a);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0)) top right / 100% 96px no-repeat,
    linear-gradient(135deg, rgba(0, 255, 102, 0.1), rgba(0, 255, 102, 0) 34%),
    var(--paper, #f4f3ee);
  border: 1px solid var(--rule, #1a1a1a);
  box-shadow: 6px 6px 0 0 var(--acid, #00ff66), 6px 6px 0 1px var(--ink, #0a0a0a), 0 20px 40px rgba(10, 10, 10, 0.18);
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
  pointer-events: auto;
}

.rlly-consent-root[data-open="true"] .rlly-consent-dialog {
  transform: translateY(0);
  opacity: 1;
}

.rlly-consent-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted, #6b6b6b);
}

.rlly-consent-kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--acid, #00ff66);
  box-shadow: 0 0 0 4px rgba(0, 255, 102, 0.15);
}

.rlly-consent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.rlly-consent-title {
  margin: 0;
  font-family: 'Satoshi', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.rlly-consent-title .italic {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 400;
}

.rlly-consent-close {
  appearance: none;
  border: 1px solid var(--rule, #1a1a1a);
  background: rgba(244, 243, 238, 0.9);
  color: var(--ink, #0a0a0a);
  width: 34px;
  height: 34px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.rlly-consent-copy {
  margin: 0 0 12px;
  max-width: 42ch;
  font-size: 14px;
  line-height: 1.48;
  color: rgba(10, 10, 10, 0.8);
}

.rlly-consent-highlight {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rlly-consent-note,
.rlly-consent-status {
  flex: 1 1 160px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(10, 10, 10, 0.14);
  background: rgba(255, 255, 255, 0.45);
}

.rlly-consent-note strong,
.rlly-consent-status strong {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.rlly-consent-note span,
.rlly-consent-status span {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.rlly-consent-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 14px;
}

.rlly-consent-advanced {
  display: none;
}

.rlly-consent-root[data-expanded="true"] .rlly-consent-advanced {
  display: block;
}

.rlly-consent-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--rule, #1a1a1a);
  background: rgba(255, 255, 255, 0.5);
}

.rlly-consent-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.rlly-consent-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(10, 10, 10, 0.72);
}

.rlly-consent-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #6b6b6b);
}

.rlly-consent-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.2);
}

.rlly-consent-chip.is-live::before {
  background: var(--acid, #00ff66);
}

.rlly-consent-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 64px;
  height: 32px;
  padding-left: 8px;
  border: 1px solid var(--rule, #1a1a1a);
  background: rgba(10, 10, 10, 0.08);
  color: rgba(10, 10, 10, 0.45);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.rlly-consent-toggle[aria-checked="true"] {
  background: rgba(0, 255, 102, 0.2);
}

.rlly-consent-toggle[disabled] {
  cursor: default;
  opacity: 0.72;
}

.rlly-consent-toggle::after {
  content: "";
  position: absolute;
  left: 5px;
  width: 20px;
  height: 20px;
  background: var(--ink, #0a0a0a);
  transition: transform 0.18s ease, background 0.18s ease;
}

.rlly-consent-toggle[aria-checked="true"]::after {
  transform: translateX(24px);
  background: var(--acid-ink, #002a10);
}

.rlly-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
}

.rlly-consent-btn {
  appearance: none;
  border: 1px solid var(--ink, #0a0a0a);
  background: transparent;
  color: var(--ink, #0a0a0a);
  min-height: 40px;
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.rlly-consent-btn:hover,
.rlly-consent-btn:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.rlly-consent-btn.primary {
  background: var(--ink, #0a0a0a);
  color: var(--paper, #f4f3ee);
  box-shadow: 4px 4px 0 0 var(--acid, #00ff66), 4px 4px 0 1px var(--ink, #0a0a0a);
}

.rlly-consent-btn[data-consent-action="save"] {
  display: none;
}

.rlly-consent-root[data-expanded="true"] .rlly-consent-btn[data-consent-action="save"] {
  display: inline-flex;
}

.rlly-consent-btn.secondary {
  background: rgba(255, 255, 255, 0.72);
}

.rlly-consent-btn.ghost {
  border-color: rgba(10, 10, 10, 0.2);
  color: rgba(10, 10, 10, 0.72);
}

.rlly-consent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rlly-consent-links a {
  color: var(--ink, #0a0a0a);
  font-size: 12px;
}

.rlly-consent-trigger {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 121;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--ink, #0a0a0a);
  background: var(--paper, #f4f3ee);
  color: var(--ink, #0a0a0a);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 0 rgba(10, 10, 10, 0.12);
  cursor: pointer;
  pointer-events: auto;
}

.rlly-consent-trigger::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--acid, #00ff66);
  box-shadow: 0 0 0 4px rgba(0, 255, 102, 0.12);
}

@media (max-width: 700px) {
  .rlly-consent-dialog {
    max-height: min(62vh, 520px);
    padding: 16px;
  }

  .rlly-consent-head {
    gap: 12px;
  }

  .rlly-consent-card {
    grid-template-columns: 1fr;
  }

  .rlly-consent-toggle {
    margin-top: 4px;
  }

  .rlly-consent-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .rlly-consent-btn {
    width: 100%;
  }

  .rlly-consent-root {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
  }

  .rlly-consent-trigger {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rlly-consent-backdrop,
  .rlly-consent-dialog,
  .rlly-consent-toggle::after,
  .rlly-consent-btn {
    transition: none !important;
  }
}