/* The newsletter form (home page, footer, research page, privacy page). Self-contained, so pages with their own
   stylesheet can use it too; colours fall back to the site palette when a page doesn't define them. */
.join {
  --j-green: var(--green, #2fb36f);
  --j-ink: #04140b; /* not var(--ink): some pages use that name for their light text colour */
  --j-line: var(--line, #273932);
  --j-text: var(--text, #e7edea);
  --j-muted: var(--muted, #83948c);
  --j-field: #070a09;
  --j-red: var(--red, #e5534b);
  display: grid; gap: 14px;
  font-family: "Inter", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  color: var(--j-text);
}
.join-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join-fields { display: grid; gap: 12px; }
@media (min-width: 720px) { .join-fields { grid-template-columns: 1.3fr 1fr 1fr; } }
.join-field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--j-text); }
.join-field i { font-style: normal; font-weight: 500; color: var(--j-muted); }
.join input[type="email"], .join input[type="text"], .join select {
  width: 100%; min-height: 46px; padding: 0 14px;
  border-radius: 10px; border: 1.5px solid var(--j-line); background: var(--j-field);
  font: 500 15px/1.2 inherit; font-family: inherit; color: var(--j-text);
}
.join select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--j-muted) 50%), linear-gradient(135deg, var(--j-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.join input::placeholder { color: #4d5d56; }
.join input:focus-visible, .join select:focus-visible { outline: 2px solid var(--j-green); outline-offset: 2px; border-color: var(--j-green); }

/* A rounded-square checkbox with a tick, not a switch */
.join-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--j-muted); cursor: pointer; }
.join-consent input {
  appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0;
  border-radius: 6px; border: 1.5px solid var(--j-line); background: var(--j-field); cursor: pointer;
  display: grid; place-content: center;
}
.join-consent input::after { content: "✓"; font: 800 13px/1 system-ui, sans-serif; color: var(--j-ink); opacity: 0; }
.join-consent input:checked { background: var(--j-green); border-color: var(--j-green); }
.join-consent input:checked::after { opacity: 1; }
.join-consent input:focus-visible { outline: 2px solid var(--j-green); outline-offset: 2px; }

.join-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.join-btn {
  min-height: 46px; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--j-green); color: var(--j-ink); font: 700 15px/1 inherit; font-family: inherit;
}
.join-btn:hover { filter: brightness(1.08); }
.join-btn:disabled { opacity: .6; cursor: progress; }
.join-btn:focus-visible { outline: 2px solid var(--j-text); outline-offset: 3px; }
.join-msg { margin: 0; font-size: 14px; font-weight: 600; }
.join-msg.is-ok { color: var(--j-green); }
.join-msg.is-error { color: var(--j-red); }
.join-fine { margin: 0; font-size: 12.5px; color: var(--j-muted); }
.join-fine a { color: inherit; }

/* Compact one-line version for the footer */
.join.is-compact { gap: 10px; }
.join.is-compact .join-fields { grid-template-columns: 1fr; }
.join.is-compact .join-inline { display: flex; gap: 8px; }
.join.is-compact .join-inline input { flex: 1; min-width: 0; }
.join.is-compact .join-btn { padding: 0 18px; flex: none; }
.join.is-compact .join-consent { font-size: 13px; }

/* A full-width band holding the form, for pages that don't use the site's own layout (the research page) */
.join-band { padding: clamp(40px, 7vw, 72px) 16px; }
.join-band-card {
  max-width: 1100px; margin: 0 auto; display: grid; gap: 22px;
  padding: clamp(22px, 3.4vw, 36px); border-radius: 16px;
  border: 1.5px solid color-mix(in oklch, #2fb36f, #273932 70%);
  background: linear-gradient(165deg, #0f1c16, #0d1210 65%);
  font-family: "Inter", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
}
.join-band-card > div:first-child { display: grid; gap: 10px; }
.join-band-kicker { margin: 0;font: 600 12px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: #2fb36f; }
.join-band-title { margin: 0; font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.025em; color: #fff; line-height: 1.15; text-transform: none; font-family: inherit; }
.join-band-text { margin: 0; color: #83948c; max-width: 60ch; line-height: 1.6; }

/* An outlined button for actions that aren't "join" (leaving the list) */
.join-btn.is-secondary { background: transparent; color: var(--j-text); border: 1.5px solid var(--j-line); }
.join-btn.is-secondary:hover { border-color: var(--j-text); filter: none; }

/* After a successful sign-up only the message stays (last, so it beats the layouts above) */
.join.is-done .join-fields, .join.is-done .join-inline, .join.is-done .join-consent, .join.is-done .join-btn { display: none; }
