/* XILINOS APPLY PREVIEW V1 */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.preview-main {
  padding: 70px 0 96px;
}

.preview-hero {
  padding-bottom: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 56px;
}

.preview-hero h1 {
  max-width: 830px;
  margin-bottom: 20px;
  font-size: clamp(50px, 6.3vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.preview-hero .lead {
  max-width: 760px;
}

.preview-notice {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.preview-notice p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.preview-dot {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #38a169;
  box-shadow: 0 0 0 5px rgba(56, 161, 105, 0.12);
}

.form-shell {
  padding-top: 52px;
  border-top: 1px solid var(--line);
}

.form-progress {
  margin-bottom: 34px;
}

.progress-track {
  height: 3px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.form-progress ol {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.form-progress li {
  color: var(--muted);
  font-size: 12px;
}

.form-progress li span {
  margin-right: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.form-progress li.is-active {
  color: var(--text);
  font-weight: 700;
}

.form-step {
  min-height: 560px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.step-number {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.step-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.08;
}

.step-heading > p:last-child {
  color: var(--muted);
}

.choice-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-grid {
  display: grid;
  gap: 14px;
}

.choice-grid-large {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  cursor: pointer;
  display: grid;
  align-content: center;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    background-color 170ms ease;
}

.choice-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.choice-card input,
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-index {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.choice-card:has(input:checked) .choice-index,
.choice-card:has(input:checked) small {
  color: color-mix(in srgb, var(--accent-text) 72%, transparent);
}

.choice-card strong {
  font-size: 22px;
}

.choice-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.text-field {
  display: grid;
  gap: 8px;
}

.text-field-wide {
  margin-top: 26px;
}

.text-field > span,
.field-label-row strong {
  font-weight: 700;
}

.text-field em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.text-field input,
.text-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.text-field input {
  min-height: 50px;
  padding: 0 15px;
}

.text-field textarea {
  padding: 14px 15px;
  resize: vertical;
}

.text-field input:focus,
.text-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.text-field small,
.field-label-row small,
.textarea-meta {
  color: var(--muted);
  font-size: 11px;
}

.textarea-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.form-block {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.form-block:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.field-label-row {
  margin-bottom: 14px;
}

.field-label-row > div {
  display: grid;
  gap: 3px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip span {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.chip:hover span {
  transform: translateY(-1px);
  color: var(--text);
}

.chip:has(input:checked) span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.other-field {
  max-width: 520px;
  margin-top: 14px;
}

.risk-preview {
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid #d69e2e;
  border-radius: 13px;
  background: color-mix(in srgb, #d69e2e 10%, var(--bg));
  color: var(--text);
  font-size: 13px;
}

.field-error {
  min-height: 24px;
  margin: 16px 0 0;
  color: #c53030;
  font-size: 13px;
}

.step-actions {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.step-actions-end {
  justify-content: flex-end;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  overflow: hidden;
}

.review-row {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
}

.review-row + .review-row {
  border-top: 1px solid var(--line);
}

.review-row dt,
.review-row dd {
  margin: 0;
}

.review-row dt {
  color: var(--muted);
  font-size: 12px;
}

.review-row dd {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.privacy-inline {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.privacy-inline p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.privacy-inline a,
.dialog-policy-link {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.privacy-dialog {
  width: min(560px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.28);
}

.privacy-dialog::backdrop {
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(5px);
}

.privacy-dialog form {
  padding: 30px;
}

.privacy-dialog h2 {
  margin-bottom: 14px;
  font-size: 30px;
  line-height: 1.12;
}

.privacy-dialog p {
  color: var(--muted);
}

.dialog-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.dialog-actions {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.success-panel {
  min-height: 560px;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  place-items: center;
  align-content: center;
}

.success-panel:not([hidden]) {
  display: grid;
}

.success-panel img {
  width: 180px;
  margin-bottom: 26px;
}

.success-panel h2 {
  margin-bottom: 14px;
  font-size: clamp(38px, 5vw, 58px);
}

.success-panel > p:not(.eyebrow) {
  max-width: 660px;
  color: var(--muted);
}

.success-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 900px) {
  .preview-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .preview-notice {
    max-width: 520px;
  }
}

@media (max-width: 700px) {
  .preview-main {
    padding: 52px 0 72px;
  }

  .preview-hero h1 {
    font-size: 48px;
  }

  .form-progress ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid-large,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .form-step,
  .success-panel {
    min-height: auto;
    padding: 28px;
  }

  .choice-card {
    min-height: 150px;
  }

  .review-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .privacy-inline {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .preview-hero h1 {
    font-size: 42px;
  }

  .form-progress li {
    font-size: 11px;
  }

  .step-heading h2 {
    font-size: 36px;
  }

  .step-actions,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .step-actions .button,
  .dialog-actions .button {
    width: 100%;
  }

  .textarea-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* XILINOS APPLY PREVIEW LAYOUT V2 START */

/* Desktop: keep the introduction compact so Step 01 is immediately usable. */
@media (min-width: 901px) {
  .preview-main {
    padding: 30px 0 52px;
  }

  .preview-hero {
    padding-bottom: 20px;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 34px;
    align-items: center;
  }

  .preview-hero h1 {
    max-width: 720px;
    margin-bottom: 12px;
    font-size: clamp(44px, 4.25vw, 60px);
    line-height: 1.01;
  }

  .preview-hero .lead {
    max-width: 720px;
    margin-bottom: 0;
    font-size: 14px;
  }

  .preview-notice {
    padding: 15px 17px;
  }

  .form-shell {
    padding-top: 22px;
  }

  .form-progress {
    margin-bottom: 18px;
  }

  .form-progress ol {
    margin-top: 10px;
  }

  .form-step {
    padding: 30px;
  }

  .form-step[data-step="1"],
  .form-step[data-step="2"] {
    min-height: 370px;
  }

  .step-heading {
    margin-bottom: 22px;
  }

  .step-heading h2 {
    font-size: clamp(32px, 3vw, 44px);
  }

  .choice-card {
    min-height: 118px;
    padding: 19px 20px;
  }

  .choice-index {
    margin-bottom: 14px;
  }

  .choice-card strong {
    font-size: 19px;
  }

  .choice-card small {
    font-size: 12px;
  }
}

/* Successful simulation becomes its own result screen. */
.preview-success-state .preview-hero {
  display: none;
}

.preview-success-state .preview-main {
  min-height: calc(100dvh - 141px);
  padding: 24px 0;
  display: grid;
  align-items: center;
}

.preview-success-state .form-shell {
  padding-top: 0;
  border-top: 0;
}

.preview-success-state .success-panel {
  min-height: min(460px, calc(100dvh - 190px));
  padding: 34px;
}

.preview-success-state .success-panel img {
  width: 132px;
  margin-bottom: 20px;
}

.preview-success-state .success-panel h2 {
  font-size: clamp(36px, 4vw, 52px);
}

@media (max-width: 700px) {
  .preview-success-state .preview-main {
    min-height: calc(100dvh - 135px);
    padding: 18px 0;
  }

  .preview-success-state .success-panel {
    min-height: auto;
    padding: 28px 22px;
  }

  .preview-success-state .success-panel img {
    width: 112px;
  }
}
/* XILINOS APPLY PREVIEW LAYOUT V2 END */

/* XILINOS APPLY TITLE CONSISTENCY V2 START */

/* Same desktop typography scale as .content-hero h1 on the About page. */
.preview-hero h1 {
  max-width: 880px;
  margin-bottom: 22px;
  font-size: clamp(46px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

/* Same current mobile scale as the About-page heading. */
@media (max-width: 640px) {
  .preview-hero h1 {
    font-size: clamp(36px, 10.2vw, 40px);
    line-height: 1.16;
    letter-spacing: -0.03em;
  }
}
/* XILINOS APPLY TITLE CONSISTENCY V2 END */

/* XILINOS APPLY EXPERIENCE V3 START */

.recommend-badge {
  margin-left: 8px;
  padding: 4px 8px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.privacy-inline {
  align-items: flex-start;
}

.privacy-inline > div {
  width: 100%;
}

.privacy-inline p {
  max-width: 860px;
  line-height: 1.7;
}

.privacy-inline p a {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.success-panel {
  justify-items: center;
  text-align: center;
}

.success-panel .eyebrow,
.success-panel h2,
.success-panel > p:not(.eyebrow) {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.success-panel > p:not(.eyebrow) {
  max-width: 660px;
}

@media (max-width: 640px) {
  .recommend-badge {
    display: inline-flex;
    margin-top: 7px;
    margin-left: 0;
  }
}
/* XILINOS APPLY EXPERIENCE V3 END */

/* XILINOS APPLY REWARD REPAIR V5 START */

.preview-success-state .success-panel {
  justify-items: center;
  text-align: center;
}

.preview-success-state .success-panel h2 {
  width: 100%;
  margin: 0;
  text-align: center;
}

.success-reward-copy {
  width: min(680px, 100%);
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.reward-button {
  min-width: 220px;
}

.success-note {
  width: 100%;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 640px) {
  .reward-button {
    min-width: 0;
  }
}
/* XILINOS APPLY REWARD REPAIR V5 END */

/* XILINOS SUCCESS BUTTON CONSISTENCY V5 START */

.success-actions .button {
  min-height: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer !important;
}

.success-actions button.button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.success-actions .button:hover,
.success-actions .button:focus-visible {
  cursor: pointer !important;
}
/* XILINOS SUCCESS BUTTON CONSISTENCY V5 END */

/* XILINOS PHASE 5B REAL INTAKE CANDIDATE START */
#applicationForm[aria-busy="true"] {
  cursor: wait;
}

#applicationForm[aria-busy="true"] .button {
  opacity: 0.72;
}

#applicationForm[aria-busy="true"] input,
#applicationForm[aria-busy="true"] textarea,
#applicationForm[aria-busy="true"] select {
  pointer-events: none;
}
/* XILINOS PHASE 5B REAL INTAKE CANDIDATE END */

/* XILINOS APPLY HERO PRESERVED WORDING LAYOUT V1 START */
.preview-hero h1 .apply-hero-line {
  display: block;
}

@media (min-width: 900px) {
  .preview-hero h1 {
    max-width: 980px;
    font-size: clamp(46px, 5.7vw, 72px);
  }

  .preview-hero h1 .apply-hero-line-nowrap {
    white-space: nowrap;
  }
}
/* XILINOS APPLY HERO PRESERVED WORDING LAYOUT V1 END */
