.policy-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: transparent;
  color: light-dark(#171714, #e8e8e5);
  opacity: 0;
  transition: opacity 260ms ease;
}

.policy-dialog[open] {
  display: grid;
  place-items: center;
}

.policy-dialog.is-open {
  opacity: 1;
}

.policy-dialog::backdrop {
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  transition:
    backdrop-filter 260ms ease,
    background 260ms ease;
}

.policy-dialog.is-open::backdrop {
  background: light-dark(rgba(23, 23, 20, 0.1), rgba(0, 0, 0, 0.35));
  backdrop-filter: blur(8px);
}

.policy-panel {
  position: relative;
  width: min(34rem, 100%);
  max-height: calc(100svh - 2rem);
  overflow-y: auto;
  padding: 2rem 2rem 2.25rem;
  border: 1px solid light-dark(rgba(23, 23, 20, 0.22), rgba(255, 255, 255, 0.16));
  border-radius: 20px;
  background: light-dark(rgba(250, 249, 245, 0.88), rgba(34, 34, 34, 0.78));
  box-shadow: 0 1px 0 light-dark(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.04)) inset, 0 12px 32px light-dark(rgba(23, 23, 20, 0.1), rgba(0, 0, 0, 0.35));
  backdrop-filter: blur(18px) saturate(1.2);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 370;
  line-height: 1.7;
  letter-spacing: 0;
  transform: translateY(6px) scale(0.99);
  transition: transform 260ms ease;
}

.policy-dialog.is-open .policy-panel {
  transform: none;
}

.policy-panel h2 {
  margin: 0;
  font-family: "Mona Sans", system-ui, sans-serif;
  font-size: 2.25rem;
  font-weight: 264;
  font-stretch: 85%;
  letter-spacing: 0.02em;
  line-height: 1;
}

.policy-panel p {
  margin-top: 0.9rem;
}

.policy-updated {
  color: light-dark(#7d7c76, #8e8e8a);
}

.policy-panel a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.policy-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: light-dark(#171714, #e8e8e5);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 160ms ease;
}

.policy-close:hover,
.policy-close:focus-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .policy-dialog,
  .policy-dialog::backdrop,
  .policy-panel,
  .policy-close {
    transition: none;
  }
}
