/* The testers' page (/discovery/test/, src/discovery/test.njk): the door at 3:00 AM over the header, then plain
   sections in the site's tokens, and the application form in a sunken card. */

.dt-head { min-height: min(70vh, 620px); }
.dt-head .page__kicker { margin-bottom: 6px; color: var(--brand-text); }
.dt-head__ways { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 0; }

.dt {
  display: grid;
  gap: 56px;
  padding: 8px 0 72px;
}

.dt p { line-height: 1.6; }

.dt-title {
  font-family: var(--font-display);
  font-size: var(--heading-size);
  font-weight: 600;
  color: var(--brand-text);
  margin: 0 0 14px;
}

.dt-note { color: var(--ink-soft); font-size: 0.95rem; margin: 16px 0 0; }

/* What testing means / what it isn't */
.dt-what {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 40px;
  font-size: 17px;
}
.dt-what p { margin: 0 0 16px; }
.dt-what__isnt {
  border-left: 1px solid var(--border);
  padding-left: 32px;
}
.dt-what__isnt .dt-title + p + .dt-title { margin-top: 24px; }

/* What testers get */
.dt-get__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.dt-card {
  padding: var(--card-pad);
  border: 1px solid var(--border);
  border-top: 2px solid var(--brand);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.dt-card--title {
  border-top-color: var(--accent-teal);
  background: linear-gradient(180deg, rgba(63, 193, 196, 0.08), transparent 60%), var(--bg-raised);
}
.dt-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
}
.dt-card p { margin: 0; color: var(--ink-soft); }

/* Other ways to help */
.dt-help { max-width: 46rem; font-size: 17px; }
.dt-help > p { margin: 0 0 16px; }
.dt-roles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.dt-role {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.dt-role:hover, .dt-role:focus-visible { border-color: var(--brand-text); color: var(--brand-text); }

/* The form */
.dt-apply { scroll-margin-top: 90px; }
.dt-apply__card {
  max-width: 50rem;
  padding: 32px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-sunken);
}
.dt-apply__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 600;
  margin: 0 0 22px;
}

.dt-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.dt-field { display: grid; gap: 6px; min-width: 0; }
.dt-field--wide { grid-column: 1 / -1; }
.dt-field label, .dt-machine legend { font-weight: 700; font-size: 14px; }
.dt-opt { font-weight: 400; color: var(--ink-soft); }

.dt-form input[type=text], .dt-form input[type=email], .dt-form select, .dt-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.dt-form textarea { resize: vertical; }
.dt-form input::placeholder, .dt-form textarea::placeholder { color: var(--ink-soft); opacity: 0.8; }
.dt-form :is(input, select, textarea):focus { outline: 2px solid var(--brand-text); outline-offset: 1px; }

.dt-machine {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 0;
}
.dt-machine legend { padding: 0 6px; }

.dt-check { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.dt-check input { width: 20px; height: 20px; accent-color: var(--brand); }

.dt-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.dt-send { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.dt-send__button { border: none; cursor: pointer; font-size: 15px; }
.dt-send__button:disabled { opacity: 0.6; cursor: progress; }
.dt-fine { margin: 0; font-size: 13px; color: var(--ink-soft); flex: 1 1 16rem; }
.dt-fine a { color: inherit; }

.dt-status { margin: 0; font-weight: 600; color: var(--status-done-ink); }
.dt-status.is-error { color: var(--accent-red); }

/* After sending */
.dt-thanks { text-align: center; padding: 12px 0 4px; }
.dt-thanks:focus { outline: none; }
.dt-thanks__sigil { display: block; margin: 0 auto 14px; }
.dt-thanks .dt-apply__title { color: var(--brand-text); }
.dt-thanks > p { max-width: 34rem; margin: 0 auto 14px; font-size: 17px; }

.dt-pro {
  max-width: 46rem;
  margin: 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent-teal);
  background: var(--bg-raised);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
}
.dt-pro a { color: var(--accent-teal); }

.dt-close {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--brand-text);
}

@media (max-width: 900px) {
  .dt-what { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .dt-what__isnt { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 24px; }
  .dt-get__list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .dt { gap: 44px; }
  .dt-apply__card { padding: 24px 18px; margin: 0 -4px; }
  .dt-form, .dt-machine { grid-template-columns: minmax(0, 1fr); }
}

/* The form and the thank-you swap with [hidden]; their display rules mustn't override it. */
.dt-form[hidden], .dt-thanks[hidden], .dt-apply__card [data-apply-head][hidden] { display: none; }
.dt-thanks .page__more { display: flex; justify-content: center; }

.dt-head .page-header__title { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.dt-head > .page-header__title { max-width: 48rem; }
