/* IELTS Academic exam UI. Everything is scoped under .ielts-app. */
.ielts-app {
  --red: #d6083b;
  --blue: #3262a3;
  --bg: #fff;
  --fg: #2e2a2a;
  --soft: #f5f5f5;
  --line: #c9c6c6;
  --accent: #d6083b;
  --link: #3262a3;
  --hl: #ffd54a;
  --hl-fg: #000;
  --ok: #1b7a3d;
  --bad: #c4102f;
  --btn-bg: #2e2a2a;
  --btn-fg: #fff;
  height: 100dvh;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  position: relative;
}
.ielts-app[data-size="large"] { font-size: 19px; }
.ielts-app[data-size="xl"] { font-size: 23px; }
.ielts-app[data-contrast="wb"] {
  --bg: #000; --fg: #fff; --soft: #1c1c1c; --line: #777; --accent: #ff8fa8; --link: #8ec1ff;
  --ok: #6ee79b; --bad: #ff8fa0; --btn-bg: #fff; --btn-fg: #000;
}
.ielts-app[data-contrast="yb"] {
  --bg: #000; --fg: #ffe600; --soft: #1c1c1c; --line: #9a8a00; --accent: #ffe600; --link: #ffe600;
  --ok: #ffe600; --bad: #ffe600; --btn-bg: #ffe600; --btn-fg: #000;
}
.ielts-app *, .ielts-app *::before, .ielts-app *::after { box-sizing: border-box; }
:where(.ielts-app) button { font: inherit; color: inherit; cursor: pointer; }
.ielts-app button:disabled { opacity: 0.5; cursor: default; }
.ielts-app :focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.ielts-app .sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.ielts-app h1, .ielts-app h2, .ielts-app h3, .ielts-app h4 { letter-spacing: 0; }

