/* The intake forms: the monthly letter's sign-up (src/components/Signup.astro) and
   the feedback form on /contact (src/components/FeedbackForm.astro).

   Loaded by the components themselves, so only a page that shows a form pays for it.
   Classes are all prefixed intake- so verify's check 3 can match each one to this
   file, and none of them leaks onto the rest of the site.

   Inputs are styled here rather than by the general `.ed :where(input, select,
   textarea)` rule in editorial-compat.css, because that rule sits after a block of
   stray prose and is swallowed by the parser today (memory note on Datum). Deleting
   the prose would wake it up site-wide; these classes do not depend on it either way.

   Tokens only, no new colours: --ed-paper-alt, --ed-rule, --ed-rule-strong, --ed-ink,
   --ed-body, --ed-quiet, --ed-accent, --font-body, --font-mono. */

.ed .intake-form {
  display: flex; flex-direction: column; gap: 1rem;
  max-width: 36rem; margin-top: 0.75rem;
}
.ed .intake-field { display: flex; flex-direction: column; gap: 0.4rem; }
.ed .intake-field > label {
  font-family: var(--font-mono); font-weight: 500; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ed-quiet);
}
.ed .intake-input {
  width: 100%; box-sizing: border-box;
  font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.4;
  color: var(--ed-ink); background: var(--ed-paper-alt);
  border: 1px solid var(--ed-rule-strong); border-radius: 2px;
  padding: 0.6em 0.75em;
}
.ed textarea.intake-input { resize: vertical; min-height: 8rem; line-height: 1.55; }
.ed .intake-input:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 2px; }
.ed .intake-input::placeholder { color: var(--ed-quiet); opacity: 1; }

.ed .intake-check {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.875rem; line-height: 1.55; color: var(--ed-body); max-width: 62ch;
}
.ed .intake-check input { margin: 0.3em 0 0; accent-color: var(--ed-accent); flex: none; }

/* The four email topics, none ticked. A fieldset so the question ("Pick what you want
   by email. Nothing is ticked.") is the group's name for a screen reader. */
.ed .intake-topics { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.ed .intake-topics legend { padding: 0; margin: 0 0 0.35rem; font-size: 0.875rem; line-height: 1.55; color: var(--ed-ink); }

/* p.intake-* outranks `.ed .block p + p` in editorial-compat.css, which would
   otherwise add its paragraph spacing on top of the form's own gap. */
.ed .intake-form p.intake-consent,
.ed .intake-form p.intake-note { margin: 0; font-size: 0.875rem; line-height: 1.6; color: var(--ed-body); max-width: 62ch; }
.ed .intake-form p.intake-note { color: var(--ed-quiet); }

.ed .intake-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.ed .intake-actions .btn[disabled] { opacity: 0.6; cursor: progress; }
/* The status line is never display:none, even when empty: a live region that is not
   rendered when its text changes is not announced by every screen reader. */
.ed .intake-form p.intake-status { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--ed-ink); max-width: 52ch; }

/* The honeypot: present for a form-filling bot, absent for a person. Off-screen
   rather than display:none, which some bots skip. */
.ed .intake-hp {
  position: absolute; left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* 16px stops iOS zooming into a field on focus, the same rule the tool forms use. */
@media (max-width: 40rem) {
  .ed .intake-input { font-size: 16px; }
}
