/*
 * Timaci application page (/apply).
 * Mobile first — most visitors arrive from phones and Meta ads.
 * Uses only the approved palette tokens from global.css.
 */

.tp-apply,
.tp-apply *,
.tp-apply *::before,
.tp-apply *::after {
  box-sizing: border-box;
}

.tp-apply {
  background: var(--tp-surface);
  color: var(--tp-text);
}

.tp-apply .tp-container {
  margin-inline: auto;
  max-width: var(--tp-container);
  padding-inline: clamp(20px, 5vw, 44px);
  width: 100%;
}

.tp-apply-section-title {
  font-family: "Nunito", sans-serif;
  font-size: clamp(27px, 5.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.14;
  margin: 0 0 10px;
}

/* ---------------------------------------------------------------- hero */

.tp-apply-hero {
  background: var(--tp-bg);
  border-bottom: 1px solid var(--tp-border);
  padding-bottom: clamp(52px, 9vw, 92px);
  padding-top: clamp(132px, 11vw, 168px);
}

.tp-apply .tp-apply-hero__inner {
  max-width: 820px;
}

.tp-apply-hero h1 {
  font-family: "Nunito", sans-serif;
  font-size: clamp(34px, 8vw, 62px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 18px;
}

.tp-apply-hero__lead {
  color: var(--tp-text);
  font-size: clamp(18px, 3.4vw, 23px);
  line-height: 1.45;
  margin: 0 0 12px;
  max-width: 30ch;
}

.tp-apply-hero__meta {
  color: var(--tp-muted);
  font-size: clamp(15px, 2.6vw, 17px);
  margin: 0;
}

/* --------------------------------------------------------------- paths */

.tp-apply-paths {
  padding-block: clamp(48px, 9vw, 92px);
}

.tp-apply-path-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 30px;
}

.tp-apply-path {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-md);
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 5vw, 34px);
}