/* Strip + header */
.ie-strip { flex: none; background: var(--blue); color: #fff; text-align: center; font-size: 0.75em; font-weight: 700; letter-spacing: 0.08em; padding: 4px 10px; }
.ielts-app[data-contrast="yb"] .ie-strip, .ielts-app[data-contrast="wb"] .ie-strip { background: #222; border-bottom: 1px solid var(--line); }
.ie-header {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 8px 20px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.ie-id { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex-wrap: wrap; }
.ie-logo { font-size: 1.25em; color: var(--accent); font-weight: 800; white-space: nowrap; }
.ie-logo span { color: var(--fg); font-weight: 600; }
.ie-name { font-size: 0.9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-timebox { text-align: center; line-height: 1.2; }
.ie-timebox small { display: block; font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; }
.ie-time { font-size: 1.5em; font-weight: 700; font-variant-numeric: tabular-nums; }
.ie-time.is-low { color: var(--bad); }
.ie-save { display: block; font-size: 0.7em; opacity: 0.8; min-height: 1em; }
.ie-save.is-error { color: var(--bad); font-weight: 700; opacity: 1; }
.ie-tools { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap; }
.ie-toolbtn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid transparent; border-radius: 4px; padding: 6px 10px; font-size: 0.85em; }
.ie-toolbtn svg, .ie-helpbtn svg { width: 1.3em; height: 1.3em; }
.ie-toolbtn:hover, .ie-toolbtn[aria-pressed="true"] { background: var(--soft); border-color: var(--line); }
.ie-modswitch select { width: auto; font: inherit; font-size: 0.85em; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; }
.ie-iconbtn { background: none; border: 0; padding: 6px; display: inline-flex; }
.ie-iconbtn svg { width: 1.4em; height: 1.4em; }

/* Main area */
.ie-main { flex: 1; min-height: 0; display: flex; }
.ie-partwrap { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.ie-banner { flex: none; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; background: var(--soft); border-bottom: 1px solid var(--line); padding: 10px 20px; }
.ie-banner p { margin: 2px 0 0; }
.ie-helpbtn { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; font-size: 0.85em; }
.ie-help { flex: none; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px; font-size: 0.9em; }
.ie-help p { margin: 4px 0; }
.ie-split { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--pane, 50%) 18px minmax(0, 1fr); }
.ie-pane { overflow-y: auto; min-width: 0; padding: 20px 24px 40px; }
.ie-left { grid-column: 1; }
.ie-rightwrap { position: relative; min-width: 0; min-height: 0; display: flex; }
.ie-rightwrap .ie-right { flex: 1; padding-bottom: 90px; }
.ie-divider { cursor: col-resize; background: var(--soft); border-left: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: center; user-select: none; touch-action: none; font-size: 0.8em; }
.ie-divider span { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 0; width: 100%; text-align: center; }
body.ie-resizing { cursor: col-resize; user-select: none; }
.ie-arrows { position: absolute; right: 22px; bottom: 14px; display: flex; gap: 8px; z-index: 2; }
.ie-arrows button { width: 44px; height: 44px; border: 0; border-radius: 4px; display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-fg); }
.ie-arrows button:first-child { background: var(--soft); color: var(--fg); border: 1px solid var(--line); }
.ie-arrows svg { width: 22px; height: 22px; }

/* Passage */
.ie-passage { max-width: 46em; }
.ie-ptitle { font-size: 1.5em; margin: 0 0 0.6em; }
.ie-subtitle { font-weight: 700; }
.ie-intro { font-style: italic; }
.ie-img { max-width: 100%; height: auto; display: block; margin: 12px 0; border: 1px solid var(--line); background: #fff; }
.ie-para { display: flex; gap: 10px; margin: 0 0 1em; }
.ie-plabel { flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--bg); font-size: 0.85em; margin-top: 0.15em; }
.ie-ptext { margin: 0; flex: 1; }
.ie-task p { margin: 0 0 0.8em; }
.ie-hl { background: var(--hl); color: var(--hl-fg); cursor: pointer; }
.ie-hzones { margin: 0 0 6px 2.5em; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Question groups */
.ie-group { margin: 0 0 2em; max-width: 44em; }
.ie-gtitle { font-size: 1.1em; margin: 0 0 4px; }
.ie-gsub { margin: 4px 0; }
.ie-instr p { margin: 0 0 4px; }
.ie-q { margin: 14px 0; padding: 8px 10px; border-left: 4px solid transparent; border-radius: 3px; }
.ie-q.is-ok, .ie-gapwrap.is-ok { border-color: var(--ok); }
.ie-q.is-bad, .ie-gapwrap.is-bad { border-color: var(--bad); }
.ie-qhead { display: flex; gap: 10px; align-items: flex-start; }
.ie-num { flex: none; min-width: 2em; text-align: center; border: 2px solid transparent; border-radius: 4px; padding: 0 6px; }
/* Only the current question's number is boxed, in blue, as in the official test. */
.ie-q.is-cur .ie-num { border-color: #3d7bd9; }
.ielts-app[data-contrast="yb"] .ie-q.is-cur .ie-num, .ielts-app[data-contrast="wb"] .ie-q.is-cur .ie-num { border-color: var(--fg); }
.ie-qtext { flex: 1; }
.ie-limit { display: block; opacity: 0.75; font-size: 0.8em; }
.ie-opts { margin: 8px 0 0 2.6em; display: flex; flex-direction: column; gap: 4px; }
.ie-opt { display: flex; gap: 8px; align-items: flex-start; padding: 5px 8px; border-radius: 4px; cursor: pointer; border: 1px solid transparent; }
.ie-opt:hover { background: var(--soft); }
.ie-opt.is-on { border-color: var(--line); background: var(--soft); }
.ie-opt input { margin-top: 0.35em; accent-color: var(--accent); }
.ie-key { font-weight: 700; flex: none; }
.ie-mark { font-weight: 700; margin-left: 6px; }
.ie-mark.is-ok { color: var(--ok); }
.ie-mark.is-bad { color: var(--bad); }
.ie-note { font-size: 0.9em; opacity: 0.8; }

/* Drag and drop */
.ie-bank { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 12px 0; background: var(--soft); }
.ie-bank h4 { margin: 0 0 8px; }
.ie-chips { display: flex; flex-direction: column; gap: 6px; }
.ie-chip { display: flex; gap: 8px; padding: 6px 10px; border: 1px solid var(--fg); border-radius: 4px; background: var(--bg); cursor: grab; }
.ie-chip.is-static { cursor: default; border-color: var(--line); }
.ie-chip.is-picked, .ie-zone.is-picked { outline: 3px solid var(--link); background: var(--soft); }
.ie-chip.is-dragging, .ie-zone.is-dragging { opacity: 0.45; }
.ie-zone { display: inline-flex; align-items: center; gap: 8px; min-width: 11em; max-width: 100%; min-height: 2.4em; padding: 4px 10px; border: 2px dashed var(--fg); border-radius: 4px; background: var(--bg); }
.ie-zone em { opacity: 0.6; font-style: normal; font-weight: 700; margin: 0 auto; }
.ie-zone.is-filled { border-style: solid; cursor: grab; }
.ie-zone.is-over, .ie-bank.is-over { background: var(--soft); border-color: var(--accent); }
.ie-zone.is-ok { border-color: var(--ok); }
.ie-zone.is-bad { border-color: var(--bad); }
.ie-zone-x { margin-left: auto; background: none; border: 0; padding: 0 4px; font-size: 0.85em; }
.ie-inline { min-width: 6em; padding: 0 8px; min-height: 1.9em; vertical-align: middle; }
.ie-empty { margin: 0; font-size: 0.85em; opacity: 0.8; }
.ielts-app.is-picking .ie-zone:not(.is-filled) { background: var(--soft); }

/* Completion */
.ie-completion { margin: 12px 0; }
.ie-ctitle { margin: 12px 0 6px; }
.ie-cl { margin: 0 0 8px; padding-left: 1.4em; }
.ie-cl li { margin: 6px 0; }
.ie-cp { margin: 6px 0; }
.ie-gapwrap { display: inline-block; border-left: 3px solid transparent; padding-left: 2px; }
.ie-gap { font: inherit; width: 8.5em; max-width: 100%; padding: 2px 8px; border: 2px solid var(--fg); border-radius: 4px; background: var(--bg); color: var(--fg); }
.ie-gap::placeholder { color: var(--fg); opacity: 0.55; text-align: center; font-weight: 700; }
.ie-tablewrap { overflow-x: auto; margin: 10px 0; }
.ie-table { border-collapse: collapse; width: 100%; }
.ie-table th, .ie-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.ie-table th { background: var(--soft); }

/* Review blocks */
.ie-review { margin: 14px 0 0; border-top: 1px solid var(--line); }
.ie-rv { display: flex; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; font-size: 0.92em; }
.ie-rv.is-ok { border-left-color: var(--ok); }
.ie-rv.is-bad { border-left-color: var(--bad); }
.ie-rv > b { flex: none; min-width: 2.2em; }
.ie-expl { margin: 4px 0 0; }
.ie-evid { margin: 4px 0 0; padding-left: 10px; border-left: 3px solid var(--line); font-style: italic; }

/* Writing */
.ie-write { display: flex; flex-direction: column; gap: 6px; min-height: 100%; }
.ie-essay { width: 100%; min-height: 55vh; flex: 1; resize: vertical; font: inherit; line-height: 1.6; padding: 12px; border: 1px solid var(--fg); border-radius: 4px; background: var(--bg); color: var(--fg); }
.ie-wc { text-align: right; font-size: 0.9em; }
.ie-wc small { margin-left: 12px; opacity: 0.7; }
.ie-wreview { margin-top: 12px; }
.ie-await { font-weight: 700; color: var(--accent); }
.ie-sample { border: 1px solid var(--line); border-radius: 6px; padding: 4px 16px 12px; background: var(--soft); }

/* Notes panel */
.ie-notes { flex: none; width: 320px; border-left: 1px solid var(--line); background: var(--bg); overflow-y: auto; padding: 0 16px 24px; }
.ie-notes header { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--bg); padding: 12px 0 4px; }
.ie-notes h2 { margin: 0; font-size: 1.1em; }
.ie-notes h3 { font-size: 0.95em; margin: 14px 0 6px; color: var(--accent); }
.ie-note-item { border: 1px solid var(--line); border-radius: 6px; padding: 8px; margin-bottom: 8px; }
.ie-quote { font-style: italic; margin: 0 0 6px; font-size: 0.9em; }
.ie-note-item textarea { width: 100%; min-height: 4.5em; font: inherit; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--fg); }
.ie-textbtn { background: none; border: 0; color: var(--link); text-decoration: underline; padding: 4px 2px; }
.ie-toolbar { position: fixed; z-index: 30; display: flex; gap: 2px; background: #2e2a2a; border-radius: 6px; padding: 4px; box-shadow: 0 3px 12px #0005; }
.ie-toolbar[hidden] { display: none; }
.ie-toolbar button { background: none; border: 0; color: #fff; padding: 6px 10px; border-radius: 4px; font-size: 0.85em; white-space: nowrap; }
.ie-toolbar button:hover { background: #fff3; }

/* Navigator */
/* Bottom navigator, as in the official test: Parts share the width, collapsed
   Parts read "Part 2  0 of 13", and the open Part has a thin segmented bar on
   the top edge (one segment per item, darker when answered). */
.ie-nav { flex: none; display: flex; align-items: stretch; border-top: 1px solid var(--line); background: var(--bg); min-height: 60px; --cur: #3d7bd9; --seg: #d9d9d9; }
.ielts-app[data-contrast="yb"] .ie-nav, .ielts-app[data-contrast="wb"] .ie-nav { --cur: var(--fg); --seg: #555; }
.ie-parts { flex: 1; display: flex; align-items: stretch; min-width: 0; overflow-x: auto; }
.ie-part { flex: 1 1 0; min-width: max-content; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 16px; border: 0; background: none; color: var(--fg); text-align: left; }
button.ie-part:hover .ie-pname { text-decoration: underline; }
.ie-pname { white-space: nowrap; }
.ie-count { white-space: nowrap; opacity: 0.6; }
.ie-part.is-current { flex: 0 1 auto; align-items: stretch; gap: 0; padding: 0 12px; }
.ie-part.is-current > .ie-pname { position: relative; display: flex; align-items: center; font-weight: 700; padding: 0 22px 0 8px; }
.ie-part.is-done .ie-pname { font-weight: 400; }
.ie-tick { color: var(--ok); }
.ie-nums { display: flex; align-items: stretch; gap: 0; }
.ie-num-btn { position: relative; display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 0; background: none; color: var(--fg); font-size: 1em; }
.ie-num-label { display: block; min-width: 1.7em; padding: 2px 4px; border: 2px solid transparent; border-radius: 5px; text-align: center; line-height: 1.3; }
.ie-num-btn.is-cur .ie-num-label { border-color: var(--cur); font-weight: 700; }
.ie-num-btn:hover .ie-num-label { text-decoration: underline; }
/* The segments on the top edge. */
.ie-part.is-current > .ie-pname::before, .ie-num-btn::before { content: ""; position: absolute; top: -1px; left: 2px; right: 2px; height: 4px; background: var(--seg); }
.ie-part.is-current > .ie-pname::before { left: 0; }
.ie-num-btn.is-answered::before { background: var(--blue); }
.ielts-app[data-contrast="yb"] .ie-num-btn.is-answered::before, .ielts-app[data-contrast="wb"] .ie-num-btn.is-answered::before { background: var(--fg); }
.ie-num-btn.is-ok::before { background: var(--ok); }
.ie-num-btn.is-bad::before { background: var(--bad); }
.ie-reviewbtn { flex: none; width: 96px; border: 0; border-left: 1px solid var(--line); background: #ececec; color: var(--fg); display: grid; place-items: center; }
.ie-reviewbtn:hover, .ie-reviewbtn.is-current { background: #dedede; }
.ielts-app[data-contrast="yb"] .ie-reviewbtn, .ielts-app[data-contrast="wb"] .ie-reviewbtn { background: var(--soft); }
.ie-reviewbtn svg { width: 26px; height: 26px; }

/* Pages */
.ie-reviewpage, .ie-complete, .ie-breakpage { flex: 1; overflow-y: auto; padding: 32px 24px; max-width: 760px; margin: 0 auto; width: 100%; }
.ie-reviewtable { width: 100%; border-collapse: collapse; margin: 16px 0; }
:where(.ielts-app) table { font-size: inherit; width: 100%; }
:where(.ielts-app) th, :where(.ielts-app) td { text-transform: none; letter-spacing: 0; font-size: inherit; color: inherit; background: none; white-space: normal; padding: 6px 10px; }
.ie-reviewtable th, .ie-reviewtable td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 6px; vertical-align: middle; }
:where(.ielts-app) small { font-size: 0.8em; text-transform: none; letter-spacing: 0; color: inherit; }
.ie-reviewtable th small, .ie-reviewtable td small { display: block; font-weight: 400; opacity: 0.75; }
.ie-reviewfoot { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.ie-primary, .ie-secondary { border-radius: 4px; padding: 10px 22px; border: 2px solid var(--btn-bg); font-weight: 700; }
.ie-primary { background: var(--btn-bg); color: var(--btn-fg); }
.ie-secondary { background: var(--bg); color: var(--fg); border-color: var(--fg); }
.ie-modchips { display: flex; gap: 8px; flex-wrap: wrap; }
.ie-chipbtn { display: flex; gap: 10px; border: 1px solid var(--line); background: var(--bg); border-radius: 4px; padding: 6px 12px; }
.ie-chipbtn.is-current { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.ie-complete { text-align: center; }
.ie-complete h2 { font-size: 1.9em; font-weight: 500; }
.ie-completecard { max-width: 440px; margin: 0 auto; padding: 24px 32px 30px; border: 1px solid var(--line); border-radius: 12px; }
.ie-completecard svg { width: 200px; height: 150px; }
.ie-scoretable { margin: 12px auto 20px; border-collapse: collapse; min-width: 260px; }
.ie-scoretable caption { font-weight: 700; padding-bottom: 6px; }
.ie-scoretable th, .ie-scoretable td { padding: 6px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.ie-scoretable .is-total { font-weight: 700; }
.ie-completecard .ie-textbtn { display: block; margin: 14px auto 0; }
.ie-breakpage { text-align: center; }
.ie-bsym svg { width: 56px; height: 56px; color: var(--accent); }
.ie-break-count { font-size: 2.4em; font-weight: 700; font-variant-numeric: tabular-nums; }
.ie-break-count.is-over { font-size: 1.1em; }

/* Options page */
.ie-optionspage { position: absolute; inset: 0; z-index: 20; background: var(--bg); overflow-y: auto; }
.ie-optionspage header { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.ie-optionspage h2 { margin: 0; }
.ie-optionsbody { max-width: 640px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.ie-optionsbody h3 { margin: 0 0 8px; }
.ie-redrow { background: var(--red); color: #fff; border: 0; border-radius: 4px; padding: 14px 16px; text-align: left; font-weight: 700; }
.ielts-app[data-contrast="yb"] .ie-redrow { background: var(--fg); color: #000; }
.ielts-app[data-contrast="wb"] .ie-redrow { background: #ff8fa8; color: #000; }
.ie-row { display: block; width: 100%; text-align: left; background: var(--soft); border: 1px solid var(--line); border-radius: 4px; padding: 12px 16px; margin-bottom: 8px; }
.ie-radios { display: flex; flex-direction: column; gap: 6px; }
.ie-radio { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.ie-radio.is-on { border: 2px solid var(--accent); }
.ie-radio input { accent-color: var(--accent); }

/* Dialog */
.ie-dialog { background: var(--bg); color: var(--fg); border: 2px solid var(--fg); border-radius: 8px; padding: 0; max-width: 480px; width: calc(100% - 32px); }
.ie-dialog::backdrop { background: #0007; }
.ie-dialog header { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.ie-dialog h2 { margin: 0; font-size: 1.15em; }
.ie-dialogbody { padding: 12px 18px; }
.ie-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); }

@media (max-width: 800px) {
  .ie-header { grid-template-columns: 1fr auto; padding: 6px 10px; }
  .ie-tools { grid-column: 1 / -1; justify-content: flex-start; }
  .ie-toolbtn span { display: none; }
  .ie-split { display: flex; flex-direction: column; }
  .ie-pane { padding: 12px 14px 30px; }
  .ie-left { flex: 1 1 40%; min-height: 0; border-bottom: 1px solid var(--line); }
  .ie-rightwrap { flex: 1 1 60%; }
  .ie-divider { display: none; }
  .ie-notes { position: absolute; right: 0; top: 0; bottom: 0; z-index: 10; width: min(320px, 90%); box-shadow: -4px 0 12px #0003; }
  .ie-opts { margin-left: 0; }
  .ie-banner { padding: 8px 12px; }
  .ie-nav { min-height: 52px; }
  .ie-part { padding: 0 10px; flex: none; }
  .ie-part.is-current { max-width: 80vw; }
  .ie-nums { flex-wrap: nowrap; overflow-x: auto; }
  .ie-num-btn { flex: none; }
}

/* Report button, Listening header controls, audio overlay and notices */
.ie-reportbtn { opacity: 0.85; }
.ie-audio { display: inline-flex; align-items: center; gap: 12px; margin-right: 6px; font-size: 0.85em; }
.ie-audio-status { font-weight: 700; white-space: nowrap; }
.ie-audio-status[data-state="playing"]::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 6px; border-radius: 50%; background: var(--ok); }
.ie-audio-status[data-state="ended"], .ie-audio-status[data-state="error"] { color: var(--bad); }
.ie-volume { display: inline-flex; align-items: center; gap: 6px; }
.ie-volume input { width: 96px; accent-color: var(--accent); }
.ie-notice-slot:empty { display: none; }
.ie-audio-notice { flex: none; padding: 10px 20px; background: var(--soft); border-bottom: 1px solid var(--line); border-left: 6px solid var(--accent); font-weight: 700; }
.ie-audio-notice.is-error { color: var(--bad); }
.ie-audio-overlay { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: #000a; }
.ie-audio-card { background: var(--bg); color: var(--fg); border: 2px solid var(--fg); border-radius: 8px; padding: 24px 32px; text-align: center; max-width: 90%; }
.ie-audio-card p { margin: 0 0 14px; }
.ie-review-audio { padding: 8px 20px; border-bottom: 1px solid var(--line); background: var(--soft); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.ie-review-audio figure { margin: 0; display: flex; align-items: center; gap: 10px; }
.ie-review-audio audio { max-width: 100%; }
.ie-audio-slot:empty { display: none; }

/* Listening: no passage, questions use the full width */
.ie-listen-body { flex: 1; min-height: 0; display: flex; }
.ie-listen-body .ie-rightwrap { flex: 1; }
.ie-listen-pane .ie-group { max-width: 54em; margin-left: auto; margin-right: auto; }
.ie-gimg { max-height: 70vh; width: auto; }

/* Writing marks shown to the student and in review */
.ie-marks { border: 1px solid var(--line); border-radius: 6px; padding: 4px 16px 12px; margin: 10px 0; background: var(--soft); }
.ie-marktable { border-collapse: collapse; margin: 6px 0; }
.ie-marktable th, .ie-marktable td { text-align: left; border-bottom: 1px solid var(--line); padding: 5px 12px 5px 0; }
.ie-mcomment { white-space: pre-wrap; margin: 4px 0 8px; }
.ie-wband { margin: 8px 0 0; }

@media (max-width: 800px) {
  .ie-audio { flex-wrap: wrap; }
  .ie-volume span { display: none; }
}
