/* The Join the waitlist pop-up, the same on every page (24 Nov 2026).
   Wireframe: scratchpad/design/wireframes/site-waitlist-popup-2026-11-24.md. It uses the page's own tokens (--panel,
   --text, --soft, --faint, --border, --accent, --bad, the --t- ladder) and the page's .btn; nothing here sets a colour
   or a size of its own. Spacing is on the 4, 8, 16, 24 scale. */
.wlp { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; overflow: auto;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text);
  font: 400 var(--t-body)/var(--lh-body) var(--sans); text-align: left; }
.wlp::backdrop { background: color-mix(in srgb, var(--ink) 48%, transparent); }
/* On a dark page --ink is the light text colour, so the veil is made from the page's own dark ground. */
@media (prefers-color-scheme: dark) { .wlp::backdrop { background: color-mix(in srgb, var(--bg) 72%, transparent); } }
.wlp[open] { animation: wlp-in 180ms var(--ease-out); }
@keyframes wlp-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .wlp[open] { animation: none; } }

.wlp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.wlp-title { margin: 0; font-size: var(--t-h3); line-height: 32px; font-weight: 600; }
.wlp-close { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--faint);
  font: 400 var(--t-h3)/1 var(--sans); cursor: pointer; }
.wlp-close:hover { color: var(--text); }
.wlp-line { margin: 8px 0 24px; color: var(--soft); }

.wlp-field { display: block; margin-top: 16px; }
.wlp-line + .wlp-field { margin-top: 0; }
.wlp-field span { display: block; margin-bottom: 4px; font-size: var(--t-small); line-height: 20px; font-weight: 400; color: var(--text); }
.wlp-field input, .wlp-field textarea { display: block; width: 100%; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--panel); color: var(--text); font: 400 var(--t-body)/24px var(--sans); }
.wlp-field input { height: 44px; }
.wlp-field textarea { height: 88px; padding: 8px 12px; resize: none; }
.wlp-field input::placeholder, .wlp-field textarea::placeholder { color: var(--faint); }
.wlp-field input:focus-visible, .wlp-field textarea:focus-visible, .wlp-close:focus-visible, .wlp .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wlp-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.wlp-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.wlp-msg { margin: 0; min-height: 20px; font-size: var(--t-small); line-height: 20px; color: var(--soft); }
.wlp-msg.bad { color: var(--bad); }
.wlp-field [aria-invalid], .wlp-field [aria-invalid]:focus-visible { border-color: var(--bad); outline-color: var(--bad); }
/* The label takes the panel's colour: white on the light page's accent, dark on the dark page's paler accent. */
.wlp-foot .btn { flex: none; min-height: 48px; padding: 0 24px; font-weight: 600; white-space: nowrap; color: var(--panel); }
.wlp-foot .btn.wlp-done { margin-left: auto; }

/* A phone: a sheet on the bottom edge, full width, every target 44 px or more, the button under the fields. */
@media (max-width: 480px) {
  .wlp { width: 100vw; max-width: 100vw; max-height: calc(100dvh - 24px); margin: auto 0 0; padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
    border-width: 1px 0 0; border-radius: 10px 10px 0 0; }
  .wlp[open] { animation-name: wlp-up; }
  .wlp-title { line-height: 44px; }
  .wlp-close { width: 44px; height: 44px; }
  .wlp-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .wlp-foot .btn, .wlp-foot .btn.wlp-done { width: 100%; margin-left: 0; }
  .wlp-msg:empty { display: none; }
}
@keyframes wlp-up { from { transform: translateY(24px); opacity: 0; } }
