/*
 * public/assets/u3-forms.css — the form states: an empty field looks
 * empty, a filled one looks filled, and a refusal says why, so a member
 * always knows what their entry needs before it can be sent.
 */

/* — token group — U3:416 field construction + the F5 conflict above. */
.u3-scope {
  --u3-field-border-color: #666666; /* A1 ruling (COPY-N16 field.border) — the C13b served byte */
  --u3-field-min-h: 48px;        /* U3:416 — "minimum height 48px" */
  --u3-field-pad: 12px;          /* U3:416 — "12px internal padding" */
  --u3-field-text: 16px;         /* U3:416 — "16px text" */
  --u3-choice-min-h: 44px;      /* U3:416 — "Radio/checkbox labels have 44px minimum touch height" */
  --u3-textarea-rows: 4;         /* U3:416 — "Textarea starts at four rows" (rows attribute in markup) */
}

/* — form frame — U1:379 reading column (620px) is the form's column; the
 *   field construction inside it is U3:416. No max-width is forced on the
 *   form element itself beyond the column it sits in. */
.u3-scope .u3-form { max-width: var(--u1-reading-max, 620px); text-align: left; }
.u3-scope .u3-field { margin: 0 0 var(--u1-s3, 24px); }

/* — labels — U1:380 ("Labels: 16px, weight 500") carried into the form layer
 *   so the form is complete from U1+U3 alone; same values as .u1-label. */
