/* AI Systems Finder: the four states of every control (design pass, 14 Nov 2026), loaded last on the finder pages.
   Focus: one 2px Consulting Blue ring, 3px clear (finder.css). Disabled: Soft Stone face, Steel words, dashed edge.
   Loading: the button keeps its colour, says what is happening and shows a turning ring. Error: an icon and bold
   words under the field, a red edge on the field and on each missed choice, never colour alone. */

/* Error: the icon and the heavy field edge are in controls.css, shared with the scorecard and the assessment. */
/* A missed question: a solid red line round each choice (Kristian, 14 Nov 2026: "a red line ... more obvious"); the icon and words still say it. */
.fd-q[aria-invalid="true"] :is(.fd-tile, .fd-chip, .fd-sys, .fd-slider, .fd-cal, .fd-stage-open):not(:has(input:checked), [aria-pressed="true"], [data-picked]) { border-color: var(--fd-alert); border-style: solid; }
.fd-page :is(.fd-other, .fd-field, .fd-sys-other + div) :is(input, select, textarea)[aria-invalid="true"]:not(:focus) { border-color: var(--fd-alert); box-shadow: 0 0 0 1px var(--fd-alert); }

/* Loading: still Charcoal, its words say what is happening and a ring turns in place of the arrow (the ring stands
   still under reduced motion; the words carry it). */
:is(.fd-go, .fd-alt, .fd-ghost)[aria-busy="true"] { cursor: progress; }
:is(.fd-go, .fd-alt, .fd-ghost)[aria-busy="true"]::after {
  content: ""; width: var(--fd-t2); height: var(--fd-t2); flex: none; -webkit-mask: none; mask: none; background: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: fd-spin 0.8s linear infinite;
}
@keyframes fd-spin { to { transform: rotate(1turn); } }
/* The estimate page by link while it fetches the estimate. */
[data-fd-loading] { display: flex; align-items: center; gap: var(--fd-s2); margin: 0; font-weight: 600; }
[data-fd-loading]::before {
  content: ""; width: var(--fd-t2); height: var(--fd-t2); flex: none; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: fd-spin 0.8s linear infinite;
}

/* Disabled */
:is(.fd-go, .fd-ghost, .fd-more, .fd-back):is(:disabled, [aria-disabled="true"]):not([aria-busy="true"]) {
  cursor: not-allowed; background: var(--fd-ground); color: var(--fd-muted); box-shadow: none; transform: none;
  outline: 2px dashed var(--fd-muted); outline-offset: -2px;
}
:is(.fd-go, .fd-ghost, .fd-more, .fd-back):is(:disabled, [aria-disabled="true"]):not([aria-busy="true"]):focus-visible { outline: var(--fd-focus); outline-offset: var(--fd-focus-off); }
:is(.fd-go, .fd-back):is(:disabled, [aria-disabled="true"]):not([aria-busy="true"])::after { display: none; }
.fd-page :is(.fd-other, .fd-field, .fd-sys-other + div) :is(input, select, textarea):disabled {
  cursor: not-allowed; background: var(--fd-ground); color: var(--fd-muted); border-style: dashed; box-shadow: none;
}
.fd-range:disabled { cursor: not-allowed; }
.fd-range:disabled::-webkit-slider-thumb { background: var(--fd-muted); box-shadow: 0 0 0 1px var(--fd-muted); }

/* Focus extras: a heading that takes focus on a new step shows the same ring, clear of its words. */
.fd-slide :is(h2, h3, legend)[tabindex="-1"]:focus { outline: none; }
.fd-slide :is(h2, h3, legend)[tabindex="-1"]:focus-visible { outline: var(--fd-focus); outline-offset: var(--fd-s1); border-radius: var(--fd-r1); }

/* No gradients on the finder (design pass): the wide board's edge fade becomes a plain Off-White strip. The 756
   detail pages keep board.css's own fade. */
.fd-page .bd-frame.is-wide::after { background: color-mix(in srgb, var(--fd-surface) 85%, transparent); width: var(--fd-s5); }
