/* Agentic Wizards — the parts every lead form shares (assets/js/intake.js): consent block, honeypot, Turnstile slot,
   status line and the email fallback. Loaded on the four form pages and mission-received. Tokens only. */

/* Consent (04-security.md): one required row, as in the designs, "privacy notice" in its text the link (build.mjs); the
   optional news opt-in, unticked, under it. The row repeats the commerce family's .xc-check look so the assessment
   page, which doesn't load that family, matches. */
.consent { margin: var(--aw-space-4) 0; padding: 0; border: 0; min-width: 0; }
.consent__item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 0 0 var(--aw-space-2);
  padding: var(--aw-space-3) 14px;
  border: 1px solid var(--aw-border-line);
  border-radius: var(--aw-radius-md);
  font: 400 13px/1.5 var(--aw-font-body);
  color: var(--aw-text-secondary);
  cursor: pointer;
}
.consent__item input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--aw-accent-gold-light); cursor: pointer; }
.consent__item:has([aria-invalid="true"]) { border-color: var(--aw-state-danger); }
.consent__item + .xc-error { margin: -4px 0 var(--aw-space-2); }
.consent__item a { color: var(--aw-text-primary); text-decoration: underline; text-underline-offset: 3px; }
/* The optional news opt-in: a plain line under the consent row (the designs have one boxed row), its box in line with
   the row's (14px padding + 1px border). */
.consent__optin {
  display: flex; gap: 11px; align-items: flex-start;
  margin: calc(-1 * var(--aw-space-1)) 0 0; padding: 0 15px;
  font: 400 12px/1.5 var(--aw-font-body); color: var(--aw-text-secondary);
  cursor: pointer;
}
.consent__optin input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--aw-accent-gold-light); cursor: pointer; }
.consent [class*="error"]:not([hidden]) + .consent__optin { margin-top: var(--aw-space-2); }   /* under a shown consent error */

/* Honeypot: present for bots, invisible and unreachable for people. */
.intake-hp { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Turnstile (appearance "interaction-only", intake.js): invisible unless Cloudflare needs the visitor to interact; then
   its 65px-high iframe shows here. */
.intake-turnstile { min-width: 0; max-width: 100%; }

/* Status line: pending / success / error / offline. Empty until intake.js fills it, so the live region exists from load. */
.intake-status { font: 500 14px/1.5 var(--aw-font-body); color: var(--aw-text-primary); }
.intake-status[data-state] {
  display: flex; gap: var(--aw-space-2); align-items: flex-start;
  margin: var(--aw-space-3) 0; padding: var(--aw-space-3) 14px;
  border: 1px solid var(--aw-border-line); border-left-width: 4px; border-radius: var(--aw-radius-md);
  background: var(--aw-bg-card);
}
.intake-status .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.intake-status[data-state="pending"] { border-color: var(--aw-accent-energy); }
.intake-status[data-state="pending"] .icon { color: var(--aw-text-energy); animation: intake-spin 0.9s linear infinite; }
.intake-status[data-state="success"] { border-color: var(--aw-state-success); }
.intake-status[data-state="success"] .icon { color: var(--aw-state-success); }
.intake-status[data-state="error"] { border-color: var(--aw-state-danger); }
.intake-status[data-state="error"] .icon { color: var(--aw-state-danger); }
.intake-status[data-state="offline"] { border-color: var(--aw-state-warning); }
.intake-status[data-state="offline"] .icon { color: var(--aw-state-warning); }
@keyframes intake-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .intake-status[data-state="pending"] .icon { animation: none; } }

form.is-sending [type="submit"] { opacity: 0.72; cursor: progress; }

/* Email fallback: INTAKE_ENABLED=false, or two failed attempts. */
.intake-fallback {
  margin: var(--aw-space-3) 0; padding: var(--aw-space-4);
  border: 1px solid var(--aw-border-gold); border-radius: var(--aw-radius-md);
  background: var(--aw-bg-card);
  font: 400 14px/1.55 var(--aw-font-body); color: var(--aw-text-secondary);
}
.intake-fallback[hidden] { display: none; }
.intake-fallback p { margin: 0 0 var(--aw-space-3); }
.intake-fallback strong { color: var(--aw-text-primary); overflow-wrap: anywhere; }
.intake-fallback__title { display: flex; gap: var(--aw-space-2); align-items: center; font-weight: 700; color: var(--aw-text-primary); }
.intake-fallback__title .icon { width: 18px; height: 18px; color: var(--aw-accent-gold-light); flex: none; }
.intake-fallback .btn { white-space: normal; text-align: center; }

/* Receipt on mission-received.html */
.lead-ref { margin: var(--aw-space-4) auto 0; font: 400 14px/1.5 var(--aw-font-body); color: var(--aw-text-secondary); }
.lead-ref[hidden] { display: none; }
.lead-ref code { font: 600 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--aw-text-primary); overflow-wrap: anywhere; }

/* Plan review (athena/crm-handoff): the design's lead-record cells, filled in by the visitor. The value sits in the cell
   as in the design (no inner box); the cell border carries focus and errors. */
.xc-record--form .xc-record__item { cursor: text; }
.xc-record--form .xc-record__item textarea,
.xc-record--form .xc-record__item input {
  display: block; width: calc(100% + 8px); min-width: 0; margin: 0 -4px; padding: 2px 4px;
  border: 1px solid transparent; border-radius: var(--aw-radius-xs);
  background: transparent; color: var(--aw-text-primary); font: 700 13px/1.4 var(--aw-font-body);
}
.xc-record--form .xc-record__item textarea:not([readonly]),
.xc-record--form .xc-record__item :focus,
.xc-record--form .xc-record__item [aria-invalid="true"] { outline: none; border-color: transparent; background: transparent; }
.xc-record--form .xc-record__item:focus-within { border-color: var(--aw-accent-gold-light); box-shadow: 0 0 0 1px var(--aw-accent-gold-light); }
.xc-record--form .xc-record__item:has([aria-invalid="true"]) { border-color: var(--aw-state-danger); }
.xc-record__item ::placeholder { color: var(--aw-text-muted); font-weight: 400; opacity: 1; }
.xc-record__label { font-size: 11px; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; color: var(--aw-text-muted); }
.xc-record__value { padding: 3px 0; font: 700 13px/1.4 var(--aw-font-body); color: var(--aw-text-primary); }
.xc-record--form .xc-record__item:has(.xc-record__value) { cursor: default; }
[data-record-meter] .xc-score__ring { font-size: 18px; }
.xc-plan-source { margin: -4px 0 var(--aw-space-2); font: 400 12px/1.5 var(--aw-font-body); color: var(--aw-text-secondary); }
.xc-plan-source[hidden] { display: none; }

/* Guild Assessment: the emblem tile stands in for the persona portrait (no live agent in v1), and the consent
   block sits between the questions and the send bar. */
.ga-avatar--mark img { object-fit: contain; }
.ga-q::before { background: var(--aw-bg-primary) url("../img/brand/favicon.svg") center / contain no-repeat; }
.ga-form__consent { padding: 0 24px 0 calc(24px + 42px); }   /* aligned with the answers (.ga-q's 42px indent) */
.ga-form__consent .consent { margin-top: 0; }
@media (max-width: 639px) { .ga-form__consent { padding: 0 16px; } }   /* = .ga-form__body's mobile padding */
