/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* manrope-latin-wght-normal */
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/manrope:vf@5.3.0/latin-wght-normal.woff2") format("woff2-variations");
}

html,
body {
  height: 100%;
}

:root {
  --app-font-sans: "Manrope Variable", "Avenir Next", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --app-color-ink: #102a2b;
  --app-color-brand: #33bebe;
  --app-color-primary: #b9e9e7;
  --app-color-primary-hover: #9fdfdc;
  --app-color-primary-active: #87d4d1;
  --app-color-primary-ink: #084e50;
  --app-color-focus: #147f80;
  --app-radius-control: 999px;
  --app-shadow-control: 0 0.75rem 1.75rem rgba(51, 190, 190, 0.2);
  --bs-primary: #147f80;
  --bs-primary-rgb: 20, 127, 128;
  --bs-primary-text-emphasis: #084e50;
  --bs-primary-bg-subtle: #e0f6f4;
  --bs-primary-border-subtle: #87d4d1;
  --bs-link-color: #106f70;
  --bs-link-color-rgb: 16, 111, 112;
  --bs-link-hover-color: #084e50;
  --bs-link-hover-color-rgb: 8, 78, 80;
  --bs-focus-ring-color: rgba(51, 190, 190, 0.32);
}

body {
  font-family: var(--app-font-sans);
}

.btn,
button:not(.btn-close),
input:is([type="submit"], [type="button"], [type="reset"]) {
  border-radius: var(--app-radius-control);
}

.btn-primary {
  --bs-btn-color: var(--app-color-primary-ink);
  --bs-btn-bg: var(--app-color-primary);
  --bs-btn-border-color: var(--app-color-primary);
  --bs-btn-hover-color: var(--app-color-primary-ink);
  --bs-btn-hover-bg: var(--app-color-primary-hover);
  --bs-btn-hover-border-color: var(--app-color-primary-hover);
  --bs-btn-focus-shadow-rgb: 51, 190, 190;
  --bs-btn-active-color: var(--app-color-primary-ink);
  --bs-btn-active-bg: var(--app-color-primary-active);
  --bs-btn-active-border-color: var(--app-color-primary-active);
  --bs-btn-disabled-color: #537778;
  --bs-btn-disabled-bg: #d8eeec;
  --bs-btn-disabled-border-color: #d8eeec;
}

.btn-outline-primary {
  --bs-btn-color: #106f70;
  --bs-btn-border-color: #33aeb0;
  --bs-btn-hover-color: var(--app-color-primary-ink);
  --bs-btn-hover-bg: var(--app-color-primary);
  --bs-btn-hover-border-color: #33aeb0;
  --bs-btn-focus-shadow-rgb: 51, 190, 190;
  --bs-btn-active-color: var(--app-color-primary-ink);
  --bs-btn-active-bg: var(--app-color-primary-active);
  --bs-btn-active-border-color: #278f91;
  --bs-btn-disabled-color: #5b8d8e;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #91c6c5;
}

.app-root {
  min-height: 100%;
}

.app-screen-height {
  height: var(--app-viewport-height, 100dvh);
}

