.test-page {
  background: var(--paper);
}

.test-page .site-header {
  background: rgba(250, 250, 250, 0.88);
}

.test-main {
  min-height: 100svh;
  padding: 188px var(--page-gutter) 120px;
}

.test-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.74fr);
  gap: clamp(72px, 8vw, 110px);
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  align-items: start;
}

.test-intro h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(52px, 4.2vw, 60px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.test-copy {
  display: grid;
  max-width: 690px;
  gap: 24px;
  margin-top: 38px;
}

.test-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.82;
}

.application-card {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 28px 70px rgba(13, 22, 52, 0.06);
}

.application-form {
  display: grid;
  gap: 20px;
}

.form-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.form-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.form-heading > span {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 9px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field > span {
  color: #696969;
  font-size: 12px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 170ms ease, box-shadow 170ms ease;
}

.form-field select {
  appearance: none;
  padding-right: 40px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.01em;
  background-image:
    linear-gradient(45deg, transparent 50%, #8a8e96 50%),
    linear-gradient(135deg, #8a8e96 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 21px,
    calc(100% - 14px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  cursor: pointer;
}

.form-field select:invalid {
  color: #a4a7ac;
}

.form-field textarea {
  min-height: 104px;
  padding-top: 13px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #a4a7ac;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #8b94a4;
  box-shadow: 0 0 0 3px rgba(53, 105, 255, 0.08);
}

.submit-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 170ms ease, border-color 170ms ease, transform 170ms ease;
}

.submit-button:hover {
  border-color: #2a2a2d;
  background: #2a2a2d;
  transform: translateY(-1px);
}

.submit-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.form-note {
  margin: -6px 0 0;
  color: #929292;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.form-note.is-success {
  color: #167447;
}

.form-note.is-error {
  color: #b42318;
}

.form-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 12px;
}

.form-contact a {
  color: var(--blue-rich);
  font-family: var(--font-mono);
}

@media (max-width: 1000px) {
  .test-main {
    padding-top: 150px;
  }

  .test-shell {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .test-copy {
    max-width: 760px;
  }

  .application-card {
    width: min(640px, 100%);
  }
}

@media (max-width: 700px) {
  .test-main {
    padding-top: 118px;
    padding-bottom: 72px;
  }

  .test-intro h1 {
    font-size: clamp(42px, 12vw, 52px);
  }

  .test-copy {
    margin-top: 30px;
    gap: 20px;
  }

  .application-card {
    padding: 28px 22px;
  }

  .form-fields {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }

  .form-heading > span {
    display: none;
  }

  .form-contact {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
