/* Popups (Oct 2026): Article 50 toast, exit-intent PDF modal, partner pill.
   Markup from _build/brand.py popups(); behaviour in /assets/popups.js.
   Tokens from content.css; flat surfaces, 1px hairlines, one coral mark.
   Placement: the Tawk bubble owns the bottom-right corner (about 60x60 at
   20px), so the toast sits above it (bottom 96px) and the pill takes the
   bottom-left corner. Nothing here moves page content. */

.rgp-toast, .rgp-pill, .rgp-dialog { font-family: var(--sans, 'Host Grotesk', 'Inter', system-ui, sans-serif); }
.rgp-pill[hidden], .rgp-modal[hidden], .rgp-dialog [hidden] { display: none !important; }

/* ---- Toast ---- */
.rgp-toast { position: fixed; right: 20px; bottom: 96px; z-index: 95; width: 360px; max-width: calc(100vw - 32px); }
.rgp-toast:empty { display: none; }
.rgp-card { position: relative; background: var(--surface); color: var(--soft); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px 20px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); transition: opacity .36s cubic-bezier(.22,1,.36,1), transform .36s cubic-bezier(.22,1,.36,1); }
.rgp-card.is-in { opacity: 1; transform: none; }
.rgp-t-title { margin: 0 32px 6px 0; color: var(--fg); font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.rgp-t-body { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--soft); }
.rgp-toast .rgp-btn { width: 100%; }

/* ---- Shared controls ---- */
.rgp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border-radius: 10px; border: 1px solid transparent; background: var(--coral-deep); color: var(--on-coral, #fff) !important;
  font: 600 15px/1.2 var(--sans, inherit); text-decoration: none !important; text-align: center; cursor: pointer; }
.rgp-btn:hover { background: var(--coral-hover, var(--coral-deep)); }
.rgp-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.rgp-x:hover { color: var(--fg); border-color: var(--line); }
.rgp-toast a:focus-visible, .rgp-toast button:focus-visible, .rgp-pill a:focus-visible, .rgp-pill button:focus-visible,
.rgp-dialog a:focus-visible, .rgp-dialog button:focus-visible, .rgp-dialog input:focus-visible {
  outline: 2px solid var(--powder); outline-offset: 2px; }

/* ---- Partner pill ---- */
.rgp-pill { position: fixed; left: 20px; bottom: 20px; z-index: 94; display: flex; align-items: center;
  max-width: calc(100vw - 120px); height: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  opacity: 0; transform: translateY(8px); transition: opacity .36s cubic-bezier(.22,1,.36,1), transform .36s cubic-bezier(.22,1,.36,1); }
.rgp-pill.is-in { opacity: 1; transform: none; }
.rgp-pill-a { display: block; padding: 0 6px 0 14px; line-height: 38px; font-size: 13.5px; font-weight: 500; color: var(--fg) !important;
  text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rgp-pill-a:hover { color: var(--ember) !important; }
.rgp-pill-x { flex: none; width: 30px; height: 30px; margin-right: 4px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--faint); cursor: pointer; }
.rgp-pill-x:hover { color: var(--fg); }
.rgp-pill-x svg { width: 12px; height: 12px; }

/* ---- Modal ---- */
.rgp-modal { position: fixed; inset: 0; z-index: 2000000100; display: flex; align-items: center; justify-content: center; padding: 16px; overscroll-behavior: contain; }
.rgp-backdrop { position: absolute; inset: 0; background: rgba(22,19,16,.42); opacity: 0; transition: opacity .3s cubic-bezier(.22,1,.36,1); }
:root[data-theme="dark"] .rgp-backdrop { background: rgba(11,10,9,.66); }
.rgp-dialog { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); color: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 28px 28px 24px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: opacity .36s cubic-bezier(.22,1,.36,1), transform .36s cubic-bezier(.22,1,.36,1); }
.rgp-dialog:focus { outline: none; }
.rgp-modal.is-in .rgp-backdrop, .rgp-modal.is-in .rgp-dialog { opacity: 1; transform: none; }
.rgp-kicker { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--faint); }
.rgp-h { margin: 0 36px 10px 0; color: var(--fg); font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; }
.rgp-p { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.rgp-list { margin: 0 0 18px; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.rgp-list li { position: relative; padding: 10px 0 10px 18px; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; line-height: 1.45; color: var(--fg); }
.rgp-list li::before { content: ""; position: absolute; left: 2px; top: 18px; width: 6px; height: 6px; border-radius: 1px; background: var(--faint); }
.rgp-label { display: block; margin: 0 0 6px; font-size: 13.5px; font-weight: 500; color: var(--fg); }
.rgp-input { display: block; width: 100%; height: 48px; margin: 0 0 12px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--input-border, rgba(var(--ink),.45));
  background: var(--bg); color: var(--fg); font: 400 16px/1.2 var(--sans, inherit); box-sizing: border-box; }
.rgp-input::placeholder { color: var(--faint); }
.rgp-input:hover { border-color: var(--input-border-hover, var(--muted)); }
.rgp-input:focus { border-color: var(--powder); outline: none; }
.rgp-input:focus-visible { outline: 2px solid var(--powder); outline-offset: 2px; }
.rgp-input[aria-invalid="true"] { border-color: var(--t-unacc, var(--err)); }
.rgp-consent { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.rgp-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--coral-deep); }
.rgp-consent a { color: var(--ember) !important; }
.rgp-err { margin: -4px 0 12px; font-size: 13px; color: var(--err); }
.rgp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.rgp-link { background: none; border: 0; padding: 8px 2px; font: 500 14px/1.2 var(--sans, inherit); color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rgp-link:hover { color: var(--fg); }
.rgp-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.rgp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#rgpDone .rgp-btn { margin-top: 6px; }

@media (max-width: 600px) {
  .rgp-toast { left: 12px; right: 12px; width: auto; max-width: none; }
  .rgp-pill { left: 12px; }
  html.rgp-toast-on .rgp-pill { display: none; }
  .rgp-dialog { padding: 24px 20px 20px; }
  .rgp-h { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .rgp-card, .rgp-pill, .rgp-dialog, .rgp-backdrop { transition: none !important; transform: none !important; }
}
@media print { .rgp-toast, .rgp-pill, .rgp-modal { display: none !important; } }