.welcome-page,
.auth-page {
  display: grid;
  place-items: center;
  min-height: var(--app-viewport-height, 100dvh);
  padding: max(2rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: #f8f9fa;
  color: var(--app-color-ink);
  text-align: center;
}

.welcome-page__card,
.auth-card {
  width: min(100%, 32rem);
  border-radius: 2rem;
  padding: clamp(1.5rem, 7vw, 2.5rem);
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgba(16, 42, 43, 0.08);
}

.page-brand {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.page-brand__link {
  display: inline-flex;
  border-radius: 0.75rem;
}

.page-brand__link:focus-visible {
  outline: 3px solid var(--app-color-focus);
  outline-offset: 4px;
}

.page-brand__icon {
  display: block;
  width: clamp(1.9rem, 7.6vw, 2.6125rem);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0.25rem 0.4rem rgba(51, 190, 190, 0.18));
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.auth-form {
  margin-top: 1.75rem;
  text-align: left;
}

.auth-form__field + .auth-form__field {
  margin-top: 1.1rem;
}

.auth-form__hint {
  display: block;
  margin: -0.2rem 0 0.5rem;
  color: #6d898a;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
}

.auth-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.75rem;
  margin-top: 1.5rem;
  border-color: transparent;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 750;
  box-shadow: var(--app-shadow-control);
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.5rem;
  border-top: 1px solid #e0f1ef;
  padding-top: 1.25rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.auth-links a {
  text-underline-offset: 0.2em;
}

.auth-errors {
  border: 0;
  border-radius: 1.25rem;
  margin-bottom: 1.25rem;
}

.auth-errors p {
  margin-bottom: 0.5rem;
}

.auth-errors ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.utility-card {
  width: min(100%, 38rem);
}

.utility-card__copy {
  margin-top: 1.25rem;
  color: #365f60;
  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: 600;
  line-height: 1.5;
}

.utility-card__copy p {
  margin: 0;
}

.utility-card__copy p + p {
  margin-top: 0.75rem;
}

.utility-card__instructions,
.participant-feedback-message {
  margin-top: 1.5rem;
  border-radius: 1.5rem;
  padding: clamp(1.1rem, 4vw, 1.5rem);
  background: #f1f9f8;
  color: #365f60;
  line-height: 1.5;
  text-align: left;
}

.utility-card__instructions > :last-child,
.participant-feedback-message > :last-child {
  margin-bottom: 0;
}

.utility-card__instructions ol {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.utility-card__footer-copy {
  margin: 1.5rem 0 0;
  color: #527071;
  font-size: clamp(0.95rem, 3.5vw, 1.05rem);
  font-weight: 600;
  line-height: 1.5;
}

.utility-card__hero-icon {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--app-color-brand);
  font-size: 3rem;
  line-height: 1;
}

.utility-card__action {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.75rem;
  margin-top: 1.5rem;
  border-color: transparent;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 750;
  box-shadow: var(--app-shadow-control);
}

.participant-feedback-message {
  margin-top: 0;
}

.push-prompt {
  position: fixed;
  z-index: 9999;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(16, 42, 43, 0.42);
  text-align: center;
}

.push-prompt__card {
  width: min(100%, 32rem);
  border-radius: 2rem;
  padding: clamp(1.5rem, 6vw, 2rem);
  background: #fff;
  color: var(--app-color-ink);
  box-shadow: 0 1.5rem 3.5rem rgba(16, 42, 43, 0.2);
}

.push-prompt__icon {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--app-color-brand);
  font-size: 2.5rem;
  line-height: 1;
}

.push-prompt__card h2 {
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.push-prompt__card p {
  margin: 0.75rem 0 1.25rem;
  color: #527071;
  font-weight: 600;
}

.push-prompt__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.push-prompt__actions .btn {
  min-height: 3.5rem;
  font-weight: 750;
}

.push-prompt__help {
  margin-top: 1rem;
  color: #527071;
  font-size: 0.85rem;
  line-height: 1.45;
}

.welcome-page__brain {
  width: clamp(8rem, 28vw, 11rem);
  max-width: 48vw;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 1rem 1.5rem rgba(16, 42, 43, 0.12));
}

.welcome-page h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.welcome-page h1 > span:first-child {
  display: block;
}

.welcome-page__brand-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.2em;
  white-space: nowrap;
}

.welcome-page p {
  margin: 1rem auto 1.75rem;
  color: #527071;
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-weight: 600;
  line-height: 1.5;
}

.welcome-page__actions {
  display: grid;
  gap: 0.75rem;
}

.welcome-page__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 750;
}

.welcome-page__actions .btn-primary {
  border-color: transparent;
  box-shadow: var(--app-shadow-control);
}

.check-in-home {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(1.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: #f8f9fa;
  color: var(--app-color-ink);
}

.check-in-home__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 4vh, 2.5rem);
  width: min(100%, 42rem);
}

.check-in-home__status {
  text-align: center;
}

.app-capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  border: 0;
  border-radius: var(--app-radius-control);
  padding: 0.5rem 1rem;
  background: #e0f6f4;
  color: var(--app-color-primary-ink);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
}

.app-capsule:focus-visible {
  outline: 3px solid var(--app-color-focus);
  outline-offset: 3px;
}

