/* Local candidate only. Keep tap targets independent from the type scale. */
.page-shell-form {
  --form-title: 20px;
  --form-label: 14px;
  --form-input: 16px;
  --form-option: 14px;
  --form-hint: 13px;
}
.page-shell-form .title-with-logo { display: flex; align-items: center; gap: 8px; }
.page-shell-form .hero-panel { position: relative; z-index: 2; }
.page-shell-form .title-with-logo .logo-tile-inline { display: none; }
.page-shell-form .hero-title.hero-title-form {
  flex: 1; min-width: 0; font-size: var(--form-title); line-height: 1.35;
}
.page-shell-form .font-control { flex: none; display: flex; align-items: center; gap: 6px; }
.page-shell-form .font-control-label { font: 400 12px/1.4 system-ui, sans-serif; color: var(--muted); }
.page-shell-form .font-size-dropdown { position: relative; }
.page-shell-form .font-size-trigger {
  min-height: 44px; padding: 9px 12px; gap: 10px; list-style: none;
  font: 600 14px/1.4 system-ui, sans-serif; white-space: nowrap; cursor: pointer;
}
.page-shell-form .font-size-trigger::-webkit-details-marker { display: none; }
.page-shell-form .font-size-dropdown[open] .topbar-more-caret { transform: rotate(-135deg) translate(-1px, -1px); }
.page-shell-form .font-size-options {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 136px; display: flex; flex-direction: column; gap: 4px;
  padding: 6px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; box-shadow: var(--shadow);
}
.page-shell-form .font-size-dropdown:not([open]) .font-size-options { display: none; }
.page-shell-form .font-size-options button {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); font: 500 14px/1.4 system-ui, sans-serif;
  white-space: nowrap; cursor: pointer;
}
.page-shell-form .font-size-options button[aria-pressed="true"] { background: #f2f4f7; font-weight: 600; }
.page-shell-form .font-size-options button[aria-pressed="true"]::after { content: '✓'; }
.page-shell-form .font-size-options button:hover { background: #f2f4f7; }
.page-shell-form .font-size-trigger:focus-visible,
.page-shell-form .font-size-options button:focus-visible { outline: 2px solid #ae6a0d; outline-offset: 2px; }
.page-shell-form .field > label,
.page-shell-form .field-heading label,
.page-shell-form .field .question-label { font-size: var(--form-label); font-weight: 500; line-height: 1.5; }
.page-shell-form .field-heading { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.page-shell-form .field-heading label { flex: none; }
.page-shell-form .field-heading-hint { min-width: 0; color: var(--muted); font-size: var(--form-hint); font-weight: 400; line-height: 1.5; }
.page-shell-form .field input[type="text"],
.page-shell-form .field input[type="email"],
.page-shell-form .field textarea,
.page-shell-form .resubmission-recovery input {
  font-size: var(--form-input); min-height: 44px; line-height: 1.5;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.page-shell-form .field .option-item { min-height: 44px; font-size: var(--form-option); font-weight: 400; line-height: 1.5; }
.page-shell-form .field input[type="text"],
.page-shell-form .field input[type="email"] {
  min-height: 40px; padding: 6px 10px; line-height: 1.4;
}
.page-shell-form[data-font-size="large"] .field input[type="text"],
.page-shell-form[data-font-size="large"] .field input[type="email"] {
  min-height: 44px; padding: 7px 10px;
}
.page-shell-form .field .helper-text,
.page-shell-form .hero-description,
.page-shell-form .error { font-size: var(--form-hint); line-height: 1.5; }
.page-shell-form[data-font-size="large"] {
  --form-title: 24px; --form-label: 17px; --form-input: 18px;
  --form-option: 17px; --form-hint: 16px;
}
.page-shell-form[data-font-size="large"] .form-grid { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
.page-shell-form[data-font-size="large"] .form-grid > .field { grid-column: 1 / -1; }
.page-shell-form[data-font-size="large"] .field { gap: 6px; }
.page-shell-form[data-font-size="large"] .option-grid,
.page-shell-form[data-font-size="large"] .field-title .option-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.page-shell-form[data-font-size="large"] .resubmission-status p,
.page-shell-form[data-font-size="large"] .resubmission-reason,
.page-shell-form[data-font-size="large"] .resubmission-recovery { font-size: 17px; line-height: 1.6; }
.page-shell-form[data-font-size="large"] .resubmission-secondary,
.page-shell-form[data-font-size="large"] .btn-primary,
.page-shell-form[data-font-size="large"] .btn-secondary { font-size: 17px; min-height: 44px; }
.page-shell-form .basic-field { gap: 3px; margin-bottom: -4px; }
.page-shell-form .basic-field input[type="text"],
.page-shell-form .basic-field input[type="email"] { min-height: 36px; padding-block: 4px; }
.page-shell-form[data-font-size="large"] .basic-field { gap: 4px; }
.page-shell-form[data-font-size="large"] .basic-field input[type="text"],
.page-shell-form[data-font-size="large"] .basic-field input[type="email"] { min-height: 40px; padding-block: 5px; }
.page-shell-form .q5-options,
.page-shell-form[data-font-size="large"] .q5-options { display: flex; flex-wrap: wrap; gap: 6px; }
.page-shell-form .q5-options .option-item { flex: 1 1 auto; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.page-shell-form .supplementary-field textarea { min-height: 96px; resize: vertical; }
.page-shell-form .identity-field { gap: 5px; margin-bottom: -2px; }
.page-shell-form .identity-field input[type="text"],
.page-shell-form .identity-field input[type="email"] { min-height: 40px; padding-block: 6px; }
.page-shell-form[data-font-size="large"] .identity-field { gap: 6px; }
.page-shell-form[data-font-size="large"] .identity-field input[type="text"],
.page-shell-form[data-font-size="large"] .identity-field input[type="email"] { min-height: 44px; padding-block: 7px; }

/* Two rows: two longer titles above, then one long and two short choices. */
@media (min-width: 360px) {
  .page-shell-form .field-title .option-grid,
  .page-shell-form[data-font-size="large"] .field-title .option-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px;
  }
  .page-shell-form .field-title .option-item { grid-column: span 6; min-width: 0; padding: 8px 6px; gap: 6px; overflow-wrap: anywhere; }
  .page-shell-form .field-title .option-item:nth-child(4),
  .page-shell-form .field-title .option-item:nth-child(5) { grid-column: span 3; }
  .page-shell-form .field-title .option-item input { flex-shrink: 0; }
}
