@font-face {
  font-family: 'Twiin Popup Display';
  src: url('fonts/universal-doomsday-regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Twiin Popup Body';
  src: url('fonts/inter.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Scoped styling: no changes to the theme, buttons or typography elsewhere. */
#twiin-rebrand-popup {
  --rp-ink: #000;
  --rp-sand: #ded6c6;
  --rp-accent: #b3a284;
  --rp-light: #f4f3f0;
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(620px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--rp-sand);
  border-radius: 24px;
  background: var(--rp-light);
  color: var(--rp-ink);
  box-shadow: 0 24px 90px rgb(0 0 0 / .18);
  font-family: 'Twiin Popup Body', Inter, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  overflow: auto;
  overscroll-behavior: contain;
  z-index: 2147483000;
}
#twiin-rebrand-popup:not([open]) { display: none; }
#twiin-rebrand-popup[open] { display: block; animation: twiin-rp-in .42s cubic-bezier(.2,.7,.2,1) both; }
#twiin-rebrand-popup::backdrop {
  background: rgb(0 0 0 / .42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: twiin-rp-backdrop-in .3s ease both;
}
#twiin-rebrand-popup *,
#twiin-rebrand-popup *::before,
#twiin-rebrand-popup *::after { box-sizing: border-box; }
#twiin-rebrand-popup .twiin-rp__inner { position: relative; padding: 44px; }
#twiin-rebrand-popup .twiin-rp__logo {
  display: block;
  width: 106px;
  height: auto;
  max-width: 100%;
  margin: 0 0 32px;
  border: 0;
  filter: brightness(0);
}
#twiin-rebrand-popup .twiin-rp__title {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  color: var(--rp-ink);
  font-family: 'Twiin Popup Display', 'Universal Doomsday', ui-rounded, sans-serif;
  font-size: clamp(29px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-transform: none;
  overflow-wrap: anywhere;
}
#twiin-rebrand-popup .twiin-rp__title span { display: block; color: #8b7857; }
#twiin-rebrand-popup .twiin-rp__promise {
  margin: 0 0 16px;
  padding: 0;
  color: var(--rp-ink);
  font: 500 17px/1.6 'Twiin Popup Body', Inter, system-ui, sans-serif;
  text-wrap: pretty;
}
#twiin-rebrand-popup .twiin-rp__message {
  margin: 0 0 28px;
  padding: 0;
  color: #54514a;
  font: 400 16px/1.7 'Twiin Popup Body', Inter, system-ui, sans-serif;
  text-wrap: pretty;
}
#twiin-rebrand-popup .twiin-rp__close {
  position: absolute;
  top: 44px;
  right: 44px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rp-sand);
  border-radius: 50%;
  background: transparent;
  color: var(--rp-ink);
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  transition: background-color .2s, transform .2s;
}
#twiin-rebrand-popup .twiin-rp__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: auto;
  min-height: 48px;
  margin: 0;
  padding: 12px 24px;
  border: 2px solid var(--rp-ink);
  border-radius: 999px;
  background: var(--rp-ink);
  color: #fff;
  box-shadow: none;
  font: 400 18px/1.2 'Twiin Popup Display', 'Universal Doomsday', sans-serif;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, transform .2s cubic-bezier(.2,.7,.2,1);
}
#twiin-rebrand-popup svg { display: block; flex: none; margin: 0; }
#twiin-rebrand-popup .twiin-rp__button:focus-visible,
#twiin-rebrand-popup .twiin-rp__close:focus-visible { outline: 2px solid #8b7857; outline-offset: 4px; }
#twiin-rebrand-popup .twiin-rp__button:active { transform: scale(.985); }
#twiin-rebrand-popup .twiin-rp__motif {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 13px;
  margin-top: 36px;
}
#twiin-rebrand-popup .twiin-rp__motif i {
  display: block;
  width: 38px;
  height: 13px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  background: var(--rp-accent);
}
#twiin-rebrand-popup .twiin-rp__motif i:nth-child(2) { width: 13px; background: var(--rp-ink); }
#twiin-rebrand-popup .twiin-rp__motif i:nth-child(3) { width: 52px; background: var(--rp-sand); }
@media (hover: hover) and (pointer: fine) {
  #twiin-rebrand-popup .twiin-rp__button:hover { background: #2b2925; color: #fff; text-decoration: none; transform: translateY(-1px); }
  #twiin-rebrand-popup .twiin-rp__button:active { transform: scale(.985); }
  #twiin-rebrand-popup .twiin-rp__close:hover { background: var(--rp-sand); transform: rotate(90deg); }
}
#twiin-rebrand-popup[open].twiin-rp--closing { animation: twiin-rp-out .18s ease forwards; }
#twiin-rebrand-popup.twiin-rp--closing::backdrop { animation: twiin-rp-backdrop-out .18s ease forwards; }
@keyframes twiin-rp-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes twiin-rp-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes twiin-rp-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes twiin-rp-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 480px) {
  #twiin-rebrand-popup .twiin-rp__inner { padding: 28px 24px; }
  #twiin-rebrand-popup .twiin-rp__close { top: 28px; right: 24px; }
  #twiin-rebrand-popup .twiin-rp__logo { width: 92px; margin-bottom: 28px; }
  #twiin-rebrand-popup .twiin-rp__title { font-size: 29px; }
  #twiin-rebrand-popup .twiin-rp__promise { font-size: 16px; }
  #twiin-rebrand-popup .twiin-rp__button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #twiin-rebrand-popup[open],
  #twiin-rebrand-popup[open].twiin-rp--closing,
  #twiin-rebrand-popup::backdrop { animation: none; }
  #twiin-rebrand-popup .twiin-rp__close,
  #twiin-rebrand-popup .twiin-rp__button { transition: none; }
  #twiin-rebrand-popup .twiin-rp__close:hover,
  #twiin-rebrand-popup .twiin-rp__button:hover,
  #twiin-rebrand-popup .twiin-rp__button:active { transform: none; }
}