.check-in-home__day {
  margin: 0 0 0.75rem;
}

.brain-illustration {
  display: block;
  width: min(100%, 15rem);
  height: auto;
  object-fit: contain;
}

.check-in-home__brain {
  width: clamp(10rem, 28vh, 15rem);
  max-width: 58vw;
  margin: 0 auto;
  filter: drop-shadow(0 1rem 1.5rem rgba(16, 42, 43, 0.12));
}

.check-in-home__message {
  margin: 0.75rem 0 0;
  color: #184f51;
  font-size: clamp(1.15rem, 4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.check-in-home__action-surface {
  width: 100%;
}

.check-in-home__form {
  width: 100%;
  margin: 0;
}

.check-in-home__start {
  --bs-btn-padding-x: clamp(1.5rem, 5vw, 2.5rem);
  --bs-btn-padding-y: clamp(1.25rem, 4vw, 1.75rem);
  --bs-btn-font-family: var(--app-font-sans);
  --bs-btn-font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  --bs-btn-font-weight: 750;
  --bs-btn-line-height: 1.15;
  --bs-btn-color: var(--app-color-primary-ink);
  --bs-btn-bg: var(--app-color-primary);
  --bs-btn-border-color: var(--app-color-primary);
  --bs-btn-border-radius: var(--app-radius-control);
  --bs-btn-hover-color: var(--app-color-primary-ink);
  --bs-btn-hover-bg: var(--app-color-primary-hover);
  --bs-btn-hover-border-color: var(--app-color-primary-hover);
  --bs-btn-focus-shadow-rgb: 51, 190, 190;
  --bs-btn-active-color: var(--app-color-primary-ink);
  --bs-btn-active-bg: var(--app-color-primary-active);
  --bs-btn-active-border-color: var(--app-color-primary-active);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 6rem;
  box-shadow: var(--app-shadow-control);
  letter-spacing: -0.025em;
  text-decoration: none;
  touch-action: manipulation;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.check-in-home__start:hover {
  box-shadow: 0 1rem 2.25rem rgba(51, 190, 190, 0.24);
  transform: translateY(-0.125rem);
}

.check-in-home__start:active {
  box-shadow: 0 0.45rem 1rem rgba(51, 190, 190, 0.18);
  transform: translateY(0.0625rem) scale(0.99);
}

.check-in-home__settings {
  --bs-btn-padding-x: 0;
  --bs-btn-padding-y: 0;
  --bs-btn-font-family: var(--app-font-sans);
  --bs-btn-font-size: 1rem;
  --bs-btn-font-weight: 650;
  --bs-btn-line-height: 1.25;
  --bs-btn-color: #106f70;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: transparent;
  --bs-btn-border-radius: var(--app-radius-control);
  --bs-btn-hover-color: var(--app-color-primary-ink);
  --bs-btn-hover-bg: #f2fbfa;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-focus-shadow-rgb: 51, 190, 190;
  --bs-btn-active-color: var(--app-color-primary-ink);
  --bs-btn-active-bg: #e0f6f4;
  --bs-btn-active-border-color: transparent;
  position: absolute;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(16, 42, 43, 0.08);
  text-decoration: none;
  transform: translateX(-50%);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.check-in-home__settings .bi {
  color: var(--app-color-primary);
  font-size: 1.5rem;
  line-height: 1;
}

.check-in-home__settings:hover {
  box-shadow: 0 0.75rem 1.75rem rgba(16, 42, 43, 0.12);
  transform: translate(-50%, -0.125rem);
}

.check-in-home__start:focus-visible,
.check-in-home__settings:focus-visible {
  outline: 3px solid var(--app-color-focus);
  outline-offset: 4px;
  box-shadow: 0 0 0 3px #fff, var(--app-shadow-control);
}

.check-in-home__settings:focus-visible {
  box-shadow: 0 0 0 3px #fff, 0 0.5rem 1.5rem rgba(16, 42, 43, 0.12);
}

.completion-screen {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(1.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: #f8f9fa;
  text-align: center;
}

.completion-screen__content {
  width: min(100%, 42rem);
}

.completion-screen__brain {
  width: clamp(10rem, 30vh, 16rem);
  max-width: 60vw;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 1rem 1.5rem rgba(16, 42, 43, 0.12));
}

@media (max-height: 32rem) {
  .check-in-home__content {
    gap: 0.75rem;
  }

  .check-in-home__brain {
    width: 8rem;
  }

  .check-in-home__message {
    margin-top: 0.25rem;
  }

  .check-in-home__settings {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    left: auto;
    transform: none;
  }

  .check-in-home__settings:hover {
    transform: translateY(-0.125rem);
  }

  .completion-screen__brain {
    width: 8rem;
    margin-bottom: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .check-in-home__start,
  .check-in-home__settings {
    transition: none;
  }
}

.task-heading {
  font-size: clamp(1.75rem, 8vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.task-copy {
  font-size: clamp(1.35rem, 6vw, 2.25rem);
  line-height: 1.22;
  margin-bottom: 1.5rem;
}

.task-option {
  font-size: clamp(1.75rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
}

.task-stimulus-xl {
  font-size: clamp(8rem, 35vw, 13rem);
  font-weight: 700;
  line-height: 1;
}

.task-stimulus-md {
  font-size: clamp(3.75rem, 14vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
}

.task-small {
  font-size: clamp(1.35rem, 4.4vw, 1.8rem);
  line-height: 1.15;
}

.task-feedback-screen,
.task-guidance-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: #f8f9fa;
  color: var(--app-color-ink);
  text-align: center;
}

.task-feedback-card,
.task-guidance-card {
  width: min(100%, 44rem);
  margin: auto;
  border: 1px solid rgba(51, 190, 190, 0.2);
  border-radius: 2rem;
  padding: clamp(1.25rem, 5vw, 2rem);
  background: #fff;
  box-shadow: 0 0.75rem 2rem rgba(16, 42, 43, 0.06);
}

.task-feedback-header,
.task-guidance-header {
  margin-bottom: 1.25rem;
}

.task-feedback-header h1,
.task-feedback-header h2,
.task-guidance-header h1,
.task-guidance-header h2 {
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.task-feedback-progress,
.task-guidance-progress {
  margin: 0 0 0.75rem;
}

.task-feedback-highlight {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 1.25rem;
  border-radius: 1.5rem;
  padding: 1rem 1.25rem;
  background: #e0f6f4;
  color: #184f51;
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 700;
}

.task-feedback-highlight strong {
  color: var(--app-color-primary-ink);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.task-feedback-metrics {
  margin: 0 0 1.25rem;
  border: 1px solid #e0f1ef;
  border-radius: 1.5rem;
  padding: 0 1.1rem;
  background: #fbfefe;
  text-align: left;
}

.task-feedback-metrics > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.7rem 0;
}

.task-feedback-metrics > div + div {
  border-top: 1px solid #e0f1ef;
}

.task-feedback-metrics dt {
  color: #4e7071;
  font-size: clamp(0.88rem, 3.5vw, 1rem);
  font-weight: 650;
  line-height: 1.3;
}

.task-feedback-metrics dd {
  min-width: 3.5rem;
  margin: 0;
  color: var(--app-color-ink);
  font-size: clamp(1.05rem, 4.5vw, 1.3rem);
  font-weight: 800;
  text-align: right;
}

.task-feedback-message {
  margin: 0 0 1.5rem;
  color: #365f60;
  font-size: clamp(1.1rem, 4.5vw, 1.4rem);
  font-weight: 650;
  line-height: 1.4;
}

.task-feedback-countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin: 0;
  border-radius: var(--app-radius-control);
  padding: 0.65rem 1.25rem;
  background: #f0f7f6;
  color: #365f60;
  font-size: clamp(1rem, 4vw, 1.2rem);
  font-weight: 700;
}

.task-guidance-copy {
  margin: 0;
  border: 0;
  border-radius: 1.5rem;
  padding: clamp(1.1rem, 4vw, 1.5rem);
  background: #f1f9f8;
  color: #365f60;
  text-align: center;
}

.task-guidance-copy > p {
  margin: 0;
  padding: 0;
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-weight: 600;
  line-height: 1.45;
}

.task-guidance-copy > p + p {
  margin-top: 1rem;
}

.task-guidance-copy strong {
  color: var(--app-color-ink);
  font-weight: 800;
}

.task-guidance-copy--compact > p + p {
  margin-top: 0.7rem;
}

.task-guidance-example {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  border-radius: 1.25rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.task-guidance-example .stop-signal-example-box {
  margin: 0;
}

.task-guidance-card {
  border: 0;
  box-shadow: 0 1rem 2.5rem rgba(16, 42, 43, 0.08);
}

.task-feedback-actions,
.task-guidance-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(100%, 32rem);
  margin: 1.25rem auto 0;
}

.task-feedback-actions .task-option,
.task-guidance-actions .task-option {
  min-height: 4rem;
  font-size: clamp(1.1rem, 4.5vw, 1.4rem);
}

.task-feedback-actions .btn-secondary,
.task-guidance-actions .btn-secondary {
  --bs-btn-color: #365f60;
  --bs-btn-bg: #edf6f5;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--app-color-primary-ink);
  --bs-btn-hover-bg: #dcefed;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--app-color-primary-ink);
  --bs-btn-active-bg: #cce6e4;
  --bs-btn-active-border-color: transparent;
}

.task-confirmation-modal {
  border: 1px solid rgba(51, 190, 190, 0.2);
  border-radius: 1.75rem;
  color: var(--app-color-ink);
  box-shadow: 0 1.25rem 3rem rgba(16, 42, 43, 0.16);
}

.task-confirmation-modal .modal-body {
  padding: clamp(1.5rem, 6vw, 2rem);
}

.task-confirmation-modal h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.task-confirmation-modal p {
  margin: 0;
  color: #365f60;
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-weight: 600;
  line-height: 1.45;
}

.task-confirmation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.task-confirmation-actions .btn {
  min-height: 3.5rem;
  font-weight: 750;
}

.questionnaire-card {
  width: min(100%, 46rem);
}

.questionnaire-form,
.questionnaire-step {
  width: 100%;
}

.questionnaire-step {
  display: none;
  flex-direction: column;
}

.task-final-form {
  width: min(100%, 36rem);
}

.task-final-fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.task-final-fieldset legend {
  width: 100%;
  margin: 0 0 1.25rem;
  border-radius: 1.5rem;
  padding: 1.1rem 1.25rem;
  background: #f1f9f8;
  color: #365f60;
  font-size: clamp(1.05rem, 4vw, 1.3rem);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.task-final-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.task-final-option:last-child {
  grid-column: 1 / -1;
}

.task-final-option {
  position: relative;
}

.task-final-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.task-final-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  border-radius: var(--app-radius-control);
  padding: 0.75rem 1rem;
  background: #edf6f5;
  color: #365f60;
  font-weight: 700;
  cursor: pointer;
}

.task-final-option input:checked + label {
  background: var(--app-color-primary);
  color: var(--app-color-primary-ink);
  box-shadow: 0 0.4rem 1rem rgba(51, 190, 190, 0.14);
}

.task-final-option input:focus-visible + label {
  outline: 3px solid var(--app-color-focus);
  outline-offset: 3px;
}

.task-stage-skip {
  position: absolute;
  top: max(1.5rem, env(safe-area-inset-top));
  left: max(1rem, env(safe-area-inset-left));
  z-index: 2;
  margin: 0;
}

.nback-example {
  --nback-example-blue: #0877d8;
  --nback-example-red: #e64b5a;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 0;
  width: min(100%, 36rem);
  margin: 0 auto 1.5rem;
  padding: clamp(2.25rem, 8vw, 3.5rem) 0 clamp(1.25rem, 5vw, 2.25rem);
  color: var(--nback-example-blue);
}

.nback-example-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0 clamp(0.3rem, 2vw, 1.35rem);
}

.nback-example-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 5.4rem);
  aspect-ratio: 1;
  border: clamp(0.18rem, 0.8vw, 0.3rem) solid var(--nback-example-blue);
  background: #fff;
  font-size: clamp(2.5rem, 11vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
}

.nback-example-index {
  margin-top: 0.45rem;
  font-size: clamp(1rem, 4vw, 1.45rem);
  line-height: 1;
}

.nback-example-match {
  --nback-example-line: clamp(0.18rem, 0.8vw, 0.28rem);
  --nback-example-arrow-height: clamp(0.45rem, 1.8vw, 0.7rem);
  --nback-example-arrow-width: clamp(0.56rem, 2.4vw, 0.84rem);
  position: absolute;
  top: clamp(0.45rem, 2vw, 0.9rem);
  left: var(--match-left);
  width: var(--match-width);
  height: clamp(1rem, 4.5vw, 1.7rem);
}

.nback-example-match-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nback-example-line);
  background: var(--nback-example-red);
}

.nback-example-match-end {
  position: absolute;
  top: 0;
  width: var(--nback-example-arrow-width);
  height: 100%;
}

.nback-example-match-end.is-start {
  left: 0;
  transform: translateX(-50%);
}

.nback-example-match-end.is-end {
  right: 0;
  transform: translateX(50%);
}

.nback-example-match-end::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--nback-example-line);
  height: calc(100% - var(--nback-example-arrow-height));
  background: var(--nback-example-red);
  content: "";
  transform: translateX(-50%);
}

.nback-example-match-end::after,
.nback-example-item.is-response::after {
  position: absolute;
  width: 0;
  height: 0;
  content: "";
}

.nback-example-match-end::after {
  top: calc(100% - var(--nback-example-arrow-height));
  left: 50%;
  border-right: calc(var(--nback-example-arrow-width) / 2) solid transparent;
  border-left: calc(var(--nback-example-arrow-width) / 2) solid transparent;
  border-top: var(--nback-example-arrow-height) solid var(--nback-example-red);
  transform: translateX(-50%);
}

.nback-example-item.is-response::before {
  position: absolute;
  bottom: clamp(-1.35rem, -3.5vw, -0.95rem);
  left: 50%;
  width: clamp(0.18rem, 0.8vw, 0.28rem);
  height: clamp(0.75rem, 2.4vw, 1rem);
  background: var(--nback-example-red);
  content: "";
  transform: translateX(-50%);
}

.nback-example-item.is-response::after {
  bottom: clamp(-0.8rem, -2.2vw, -0.58rem);
  left: 50%;
  border-right: clamp(0.3rem, 1.2vw, 0.45rem) solid transparent;
  border-left: clamp(0.3rem, 1.2vw, 0.45rem) solid transparent;
  border-bottom: clamp(0.5rem, 1.8vw, 0.75rem) solid var(--nback-example-red);
  transform: translateX(-50%);
}

.settings-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--app-viewport-height, 100dvh);
  padding: max(2rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) calc(6rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: #f8f9fa;
  color: var(--app-color-ink);
}

.settings-page__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(100%, 42rem);
  margin: 0 auto;
}

