/* REVISE. Reading Colours. Optional student-selected backgrounds on text-oriented reading surfaces only.
   The standard brand palette, illustrations, photographs, diagrams, feedback states and main actions remain distinct. */
.reading-colours-menu{position:relative;flex:0 0 auto;z-index:50;font-size:13px}
.reading-colours-menu>summary{display:flex;align-items:center;gap:6px;justify-content:center;min-height:37px;padding:8px 10px;border:1px solid #d5dedb;border-radius:999px;background:#fff;color:#253b40;cursor:pointer;font-weight:740;list-style:none;white-space:nowrap;line-height:1.1}
.reading-colours-menu>summary::-webkit-details-marker{display:none}
.reading-colours-menu>summary:hover,.reading-colours-menu[open]>summary{background:#e6f5ee;border-color:#a6d5c4}
.reading-colours-menu>summary:focus-visible,.reading-colour-option:focus-within,.reading-custom-picker:focus-visible,.reading-reset:focus-visible{outline:3px solid #176f6a;outline-offset:3px}
.reading-colours-panel{position:absolute;right:0;top:calc(100% + 10px);width:min(330px,calc(100vw - 24px));max-height:min(76vh,660px);overflow:auto;padding:17px;border:1px solid #d9e1dc;border-radius:17px;background:#fff;color:#1c292f;box-shadow:0 16px 43px #12242e29;text-align:left}
.reading-colours-heading{font-weight:850;margin:0 0 6px;font-size:16px;color:#172e31}
.reading-colours-description{font-size:12px;line-height:1.55;margin:0 0 14px;color:#465e63}
.reading-colours-panel fieldset{border:0;margin:0;padding:0;min-width:0}
.reading-colours-panel legend{font-size:12px;font-weight:800;color:#365058;margin-bottom:10px}
.reading-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.reading-colour-option{border:1px solid #dce4e0;border-radius:10px;padding:9px;display:flex;align-items:center;gap:7px;cursor:pointer;font-size:12px;color:#23383f;background:#fafcfb;min-width:0}
.reading-colour-option:has(input:checked){border-color:#197d74;background:#f1fbf8;box-shadow:inset 0 0 0 1px #197d74}
.reading-colour-option input{margin:0;accent-color:#176d63;width:15px;height:15px;flex:none}
.reading-colour-swatch{border-radius:50%;width:18px;height:18px;display:inline-block;flex:none;box-shadow:inset 0 0 0 1px #19252c29}
.reading-custom-row{border-top:1px solid #e6ece9;margin-top:13px;padding-top:12px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#293b42;font-size:12px;font-weight:760}
.reading-custom-picker{height:38px;width:60px;border:1px solid #abbab5;background:#fff;border-radius:8px;cursor:pointer;padding:3px}
.reading-reset{border:1px solid #263339;border-radius:999px;background:#fff;color:#202e34;padding:9px 13px;font-size:12px;font-weight:780;cursor:pointer;margin-top:13px;width:100%}
.reading-reset:hover{background:#edf6f3}
.reading-colours-note{font-size:11px;line-height:1.4;color:#52656b;margin:10px 0 0}
@media(max-width:1020px){.reading-colours-menu{order:0}.reading-colours-menu>summary{min-height:36px;padding:8px 10px}}
@media(max-width:620px){.header-subject{display:none}.header-actions{gap:7px}}
@media(max-width:370px){.reading-colours-menu>summary{padding:7px 8px;font-size:12px}.menu-toggle{padding:8px 9px!important;font-size:12px!important}.header-wordmark{font-size:26px!important}.header-actions{gap:5px}}
@media print{.reading-colours-menu{display:none!important}html.reading-colours-active{--reading-surface:#FFFFFF!important;--reading-ink:#101820!important;--reading-accent:#075C55!important;--reading-field:#FFFFFF!important;--reading-field-ink:#101820!important}}
/* These are real reading surfaces: no blanket filters or overlays are applied. */
html.reading-colours-active :is(
  .learn-landing-hero,.learn-strand-hero,.learn-lesson-head,.learn-content-section,
  .learn-process-step,.learn-case-study,.learn-comparison>div,.learn-model-answer,
  .learn-topic-card,.learn-lesson-card,.learn-aside-card,.learn-writing-scaffold,
  .photo-exam-paper,.photo-feedback,.photo-guidance-list li,.photo-model-answer,
  .photo-question-card,.photo-lab-guide,.photo-lab-intro,
  .card,.panel,.question-card,.topic-row,.read-box,.result-card,
  .body-copy,.review-list,.info-panel,.quiz-card
){background-color:var(--reading-surface)!important;color:var(--reading-ink)!important}
/* Explicit text contrast on existing dark-hardcoded teaching text; do not override answer feedback, status badges or controls. */
html.reading-colours-active :is(
 .learn-landing-hero,.learn-strand-hero,.learn-lesson-head,.learn-content-section,
 .learn-process-step,.learn-case-study,.learn-comparison>div,.learn-model-answer,
 .learn-topic-card,.learn-lesson-card,.learn-aside-card,.learn-writing-scaffold,
 .photo-exam-paper,.photo-feedback,.photo-guidance-list li,.photo-model-answer,
 .photo-question-card,.photo-lab-guide,.photo-lab-intro,.card,.panel,.question-card,.topic-row,.read-box,.result-card
) :is(h1,h2,h3,h4,p,li,small,strong,span,figcaption,label):not(:is(.learn-option,.answer-option,.learn-feedback,.feedback,.callout,.pill,.badge,.btn,.studio-button,.photo-image-fallback,.photo-misconception,.learn-diagram,.learn-hero-graphic,.learn-lesson-mark,.photo-frame,.paper-q-numeral,.learn-letter,.photo-exam-image,.learn-option *,.answer-option *,.learn-feedback *,.feedback *,.callout *,.pill *,.badge *,.btn *,.studio-button *,.photo-image-fallback *,.photo-misconception *,.learn-diagram *,.learn-hero-graphic *,.learn-lesson-mark *,.photo-frame *,.paper-q-numeral *,.learn-letter *, .photo-exam-image *)){
 color:var(--reading-ink)!important;
}
html.reading-colours-active :is(.learn-intro-small,.learn-auto-save,.learn-progress-note,.learn-exam-question,.learn-metrics span){color:var(--reading-ink)!important}
html.reading-colours-active :is(.learn-content-section,.learn-process-step,.learn-topic-card,.learn-lesson-card,.learn-case-study,.learn-model-answer,.photo-exam-paper,.photo-feedback,.card,.panel,.question-card){border-color:var(--reading-border)!important;}
html.reading-colours-active :is(.learn-content-section,.learn-strand-hero,.learn-lesson-head,.learn-topic-card,.learn-lesson-card,.photo-exam-paper,.photo-feedback,.card,.panel,.question-card) :is(a:not(.btn):not(.studio-button),.learn-kicker){color:var(--reading-accent)!important}
html.reading-colours-active :is(.learn-draft,.photo-answer-text,.textarea,.text-input){background:var(--reading-field)!important;color:var(--reading-field-ink)!important}
html.reading-colours-active :is(.learn-draft,.photo-answer-text,.textarea,.text-input)::placeholder{color:var(--reading-field-ink);opacity:.7}
/* Exam-paper figures retain their original appearance, and correctness/warning colour remains meaningful. */
html.reading-colours-active :is(.photo-frame,.learn-diagram,.learn-hero-graphic,.revise-hero-art,.exam-visual,.quiz-image,.diagram,.photo-lightbox){background-color:initial}
html.reading-colours-active :is(.learn-feedback,.feedback,.callout,.photo-misconception,.photo-image-fallback,.learn-option,.answer-option,.btn,.studio-button,.pill,.badge){--reading-surface:initial}
/* Activity-specific sharing, native Classroom URL flow; no student data in the URL. */
.classroom-share-row{display:flex;justify-content:flex-end;margin:0 1px 8px}
.classroom-share-link{font-size:11px;font-weight:720;color:#335f5b;text-decoration:underline;text-decoration-color:#86b8ab;text-underline-offset:3px;border-radius:6px;padding:6px 8px;white-space:nowrap}
.classroom-share-link:hover{color:#115f58;background:#ecf5f1}
.classroom-share-link:focus-visible{outline:3px solid #176f6a;outline-offset:2px}
@media print{.classroom-share-row{display:none!important}}
/* On small screens the selector is anchored to the viewport, never clipped by its header column. */
@media(max-width:620px){.reading-colours-panel{position:fixed;top:66px;right:0;left:auto;width:min(330px,calc(100vw - 44px));max-height:calc(100dvh - 78px)}}
/* The exam task inset must not retain a pale-green fill under white custom-colour text. */
html.reading-colours-active .photo-question-task{background:var(--reading-surface)!important;color:var(--reading-ink)!important;outline:1px solid var(--reading-border);outline-offset:0}
html.reading-colours-active .photo-question-task :is(p,strong){color:var(--reading-ink)!important}

/* Small semantic labels keep sufficient contrast instead of inheriting pale text on pale chips. */
html.reading-colours-active .learn-section-label span{color:#164C47!important;background:#E7F4F0!important}
html.reading-colours-active .learn-exam-header>span{color:#07564E!important;background:#E7F4F0!important}
html.reading-colours-active .learn-lesson-head-meta>span{color:var(--reading-ink)!important;background:var(--reading-surface)!important;border-color:var(--reading-border)!important}
html.reading-colours-active .paper-q-numeral{color:#171C22!important;background:#FFFFFF!important}