.tp-apply-path h3 {
  font-family: "Nunito", sans-serif;
  font-size: clamp(19px, 3.4vw, 23px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.tp-apply-path p {
  color: var(--tp-muted);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0 0 12px;
  max-width: 56ch;
}

.tp-apply-path__badge {
  background: var(--tp-purple-soft);
  border-radius: 999px;
  color: var(--tp-purple);
  display: inline-block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 6px 14px;
  width: fit-content;
}

.tp-apply-path__claim {
  color: var(--tp-text);
  font-size: 17px;
  font-weight: 700;
}

.tp-apply-path--educator {
  background: var(--tp-surface-warm);
  border-color: var(--tp-purple);
}

.tp-apply-path__actions {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
}

.tp-apply-path__actions .tp-button,
.tp-apply-lead__cta,
.tp-apply-community .tp-button {
  height: auto;
  line-height: 1.3;
  max-width: 100%;
  padding-block: 16px;
  text-align: center;
  white-space: normal;
}

.tp-apply-textlink {
  color: var(--tp-purple);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tp-apply-textlink:hover,
.tp-apply-textlink:focus-visible {
  color: var(--tp-orange);
}

.tp-apply-fineprint {
  color: var(--tp-muted);
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.55;
  margin: 14px 0 0;
}

/* --------------------------------------------------------------- steps */

.tp-apply-steps {
  background: var(--tp-bg);
  padding-block: clamp(48px, 9vw, 92px);
}

.tp-apply-step-list {
  counter-reset: tp-step;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

.tp-apply-step-list li {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  counter-increment: tp-step;
  padding: 24px 26px 24px 68px;
  position: relative;
}

.tp-apply-step-list li::before {
  align-items: center;
  background: var(--tp-purple);
  border-radius: 50%;
  color: #fff;
  content: counter(tp-step);
  display: flex;
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  left: 24px;
  position: absolute;
  top: 24px;
  width: 30px;
}

.tp-apply-step-list strong {
  display: block;
  font-family: "Nunito", sans-serif;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.tp-apply-step-list span {
  color: var(--tp-muted);
  font-size: 15.5px;
  line-height: 1.6;
}

/* ---------------------------------------------------- lead opportunity */

.tp-apply-lead {
  background: var(--tp-sand);
  border-block: 1px solid var(--tp-border);
  color: var(--tp-text);
  padding-block: clamp(52px, 10vw, 100px);
  position: relative;
}

/* A slim rule carries the brand instead of a large purple field. */
.tp-apply-lead::before {
  background: var(--tp-purple);
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.tp-apply .tp-apply-lead__inner {
  max-width: 880px;
}

.tp-apply-lead h2 {
  font-family: "Nunito", sans-serif;
  font-size: clamp(25px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.16;
  margin: 0 0 16px;
}

.tp-apply-lead__intro {
  color: var(--tp-muted);
  font-size: clamp(16px, 2.8vw, 18px);
  line-height: 1.6;
  margin: 0 0 26px;
  max-width: 62ch;
}

.tp-apply-lead__list {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}

.tp-apply-lead__list li {
  border-top: 1px solid var(--tp-border);
  color: var(--tp-muted);
  font-size: 15.5px;
  line-height: 1.6;
  padding-top: 14px;
}

.tp-apply-lead__list strong {
  color: var(--tp-purple);
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.tp-apply-lead__note {
  color: var(--tp-muted);
  font-size: 13.5px;
  font-style: italic;
  margin: 0 0 26px;
}

/* ---------------------------------------------------------------- form */

.tp-apply-form-section {
  padding-block: clamp(48px, 9vw, 96px);
  scroll-margin-top: clamp(100px, 12vw, 124px);
}

.tp-apply .tp-apply-form-shell {
  max-width: 720px;
}

.tp-apply-form-intro {
  color: var(--tp-muted);
  font-size: 16px;
  margin: 0 0 26px;
}

.tp-apply-alert {
  background: #fdedec;
  border-left: 4px solid #b42318;
  border-radius: var(--tp-radius-sm);
  color: #8a2018;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 24px;
  padding: 15px 18px;
}

.tp-apply-field {
  border: 0;
  margin: 0 0 22px;
  padding: 0;
}

.tp-apply-field > label,
.tp-apply-choice legend {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  padding: 0;
}

.tp-apply-field input[type="text"],
.tp-apply-field input[type="email"],
.tp-apply-field input[type="tel"],
.tp-apply-field textarea {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  color: var(--tp-text);
  font-family: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
  padding: 15px 16px;
  width: 100%;
}

.tp-apply-field textarea {
  line-height: 1.6;
  min-height: 160px;
  resize: vertical;
}

.tp-apply-field input[type="file"] {
  background: var(--tp-bg);
  border: 1px dashed var(--tp-border);
  border-radius: var(--tp-radius-sm);
  font-size: 15px;
  padding: 15px 16px;
  width: 100%;
}

.tp-apply-field input:focus-visible,
.tp-apply-field textarea:focus-visible {
  border-color: var(--tp-purple);
  outline: 2px solid var(--tp-purple);
  outline-offset: 1px;
}

.tp-apply-field input[aria-invalid="true"],
.tp-apply-field textarea[aria-invalid="true"] {
  border-color: #b42318;
}

.tp-apply-help {
  color: var(--tp-muted);
  display: block;
  font-size: 13.5px;
  margin-top: 7px;
}

.tp-apply-error {
  color: #b42318;
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 7px;
}

.tp-apply-radio,
.tp-apply-check {
  align-items: flex-start;
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
  display: flex;
  font-size: 15.5px;
  gap: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
  padding: 14px 16px;
}

.tp-apply-radio input,
.tp-apply-check input {
  accent-color: var(--tp-purple);
  flex: 0 0 auto;
  height: 20px;
  margin-top: 1px;
  width: 20px;
}

.tp-apply-radio:has(input:checked),
.tp-apply-check:has(input:checked) {
  background: var(--tp-purple-soft);
  border-color: var(--tp-purple);
}

.tp-apply-radio:focus-within,
.tp-apply-check:focus-within {
  outline: 2px solid var(--tp-purple);
  outline-offset: 1px;
}

.tp-apply-check a {
  color: var(--tp-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tp-apply-field--check {
  margin-bottom: 22px;
}

.tp-apply-educator[hidden] {
  display: none;
}

.tp-apply-educator {
  background: var(--tp-surface-warm);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  margin-bottom: 22px;
  padding: 20px 18px 2px;
}

.tp-apply-submit {
  width: 100%;
}

/* Honeypot: off-screen rather than display:none so bots still fill it. */
.tp-apply-trap {
  height: 1px;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.tp-apply-confirmation {
  background: var(--tp-surface-warm);
  border: 1px solid var(--tp-border);
  border-left: 5px solid var(--tp-purple);
  border-radius: var(--tp-radius-md);
  padding: clamp(30px, 6vw, 48px);
}

.tp-apply-confirmation:focus {
  outline: 2px solid var(--tp-purple);
  outline-offset: 3px;
}

.tp-apply-confirmation h2 {
  font-family: "Nunito", sans-serif;
  font-size: clamp(21px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
  max-width: 28ch;
}

/* ----------------------------------------------- community and contact */

.tp-apply-community {
  background: var(--tp-bg);
  border-top: 1px solid var(--tp-border);
  padding-block: clamp(44px, 8vw, 84px);
}

.tp-apply .tp-apply-community__inner {
  max-width: 660px;
}

.tp-apply-community h2 {
  font-family: "Nunito", sans-serif;
  font-size: clamp(22px, 4.2vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}

.tp-apply-community p {
  color: var(--tp-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.tp-apply-contact {
  border-top: 1px solid var(--tp-border);
  padding-block: 30px;
}

.tp-apply-contact p {
  color: var(--tp-muted);
  font-size: 15px;
  margin: 0;
}

.tp-apply-contact a {
  color: var(--tp-purple);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------- wider */

@media (min-width: 760px) {
  .tp-apply-path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .tp-apply-step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .tp-apply-lead__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
  .tp-apply-path__actions { flex-direction: row; align-items: center; gap: 20px; }
  .tp-apply-submit { width: auto; min-width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-apply * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (min-width: 760px) {
  .tp-apply-hero__lead { max-width: 46ch; }
}

/* ---------------------------------------------------------------------
 * Theme hardening (v2.21.3)
 *
 * The apply page renders inside whatever theme the site runs, and theme
 * form styling was overriding the choice rows — labels fell back to block
 * layout, so the text wrapped underneath the control instead of beside it.
 * These rules re-assert only the structure that broke, at a specificity the
 * theme cannot beat. `!important` is used sparingly and only on the layout
 * properties that were actually being overridden.
 * ------------------------------------------------------------------ */

.tp-apply .tp-apply-radio,
.tp-apply .tp-apply-check {
  align-items: flex-start !important;
  display: flex !important;
  flex-direction: row !important;
  float: none !important;
  font-size: 15.5px;
  font-weight: 500;
  gap: 12px;
  line-height: 1.5;
  text-align: left;
  text-transform: none;
  width: 100%;
}

.tp-apply .tp-apply-radio > input,
.tp-apply .tp-apply-check > input {
  flex: 0 0 20px !important;
  float: none !important;
  height: 20px !important;
  margin: 2px 0 0 !important;
  min-width: 0;
  position: static !important;
  width: 20px !important;
}

.tp-apply .tp-apply-radio > span,
.tp-apply .tp-apply-check > span {
  display: block;
  flex: 1 1 auto !important;
  font-weight: 500;
  letter-spacing: normal;
  min-width: 0;
  text-transform: none;
}

/* Field labels: themes commonly uppercase, bold or float these. */
.tp-apply .tp-apply-field > label,
.tp-apply .tp-apply-choice legend {
  color: var(--tp-text);
  float: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  width: auto;
}

/* Controls: re-assert sizing the theme may have changed. */
.tp-apply .tp-apply-field input[type="text"],
.tp-apply .tp-apply-field input[type="email"],
.tp-apply .tp-apply-field input[type="tel"],
.tp-apply .tp-apply-field input[type="file"],
.tp-apply .tp-apply-field textarea {
  box-shadow: none;
  float: none;
  max-width: 100%;
  width: 100%;
}

/* Headings and body copy must not inherit a theme colour we cannot predict. */
.tp-apply h1,
.tp-apply h2,
.tp-apply h3,
.tp-apply .tp-apply-section-title,
.tp-apply .tp-apply-lead h2,
.tp-apply .tp-apply-confirmation h2 {
  color: var(--tp-text) !important;
  text-transform: none;
}

.tp-apply .tp-apply-hero__lead { color: var(--tp-text); }
.tp-apply .tp-apply-hero__meta,
.tp-apply .tp-apply-lead__intro,
.tp-apply .tp-apply-lead__list li,
.tp-apply .tp-apply-lead__note,
.tp-apply .tp-apply-path p,
.tp-apply .tp-apply-step-list span,
.tp-apply .tp-apply-form-intro,
.tp-apply .tp-apply-help { color: var(--tp-muted); }

.tp-apply .tp-apply-path__badge { color: var(--tp-purple); }
.tp-apply .tp-apply-lead__list strong { color: var(--tp-purple); }
.tp-apply .tp-apply-step-list li::before { color: #fff; }
.tp-apply .tp-button { color: #fff !important; text-transform: none; }

/* Long path labels reached 94px tall on mobile; tighten type and padding. */
@media (max-width: 520px) {
  .tp-apply .tp-apply-path__actions .tp-button {
    font-size: 15px;
    letter-spacing: -0.01em;
    padding-block: 14px;
    padding-inline: 20px;
  }
}

/* Inputs measured 40px tall on mobile once theme padding applied. */
.tp-apply .tp-apply-field input[type="text"],
.tp-apply .tp-apply-field input[type="email"],
.tp-apply .tp-apply-field input[type="tel"],
.tp-apply .tp-apply-field input[type="file"] {
  min-height: 48px;
}

/* "Learn more about training" and "Contact us." were 25px and 18px tall. */
@media (max-width: 860px) {
  .tp-apply .tp-apply-textlink,
  .tp-apply .tp-apply-contact a {
    align-items: center;
    display: inline-flex;
    min-height: 44px;
  }
}

/* Section rhythm: lead was 100/100 and form 96/96 against 92/92 elsewhere. */
@media (min-width: 861px) {
  .tp-apply-lead,
  .tp-apply-form-section { padding-block: 92px; }
}