.settings-page__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
  text-align: center;
}

.settings-page__header h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.settings-page__icon {
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  color: var(--app-color-primary);
  font-size: 1.6rem;
}

.settings-page__panel {
  border: 1px solid rgba(51, 190, 190, 0.2);
  border-radius: 1.75rem;
  padding: clamp(1.25rem, 5vw, 1.75rem);
  background: #fff;
  box-shadow: 0 0.75rem 2rem rgba(16, 42, 43, 0.06);
}

.settings-page__details {
  margin: 0;
}

.settings-page__detail {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
}

.settings-page__detail:first-child {
  padding-top: 0;
}

.settings-page__detail:last-child {
  padding-bottom: 0;
}

.settings-page__detail + .settings-page__detail {
  border-top: 1px solid #e0f1ef;
}

.settings-page__detail dt {
  color: #4e7071;
  font-size: 0.9rem;
  font-weight: 700;
}

.settings-page__detail dd {
  min-width: 0;
  margin: 0;
  color: var(--app-color-ink);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

.settings-page__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.settings-page__controls {
  border-top: 1px solid #e0f1ef;
  padding-top: 1.25rem;
}

.settings-page__action-form {
  display: flex;
  margin: 0;
}

.settings-page__action {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.settings-page__home {
  position: fixed;
}

@media (max-width: 35rem) {
  .settings-page__actions {
    grid-template-columns: 1fr;
  }
}

.profile-page {
  min-height: var(--app-viewport-height, 100dvh);
  padding: max(2rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: #f8f9fa;
  color: var(--app-color-ink);
}

.profile-page__content {
  width: min(100%, 52rem);
  margin: 0 auto;
}

.profile-page__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
  text-align: center;
}

.profile-page__header h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.profile-form {
  border: 1px solid rgba(51, 190, 190, 0.2);
  border-radius: 2rem;
  padding: clamp(1.25rem, 5vw, 2rem);
  background: #fff;
  box-shadow: 0 0.75rem 2rem rgba(16, 42, 43, 0.06);
}

.profile-form__errors {
  border: 0;
  border-radius: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-form__errors p {
  margin-bottom: 0.5rem;
}

.profile-form__errors ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.profile-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.profile-form__field {
  min-width: 0;
}

.profile-form__field--wide {
  grid-column: 1 / -1;
}

.profile-form .form-label,
.auth-form .form-label {
  margin-bottom: 0.5rem;
  color: #365f60;
  font-size: 0.9rem;
  font-weight: 750;
}

.profile-form .form-control,
.profile-form .form-select,
.auth-form .form-control,
.auth-form .form-select {
  min-height: 3.5rem;
  border: 1px solid #c9dedc;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  background-color: #fbfefe;
  color: var(--app-color-ink);
  font-weight: 600;
}

.profile-form .form-control::placeholder,
.auth-form .form-control::placeholder {
  color: #789192;
  font-weight: 500;
  opacity: 1;
}

.profile-form .form-control:focus,
.profile-form .form-select:focus,
.auth-form .form-control:focus,
.auth-form .form-select:focus {
  border-color: var(--app-color-brand);
  background-color: #fff;
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.profile-form__fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.profile-form__choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.profile-form__choice {
  position: relative;
}

.profile-form__choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-form__choice label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  border: 1px solid #c9dedc;
  border-radius: var(--app-radius-control);
  padding: 0.7rem 1rem;
  background: #fbfefe;
  color: #365f60;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.profile-form__choice label:hover {
  border-color: var(--app-color-brand);
  background: #f2fbfa;
}

.profile-form__choice input:checked + label {
  border-color: transparent;
  background: var(--app-color-primary);
  color: var(--app-color-primary-ink);
  box-shadow: 0 0.4rem 1rem rgba(51, 190, 190, 0.14);
}

.profile-form__choice input:focus-visible + label {
  outline: 3px solid var(--app-color-focus);
  outline-offset: 3px;
}

.profile-form__actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1.75rem;
  border-top: 1px solid #e0f1ef;
  padding-top: 1.5rem;
}

.profile-form__submit,
.profile-form__cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 750;
}

.profile-form__submit {
  border-color: transparent;
  box-shadow: var(--app-shadow-control);
}

@media (max-width: 40rem) {
  .profile-form__grid,
  .profile-form__actions {
    grid-template-columns: 1fr;
  }

  .profile-form__field--wide {
    grid-column: auto;
  }

  .profile-form__choices {
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-form__choice label {
    transition: none;
  }
}

.mcq-choice-button {
  -webkit-tap-highlight-color: transparent;
}

.mcq-question-content {
  display: flex;
  flex-direction: column;
  width: min(100%, 48rem);
  min-height: min(78dvh, 44rem);
  margin: auto;
}

.mcq-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 3vw, 1.25rem);
  margin-top: auto;
  padding-top: clamp(3rem, 10vh, 6rem);
}

