/* ============================================================
   components/forms.css
   Inputs, primary button, the subscribe band, the legal line.
   One form per page, where the reader finished. No outer margin.
   ============================================================ */
/* One input, everywhere (account + subscribe). Full width of its column; tall enough to be
   comfortable; 16px font so iOS never zooms the page on focus. Border and radius are tokens. */
.rfi-input {
  width: 100%; min-width: 0; min-height: 48px; padding: 12px 16px;
  font-size: 16px; line-height: 1.4; font-family: inherit;
  border: 1px solid var(--rfi-border); border-radius: var(--rfi-radius);
  background: var(--rfi-surface); color: var(--rfi-text);
}
.rfi-input::placeholder { color: var(--rfi-text-3); }
.rfi-input:focus { outline: 0; border-color: var(--rfi-teal); }

/* Field = a visible label stacked above its input. The label is a real caption (14px,
   text-secondary), never only a placeholder: the placeholder disappears on input and the
   person would otherwise lose the context of what they are typing. */
.rfi-field { display: flex; flex-direction: column; gap: 6px; }
.rfi-field__label { font-family: var(--rfi-font-ui); font-size: 14px; font-weight: 500; color: var(--rfi-text-2); }
.rfi-btn {
  height: 42px; padding: 0 24px; background: var(--rfi-teal); color: var(--rfi-inverse); border: 0;
  border-radius: var(--rfi-radius); font-family: var(--rfi-font-ui); font-size: 14px; font-weight: 500;
  white-space: nowrap; display: inline-flex; align-items: center; justify-content: center;
}
.rfi-btn:hover { background: var(--rfi-teal-dark); }
/* The second button on the site. Both are inline-flex and centred, so each reads the
   same whether it is a <button> in a form or an <a> to somewhere else, and no call
   site has to know which it is (design-decisions.md 3). */
.rfi-btn--secondary { background: var(--rfi-surface); border: 1px solid var(--rfi-border); color: var(--rfi-navy); padding: 0 22px; }
.rfi-btn--secondary:hover { background: var(--rfi-surface); border-color: var(--rfi-teal); color: var(--rfi-teal); }
/* The header scale. The masthead is a 74px bar, so a 42px button would dominate it;
   this is the size the wireframe draws there. It is a modifier ON the button rather
   than an override reaching in from masthead.css, so the site still has exactly one
   button component and its sizes live with it. */
.rfi-btn--sm { height: 38px; font-size: 13.5px; padding: 0 18px; }
/* Form submit buttons match the input height (48px) so the field column reads as one scale. */
.rfi-authform__submit, .rfi-subscribe__submit { height: 48px; }
/* A form wrapper owns the small gap to the legal line, so the leaf sets no margin. */
.rfi-form { display: flex; flex-direction: column; gap: 8px; }
.rfi-legal { font-size: 13px; line-height: 1.5; color: var(--rfi-text-3); }
.rfi-legal a { color: var(--rfi-navy); text-decoration: underline; }

/* The honeypot must never be visible or focusable: it is a spam control, not a
   field. Off-canvas rather than display:none, which some bots skip. */
.rfi-subscribe__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rfi-subscribe__status:empty { display: none; }
.rfi-subscribe__status { font-size: var(--rfi-desc); color: var(--rfi-text-2); }
.rfi-subband .rfi-subscribe__status { color: var(--rfi-inverse); }

/* ---- subscribe widget: one form shape, three variants -----------------------------------
   'stack' (the /subscribe/ landing): fields stacked, full-width button under them.
   'row'   (homepage navy band, article inline): fields + button on one line on wide screens,
           MANDATORY collapse to a full-width column below 768px so nothing squeezes on mobile. */
.rfi-subscribe { display: flex; flex-direction: column; gap: 10px; }
.rfi-subscribe__fields { display: flex; flex-direction: column; gap: 14px; }
.rfi-subscribe--stack .rfi-subscribe__submit { width: 100%; }
.rfi-subscribe--row .rfi-subscribe__fields { flex-direction: row; align-items: flex-end; gap: 10px; }
.rfi-subscribe--row .rfi-field { flex: 1 1 0; min-width: 0; }
.rfi-subscribe--row .rfi-subscribe__submit { flex: 0 0 auto; }
@media (max-width: 767px) {
  .rfi-subscribe--row .rfi-subscribe__fields { flex-direction: column; align-items: stretch; gap: 14px; }
  .rfi-subscribe--row .rfi-subscribe__submit { width: 100%; }
}

/* Subscribe band (navy), before the footer / after an article. */
.rfi-subband { background: var(--rfi-navy); border-radius: var(--rfi-radius); padding: 28px 30px; display: flex; align-items: center; gap: 30px; color: var(--rfi-inverse); }
.rfi-subband__t { font-family: var(--rfi-font-ui); font-size: 22px; font-weight: 600; }
.rfi-subband__s { font-size: 14px; color: var(--rfi-inverse-soft); margin-top: 5px; }
.rfi-subband__form { margin-left: auto; flex: 1; max-width: 620px; }
.rfi-subband .rfi-input { border: 0; }
.rfi-subband .rfi-legal { color: var(--rfi-inverse-mute); }
.rfi-subband .rfi-legal a { color: var(--rfi-inverse-strong); }
@media (max-width: 900px) { .rfi-subband { flex-direction: column; align-items: stretch; gap: 16px; } .rfi-subband__form { margin-left: 0; max-width: none; } }

/* The /subscribe/ landing: ONE centred column, max 560px. Stacked top to bottom: title, subtitle,
   the bare subscribe form, the no-spam note, then the "Already have an account? Sign in" line. */
.rfi-substack {
  max-width: 560px; margin: 30px auto 0;
  background: var(--rfi-surface); border-radius: var(--rfi-radius); box-shadow: var(--rfi-shadow);
  padding: 28px 30px;
}
.rfi-substack__title { font-family: var(--rfi-font-ui); font-size: 22px; font-weight: 600; color: var(--rfi-text); margin: 0 0 6px; }
.rfi-substack__sub { font-size: 14px; line-height: 1.55; color: var(--rfi-text-2); margin: 0; }
.rfi-substack .rfi-subscribe { margin-top: 20px; }
.rfi-substack__cta { margin-top: 16px; }
/* The alt line reads as a site link (navy, teal on hover). */
.rfi-substack__alt { font-size: 13.5px; color: var(--rfi-text-3); margin-top: 16px; }
.rfi-substack__alt a { color: var(--rfi-navy); font-weight: 600; }
.rfi-substack__alt a:hover { color: var(--rfi-teal); }

/* Turnstile client-side status (auth-turnstile.js): a clear message when the widget
   is verifying or fails, instead of a generic server rejection. */
.rfi-turnstile-status:empty { display: none; }
.rfi-turnstile-status {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--rfi-text-2, #6B6B6B);
}
