/* IELTS Reading with evidence: highlighted proof in the passage, numbered paraphrase chips, explanation panels.
 * Square like the rest of IELTS. Highlights are a tinted background plus an underline or outline and a number,
 * so nothing relies on hue alone. Tokens fall back for pages without ielts-roadmap.css (the mock exam). */
body {
  --re-ink: var(--ir-ink, #15130f); --re-card: var(--ir-card, #fffdf8); --re-line: var(--ir-line, #c9bfac);
  --re-text: var(--ir-text, #2b2720); --re-muted: var(--ir-muted, #4f483d); --re-hi: var(--ir-hi, #eef04a);
  --re-done: var(--ir-done, #11643f); --re-done-soft: var(--ir-done-soft, #e3f1e8); --re-warn: var(--ir-exercise, #9a3412);
  --re-font: var(--ir-font, "Be Vietnam Pro", "Segoe UI", Arial, sans-serif);
  --re-c0: #3524d6; --re-c1: #11643f; --re-c2: #9a3412; --re-c3: #7a1f74;
}
/* Passage: evidence becomes visible only after checking. */
.re-passage .re-seg.re-ev { background: #fbf3b9; box-shadow: inset 0 -2px 0 #b9a400; cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.re-passage .re-seg.re-ev:hover { background: #f6eb8c; }
.re-passage .re-seg.re-active { background: var(--re-hi); box-shadow: inset 0 -3px 0 var(--re-ink); }
.re-passage .re-seg.re-pc { outline: 2px solid currentColor; outline-offset: 1px; font-weight: 600; }
.re-passage .re-seg.re-pc.re-c0 { color: var(--re-c0); } .re-passage .re-seg.re-pc.re-c1 { color: var(--re-c1); }
.re-passage .re-seg.re-pc.re-c2 { color: var(--re-c2); } .re-passage .re-seg.re-pc.re-c3 { color: var(--re-c3); }
.re-badge, .re-pn { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; margin: 0 4px 0 1px; vertical-align: 2px; background: var(--re-ink); color: #fff; font: 700 11px/1 var(--re-font); box-sizing: border-box; }
.re-badge[hidden] { display: none; }
.re-pn.re-c0 { background: var(--re-c0); } .re-pn.re-c1 { background: var(--re-c1); } .re-pn.re-c2 { background: var(--re-c2); } .re-pn.re-c3 { background: var(--re-c3); }

/* A passage shown again for review (Reading lab, mock results). */
.re-passage.re-boxed { padding: 20px 22px; background: #fbf8f1; border: 1px solid #c8c4b9; color: #222; font: 400 17px/1.85 Georgia, "Times New Roman", serif; }
.re-passage.re-boxed p { margin: 0 0 16px; overflow-wrap: anywhere; }
.re-passage.re-boxed strong { margin-right: 6px; font-family: var(--ir-font, "Segoe UI", Arial, sans-serif); }
@media (max-width: 560px) { .re-passage.re-boxed { padding: 16px 14px; font-size: 16.5px; } }

/* Chips: the same number and colour in the question, the passage and the pair list. */
.re-chip { display: inline; padding: 1px 4px; border: 2px solid currentColor; background: #fff; font-weight: 600; -webkit-box-decoration-break: clone; box-decoration-break: clone; overflow-wrap: anywhere; }
.re-chip.re-c0 { color: var(--re-c0); } .re-chip.re-c1 { color: var(--re-c1); } .re-chip.re-c2 { color: var(--re-c2); } .re-chip.re-c3 { color: var(--re-c3); }
.re-chip-n { display: inline-block; min-width: 1.4em; margin-right: 4px; color: #fff; text-align: center; font: 700 11px/1.6 var(--re-font); }
.re-chip.re-c0 .re-chip-n { background: var(--re-c0); } .re-chip.re-c1 .re-chip-n { background: var(--re-c1); }
.re-chip.re-c2 .re-chip-n { background: var(--re-c2); } .re-chip.re-c3 .re-chip-n { background: var(--re-c3); }

/* Panel under each question. */
.re-panel { margin: 14px 0 4px; padding: 16px 18px; border: 2px solid var(--re-ink); background: var(--re-card); color: var(--re-text); font: 400 15px/1.65 var(--re-font); min-width: 0; }
.re-panel p { margin: 0 0 8px; overflow-wrap: anywhere; }
.re-verdict { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: -16px -18px 14px !important; padding: 10px 18px; font-weight: 600; background: #fdebd8; color: #6b2a0b; }
.re-right .re-verdict { background: var(--re-done-soft); color: var(--re-done); }
.re-mark { font-size: 18px; }
.re-verdict b { font-weight: 700; }
.re-yours, .re-key { font-weight: 500; }
.re-h { margin: 14px 0 6px; color: var(--re-ink); font: 700 15px/1.45 var(--re-font); letter-spacing: normal; text-transform: none; }
.re-quote { margin: 0 0 8px; padding: 10px 14px; border-left: 4px solid #b9a400; background: #fdf8d8; font: 400 16px/1.75 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.re-jump { margin: 2px 0 6px; white-space: normal; }
.re-pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.re-pairs li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; line-height: 1.9; }
.re-arrow { font-weight: 700; color: var(--re-muted); }
.re-kind { color: var(--re-muted); font-size: 13px; }
.re-why, .re-missing, .re-chose { margin-top: 6px; }
.re-missing { padding: 8px 12px 2px; border: 1px dashed var(--re-muted); }
.re-chose { padding: 8px 12px 2px; background: #fdebd8; border-left: 4px solid var(--re-warn); }
.re-chose .re-h { color: #6b2a0b; }
.re-others { margin-top: 12px; border-top: 1px solid var(--re-line); padding-top: 10px; }
.re-others summary { cursor: pointer; font-weight: 700; color: var(--re-ink); }
.re-others ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.re-others li { padding: 8px 10px; border: 1px solid var(--re-line); background: #fff; }
.re-others li.re-picked { border: 2px solid var(--re-warn); }
.re-other-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.re-trap { display: inline-block; padding: 0 8px; background: var(--re-ink); color: #fff; font: 600 12px/1.8 var(--re-font); }
.re-prompt { font-weight: 500; }
.re-flash { animation: re-flash 1.2s ease-out; }
@keyframes re-flash { 0% { box-shadow: 0 0 0 4px var(--re-hi); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .re-flash { animation: none; } }

/* Floating way back from the passage to the question. */
.re-back { position: fixed; right: 16px; bottom: 16px; z-index: 40; max-width: calc(100vw - 32px); padding: 12px 16px; border: 2px solid var(--re-ink); background: var(--re-hi); color: var(--re-ink); font: 700 15px/1.3 var(--re-font); cursor: pointer; box-shadow: 4px 4px 0 var(--re-ink); }
.re-back[hidden] { display: none; }
.re-back:focus-visible, .re-jump:focus-visible { outline: 3px solid var(--re-c0); outline-offset: 2px; }
.re-note { margin: 10px 0 0; font: 500 14px/1.6 var(--re-font); color: var(--re-muted); }

/* Two columns where there is room: the passage scrolls on its own beside the questions. */
.re-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.re-layout > .re-passage { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; overscroll-behavior: contain; }
@media (max-width: 1000px) {
  .re-layout { grid-template-columns: minmax(0, 1fr); }
  .re-layout > .re-passage { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 560px) {
  .re-panel { padding: 14px 12px; }
  .re-verdict { margin: -14px -12px 12px !important; padding: 10px 12px; }
  .re-quote { padding: 8px 10px; font-size: 15.5px; }
  .re-back { left: 16px; right: 16px; bottom: 12px; text-align: center; }
}
