/* Keep the page viewport as the scroll container for pinned sections. */
html.has-login-dialog { overflow-y: hidden; }

.modal {
  position: fixed; z-index: 9999; inset: 0; display: grid; place-items: center;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) max(14px, env(safe-area-inset-bottom));
  visibility: hidden; pointer-events: none;
}
.modal.is-open { visibility: visible; pointer-events: auto; }
.modal.is-closing { pointer-events: none; }
.modal__backdrop {
  position: absolute; inset: 0; background: rgba(25, 28, 33, .44);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.modal__window {
  position: relative; width: min(100%, 510px); max-height: calc(100dvh - 32px);
  overflow: auto; overscroll-behavior: contain; padding: clamp(23px, 5vw, 40px);
  border-radius: var(--r-lg); background: var(--paper-hi); color: var(--ink);
  box-shadow: 0 24px 80px rgba(25, 28, 33, .26);
}
.modal.is-open .modal__window { animation: login-in 220ms var(--out) both; }
.modal.is-open .modal__backdrop { animation: login-fade 220ms ease both; }
.modal.is-closing .modal__window, .modal.is-closing .modal__backdrop { animation: login-out 220ms ease both; }
@keyframes login-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes login-fade { from { opacity: 0; } }
@keyframes login-out { to { opacity: 0; } }
.modal__close {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--ink); cursor: pointer;
  transition: background-color 160ms ease;
}
.modal__close:hover { background: var(--paper-lo); }
.modal__close svg { width: 18px; height: 18px; }
.modal__title { margin: 0 36px 8px 0; font: 400 clamp(31px, 5vw, 42px)/1.1 var(--serif); letter-spacing: -.02em; }
.modal__subtitle { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; }
.yaid { display: flex; width: 100%; gap: 10px; padding: 12px 16px; white-space: normal; text-align: center; }
.yaid__icon { flex: none; display: grid; place-items: center; }
.yaid__icon svg { width: 24px; height: 24px; }
.yaid[data-locked] { opacity: .65; cursor: wait; }
.consent { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 16px; cursor: pointer; }
.consent__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.consent__box { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 2px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--white); }
.consent__box svg { width: 15px; height: 15px; opacity: 0; }
.consent__input:checked + .consent__box { background: var(--dark); color: var(--cream); }
.consent__input:checked + .consent__box svg { opacity: 1; }
.consent__input:focus-visible + .consent__box { outline: 2px solid var(--umber); outline-offset: 2px; }
.consent__text { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.consent__text a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line-2); overflow-wrap: anywhere; }
.consent__text a:hover { text-decoration-color: var(--ink); }
.consent.is-error .consent__box { border-color: #994839; }
.consent__hint { margin: 10px 0 0; min-height: 1.4em; color: #813c30; font-size: 13px; opacity: 0; }
.consent__hint.is-visible { opacity: 1; }
.smart-captcha { width: 100%; min-height: 85px; margin-top: 12px; }
.site-notice {
  position: fixed; z-index: 70; top: calc(var(--nav-clear) + 6px); inset-inline: var(--gutter);
  width: fit-content; max-width: calc(100% - 2 * var(--gutter)); margin-inline: auto; padding: 10px 18px;
  border-radius: var(--r-md); background: var(--paper-hi); color: var(--ink); box-shadow: 0 12px 38px #22262b38;
  opacity: 0; transition: opacity 200ms ease;
}
.site-notice.is-visible { opacity: 1; }
.plan__action { margin-top: auto; }
.pricing-button:disabled, .payg-button:disabled { opacity: .66; cursor: default; }
.pricing-note, .payg-note { color: var(--ink-2); font-size: 14px; }
.pricing-note:empty, .payg-note:empty { display: none; }
.home-faq-item { border-bottom: 1px solid var(--line-2); }
.home-faq-item summary { list-style: none; }
.home-faq-item summary::-webkit-details-marker { display: none; }
.home-faq-item[open] .qa__icon { background: var(--dark); box-shadow: none; }
.home-faq-item[open] .qa__icon i { background: var(--cream); }
.home-faq-item[open] .qa__icon i + i { transform: rotate(180deg); opacity: 0; }
.home-faq-answer { padding: 0 clamp(0px, 5vw, 50px) 22px 0; color: var(--ink-2); }
.home-faq-answer p { margin: 0; }
.home-faq-item[open] .home-faq-answer { animation: login-in 220ms var(--out) both; }
.home-fallback { display: flex; flex-wrap: wrap; gap: 12px 20px; padding-block: 24px; }
@media (prefers-reduced-motion: reduce) {
  .modal.is-open .modal__window, .modal.is-open .modal__backdrop,
  .home-faq-item[open] .home-faq-answer { animation: none; }
}
