/* Mobile-first form layout; all collection and validation contracts stay unchanged. */
body {
  --form-card: #111316;
  --form-input: #080a0d;
  --form-line: #34383f;
  --form-muted: #b3b8c2;
  background: var(--us-bg);
  /* Switch the full palette together; white controls must not retain light text. */
  transition: none;
}
body.light-mode {
  --form-card: #f6f7f8;
  --form-input: #fff;
  --form-line: #cbd0d8;
  --form-muted: #515966;
}
header.container {
  max-width: 800px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--form-line);
}
header > a {
  font-weight: 750;
  font-size: 16px;
  letter-spacing: -0.02em;
}
header nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
header button {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 22px;
  border: 1px solid transparent;
  font-size: 13px;
}
header button[aria-pressed="true"] {
  background: var(--form-card);
  border-color: var(--form-line);
}
#website-theme {
  color: var(--form-muted);
}
.website-intake {
  max-width: 800px;
  padding: 36px 24px 64px;
  font-size: 16px;
  line-height: 1.55;
}
.website-intake h1 {
  font-size: clamp(28px, 5.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
  max-width: 620px;
}
.website-intake > p {
  margin: 8px 0 20px;
  color: var(--form-muted);
  max-width: 640px;
}
.website-intake > p:first-of-type:not(:empty) {
  color: var(--us-gold);
  font-weight: 600;
  font-size: 14px;
}
.website-intake [hidden] {
  display: none !important;
}
#website-form {
  margin-top: 28px;
}
.website-intake fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.website-intake .form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.website-intake .form-group {
  grid-column: 1/-1;
  border-top: 1px solid var(--form-line);
  padding-top: 24px;
  margin-top: 4px;
}
.website-intake legend {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
  padding: 0 0 16px;
  float: left;
  width: 100%;
}
.website-intake legend + * {
  clear: both;
}
.website-intake label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  min-width: 0;
  font-size: 14px;
  font-weight: 550;
}
.website-intake input,
.website-intake select,
.website-intake textarea {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: inherit;
  background: var(--form-input);
  border: 1px solid var(--form-line);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}
.website-intake input:hover,
.website-intake select:hover,
.website-intake textarea:hover {
  border-color: var(--form-muted);
}
.website-intake textarea {
  min-height: 112px;
  resize: vertical;
}
.website-intake select option {
  color: #111;
  background: #fff;
}
.website-intake .form-wide,
.website-intake .form-check {
  grid-column: 1/-1;
}
.website-intake label:has(> input[type="checkbox"]) {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--form-card);
  border-radius: 12px;
  font-weight: 400;
  line-height: 1.5;
}
.website-intake input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  height: 22px;
  flex: 0 0 22px;
  accent-color: #e6b932;
  margin-top: 1px;
  order: -1;
}
.website-intake button {
  min-height: 46px;
  padding: 10px 16px;
  margin: 0;
  border: 1px solid var(--form-line);
  border-radius: 10px;
  color: inherit;
  background: var(--form-card);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.website-intake button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.website-intake .repeat-list {
  display: grid;
  gap: 14px;
}
.website-intake .repeat-row {
  padding: 16px;
  background: var(--form-card);
  border-radius: 12px;
}
.website-intake .repeat-compact {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 0;
  background: none;
}
.website-intake .repeat-compact label {
  flex: 1;
}
.website-intake .repeat-compact label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.website-intake .repeat-row > .form-group {
  border: 0;
  padding: 0;
  margin: 0;
}
.website-intake .repeat-row > fieldset > legend {
  font-size: 15px;
}
.website-intake .repeat-remove {
  color: var(--form-muted);
  margin-top: 12px;
}
.website-intake .repeat-compact .repeat-remove {
  margin: 0;
}
.website-intake .repeat-add {
  margin-top: 12px;
  color: var(--us-gold);
  background: transparent;
  border-style: dashed;
  min-width: 120px;
}
body.light-mode .website-intake .repeat-add {
  color: #755200;
}
.website-intake .signature-group {
  padding: 20px;
  border-radius: 14px;
  background: var(--form-card);
  margin: 0 0 20px;
}
.website-intake .signature-group > p {
  font-size: 13px;
  color: var(--form-muted);
  margin-bottom: 14px;
}
.website-intake canvas {
  display: block;
  width: 100%;
  height: 160px;
  background: white;
  border-radius: 10px;
  border: 1px solid var(--form-line);
  margin-bottom: 12px;
}
.website-intake .form-upload {
  margin-top: 16px;
}
.website-intake input[type="file"] {
  padding: 10px;
  font-size: 13px;
  background: var(--form-input);
}
.website-intake input::file-selector-button {
  padding: 10px 12px;
  margin-right: 10px;
  border: 0;
  border-radius: 6px;
  background: var(--form-card);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
#website-fields > label {
  margin-top: 24px;
}
#website-fields > button {
  margin-top: 16px;
}
#website-fields > button[type="submit"] {
  width: 100%;
  min-height: 54px;
  background: #f4c44a;
  color: #15120b;
  border-color: #f4c44a;
  font-size: 16px;
  margin-top: 24px;
}
#website-inactive {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--form-line);
  border-radius: 14px;
  background: var(--form-card);
  color: var(--form-muted);
  font-size: 14px;
}
#website-inactive a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  color: var(--us-text);
  font-size: 18px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
}
#website-status {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
#website-status:not(:empty) {
  padding: 18px;
  background: var(--form-card);
  border-radius: 12px;
  border-left: 3px solid var(--us-gold);
}
.website-intake :focus-visible,
header :focus-visible {
  outline: 3px solid #bf9b30;
  outline-offset: 3px;
}
@media (min-width: 640px) {
  .website-intake .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .website-intake .form-grid > legend {
    grid-column: 1/-1;
  }
}
@media (max-width: 420px) {
  header.container {
    padding: 12px 16px;
    gap: 8px;
    flex-wrap: wrap;
  }
  header nav {
    margin-left: auto;
  }
  header button {
    padding: 8px 10px;
  }
  .website-intake {
    padding: 28px 16px 48px;
  }
  .website-intake .signature-group {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }
}
body.light-mode .website-intake > p:first-of-type:not(:empty) {
  color: #755200;
}
