/* MLA application — extends the Final landing page tokens from ../styles.css */

.apply-body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 88% 12%, rgba(228, 247, 238, 0.72), transparent 28rem),
    var(--ground);
}

.apply-body .masthead {
  position: relative;
  z-index: 10;
}

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

/* Progress furniture */
.apply-bar {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(247, 248, 244, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.apply-bar-inner {
  width: min(100%, 720px);
  min-height: 60px;
  margin-inline: auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  gap: 14px;
}

.apply-back {
  width: 40px;
  height: 40px;
  margin-left: -8px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--forest);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.apply-back:active { transform: translateY(1px); }
.apply-back[hidden] { display: none; }
.apply-back:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--action-ink), 0 0 0 6px var(--focus-outer);
}

.apply-meta { min-width: 0; flex: 1 1 auto; }
.apply-chapter {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.apply-track {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.apply-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--action);
  transition: width 320ms var(--ease-out);
}

.apply-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

/* One focused question per screen */
.apply-main { padding: 0 var(--gutter) 48px; }
.screen {
  width: min(100%, 580px);
  margin-inline: auto;
  padding: clamp(36px, 8vw, 60px) 0 clamp(72px, 12vw, 112px);
}
.screen[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .screen { animation: screen-in 260ms var(--ease-out) both; }
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.q-title {
  max-width: 17ch;
  margin: 0 0 14px;
  color: var(--forest-deep);
  font-family: var(--display);
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-wrap: balance;
}

.q-help {
  max-width: 58ch;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: pretty;
}
.q-help strong { color: var(--ink); font-weight: 700; }

/* Selectable answers */
.options {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.opt { position: relative; display: block; }
.opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.opt span {
  min-height: 58px;
  padding: 14px 16px 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(250, 250, 246, 0.9);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(6, 43, 26, 0.035);
  transition:
    border-color var(--dur-short) var(--ease-out),
    background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}

.opt span::after {
  content: "";
  width: 18px;
  height: 18px;
  margin-left: auto;
  flex: 0 0 auto;
  border: 1px solid rgba(19, 36, 27, 0.28);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 4px var(--surface);
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.opt input:checked + span {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--surface);
  font-weight: 600;
}
.opt input:checked + span::after {
  border-color: var(--action);
  background: var(--action);
  box-shadow: inset 0 0 0 4px var(--forest);
}
.opt input:focus-visible + span {
  outline: 0;
  box-shadow: 0 0 0 3px var(--action-ink), 0 0 0 6px var(--focus-outer);
}
.opt input:active + span { transform: translateY(1px); }

/* Text inputs */
.field { display: grid; gap: 8px; margin-bottom: 17px; }
.field label { color: var(--forest); font-size: 0.86rem; font-weight: 700; }
.field input,
.field textarea {
  width: 100%;
  min-height: 58px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(250, 250, 246, 0.94);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(6, 43, 26, 0.035);
  transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.field textarea { min-height: 154px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #7b8880; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 0;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--action-ink), 0 0 0 6px var(--focus-outer);
}
.field-note { margin: -8px 0 18px; color: var(--muted); font-size: 0.82rem; }
.field[data-spaced] { margin-top: 16px; }

.apply-actions { margin-top: 28px; display: grid; gap: 12px; }
.apply-actions .button-primary { max-width: none; }
.button-primary[disabled] { opacity: 0.42; cursor: not-allowed; }
.button-primary[disabled]:hover { background: var(--action); }
.button-quiet {
  min-height: 52px;
  border: 0;
  background: transparent;
  color: var(--forest);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.button-quiet:focus-visible {
  outline-color: var(--action-ink);
  outline-offset: 2px;
}

/* Intro, confirmation and success */
.screen-lead { padding-top: clamp(48px, 10vw, 84px); }
.screen-lead::before {
  content: "1:1 coaching application";
  display: block;
  margin-bottom: 18px;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.screen-lead .q-title { max-width: 12ch; font-size: clamp(2.4rem, 11vw, 4rem); }
.apply-facts {
  margin: 0 0 8px;
  padding: 20px 0 0;
  display: grid;
  gap: 11px;
  border-top: 1px solid var(--line);
  list-style: none;
}
.apply-facts li { position: relative; padding-left: 24px; color: var(--ink); font-size: 0.95rem; }
.apply-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--action);
  box-shadow: 0 0 0 3px rgba(118, 204, 45, 0.18);
}

.recap {
  margin: 0 0 6px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--mint);
}
.recap dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.recap dd {
  margin: 4px 0 18px;
  color: var(--forest);
  font-family: var(--display);
  font-size: 1.24rem;
  font-weight: 600;
  word-break: break-word;
}
.recap dd:last-of-type { margin-bottom: 0; }
.screen-done { padding-top: clamp(54px, 11vw, 90px); }
.screen-done .q-title::before {
  content: "✓";
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--action);
  color: var(--action-ink);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
}
.error { margin: 10px 0 0; color: var(--state-error); font-size: 0.88rem; font-weight: 600; }
.error[hidden] { display: none; }

/* Headings receive programmatic focus for screen readers only. */
.q-title:focus,
.q-title:focus-visible { outline: none; }
.button[hidden],
.apply-actions [hidden] { display: none; }

@media (min-width: 760px) {
  .screen { padding-top: 64px; }
  .screen-lead { padding-top: 88px; }
  .options-2 { grid-template-columns: 1fr 1fr; }
}

@media (hover: hover) and (pointer: fine) {
  .apply-back:hover { background: rgba(10, 57, 34, 0.08); }
  .opt input:hover + span { border-color: rgba(10, 57, 34, 0.5); }
  .opt input:checked:hover + span { border-color: var(--forest); }
  .button-quiet:hover { color: var(--forest-deep); }
}
