/* Reminders to vote: the sign-up form and the home page pop-up (voting reminders, 14 Oct 2026). New file, added to
   the page by js/remind.js (and linked in the head of promises/reminders.html, so the form never shows unstyled).

   .rfs-remind is the form wherever it is mounted: on the reminders page's glass card or in the pop-up's white card.
   dialog.rfs-pop is the pop-up. Both carry their own look, so they are the same on the light pages (base.css), the
   home page and the promise pages (promises.css). Type, colours and radius come from base.css's tokens where the page
   has them, with base.css's values as the fallback. Every rule is scoped to these two classes and is specific enough
   to beat the pages' plain input, link and button rules. On phones the pop-up is a sheet at the foot of the window,
   lifted above the on-screen keyboard (--rfs-kb and --rfs-vvh, set by the script). */

.rfs-remind, dialog.rfs-pop {
  --rr-ink: var(--ink, #231f20);
  --rr-muted: var(--muted, #474e54);
  --rr-red: var(--accent, #a30b3f);
  --rr-red-deep: var(--burgundy, #680126);
  --rr-alert: var(--alert, #b3261e);
  --rr-font: var(--sans, "Sohne VF", "Site Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif);
  --rr-ring: rgb(27 43 58 / 0.2);
  --rr-ease: cubic-bezier(0.3, 0.7, 0.2, 1);
}

/* ================= The form ================= */
.rfs-remind {
  max-width: 34rem;
  color: var(--rr-ink);
  font-family: var(--rr-font);
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  font-variant-numeric: normal;
}
.rfs-remind *, .rfs-remind *::before, .rfs-remind *::after { box-sizing: border-box; }
.rfs-remind [hidden] { display: none !important; }
.rfs-remind .rfs-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.rfs-remind a { color: var(--rr-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.rfs-remind a:hover { color: var(--rr-red); }

.rfs-remind .rfs-r-form { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; border: 0; }

/* Fields with the label inside the box, as in DESIGN.md */
.rfs-remind .rfs-field { position: relative; margin: 0; padding: 0; }
.rfs-remind .rfs-field > label {
  position: absolute;
  z-index: 1;
  top: 9px;
  left: 17px;
  right: 14px;
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--rr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: top 0.18s var(--rr-ease), font-size 0.18s var(--rr-ease), translate 0.18s var(--rr-ease), color 0.18s;
}
.rfs-remind .rfs-field > input {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 58px;
  margin: 0;
  padding: 26px 16px 8px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--rr-ink);
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--rr-ring), 0 1px 2px rgb(20 40 60 / 0.05);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow 0.2s, background-color 0.2s;
}
.rfs-remind .rfs-field > input:hover { box-shadow: 0 0 0 1px rgb(27 43 58 / 0.34), 0 6px 16px -12px rgb(20 40 60 / 0.3); }
.rfs-remind .rfs-field > input:focus { background: #fff; box-shadow: 0 0 0 2px var(--rr-ink), 0 8px 22px -14px rgb(20 40 60 / 0.5); }
.rfs-remind .rfs-field > input[aria-invalid='true'] { background: #fdf1f0; box-shadow: 0 0 0 1.5px var(--rr-alert); }
.rfs-remind .rfs-field > input[aria-invalid='true']:focus { box-shadow: 0 0 0 2px var(--rr-alert); }
.rfs-remind .rfs-field > input::placeholder { color: transparent; }
.rfs-remind .rfs-field > input:focus-visible { outline: none; }
.rfs-remind .rfs-field > label:has(+ :focus) { color: var(--rr-ink); }
/* Empty and not focused: the label rests in the middle at full size, like a placeholder */
.rfs-remind .rfs-field > label:has(+ input:placeholder-shown:not(:focus)) {
  top: 29px;
  translate: 0 -50%;
  font-size: 17px;
  font-weight: 400;
  color: rgb(56 74 92 / 0.85);
}
.rfs-remind .rfs-ferr { margin: 6px 4px 0; font-size: 14px; line-height: 1.4; color: var(--rr-alert); }

/* By text / By email: two radio buttons drawn as one segmented control. One white capsule marks the choice. */
.rfs-remind .rfs-seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: rgb(0 12 31 / 0.07);
}
.rfs-remind .rfs-seg > label { position: relative; display: block; margin: 0; padding: 0; cursor: pointer; }
.rfs-remind .rfs-seg input { position: absolute; top: 50%; left: 50%; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.rfs-remind .rfs-seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px 1px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--rr-muted);
  text-align: center;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.rfs-remind .rfs-seg > label:hover span { color: var(--rr-ink); }
.rfs-remind .rfs-seg input:checked + span { background: #fff; color: var(--rr-ink); box-shadow: 0 1px 3px rgb(0 12 31 / 0.14), 0 0 0 1px rgb(0 12 31 / 0.05); }
.rfs-remind .rfs-seg input:focus-visible + span { outline: 2px solid var(--rr-ink); outline-offset: 2px; }

/* The fine print just above the button */
.rfs-remind .rfs-fine { margin: 2px 0 0; max-width: 62ch; font-size: 14px; line-height: 1.45; color: var(--rr-muted); text-wrap: pretty; }

/* The button is the agreement */
.rfs-remind .rfs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 4px 0 0; }
.rfs-remind .rfs-btn, dialog.rfs-pop .rfs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0;
  padding: 8px 28px 9px;
  border: 0;
  border-radius: 999px;
  background: var(--rr-red);
  color: #fff;
  font-family: var(--rr-font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.2s, scale 0.2s var(--rr-ease), opacity 0.2s;
}
.rfs-remind .rfs-btn:hover:not(:disabled), dialog.rfs-pop .rfs-btn:hover:not(:disabled) { background: var(--rr-red-deep); }
.rfs-remind .rfs-btn:active:not(:disabled), dialog.rfs-pop .rfs-btn:active:not(:disabled) { scale: 0.98; }
.rfs-remind .rfs-btn:disabled, dialog.rfs-pop .rfs-btn:disabled { opacity: 0.55; cursor: progress; }
dialog.rfs-pop .rfs-btn-light { background: rgb(0 12 31 / 0.07); color: var(--rr-ink); }
dialog.rfs-pop .rfs-btn-light:hover:not(:disabled) { background: rgb(0 12 31 / 0.12); }
.rfs-remind .rfs-quiet {
  min-height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--rr-muted);
  font-family: var(--rr-font);
  font-size: 16px;
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
  box-shadow: none;
}
.rfs-remind .rfs-quiet:hover { color: var(--rr-ink); }
:is(.rfs-remind, dialog.rfs-pop) :is(a, button):focus-visible { outline: 2px solid var(--rr-ink); outline-offset: 3px; box-shadow: none; }

/* The answer line (a polite live region): an error under the button, or the server's answer once signed up */
.rfs-remind .rfs-status { margin: 12px 0 0; font-size: 15px; line-height: 1.45; color: var(--rr-muted); text-wrap: pretty; }
.rfs-remind .rfs-status:empty { margin: 0; }
.rfs-remind .rfs-status:focus { outline: none; }
.rfs-remind .rfs-status.is-error { color: var(--rr-alert); }
.rfs-remind .rfs-status .rfs-nb { white-space: nowrap; }
.rfs-remind .rfs-status.is-done {
  margin: 0;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(0 12 31 / 0.08);
  font-size: 18px;
  line-height: 1.45;
  color: var(--rr-ink);
}
.rfs-remind .rfs-status.is-done::before {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 0 10px;
  border-radius: 50%;
  background: var(--rr-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.4 5.8 10 11 4.4' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* How the details are used, under the form */
.rfs-remind .rfs-note { margin: 16px 0 0; max-width: 62ch; font-size: 13px; line-height: 1.45; color: var(--rr-muted); text-wrap: pretty; }

/* After the polls close */
.rfs-remind .rfs-over { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; color: var(--rr-ink); text-wrap: balance; }

/* The email-link pages, when the page has no heading of its own for them */
.rfs-remind .rfs-token-h { margin: 0; font-family: inherit; font-size: 28px; font-weight: 400; line-height: 1.15; letter-spacing: -0.02em; color: var(--rr-ink); }
.rfs-remind .rfs-token-p { margin: 8px 0 18px; font-size: 17px; line-height: 1.5; color: var(--rr-muted); }
.rfs-remind-token .rfs-status:not(:empty) { margin-top: 0; }
.rfs-remind-token .rfs-status.is-error { margin-top: 12px; }

@media (max-width: 34rem) {
  .rfs-remind .rfs-field > input { border-radius: 14px; }
  .rfs-remind .rfs-actions .rfs-btn { width: 100%; }
  .rfs-remind .rfs-actions .rfs-quiet { margin-inline: auto; }
}

/* ================= The pop-up ================= */
dialog.rfs-pop {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(31rem, calc(100vw - 2rem));
  max-width: none;
  height: fit-content;
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: #fff;
  color: var(--rr-ink);
  box-shadow: inset 1.5px 1.5px 0 #fff, 0 0 0 1px rgb(35 31 32 / 0.08), 0 30px 70px -30px rgb(20 40 60 / 0.55);
  font-family: var(--rr-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-font-smoothing: antialiased;
}
@supports (height: 100dvh) {
  dialog.rfs-pop { max-height: calc(100dvh - 2rem); }
}
dialog.rfs-pop[open] { display: flex; flex-direction: column; }
dialog.rfs-pop *, dialog.rfs-pop *::before, dialog.rfs-pop *::after { box-sizing: border-box; }
dialog.rfs-pop [hidden] { display: none !important; }
dialog.rfs-pop::backdrop {
  background: rgb(20 32 44 / 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
dialog.rfs-pop .rfs-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 30px 30px 26px; }
dialog.rfs-pop .rfs-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 12 31 / 0.06);
  color: var(--rr-ink);
  cursor: pointer;
  transition: background-color 0.2s;
}
dialog.rfs-pop .rfs-x:hover { background: rgb(0 12 31 / 0.11); }
dialog.rfs-pop .rfs-x svg { display: block; width: 18px; height: 18px; }
dialog.rfs-pop .rfs-x:focus-visible { outline-offset: 2px; }
dialog.rfs-pop .rfs-h {
  margin: 0 52px 0 0;
  font-family: inherit;
  font-size: 1.875rem;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--rr-ink);
  text-wrap: balance;
}
dialog.rfs-pop .rfs-h:focus { outline: none; box-shadow: none; }
dialog.rfs-pop .rfs-lede { margin: 8px 0 20px; font-size: 1rem; line-height: 1.5; color: var(--rr-muted); }
dialog.rfs-pop .rfs-remind { max-width: none; }
dialog.rfs-pop .rfs-remind .rfs-status.is-done { background: rgb(0 12 31 / 0.04); box-shadow: none; }
dialog.rfs-pop .rfs-after { margin: 16px 0 0; }

@media (max-width: 34rem) {
  dialog.rfs-pop {
    inset: auto 0 var(--rfs-kb, 0px) 0;
    width: 100%;
    max-height: calc(100vh - 12px);
    margin: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 0 0 1px rgb(35 31 32 / 0.08), 0 -20px 50px -24px rgb(20 40 60 / 0.5);
  }
  dialog.rfs-pop .rfs-scroll { padding: 22px 20px calc(18px + env(safe-area-inset-bottom, 0px)); }
  dialog.rfs-pop .rfs-x { top: 10px; right: 10px; }
  dialog.rfs-pop .rfs-h { font-size: 1.625rem; margin-top: 6px; }
  dialog.rfs-pop .rfs-lede { margin-bottom: 16px; }
  dialog.rfs-pop .rfs-remind .rfs-r-form { gap: 10px; }
  dialog.rfs-pop .rfs-after .rfs-btn { width: 100%; }
}
@supports (height: 100dvh) {
  @media (max-width: 34rem) {
    dialog.rfs-pop { max-height: calc(var(--rfs-vvh, 100dvh) - 12px); }
  }
}
@media (pointer: coarse) {
  html:has(dialog.rfs-pop[open]) { overflow: hidden; }
}

/* ---------- Motion: a short fade and rise (a slide up on phones); none for reduced motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  dialog.rfs-pop { transition: opacity 0.25s ease, translate 0.35s var(--rr-ease), display 0.35s allow-discrete, overlay 0.35s allow-discrete; }
  dialog.rfs-pop::backdrop { transition: opacity 0.25s ease, display 0.3s allow-discrete, overlay 0.3s allow-discrete; }
  dialog.rfs-pop:not([open]), dialog.rfs-pop:not([open])::backdrop { opacity: 0; }
  dialog.rfs-pop:not([open]) { translate: 0 12px; }
  @starting-style {
    dialog.rfs-pop[open], dialog.rfs-pop[open]::backdrop { opacity: 0; }
    dialog.rfs-pop[open] { translate: 0 12px; }
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 34rem) {
  dialog.rfs-pop:not([open]) { opacity: 1; translate: 0 100%; }
  @starting-style {
    dialog.rfs-pop[open] { opacity: 1; translate: 0 100%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog.rfs-pop, dialog.rfs-pop::backdrop, dialog.rfs-pop *, .rfs-remind * { transition: none !important; }
}