.mcq-choice-grid .mcq-choice-button {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: min(100%, 18rem);
  min-height: 0;
  aspect-ratio: 1;
  justify-self: center;
  min-width: 0;
  border-radius: 1.75rem;
  padding: clamp(1rem, 4vw, 1.5rem);
  font-size: clamp(1.15rem, 5vw, 1.75rem);
  line-height: 1.15;
  white-space: normal;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.mcq-choice-amount {
  font-size: clamp(1.75rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.mcq-choice-timing {
  font-size: clamp(1rem, 4vw, 1.3rem);
  font-weight: 700;
}

.mcq-choice-grid [data-mcq-save-error] {
  grid-column: 1 / -1;
}

@media (hover: none) {
  .mcq-choice-button.btn-outline-primary,
  .mcq-choice-button.btn-outline-primary:hover,
  .mcq-choice-button.btn-outline-primary:focus,
  .mcq-choice-button.btn-outline-primary:active,
  .mcq-choice-button.btn-outline-primary:focus-visible {
    border-color: var(--bs-primary);
    background-color: transparent;
    color: var(--bs-primary);
    box-shadow: none;
  }
}

.mcq-choice-button.btn-outline-primary:active,
.mcq-choice-button.btn-outline-primary.is-selected,
.mcq-choice-button.btn-outline-primary.is-selected:disabled {
  border-color: var(--app-color-focus);
  background: var(--app-color-focus);
  color: #fff;
  box-shadow: 0 0.75rem 1.75rem rgba(20, 127, 128, 0.25);
  opacity: 1;
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  .mcq-choice-grid .mcq-choice-button {
    transition: none;
  }
}

.digit-span-fix span {
  font-weight: 400;
}

.digit-span-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 2vw, 0.85rem);
  width: min(100%, 34rem);
}

.digit-span-keypad-instruction,
.digit-span-entry {
  grid-column: 1 / -1;
  min-height: 3rem;
  color: #000;
  text-align: center;
}

.digit-span-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(3.75rem, 4.5rem, 5rem);
  border: 2px solid #000;
  border-radius: var(--app-radius-control);
  background: #fff;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.digit-span-key {
  aspect-ratio: 1 / 0.72;
  min-height: 0;
  font-size: clamp(1.75rem, 2.5rem, 3rem);
  font-weight: 700;
  line-height: 1;
}