.u3-scope .u3-label {
  display: block;
  font-size: var(--u1-label-size, 16px);
  font-weight: var(--u1-label-weight, 500);
  color: var(--u1-ink, #000000);
  margin: 0 0 var(--u1-s1, 8px);
}

/* — text inputs — U3:416 (one rule per clause):
 *   "100% width" -> width: 100%;
 *   "box-sizing border-box" -> box-sizing (also guaranteed scope-wide by u1);
 *   "minimum height 48px" -> min-height;
 *   "1px #666 border" -> border via --u3-field-border-color (REQUIRES RULING);
 *   "12px internal padding" -> padding;
 *   "16px text" -> font-size;
 *   "square corners" -> border-radius: 0.
 *   Native select keeps its native appearance (U3:414's goal control is a
 *   native radio group in the U3 spec; a select, where a ruling keeps the
 *   served M14 byte, uses this same class — no custom widget either way). */
.u3-scope .u3-input {
  width: 100%;
  box-sizing: border-box;
  min-height: var(--u3-field-min-h);
  border: 1px solid var(--u3-field-border-color);
  padding: var(--u3-field-pad);
  font-size: var(--u3-field-text);
  font-family: inherit;
  line-height: 1.5;
  color: var(--u1-ink, #000000);
  background: var(--u1-field, #FFFFFF);
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

/* — textarea — U3:416: "Textarea starts at four rows and resizes
 *   vertically." rows="4" is markup; the floor here keeps four rows even if
 *   a future page drops the attribute. Vertical resize only. */
.u3-scope .u3-textarea { min-height: 120px; resize: vertical; }

/* — choice rows — U3:416: "Radio/checkbox labels have 44px minimum touch
 *   height." The whole label row is the touch target; the native input is
 *   not shrunk below its platform default (20px visual where supported).
 *   accent-color keeps the checked state black (U1:378 — no green success
 *   and no blue anywhere in this layer). */
.u3-scope .u3-choice {
  display: flex;
  flex-wrap: wrap;   /* ROW 510 (Tani msg 850, 2026-11-18T02:57:34Z): grid/flex children
                        must shrink — the goal-choices ROW wraps instead of
                        overflowing the 195-320px reflow sweep (+137px at 195px,
                        measured at the c13b-candidate 7f52fd45…); A8: no loss of
                        information at enlarged text. Labels keep font-size 17px
                        (U3:416) — no text gets smaller. */
  align-items: center;
  gap: var(--u1-s2, 16px) var(--u1-s2, 16px);
  min-height: var(--u3-choice-min-h);
  margin: 0 0 var(--u1-s1, 8px);
  cursor: pointer;
}
.u3-scope .u3-choice input[type="radio"],
.u3-scope .u3-choice input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--u1-ink, #000000);
}
.u3-scope .u3-choice label,
.u3-scope .u3-choice > span {
  font-size: var(--u1-body-size, 17px);
  line-height: 1.5;
  color: var(--u1-ink, #000000);
}

/* — radio group frame — U3:414: "a native radio group" (fieldset + legend +
 *   native radios; no scripted widget). */
.u3-scope .u3-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--u1-s3, 24px);
  min-width: 0;
}
.u3-scope .u3-legend {
  padding: 0;
  margin: 0 0 var(--u1-s1, 8px);
  font-size: var(--u1-label-size, 16px);
  font-weight: var(--u1-label-weight, 500);
  color: var(--u1-ink, #000000);
}

/* — notices and hints — U3:414: "Use the notice 'We use these details to answer your inquiry. Sending it does not book a campaign.'" (the notice copy is markup, machine-copied in the demo); U3:416: "A server-enforced
 *   length limit is stated near a field if a person could realistically
 *   reach it." Secondary text floor 14px per U1:380. */
.u3-scope .u3-note {
  font-size: var(--u1-secondary-size, 14px);
  line-height: 1.5;
  color: var(--u1-secondary, #525252);
  margin: 0 0 var(--u1-s2, 16px);
}
.u3-scope .u3-hint {
  font-size: var(--u1-secondary-size, 14px);
  line-height: 1.5;
  color: var(--u1-secondary, #525252);
  margin: var(--u1-s1, 8px) 0 0;
}

/* — ERROR SUMMARY — U3:418: "On a validation error, return the form with an
 *   error summary BEFORE it, links to affected fields, and a specific
 *   adjacent explanation." The summary is a sibling that precedes the <form>
 *   in markup order; its links jump to field ids. Shape + text carry the
 *   state (2px black border, black text) — U1:383: "Required/error states
 *   use text and shape, not red alone" (nothing here is red). */
.u3-scope .u3-error-summary {
  border: 2px solid var(--u1-ink, #000000);
  padding: var(--u1-s2, 16px);
  margin: 0 0 var(--u1-s3, 24px);
  background: var(--u1-field, #FFFFFF);
}
.u3-scope .u3-error-summary h2 {
  font-size: 20px;          /* DERIVED — inside the 8/16/24/32/48/64 scale's family weights */
  line-height: 1.3;
  font-weight: var(--u1-label-weight, 500);
  margin: 0 0 var(--u1-s1, 8px);
}
.u3-scope .u3-error-summary ul { margin: 0; padding: 0 0 0 var(--u1-s4, 32px); }
.u3-scope .u3-error-summary li { margin: 0 0 var(--u1-s1, 8px); }
.u3-scope .u3-error-summary a {
  color: var(--u1-ink, #000000);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* — ADJACENT FIELD ERROR — U3:418: "a specific adjacent explanation" beside
 *   the affected field. The black square is the SHAPE half of the state; the
 *   sentence is the TEXT half; red is never used (U1:383). */
.u3-scope .u3-field-error {
  display: flex;
  gap: var(--u1-s1, 8px);
  align-items: flex-start;
  margin: 0 0 var(--u1-s1, 8px);
  font-size: var(--u1-body-size, 17px);
  line-height: 1.5;
  color: var(--u1-ink, #000000);
}
.u3-scope .u3-field-error::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--u1-ink, #000000);
  margin-top: 8px;
}

/* — UNKNOWN-WRITE STATE — U3:418 (machine-copied copy, never paraphrased):
 *   "We cannot confirm whether this was saved. Contact support before submitting again."
 *   — "Do not label uncertainty a failed write or a saved entry."
 *   This class is the documented carrier of that copy: 2px black
 *   border (shape), black text, no success/failure color anywhere. */
.u3-scope .u3-unknown-write {
  border: 2px solid var(--u1-ink, #000000);
  padding: var(--u1-s2, 16px);
  margin: 0 0 var(--u1-s3, 24px);
  font-size: var(--u1-body-size, 17px);
  line-height: 1.5;
  color: var(--u1-ink, #000000);
  background: var(--u1-field, #FFFFFF);
}

/* — PRESERVED-VALUES STATE — U3:418: "Preserve safe submitted values in that
 *   response; do not put them in the URL or logs." Values ride the
 *   server-rendered value attributes (the demo shows them); this note class
 *   labels the state for the person. The note copy in the demo is DEMO COPY
 *   (design layer), not C12a copy of record. */
.u3-scope .u3-preserved-note {
  font-size: var(--u1-secondary-size, 14px);
  line-height: 1.5;
  color: var(--u1-secondary, #525252);
  margin: 0 0 var(--u1-s2, 16px);
}

/* — DISABLED STATE — the server-rendered disabled surface (fieldset[disabled]
 *   + .u1-primary[disabled] from the U1 layer). Inputs keep their
 *   construction (U3:416) and lose nothing but editability; the label stays
 *   visible (U1:384). No opacity is used — text keeps its contrast. */
.u3-scope .u3-input[disabled],
.u3-scope fieldset[disabled] .u3-input {
  color: var(--u1-secondary, #525252);
  border-color: var(--u1-secondary, #525252);
  background: var(--u1-field, #FFFFFF);
  cursor: not-allowed;
}

/* — THE HONEYPOT (row 394): class .c9-hp BY NAME is the ONE allowed
 *   opacity:0 carrier in the whole served tree (SITE-NO-MOTION + RED-STOP
 *   gates). It is OFF-SCREEN and out of tab order, never display:none
 *   (bots that fill display:none fields are the ones we want). The class
 *   name is pinned by the gates — the deleted v9-forms.css (unlinked
 *   history, removed from public/assets by the row-481 fix)
 *   carried it before the C13b re-cut. — */
.u3-scope .c9-hp {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  border: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
}

/* — THE HIDDEN KEY — U3:420: markup law, not CSS: every form response
 *   carries `<input type="hidden" name="submission_id" value="<UUID}">` —
 *   type="hidden" (native, no CSS trick), never JS-generated only (the
 *   pages work without client JavaScript, U1:387). (A1123-052: the STATIC
 *   forms — public/join/index.html + the served result screens — mint the
 *   UUID at render time, so the served pages carry a fresh per-render key;
 *   the truly static /join page carries no key at all and its intake relies
 *   on the rate window + the intake validators, never a hidden token. The
 *   old 'never one shared static key / see the file header' text pointed at
 *   a header note the file never carried.)
 *   form_idempotence implementation this cites and does not rebuild.
 * — NO-STORE — U3:420: the server sets no-store on the form response, on
 *   any error response containing submitted data, and on receipt responses.
 *   CSS cannot enforce a header; this comment is the spec's anchor in the
 *   layer, and the acceptance raws record the law. */

/* W1 (ORDER 20261125T003514Z-early-access): the two doors on /join. The
 * audience radio picks the visible panel — pure CSS (:has), zero script; a
 * browser without :has shows both panels, and the server keeps only the
 * fields the picked door asks (keepFields picks the definition by the
 * posted audience value). */
.u3-panel-org { display: none; }
form:has(#door-org:checked) .u3-panel-org { display: block; }
form:has(#door-org:checked) .u3-panel-creator { display: none; }
