/*! VOCAB 5000® · © 2020–2026 E-Learning English Limited, registered in England and Wales no. 12031486. VOCAB 5000 is a registered trade mark of E-Learning English Limited, UK trade mark no. UK00004191491. All rights reserved. Licensed for use by the named institution only — not to be copied, adapted, re-uploaded or used for teaching elsewhere without written permission. Requests: info@e-learningenglish.com */
:root {
  --green: #6f8500;
  --green-dark: #4f5f00;
  --green-soft: #eef3d6;
  --tick: #1f9d3a;
  --ink: #1d2433;
  --muted: #555e6e;
  --bg: #f9fbff;
  --panel: #ffffff;
  --line: #dfe3d3;
  --warn-bg: #fff4e0;
  --warn-ink: #7a4b00;
  --focus: #1a5fd0;
  /* Company colours (v40): header, progress band, Submit. */
  --brand: #1a507a;
  --brand-dark: #124770;
  --brand-soft: #e4edf5;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.top { background-color: var(--brand-dark); color: #fff; padding: 18px 0 20px; }
.brand { margin: 0; font-size: 0.95rem; opacity: 0.9; }
.top h1 { margin: 2px 0 0; font-size: 1.7rem; font-weight: 700; }

/* Header and tracking band share one chevron pattern in the company blues
   (like the H5P summary banner). Fixed to the window so the two line up. */
.top, .points-bar {
  background-color: var(--brand-dark);
  background-image:
    linear-gradient(135deg, var(--brand) 25%, transparent 25%),
    linear-gradient(225deg, var(--brand) 25%, transparent 25%),
    linear-gradient(315deg, var(--brand) 25%, transparent 25%),
    linear-gradient(45deg, var(--brand) 25%, transparent 25%);
  background-size: 120px 120px;
  background-position: 60px 0, 60px 0, 0 0, 0 0;
  background-attachment: fixed;
}
.points-bar {
  position: sticky; top: 0; z-index: 20;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
/* Two progress cards with a ring chart each, like the H5P summary. */
.progress-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.pcard {
  background: #e6f0fa; border-radius: 12px; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.pcard p { margin: 0; }
.pcard-title { font-size: 0.85rem; font-weight: 700; }
.pcard-num { font-size: 1.6rem; font-weight: 700; line-height: 1.15; color: var(--brand-dark); }
.pcard-num span { font-weight: 700; }
.pcard-sub { font-size: 0.85rem; color: var(--muted); }
.ring { width: 60px; height: 60px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: #c9dcee; }
.ring-fg { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.6s ease; }
.points-bar.bump .pcard-num { animation: bump 0.4s ease; }
@keyframes bump { 50% { transform: scale(1.12); } }
@media (max-width: 560px) {
  .progress-cards { gap: 8px; padding-top: 6px; padding-bottom: 6px; }
  .pcard { padding: 6px 10px; gap: 6px; }
  .pcard-num { font-size: 1.2rem; }
  .pcard-sub { display: none; }
  .ring { width: 40px; height: 40px; }
}
.pts { color: var(--green-dark); font-weight: 500; white-space: nowrap; }


.notice {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--warn-bg);
  color: var(--warn-ink);
}


.exercise {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 20px 24px;
  margin: 24px 0;
}

.ex-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.exercise h2 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.step {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 1.05rem;
}
.ex-score { margin: 0; font-weight: 500; color: var(--green-dark); }
.how { margin: 8px 0 18px; color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.words {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 480px) { .words { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.word {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px 12px 12px;
  background: var(--green-soft);
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
}
.word.done { border-color: var(--tick); }
.word .tick { top: -12px; right: -12px; width: 40px; height: 40px; border-width: 3px; }
.word .tick::after { left: 11px; top: 5px; width: 9px; height: 18px; border-width: 0 4px 4px 0; }
.word-text { margin: 0; font-size: 1.3rem; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.word-btns { display: flex; flex-direction: column; gap: 8px; }
.word-btns .btn { width: 100%; padding: 6px 10px; }
.word .feedback { margin: 0; text-align: center; padding: 6px 8px; }
.word .type-box { margin: 0; }

.speaker-icon {
  width: 8px; height: 10px; background: currentColor; position: relative; margin-right: 8px;
}
.speaker-icon::after {
  content: ""; position: absolute; left: 4px; top: -5px;
  border-style: solid; border-width: 10px 10px 10px 0;
  border-color: transparent currentColor transparent transparent;
}

.part {
  margin: 32px 0 16px;
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-dark);
}

.write-box { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.write-box textarea {
  font: inherit; font-size: 1rem; line-height: 1.4;
  width: 100%; padding: 10px; resize: vertical;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
.write-box textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--green); }
.write-box textarea.ok { border-color: var(--tick); background: #f1faf3; }

.card-slot { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }

.card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 455 / 655;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 1200px;
  border-radius: 22px;
}
.card[disabled] { cursor: default; }
.card:focus-visible { outline: 4px solid var(--focus); outline-offset: 4px; }

.card-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}
.card.flipped .card-inner { transform: rotateY(180deg); }

.face {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.face.back { transform: rotateY(180deg); }

.tick {
  position: absolute; top: -10px; right: -10px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--tick);
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.tick::after {
  content: ""; position: absolute;
  left: 15px; top: 8px; width: 12px; height: 22px;
  border: solid #fff; border-width: 0 5px 5px 0;
  transform: rotate(45deg);
}
.tick:not([hidden]) { animation: pop 0.35s ease-out; }
@keyframes pop { from { transform: scale(0.3); } to { transform: scale(1); } }

.card-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card-listen { width: 100%; margin-top: 12px; }

.btn {
  font: inherit; font-size: 1rem; font-weight: 500;
  min-height: 48px; padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--green);
  background: var(--green); color: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn-quiet { background: #fff; color: var(--green-dark); }
.btn-quiet:hover { background: var(--green-soft); color: var(--green-dark); }
.card-controls .btn-mic { flex: 1 1 100%; }
.card-controls .btn-quiet { flex: 1 1 0; padding: 8px 10px; }
.btn-big { font-size: 1.15rem; min-height: 60px; padding: 10px 32px; }

.btn.listening { background: #c0392b; border-color: #c0392b; }
.btn.listening .mic-icon { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

.mic-icon {
  width: 14px; height: 20px; border-radius: 7px;
  background: currentColor; position: relative; margin-bottom: 6px;
}
.mic-icon::after {
  content: ""; position: absolute; left: -5px; right: -5px; top: 8px; height: 14px;
  border: 2.5px solid currentColor; border-top: 0; border-radius: 0 0 12px 12px;
}

.heard { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; min-height: 0; overflow-wrap: anywhere; }
.heard:empty, .feedback:empty { display: none; }
.feedback { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; font-weight: 500; }
.feedback.good { background: #e3f5e7; color: #13662a; }
.feedback.close { background: var(--warn-bg); color: var(--warn-ink); }
.feedback.retry { background: #fde8e6; color: #8d2318; }
.marked { display: block; margin-top: 8px; padding: 8px 10px; background: #fff; border-radius: 8px;
  color: var(--ink); font-size: 1.05rem; line-height: 1.7; }
.mk-wrong { color: #c0261a; font-weight: 700; text-decoration: underline wavy #c0261a; text-underline-offset: 3px; }
.mk-gap { color: #c0261a; font-weight: 700; font-size: 1.3em; line-height: 1; }
.marked-key { display: block; margin-top: 6px; font-size: 0.9rem; font-weight: 500; }

.type-box { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.type-box label { display: flex; flex-direction: column; gap: 4px; font-size: 0.95rem; }
.type-box input, .type-box textarea {
  font: inherit; padding: 10px; border: 2px solid var(--line); border-radius: 10px; width: 100%;
}

.para-controls { margin-top: 22px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.para-controls .type-box { width: 100%; max-width: 640px; text-align: left; }
.para-controls .feedback { max-width: 640px; }

.foot { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding-bottom: 40px; }
.link {
  font: inherit; font-size: 0.95rem; background: none; border: 0; padding: 8px 0;
  color: var(--green-dark); text-decoration: underline; cursor: pointer;
}
.privacy { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 520px) {
  body { font-size: 17px; }
  .exercise { padding: 16px 12px 20px; }
  .cards { gap: 12px; }
  .tick { width: 42px; height: 42px; top: -8px; right: -8px; }
  .tick::after { left: 11px; top: 5px; width: 10px; height: 19px; border-width: 0 4px 4px 0; }
}

@media (prefers-reduced-motion: reduce) {
  /* Unit 59 v11 (Peter): the cards always flip, on every device. */
  .tick:not([hidden]), .btn.listening .mic-icon, .points-bar.bump .pcard-num { animation: none; }
  .ring-fg { transition: none; }
}

.level-block + .level-block { margin-top: 48px; }
.level-banner {
  margin: 28px 0 0; padding: 12px 18px; border-radius: 14px;
  background: var(--green); color: #fff; font-size: 1.4rem; font-weight: 700;
}
/* Each level uses its cards' colour for buttons, word tiles and headings. */
.level-block[data-level="blue"] {
  --green: #1a507a; --green-dark: #123a59; --green-soft: #e5eef6; --line: #d2dde8;
}
.level-block[data-level="red"] {
  --green: #c1283f; --green-dark: #8f1b2e; --green-soft: #fbe8eb; --line: #eed3d8;
}
/* A listening (Stop) button must stand out from the level's own colour. */
.level-block[data-level="red"] .btn.listening { background: #1d2433; border-color: #1d2433; }

.sounds { display: flex; flex-wrap: wrap; gap: 6px; }
.snd {
  font: inherit; font-weight: 600; cursor: pointer; padding: 4px 10px; border-radius: 999px;
  border: 2px solid var(--line); background: #fff; color: var(--ink);
}
/* Unit 59 v15 (Peter): words heard have a green border, words missed a red one. */
.snd-ok { border-color: #2e8b3e; background: #eef8ef; color: #1d5e28; }
.snd-miss { border-color: #c0261a; background: #fde3df; color: #8a1a10; }
.snd:hover, .snd:focus-visible { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12); }

/* Practised (not recognised) still earns a tick: orange instead of green. */
.tick.practised { background: #e08a00; }
.partner-note {
  margin: 20px 0 0; padding: 16px 20px; border-radius: 16px;
  background: var(--panel); border: 2px solid var(--line);
}
.partner-note h2 { margin: 0 0 6px; font-size: 1.25rem; }
.partner-note p { margin: 6px 0 0; color: var(--muted); }
.tick-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.mini-tick {
  position: relative; display: inline-block; width: 24px; height: 24px; border-radius: 50%;
  background: var(--tick); flex: none;
}
.mini-tick::after {
  content: ""; position: absolute; left: 8px; top: 4px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.mini-tick.practised { background: #e08a00; margin-left: 10px; }

/* Submit (v39): a row at the top and bottom of the page, and a dialog. */
.submit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  margin: 20px 0 0; padding: 14px 18px; border-radius: 14px;
  background: #fff; border: 2px solid var(--brand);
}
.submit-row p { margin: 0; flex: 1 1 260px; }
.submit-bottom { margin: 40px 0 16px; }
.btn-submit, .modal-box .btn { background: var(--brand); border-color: var(--brand); color: #fff; }
.modal-box .btn:hover, .modal-box .btn:focus-visible { background: var(--brand-dark); border-color: var(--brand-dark); }
/* Submit my work turns green on hover (Peter). */
.btn-submit:not(:disabled):hover, .btn-submit:not(:disabled):focus-visible { background: #75b21f; border-color: #75b21f; }
/* Blocked until some work is done (Peter): a grey version of the same button. */
.btn-submit:disabled, .btn-submit:disabled:hover { background: #9aa3ad; border-color: #9aa3ad; color: #fff; cursor: not-allowed; opacity: 1; }
.submit-row p.submit-need { flex: 1 1 100%; margin: 0; text-align: right; font-size: 0.95rem; color: #4a5560; }
.modal-box .btn-quiet { background: #fff; color: var(--brand); }
.modal-box .btn-quiet:hover, .modal-box .btn-quiet:focus-visible { background: var(--brand-soft); color: var(--brand-dark); }
.btn-submit { gap: 10px; padding-left: 26px; padding-right: 26px; font-size: 1.1rem; }
.modal-open { overflow: hidden; }
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 26, 10, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 460px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); max-height: calc(100vh - 32px); overflow: auto;
}
.modal-box h2 { margin: 0 0 14px; font-size: 1.4rem; display: flex; align-items: center; gap: 10px; }
.submit-summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; }
.submit-summary dt { font-weight: 700; }
.submit-summary dd { margin: 0; }
.submit-warn {
  margin: 0 0 16px; padding: 10px 12px; border-radius: 10px;
  background: #fff4e0; color: #7a4a00;
}
.submit-msg { margin: 0 0 18px; line-height: 1.5; }
.modal-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.modal-btns .btn { flex: 1 1 140px; }
.foot .link { color: var(--brand); }

/* v42: company logo beside the title. */
.title-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.top-logo {
  width: 44px; height: 44px; flex: none; object-fit: contain;
  background: #fff; border-radius: 10px; padding: 4px;
}
.title-row h1 { margin: 0; }
@media (max-width: 560px) { .top-logo { width: 36px; height: 36px; } }

/* Speaking and Writing Partner boxes (Peter's wording) */
.partner-note .key-line { display: flex; align-items: center; gap: 8px; color: var(--ink, #1d2433); }
.partner-note .key-line .mini-tick.practised { margin-left: 0; }
.partner-note .key-end { color: var(--ink, #1d2433); }
.writing-note { margin: 0 0 16px; }
.writing-note h3 { margin: 0 0 6px; font-size: 1.15rem; }
.dot { display: inline-block; width: 20px; height: 20px; border-radius: 50%; flex: none; margin: 0 2px; }
.dot-good { background: radial-gradient(circle at 35% 35%, #b8f0c6, #2fa84f); }
.dot-retry { background: radial-gradient(circle at 35% 35%, #ffc59e, #e0602a); }
/* Writing Partner box: only in the first level (Peter) */
.level-block ~ .level-block .writing-note,
.level-block ~ .level-block .speaking-note { display: none; }
/* Unit 59 v17 (Peter): only the first colour has instructions; every title
   has more room above its activity. */
.level-block ~ .level-block .how { display: none; }
.ex-head { margin-bottom: 16px; }
.how { margin-top: 0; }
.speaking-note { margin: 12px 0 16px; }
.speaking-note h3 { margin: 0 0 6px; font-size: 1.15rem; }

/* v20 (Peter): more room for the activity. */
.wrap { max-width: 1240px; }

/* v20 (Peter): expand button in the top right corner, like the H5P one.
   Click to fill the screen, click again (or press Esc) to go back. */
.top { position: relative; }
.fs-btn {
  position: absolute; top: 12px; right: 12px; z-index: 30;
  width: 44px; height: 44px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.12); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.fs-btn[hidden] { display: none; }
.fs-btn:hover { background: #75b21f; border-color: #75b21f; }
.fs-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fs-btn .fs-close { display: none; }
.is-fullscreen .fs-btn .fs-open { display: none; }
.is-fullscreen .fs-btn .fs-close { display: block; }
html.is-fullscreen { overflow-y: auto; background: var(--bg); }

/* v21 (Peter): Listen cannot be pressed while the microphone is on. */
.btn-listen:disabled, .snd:disabled { opacity: 0.4; cursor: not-allowed; }

/* v22 (Peter): a passed word or card: Speak greyed out, and a small
   "Do it again" button to take the tick and points away and try again. */
.btn-mic.is-done, .btn-mic:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.6); }
.btn-redo {
  display: inline-flex; align-items: center; gap: 6px; margin: 10px auto 0;
  padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--muted, #5b6670);
  background: #fff; color: var(--ink, #1d2a33); font: inherit; font-size: 0.85rem; cursor: pointer;
}
.btn-redo[hidden] { display: none; }
.btn-redo:hover { background: #75b21f; border-color: #75b21f; color: #fff; }
.btn-redo:focus-visible { outline: 3px solid var(--brand, #1b4f7a); outline-offset: 2px; }
.word .btn-redo, .card-slot .btn-redo { align-self: center; }
.card-slot .btn-redo { display: flex; width: max-content; }
.card-slot .btn-redo[hidden] { display: none; }

/* v23 (Peter): Vocab Challenge card, and a gold score bar for a Vocab Champion. */
.progress-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) {
  .progress-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcard-quiz { grid-column: 1 / -1; }
}
.champion-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 2px !important;
  padding: 1px 10px; border-radius: 999px; background: #8a5a00; color: #fff;
  font-size: 0.8rem; font-weight: 700;
}
.champion-badge[hidden] { display: none; }
.points-bar.champion {
  --gold: #f5b82e; --gold-dark: #d99a12;
  background-color: var(--gold-dark);
  background-image:
    linear-gradient(135deg, var(--gold) 25%, transparent 25%),
    linear-gradient(225deg, var(--gold) 25%, transparent 25%),
    linear-gradient(315deg, var(--gold) 25%, transparent 25%),
    linear-gradient(45deg, var(--gold) 25%, transparent 25%);
}
.points-bar.champion .pcard { background: #fff8e1; }
.points-bar.champion .pcard-quiz { background: #fff1c2; box-shadow: 0 0 0 2px #8a5a00 inset; }
.points-bar.champion #ring-quiz { stroke: #b07800; }

/* v24: copyright line and the notice shown on other websites. */
.copyright { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.v5k-locked { max-width: 720px; margin: 60px auto; padding: 28px 32px; background: #fff; border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); font-family: "Lexend", system-ui, sans-serif; line-height: 1.6; color: #1d2a33; }
.v5k-locked h1 { font-size: 1.4rem; margin: 0 0 12px; }
.v5k-locked img { display: block; margin: 0 0 12px; }
.v5k-locked a { color: #0b6e8a; font-weight: 600; white-space: nowrap; }
.v5k-locked .v5k-small { font-size: 0.85rem; color: #55636d; margin-top: 18px; }

/* Trial (Unit 3 v2): the final round. Each "card" is all the cards of one colour, side by side. */
.level-block[data-level="final"] {
  --green: #4a3a8c; --green-dark: #33276a; --green-soft: #ece9f7; --line: #dcd7ee;
}
.level-block[data-level="final"] .cards { grid-template-columns: 1fr; gap: 28px; }
.level-block[data-level="final"] .card { aspect-ratio: var(--ratio, 1820 / 655); border-radius: 14px;
  width: min(100%, calc(var(--n, 4) * 25%)); margin: 0 auto; }
.final-label { margin: 0 0 6px; font-weight: 700; color: var(--green-dark); font-size: 1.1rem; }

/* v5 (Peter): a circle turns green with a tick when that part is all done. */
.ring-wrap { position: relative; display: inline-flex; flex: none; }
.ring-tick { display: none; position: absolute; left: 50%; top: 50%; width: 30%; height: 50%;
  border: solid var(--tick); border-width: 0 4px 4px 0; transform: translate(-50%, -65%) rotate(45deg); }
.pcard.full .ring-fg { stroke: var(--tick); }
.pcard.full .ring-tick { display: block; }
.pcard-done { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px;
  background: var(--tick); color: #fff; font-size: 0.75rem; }
@media (max-width: 560px) { .ring-tick { border-width: 0 3px 3px 0; } .pcard-done { display: none !important; } }

/* v5 (Peter): "Your ticks" at the end of the page. */
.tick-summary { margin: 28px 0 0; padding: 16px 18px; border-radius: 14px; background: #fff; border: 2px solid var(--brand); }
.tick-summary h2 { margin: 0 0 10px; font-size: 1.3rem; color: var(--brand-dark); }
.ts-rows { display: grid; gap: 10px; }
.ts-row { display: grid; grid-template-columns: 8em 1fr 1fr; gap: 4px 16px; align-items: center;
  padding: 8px 0; border-top: 1px solid var(--line); }
.ts-row p { margin: 0; }
.ts-name { font-weight: 700; }
.ts-row[data-level="green"] .ts-name { color: #4f5f00; }
.ts-row[data-level="blue"] .ts-name { color: #123a59; }
.ts-row[data-level="red"] .ts-name { color: #8f1b2e; }
.ts-row[data-level="final"] .ts-name { color: #33276a; }
.ts-part { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ts-label { font-size: 0.95rem; }
.ts-ticks { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ts-ticks .mini-tick { width: 20px; height: 20px; }
.ts-ticks .mini-tick::after { left: 6px; top: 3px; width: 5px; height: 9px; }
.ts-ticks .mini-tick.practised { margin-left: 0; }
.mini-tick.todo { background: transparent; box-shadow: inset 0 0 0 2px #c3c9d4; }
.mini-tick.todo::after { display: none; }
.ts-all, .ts-more { margin: 12px 0 0; }
@media (max-width: 560px) { .ts-row { grid-template-columns: 1fr; } }

/* v8 (Peter): a missing or wrong capital or punctuation mark in red. */
.mk-fix { color: #c0261a; font-weight: 700; text-decoration: none; background: #fde3df; border-radius: 3px; padding: 0 1px; }
.mk-extra { color: #c0261a; font-weight: 700; text-decoration: line-through 2px #c0261a; }

/* Unit 59 v5 (Peter): Listen and Hear yourself side by side under each card. */
.listen-row { display: flex; gap: 8px; margin-top: 12px; }
.listen-row .card-listen { margin-top: 0; flex: 1 1 0; min-width: 0; }
.listen-row .btn-hear[hidden] { display: none; }
.hear-icon { display: inline-block; width: 18px; height: 18px; flex: none;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.9V21h2v-3.1A7 7 0 0 0 19 11h-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.9V21h2v-3.1A7 7 0 0 0 19 11h-2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.listen-row .card-listen { padding-left: 6px; padding-right: 6px; gap: 6px; white-space: nowrap; font-size: 0.95em; }
.listen-row { flex-wrap: wrap; } .listen-row .card-listen { flex: 1 1 auto; width: auto; }

/* Unit 59 v9: the Submit box lights up when "Now submit your work" is pressed. */
.submit-bottom.flash { animation: submitFlash 1.3s ease-in-out 3; }
@keyframes submitFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 183, 49, 0); background: #fff; }
  50% { box-shadow: 0 0 0 6px rgba(245, 183, 49, 0.9); background: #fff8e1; }
}

/* Unit 59 v13 (Peter): Listen and Speak side by side; Play replays the Speak try. */
.listen-row .btn-mic { flex: 1 1 auto; margin: 0; min-width: 0; padding-left: 10px; padding-right: 10px; white-space: nowrap; }
.btn-play { gap: 8px; }
.btn-play[hidden] { display: none; }
.btn-play:disabled { opacity: 0.4; cursor: not-allowed; }
.play-icon { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; flex: none; }
.btn-play.playing .play-icon { width: 10px; height: 10px; border: 0; background: currentColor; border-radius: 2px; }
html.rec-on .btn-mic, html.tts-on .btn-mic { opacity: 0.4; pointer-events: none; }
/* Maria kit (Peter, 9 Nov): "No microphone? Type instead". */
.type-row { margin: -6px 0 12px; }
.type-toggle { background: none; border: 0; padding: 0; font: inherit; font-size: 0.95rem; font-weight: 600;
  color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.type-toggle:hover, .type-toggle:focus-visible { text-decoration-thickness: 2px; }
.type-toggle[hidden] { display: none; }
