/* Studios: missions, Speaking Studio, Writing Studio, Error Detective, Growth Map, home entry points.
   Uses the lab's tokens; every interactive element is >= 44px. */
.studio-grid,.task-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.studio-card,.task-card,.next-step{
  display: grid;
  gap: 0.25rem;
  align-content: start;
  padding: 1rem;
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-left: 6px solid var(--room, var(--brand));
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}
.studio-card > span:first-child {
  font-size: 1.6rem;
}
.studio-card {
  position: relative;
  min-height: 12rem;
  gap: .55rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--room) 5%, #fff));
  transition: transform .2s ease, box-shadow .2s ease;
}
.studio-card strong { font-size: 1.12rem; letter-spacing: -.01em; }
.studio-card > span:nth-child(3) { max-width: 28ch; color: var(--ink-2); font-size: .95rem; }
.studio-card .studio-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--room) 14%, white);
  color: var(--room);
}
.studio-icon svg { width: 2rem; height: 2rem; }
.studio-card .studio-arrow { position: absolute; right: 1.2rem; top: 1.2rem; color: var(--room); font-size: 1.3rem; }
.studio-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgb(15 44 59 / 12%); }
.studio-card:hover,.task-card:hover,.next-step:hover{
  border-color: var(--room, var(--brand));
}
.next-step {
  margin-bottom: 0.75rem;
  background: var(--brand-soft);
}
.next-step strong {
  font-size: 1.2rem;
}
.more-tools {
  margin: 1.2rem 0;
}
.more-tools > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
}
.dim-chip {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 700;
  vertical-align: middle;
}
.coach-moves {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.2rem;
}
.move-ask {
  font-weight: 650;
}
.frame {
  background: var(--hint-soft);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
}
.evidence-text,.portfolio-response{
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  white-space: pre-wrap;
}
mark.hl {
  background: #d8f0e6;
  color: inherit;
  border-radius: 3px;
  padding: 0 0.1em;
}
mark.hl-error {
  background: #fde3df;
  text-decoration: underline wavy #b3261e;
  text-underline-offset: 3px;
}
ins {
  background: #d8f0e6;
  text-decoration: underline;
  border-radius: 3px;
  padding: 0 0.1em;
}
del {
  background: #fde3df;
  border-radius: 3px;
  padding: 0 0.1em;
}
.diff {
  line-height: 1.8;
}

/* stage and rubric choosers */

.rubric {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem;
  margin: 0.75rem 0;
}

.rubric-opt{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.6rem;
  align-items: start;
  padding: 0.6rem 0.8rem;
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.rubric-opt > span {
  grid-column: 2;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.rubric-opt.is-on{
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* sources, charts, tables */
.source,.sources{
  margin: 0.75rem 0;
}

.evidence-notebook {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
}

/* detective + growth */

.spark {
  width: 120px;
  height: 28px;
  color: var(--brand);
}

.share-options {
  display: grid;
  gap: 0.3rem;
  margin: 0.5rem 0;
}
.share-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

@media print {
  .studio-grid{
    display: none;
  }
  mark.hl,ins,del{
    background: none;
    text-decoration: underline;
  }
}

/* form fields: >= 3:1 border contrast (WCAG 1.4.11) and a visible focus ring */
.field input[type="text"],.field textarea,.field select{
  border-color: #767676;
}
.field input:focus-visible,.field textarea:focus-visible,.field select:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.lab-table-wrap:focus-visible {
  outline: 3px solid var(--focus);
}

/* teacher dashboard */
.field.inline {
  display: inline-grid;
  margin-right: 0.75rem;
}
.ev-print {
  display: none;
}
@media print {
  body[data-printing="lesson"] > *:not(#classEvidence) {
    display: none !important;
  }
  body[data-printing="lesson"] #classEvidence > *:not(#lessonPrint) {
    display: none !important;
  }
  body[data-printing="lesson"] #lessonPrint {
    display: block !important;
  }
  body[data-printing="sheets"] > *:not(#classEvidence) {
    display: none !important;
  }
  body[data-printing="sheets"] #classEvidence .ev-screen {
    display: none !important;
  }
  body[data-printing="sheets"] .ev-print {
    display: block;
  }
  .ev-sheet {
    page-break-after: always;
    padding-bottom: 0.5cm;
  }
  #classEvidence .no-print {
    display: none !important;
  }
}

/* Practice composite and rating panel (practice-test results). Rules: src/lang/composite.js. */
.composite,.rate-panel{
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.comp-card {
  padding: 0.75rem 1rem;
  border-left: 6px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand-soft);
}
.comp-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.comp-num {
  margin: 0;
  font-size: 1rem;
}
.comp-num strong {
  font-size: 2rem;
}
.comp-table {
  width: 100%;
  margin: 0.75rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.comp-table caption {
  text-align: left;
  font-weight: 700;
  padding-bottom: 0.25rem;
}
.comp-table th,.comp-table td{
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.comp-method summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
}
.rate-domain,.rate-crit{
  margin: 0.75rem 0 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.rate-domain > legend {
  font-weight: 700;
}
.rate-opt {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  min-height: 44px;
  padding: 0.4rem 0;
}
.rate-opt input {
  width: 24px;
  height: 24px;
  margin-top: 0.1rem;
  flex: none;
}

/* Tap-a-word help (src/glossary.js). Glossed words are spans for pointer users; the Word help list is the keyboard path. */
.gloss-word {
  border-bottom: 2px dotted var(--brand);
  cursor: help;
}
.gloss-word:hover {
  background: var(--brand-soft);
}
.gloss-list {
  margin: 0.75rem 0;
}
.gloss-list summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
}
.gloss-list ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gloss-chip {
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.gloss-card {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 1rem;
  width: min(34rem, calc(100vw - 2rem));
  transform: translateX(-50%);
  padding: 1rem 1.25rem;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}
.gloss-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}
.gloss-card p {
  margin: 0.25rem 0 0.75rem;
}
@media print {
  .gloss-card {
    display: none;
  }
  .gloss-word {
    border-bottom: 0;
  }
}

/* Test-conditions choice on the practice-test intro (src/views/test.js). */
.test-mode {
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.test-mode > legend {
  font-weight: 700;
}
.listen-player.is-limited .listen-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