.digit-span-delete,
.digit-span-submit {
  aspect-ratio: auto;
}

.digit-span-delete {
  display: flex;
  align-items: center;
  justify-content: center;
}

.digit-span-submit {
  font-size: clamp(1.75rem, 7vw, 1.925rem);
}

@media (hover: none) {
  .digit-span-key.btn-outline-dark:hover {
    border-color: var(--bs-dark);
    background-color: transparent;
    color: var(--bs-dark);
    box-shadow: none;
  }

  .digit-span-key.btn-outline-dark:active {
    border-color: var(--bs-dark);
    background-color: var(--bs-dark);
    color: #fff;
  }
}

.stop-signal-accent {
  color: var(--app-color-brand);
}

.stop-signal-example-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(5.75rem, 22vw, 8rem);
  height: clamp(5.75rem, 22vw, 8rem);
  margin-top: 0.25rem;
  border: clamp(0.45rem, 1.5vw, 0.75rem) solid #000;
  color: #000;
}

.stop-signal-stage {
  position: relative;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.stop-signal-trial-content {
  position: absolute;
  top: 40%;
  left: 50%;
  width: min(100%, 42rem);
  transform: translate(-50%, -50%);
  text-align: center;
}

.stop-signal-letter,
.stop-signal-fix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
  min-height: 12rem;
  color: #fff;
}

