.canvas
{
    font-size: 2.2vw;
    font-size: 2.2vh;
    text-align:center;
    width:50vw;
    margin-right: auto;
    margin-left: auto;
    display: block;
    
}
p {
    font-size: 2.2vw;
    font-size: 2.2vh;
  }
  h1 {
    font-size: 2.4vw;
    font-size: 2.4vh;
  }
  h2 {
    font-size: 2.4vw;
    font-size: 2.4vh;
  }
  

  img {
    max-width: 50vw;
    height: auto;
  }

.jspsych-html-slider-response-container{
      font-size: 2.2vw;
      font-size: 2.2vh;
 }

 .jspsych-btn {
    font-size: 2.2vw;
    font-size: 2.2vh;
 }
 #slide6 > img {
 
    max-width: 100%;
    height: auto;
    

 }

/*  .ios_image {
    width: 1000px;
 } */

/* Wrap each question block with some spacing */
/* -------- Base layout (kept from earlier) -------- */
.jspsych-display-element .survey-wrap { text-align: left !important; }
.jspsych-display-element .survey-block {
  width: clamp(560px, 68vw, 960px);
  margin: 0 auto;
  line-height: 1.45;
}

/* -------- Distinct question “cards” + numbering -------- */
.survey-block { counter-reset: q; }                     /* start counter per block */

