/* Scoped text-record compatibility. No fixed-width canvas or colour-only meaning. */
.question-record{margin:1rem 0;padding:1rem;border:1px solid #d6e4e1;border-radius:14px;background:#f4faf8;color:#173f38;overflow-wrap:anywhere}
.question-record h3{font-size:1rem;margin:0 0 .65rem}
.question-record-list{margin:0;padding-left:1.45rem;display:grid;gap:.65rem;line-height:1.65}
.question-record-caption{margin:0 0 .7rem;line-height:1.6}
.question-record-table-wrap{max-width:100%;overflow-x:auto}
.question-record table{width:100%;table-layout:fixed;border-collapse:collapse;text-align:left;font-size:1rem}
.question-record caption{text-align:left;caption-side:top;padding-bottom:.65rem;line-height:1.6}
.question-record th,.question-record td{border:1px solid #bfd4cc;padding:.65rem;vertical-align:top;white-space:normal;overflow-wrap:anywhere}
.question-record thead{background:#e3f1ec}
.question-record-cards{display:grid;gap:.65rem;margin:0}
.question-record-cards>div{display:grid;grid-template-columns:4.75rem minmax(0,1fr);gap:.5rem;padding:.65rem;border:1px solid #c4dbd2;border-radius:9px;background:#fff}
.question-record-cards dt{font-weight:700}.question-record-cards dd{margin:0;line-height:1.55}
@media(max-width:420px){.question-record{padding:.75rem}.question-record th,.question-record td{padding:.45rem}.question-record-cards>div{grid-template-columns:3.8rem minmax(0,1fr)}}

/* Narrow CARD, not viewport: a CSS-zoom2 fixture can leave only ~134px here. */
.question-record{container-name:question-record;container-type:inline-size;word-break:normal;hyphens:none}
@container question-record (max-width:240px){
 .question-record-table-wrap{overflow:visible}
 .question-record caption{display:block;width:100%;box-sizing:border-box;overflow-wrap:normal;word-break:normal;hyphens:none}
 .question-record table,.question-record tbody,.question-record tbody tr,.question-record tbody th,.question-record tbody td{display:block;box-sizing:border-box;width:100%;min-width:0}
 .question-record thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
 .question-record tbody tr{margin:0 0 .75rem;border:1px solid #bfd4cc;border-radius:8px;overflow:hidden;background:#fff}
 .question-record tbody th,.question-record tbody td{border:0;padding:.5rem;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none;line-height:1.55}
 .question-record tbody th{background:#e3f1ec}
 .question-record [data-record-label]::before{content:attr(data-record-label);display:block;font-size:.82em;font-weight:700;color:#365f55;margin-bottom:.25rem}
 .question-record-cards>div{grid-template-columns:minmax(0,1fr)}
 .question-record-cards dd{overflow-wrap:normal;word-break:normal}
}
/* Only result items carrying records: never truncate the prompt needed for review. */
@supports selector(.review-item:has(.question-record)){
 .result-page-v2 .review-item:has(.question-record) .review-summary-copy{min-width:0;overflow:visible}
 .result-page-v2 .review-item:has(.question-record) .review-summary-copy strong{display:block;white-space:normal;overflow:visible;text-overflow:clip;max-height:none;overflow-wrap:normal;word-break:normal}
}

/* Narrow record-bearing question/result context only; full original words, not a global font reset. */
@supports selector(.quiz-question:has(.question-record)){
 .quiz-question:has(.question-record),.result-page-v2 .review-item:has(.question-record){container-name:record-question-layout;container-type:inline-size}
 @container record-question-layout (max-width:300px){
  .quiz-question:has(.question-record) .question-heading{display:grid;grid-template-columns:minmax(0,1fr);gap:.55rem}
  .quiz-question:has(.question-record) .question-heading>div{min-width:0;width:100%}
  .quiz-question:has(.question-record) .question-number{justify-self:start}
  .egitir-v2.quiz-page-v2 .primary-quiz .quiz-question:has(.question-record) .question-heading h2{font-size:1.15rem;line-height:1.5;white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none}
  .result-page-v2 .review-item:has(.question-record)>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.55rem;padding:.7rem}
  .result-page-v2 .review-item:has(.question-record) .review-index{grid-column:1;grid-row:1;justify-self:start}
  .result-page-v2 .review-item:has(.question-record) .review-chevron{grid-column:2;grid-row:1;justify-self:end}
  .result-page-v2 .review-item:has(.question-record) .review-summary-copy{grid-column:1/-1;grid-row:2;min-width:0;width:100%;overflow:visible}
  .result-page-v2 .review-item:has(.question-record) .review-summary-copy strong{font-size:1rem;line-height:1.55;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:normal;word-break:normal;hyphens:none}
  .result-page-v2 .review-item:has(.question-record) .review-summary-copy small{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:normal;word-break:normal}
  .result-page-v2 .review-item:has(.question-record) .review-status{grid-column:1/-1;grid-row:3;justify-self:start;white-space:normal}
 }
}

/* Very narrow record-bearing cards: reclaim padding, do not shrink the pupil's text. */
@supports selector(.quiz-player:has(.question-record)){
 .primary-quiz .quiz-player:has(.question-record){container-name:record-player-layout;container-type:inline-size}
 @container record-player-layout (max-width:180px){
  .egitir-v2.quiz-page-v2 .primary-quiz .quiz-question:has(.question-record){padding:.4rem}
  .quiz-question:has(.question-record) .question-record{padding:.4rem}
  .primary-quiz .quiz-question:has(.question-record) .quiz-choice{grid-template-columns:minmax(0,1fr) 20px;gap:.5rem;padding:.6rem}
  .primary-quiz .quiz-question:has(.question-record) .choice-key{grid-column:1;grid-row:1;justify-self:start}
  .primary-quiz .quiz-question:has(.question-record) .choice-indicator{grid-column:2;grid-row:1;justify-self:end}
  .primary-quiz .quiz-question:has(.question-record) .choice-text{grid-column:1/-1;grid-row:2;min-width:0;overflow-wrap:normal;word-break:normal;hyphens:none}
 }
 @container record-question-layout (max-width:180px){
  .result-page-v2 .review-item:has(.question-record) .question-record{padding:.4rem}
 }
}