.stop-signal-fix {
  min-width: auto;
  min-height: auto;
}

.stop-signal-wait {
  color: #fff;
}

.stop-signal-letter--boxed {
  border: clamp(0.45rem, 1.4vw, 0.75rem) solid #fff;
}

.stop-signal-prompt {
  min-height: 2.6rem;
  margin-top: 5rem;
  padding: 0 1rem;
  color: #fff;
}

.stop-signal-response-row {
  position: absolute;
  right: 0;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  padding: 0 0.75rem;
}

.stop-signal-response-button {
  box-sizing: border-box;
  width: 100%;
  height: clamp(4.67rem, 14.67vh, 8rem);
  border: 2px solid var(--app-color-primary);
  border-radius: var(--app-radius-control);
  padding: 0.35em 0.5em;
  background: rgba(51, 190, 190, 0.1);
  color: var(--app-color-primary);
  font-size: clamp(3.33rem, 12vw, 4.33rem);
  font-weight: 700;
  line-height: 1;
  touch-action: manipulation;
}

.stop-signal-response-button:active,
.stop-signal-response-button.is-pressed {
  background: var(--app-color-primary);
  color: var(--app-color-primary-ink);
  transform: scale(0.95);
}

.stop-signal-response-button:disabled {
  opacity: 1;
}

.stop-signal-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100% - 2rem, 44rem);
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
}