.survey-fieldset {
  border: 1px solid #e6e6e6;
  border-left: 4px solid #c7d2fe;                       /* accent bar */
  border-radius: .6rem;
  padding: .85rem .95rem;
  margin: 1rem 0 1.25rem;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.survey-fieldset legend {
  display: block;
  font-size: .95rem;                                    /* smaller prompt */
  font-weight: 700;
  margin: 0 0 .5rem 0;
  color: #111827;
}

/* prepend Q1., Q2., ... to each legend */
.survey-fieldset legend::before {
  counter-increment: q;
  content: "Q" counter(q) ". ";
  color: #4f46e5;                                       /* indigo accent */
  margin-right: .25rem;
}

/* Subtle separation between legend and content */
.survey-fieldset > .section-subtitle,
.survey-fieldset .hint {
  font-size: .83rem;
  color: #6b7280;
  margin-top: .25rem;
}

/* different accents per type (optional but helpful) */
.survey-fieldset[data-qtype="single"]  { border-left-color: #60a5fa; } /* blue */
.survey-fieldset[data-qtype="multi"]   { border-left-color: #34d399; } /* green */
.survey-fieldset[data-qtype="range"]   { border-left-color: #f59e0b; } /* amber */
.survey-fieldset[data-qtype="matrix"]  { border-left-color: #a78bfa; } /* violet */
.survey-fieldset[data-qtype="image_single"],
.survey-fieldset[data-qtype="image_multi"] { border-left-color: #f472b6; } /* pink */

/* -------- Options: clear left alignment & spacing -------- */
label.survey-option {
  display: flex !important;
  align-items: center;
  gap: .55rem;
  margin: .2rem 0;
}
label.survey-option input[type="radio"],
label.survey-option input[type="checkbox"] { flex: 0 0 auto; }
label.survey-option span { flex: 1 1 auto; text-align: left; }

/* two-column grid for multi (checkbox) questions on wider screens */
.survey-fieldset[data-qtype="multi"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: .35rem 1rem;
}
.survey-fieldset[data-qtype="multi"] > legend { grid-column: 1 / -1; }
.survey-fieldset[data-qtype="multi"] .hint   { grid-column: 1 / -1; }

/* -------- Range questions: full-width slider + evenly spaced labels -------- */
.survey-fieldset input[type="range"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: .55rem 0 .25rem;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .85rem;
}

/* -------- Image choices: cards with clear selected state -------- */
.img-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
@media (max-width: 1100px) { .img-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .img-grid { grid-template-columns: repeat(2, 1fr); } }

.img-choice > input { position: absolute; opacity: 0; pointer-events: none; }
.img-choice figure {
  margin: 0.2rem .2rem;
  padding: .5rem;
  border: 1px solid #d7d7d7;
  border-radius: .6rem;
  background: #fff;
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .02s ease;
}
.img-choice img { width: 100%; height: 64px; object-fit: contain; display: block; }
.img-choice figcaption { margin-top: .4rem; font-size: .9rem; text-align: center; }
.img-choice:hover figure { border-color: #bdbdbd; }
.img-choice input:focus + figure { outline: 2px solid #3b82f6; outline-offset: 2px; }
.img-choice input:checked + figure {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,.15) inset;
  transform: translateY(-1px);
}

/* -------- Matrix: clearer association row↔answers -------- */
.matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
}
.matrix thead th {
  background: #f9fafb;
  font-weight: 700;
  padding: .6rem .5rem;
  border-bottom: 1px solid #e5e7eb;
}
.matrix tbody th.rowlabel {
  text-align: left;
  font-weight: 700;
  color: #111827;
  background: #fcfcfc;
  border-right: 1px solid #eee;
  padding: .55rem .6rem;
}
.matrix td.cell {
  padding: .45rem .6rem;
  text-align: center;
  border-top: 1px solid #eee;
}
.matrix tbody tr:nth-child(odd) { background: #fafafa; }
.matrix tbody tr:hover { background: #f5f7fb; }

/* -------- Button spacing -------- */
#jspsych-survey-html-form-next { margin-top: .75rem; padding: .55rem 1.25rem; }

/* 1) make each question extra-distinguishable */
.survey-fieldset {
  border-left-width: 6px;                  /* thicker accent bar */
  background: #fff;                         /* keep white */
  box-shadow: 0 2px 8px rgba(0,0,0,.05);    /* stronger lift */
}
.survey-fieldset + .survey-fieldset {       /* subtle divider between cards */
  margin-top: 1.25rem;
}
.survey-fieldset legend {
  letter-spacing: .1px;
}
.survey-fieldset legend::after {            /* faint rule under legend */
  content: "";
  display: block;
  height: 1px;
  background: #eceff4;
  margin-top: .45rem;
}

/* 2) multi-checkbox answer text smaller + tighter layout */
.survey-fieldset[data-qtype="multi"] label.survey-option {
  gap: .4rem;
  margin: .15rem 0;
}
.survey-fieldset[data-qtype="multi"] label.survey-option span {
  font-size: .875rem;  /* 14px-ish */
  line-height: 1.25;
  color: #111827;
}
.survey-fieldset[data-qtype="multi"] .hint {
  font-size: .8rem;
  color: #6b7280;
}

/* 3) image choices = 32px icons */
.img-grid {
  gap: .5rem;
}
.img-choice figure {
  padding: .4rem;
  border-radius: .5rem;
}
.img-choice img {
  width: 100%;
  height: 32px;          /* <-- was 64; now 32px */
  object-fit: contain;
}
.img-choice figcaption {
  font-size: .85rem;
}

/* nice compact selected outline for small icons */
.img-choice input:checked + figure {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.15) inset;
}

/* optional: compress vertical spacing inside range labels so card is tighter */
.range-labels {
  font-size: .83rem;
  margin-top: .15rem;
}

/* center survey continue button */
#jspsych-survey-html-form-next,
.jspsych-display-element .jspsych-btn{
  display:block;
  margin:24px auto 0 !important;
}

/* Compact Likert rows used by matrix questions */
.likert7 { display:flex; flex-direction:column; gap:18px; }

.likert-row{
  border:1px solid #e5e7eb; border-radius:12px; background:#fff;
  padding:16px 14px; box-shadow:0 1px 3px rgba(0,0,0,.03);
}

.likert-row .prompt{
  text-align:center; font-weight:700; color:#111827; margin-bottom:12px;
}

.likert-row .line{
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:18px;
}

.likert-row .anchor{ font-weight:600; color:#111827; white-space:nowrap; }
.likert-row .anchor.left{ text-align:left;  padding-left:4px; }
.likert-row .anchor.right{ text-align:right; padding-right:4px; }

/* evenly spaced points; number of columns adapts to q.cols.length */
.likert-row .scale{
  display:grid; grid-template-columns:repeat(var(--pts,7), 40px);
  justify-items:center; align-items:center; gap:26px;
}

/* bigger, easy-to-click radios */
.likert-pt{ display:inline-flex; align-items:center; justify-content:center; }
.likert-pt input{ position:absolute; opacity:0; pointer-events:none; }
.likert-pt span{
  display:block; width:28px; height:28px; border-radius:50%;
  border:2px solid #bdbdbd; background:#fff; box-sizing:border-box;
  transition:border-color .15s, box-shadow .15s, transform .02s;
}
.likert-pt input:focus + span{ outline:2px solid #3b82f6; outline-offset:2px; }
.likert-pt input:checked + span{ border-color:#2563eb; box-shadow:0 0 0 4px rgba(37,99,235,.15); }

.likert { display: grid; gap: 24px; }
.likert-row-header { text-align: center; margin-bottom: 10px; font-weight: 600; }
.likert-scale {
  display: grid;
  grid-template-columns: 1fr minmax(0, 560px) 1fr; /* centers scale block; tweak 560px if needed */
  align-items: center;
  column-gap: 16px;
}
.likert-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  justify-items: center;
  gap: 16px;
}
.scale-end { white-space: nowrap; }
.likert-cell input {
  appearance: none;
  width: 28px; height: 28px;
  border: 2px solid #333; border-radius: 50%;
  display: inline-block; position: relative;
}
.likert-cell input:focus { outline: 2px solid #666; outline-offset: 2px; }
.likert-cell input:checked::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%;
  background: #333;
}

/* field width */
.survey-fieldset[data-qtype="text"] input,
.survey-fieldset[data-qtype="textarea"] textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 0;
  background: transparent;
  border: none;              /* borderless */
  outline: none;             /* remove default outline */
}

/* keep an accessible focus style without borders */
.survey-fieldset[data-qtype="text"] input:focus,
.survey-fieldset[data-qtype="textarea"] textarea:focus {
  box-shadow: 0 0 0 2px rgba(0,0,0,.25);
  border-radius: 6px;
}

/* allow vertical resize on textarea (optional) */
.survey-fieldset[data-qtype="textarea"] textarea {
  resize: vertical;
  min-height: 120px;
}
