/* ---------------------------------------------------------------------------
   The participant side: the invitation page and the rating task.
--------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}
.wrap-narrow { max-width: 720px; }

/* --- masthead ----------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  padding-top: env(safe-area-inset-top, 0px);
}
.masthead-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 20px;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
}
.wordmark {
  font-family: var(--mono);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark b { font-weight: 500; }
.wordmark span { color: var(--ink-faint); }

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

.hero { padding: 3.5rem 0 0; }
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.04;
  margin: .9rem 0 0;
  max-width: 24ch;
}
.lede {
  font-family: var(--read);
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 1.25rem 0 0;
}

/* --- specimen: a miniature of the real task, marked as an example ------- */

.specimen {
  margin: 2.2rem 0 0;
  padding: 1.25rem 1.25rem 1.4rem;
  position: relative;
}
.specimen-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--rule-soft);
}
.specimen .sentence { margin-top: .9rem; font-size: 1.0625rem; }
.specimen-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
  margin-top: 1.2rem;
}
.specimen-card {
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  background: var(--paper-sunk);
  padding: .85rem .95rem;
  position: relative;
}
.specimen-card .slot {
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink-faint);
}
.specimen-card .sentence { font-size: .9375rem; margin-top: .35rem; }
.specimen-foot {
  margin: 1.1rem 0 0;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (max-width: 620px) {
  .specimen-pair { grid-template-columns: 1fr; }
}

/* --- the stamp: the one loud mark on the site --------------------------- */

.stamp {
  position: absolute;
  top: -.55rem;
  right: .6rem;
  font-family: var(--mono);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--stamp);
  border: 2px solid var(--stamp);
  border-radius: 2px;
  padding: .2rem .45rem .18rem .57rem;
  background: var(--paper);
  transform: rotate(-5deg);
  animation: stamp-press .22s ease-out;
}
@keyframes stamp-press {
  from { opacity: 0; transform: rotate(-5deg) scale(1.5); }
  to   { opacity: 1; transform: rotate(-5deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .stamp { animation: none; }
}

/* --- criteria and facts ------------------------------------------------- */

.section { padding: 3rem 0 0; }
.section h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: .6rem 0 0;
}

.criteria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}
.criteria li {
  border-top: 2px solid var(--ink);
  padding-top: .8rem;
}
.criteria h3 {
  font-size: .9375rem;
  font-weight: 700;
  margin: 0 0 .35rem;
}
.criteria p {
  margin: 0;
  font-size: .9375rem;
  color: var(--ink-soft);
}
.criteria .ends {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .7rem;
}

.facts {
  margin: 1.2rem 0 0;
  border-collapse: collapse;
  width: 100%;
  font-size: .9375rem;
}
.facts th, .facts td {
  text-align: left;
  vertical-align: top;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.facts th {
  font-weight: 500;
  color: var(--ink-soft);
  width: 38%;
  padding-right: 1rem;
}

@media (max-width: 620px) {
  .criteria { grid-template-columns: 1fr; }
  .facts th { width: 45%; }
}

/* --- sign-up ------------------------------------------------------------ */

.signup {
  margin: 1.4rem 0 0;
  padding: 1.4rem 1.3rem;
}
.field { margin: 0 0 1.3rem; }
.field:last-of-type { margin-bottom: 0; }
.field > label, .field > legend, legend.label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  margin: 0 0 .5rem;
  padding: 0;
}
.field fieldset { border: 0; margin: 0; padding: 0; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .9375rem;
}
.consent input { margin: .25rem 0 0; flex: 0 0 auto; width: 1rem; height: 1rem; }

.form-foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule-soft);
}

.site-foot {
  margin: 3.5rem 0 0;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: .8125rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-foot a { color: var(--ink-soft); }

/* --- study: progress strip ---------------------------------------------- */

.progress {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.ticks { display: flex; gap: 3px; }
.tick {
  width: 10px;
  height: 16px;
  border: 1px solid var(--rule);
  border-radius: 1px 1px 0 0;
  background: var(--paper-sunk);
}
.tick.is-done { background: var(--ink); border-color: var(--ink); }
.tick.is-current { border-color: var(--ink); background: var(--paper); }
.count {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* --- study: the task ---------------------------------------------------- */

.task { padding: 2.2rem 0 3rem; }

.original {
  padding: 1.2rem 1.3rem 1.4rem;
  /* The ink edge marks which single block of text everything else is about. */
  border-left: 3px solid var(--ink);
}
.original-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--rule-soft);
}
.original .sentence {
  margin-top: 1rem;
  font-size: clamp(1.0625rem, 2.6vw, 1.3125rem);
  line-height: 1.55;
}

.instruct {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2.2rem 0 .9rem;
}
.instruct h2 {
  font-size: .9375rem;
  font-weight: 700;
  margin: 0;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.candidate {
  padding: 1.1rem 1.15rem 1.25rem;
  position: relative;
}
.candidate-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--rule-soft);
}
.slot-mark {
  font-family: var(--mono);
  font-size: .8125rem;
  font-weight: 500;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
}
.candidate .sentence {
  margin: .95rem 0 1.2rem;
  min-height: 4.8em;
}
.candidate.is-preferred { border-color: var(--stamp); }

.rating { border: 0; margin: 0 0 1rem; padding: 0; }
.rating:last-child { margin-bottom: 0; }
.rating legend {
  font-size: .8125rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: .45rem;
}
.scale-ends {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .35rem;
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.verdict {
  margin: 1.6rem 0 0;
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.verdict legend { padding: 0; }
.verdict fieldset { border: 0; margin: 0; padding: 0; }
.verdict .chips { margin-top: .5rem; }

.task-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.6rem 0 0;
}
.keys {
  font-family: var(--mono);
  font-size: .6875rem;
  color: var(--ink-faint);
}
kbd {
  font-family: var(--mono);
  font-size: .6875rem;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 2px;
  padding: 0 .25rem;
  background: var(--paper);
}

@media (max-width: 760px) {
  .pair { grid-template-columns: 1fr; }
  /* Stacked, the two cards no longer have to line up, and a short sentence
     should not leave a hole above its ratings. */
  .candidate .sentence { min-height: 0; margin-bottom: .9rem; }
  /* There is no keyboard to give shortcuts for. */
  .keys { display: none; }
}

/* --- study: end states -------------------------------------------------- */

.panel {
  padding: 2rem 1.6rem;
  margin: 2.5rem 0;
  text-align: center;
}
.panel h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: .7rem 0 0;
}
.panel p {
  color: var(--ink-soft);
  max-width: 48ch;
  margin: .9rem auto 0;
}
.panel-actions {
  display: flex;
  gap: .7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.tally {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 1.8rem 0 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--rule-soft);
}
.tally div { text-align: center; }
.tally .num {
  display: block;
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -.02em;
}
.tally .lbl {
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
