.ielts-reading-source-status {
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.ielts-smart-answer-pilot .passage-shell {
  width: min(1760px, 100%) !important;
  max-width: none !important;
}

body.ielts-smart-answer-pilot .main {
  padding-left: 24px;
  padding-right: 24px;
}

.test-grid.ielts-resizable-grid {
  grid-template-columns: minmax(280px, var(--ielts-reading-left, 52%)) 12px minmax(280px, 1fr) !important;
  gap: 6px !important;
}

@media (min-width: 1025px) {
  body.ielts-reading-p1-test1 .test-grid.ielts-resizable-grid > .reading-panel,
  body.ielts-reading-p1-test1 .test-grid.ielts-resizable-grid > .questions-panel {
    height: 78vh;
    max-height: 78vh;
    overflow: auto;
  }
}

.ielts-panel-splitter {
  position: relative;
  align-self: stretch;
  min-height: 240px;
  border-radius: 999px;
  cursor: col-resize;
  touch-action: none;
  outline: none;
}

.ielts-panel-splitter::before {
  content: "";
  position: absolute;
  inset: 0 4px;
  border-radius: inherit;
  background: rgba(148, 163, 184, 0.24);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.ielts-panel-splitter span {
  position: sticky;
  top: 50%;
  display: block;
  width: 6px;
  height: 54px;
  margin: calc(37vh - 27px) auto 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.72);
}

.ielts-panel-splitter:hover::before,
.ielts-panel-splitter:focus-visible::before,
body.ielts-panel-resizing .ielts-panel-splitter::before {
  background: rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

body.ielts-panel-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

body.night .ielts-panel-splitter::before {
  background: rgba(96, 165, 250, 0.2);
}

.ielts-reading-source-status[data-state="ready"] {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(220, 252, 231, 0.9);
  color: #166534;
}

.ielts-reading-source-status[data-state="loading"] {
  border-color: rgba(14, 165, 233, 0.28);
  background: rgba(224, 242, 254, 0.9);
  color: #075985;
}

.ielts-reading-source-status[data-state="fallback"] {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(254, 243, 199, 0.92);
  color: #92400e;
}

.timer-display.is-warning {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(254, 243, 199, 0.92);
}

.timer-display.is-expired {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(254, 226, 226, 0.95);
}

.answer-input.is-empty {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(255, 251, 235, 0.96);
}

.q-item-card.is-correct {
  border-color: rgba(22, 163, 74, 0.35);
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.1);
}

.q-item-card.is-wrong {
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.1);
}

.q-item-card.is-empty {
  border-color: rgba(245, 158, 11, 0.38);
}

.answer-feedback {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.answer-feedback-correct {
  color: #15803d;
}

.answer-feedback-wrong {
  color: #b91c1c;
}

.answer-feedback-empty {
  color: #b45309;
}

.score-note {
  font-weight: 800;
}

.ielts-answer-tools .key-note[hidden],
.key-note[hidden] {
  display: none !important;
}

.ielts-answer-tools .quick-btn:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.q-nav-btn.is-answered {
  border-color: rgba(14, 165, 233, 0.42);
  color: #0369a1;
}

.q-nav-btn.is-correct {
  border-color: rgba(22, 163, 74, 0.42);
  background: rgba(220, 252, 231, 0.92);
  color: #166534;
}

.q-nav-btn.is-wrong {
  border-color: rgba(220, 38, 38, 0.42);
  background: rgba(254, 226, 226, 0.96);
  color: #991b1b;
}

.q-nav-btn.is-empty {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(254, 243, 199, 0.96);
  color: #92400e;
}

.ielts-answer-tools {
  margin-top: 18px;
}

body.ielts-smart-answer-pilot .questions-panel {
  scroll-behavior: smooth;
  color: #0f172a;
  font-weight: 520;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.ielts-smart-answer-pilot .questions-panel .q-note {
  color: #334155;
  font-weight: 560;
}

body.ielts-smart-answer-pilot .questions-panel .ielts-question-prompt {
  margin-top: 14px;
  color: #172033;
  font-size: 1.03em;
  font-weight: 800;
  line-height: 1.55;
}

body.night.ielts-smart-answer-pilot .questions-panel .q-note {
  color: #d1d9e8;
}

body.night.ielts-smart-answer-pilot .questions-panel .ielts-question-prompt {
  color: #ffffff;
}

body.ielts-smart-answer-pilot .reading-panel {
  color: #0f172a;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.ielts-smart-answer-pilot .reading-panel p {
  color: #0f172a;
}

body.night.ielts-smart-answer-pilot .reading-panel,
body.night.ielts-smart-answer-pilot .reading-panel p {
  color: #f1f5f9;
}

body.ielts-reading-bold-text .reading-panel,
body.ielts-reading-bold-text .reading-panel p {
  font-weight: 700;
}

.reading-bold-toggle {
  min-width: 42px;
  font-weight: 900;
}

.reading-bold-toggle.is-active {
  border-color: rgba(255, 255, 255, 0.92);
  background: #fff;
  color: #dc2626;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

body.night .reading-bold-toggle.is-active {
  border-color: #93c5fd;
  background: #1e3a8a;
  color: #fff;
}

body.ielts-smart-answer-pilot .q-block-title {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

body.ielts-smart-answer-pilot .q-block-title:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.ielts-smart-card {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.ielts-smart-card .q-row {
  align-items: flex-start;
  gap: 12px;
}

.ielts-smart-card .q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 14px;
  font-weight: 900;
}

.ielts-smart-card .q-text {
  color: #172033;
  font-weight: 700;
  line-height: 1.45;
}

.ielts-smart-card .answer-label {
  display: block;
  margin: 12px 0 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.smart-answer-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smart-answer-control-roman {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
}

.answer-choice {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(100, 116, 139, 0.32);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.answer-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.answer-choice.is-selected {
  border-color: rgba(37, 99, 235, 0.68);
  background: #dbeafe;
  color: #1d4ed8;
}

.answer-choice.is-correct {
  border-color: rgba(22, 163, 74, 0.62);
  background: #dcfce7;
  color: #166534;
}

.answer-choice.is-wrong {
  border-color: rgba(220, 38, 38, 0.62);
  background: #fee2e2;
  color: #991b1b;
}

.answer-choice.is-empty {
  border-color: rgba(245, 158, 11, 0.55);
  background: #fef3c7;
  color: #92400e;
}

.smart-text-input {
  max-width: 420px;
}

.ielts-inline-answer-host {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 2px 5px;
  vertical-align: middle;
}

.ielts-smart-card.ielts-inline-answer-card.is-inline-text {
  display: inline-flex;
  width: auto;
  min-width: 150px;
  max-width: min(300px, 42vw);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  vertical-align: middle;
}

.ielts-smart-card.ielts-inline-answer-card.is-inline-choice-blank {
  display: inline-flex;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  vertical-align: middle;
}

.ielts-inline-answer-card.is-inline-text .q-item-label,
.ielts-inline-answer-card.is-inline-text .q-row,
.ielts-inline-answer-card.is-inline-text .answer-label,
.ielts-inline-answer-card.is-inline-choice-blank .q-item-label,
.ielts-inline-answer-card.is-inline-choice-blank .q-row,
.ielts-inline-answer-card.is-inline-choice-blank .answer-label,
.ielts-inline-answer-card.is-inline-choice .q-item-label,
.ielts-inline-answer-card.is-inline-choice .q-row,
.ielts-inline-answer-card.is-inline-choice .answer-label {
  display: none;
}

.ielts-inline-answer-card.is-inline-text .answer-input,
.ielts-inline-answer-card.is-inline-text .smart-text-input {
  width: 100%;
  min-width: 150px;
  height: 38px;
  margin: 0;
  padding: 7px 11px;
}

.smart-answer-control-inline {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.smart-answer-control-select {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.ielts-inline-answer-card.is-compact-select {
  display: inline-flex;
  width: auto;
  min-width: 170px;
}

.ielts-inline-answer-card.is-compact-select .inline-answer-select {
  min-width: 150px;
}

.inline-answer-select {
  min-width: 68px;
  height: 38px;
  margin: 0;
  padding: 6px 28px 6px 10px;
  border: 2px solid rgba(14, 116, 144, 0.48);
  border-radius: 9px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.ielts-inline-answer-card.is-correct .inline-answer-select {
  border-color: rgba(22, 163, 74, 0.72);
  background: #dcfce7;
  color: #166534;
}

.ielts-inline-answer-card.is-wrong .inline-answer-select {
  border-color: rgba(220, 38, 38, 0.72);
  background: #fee2e2;
  color: #991b1b;
}

.ielts-inline-answer-card.is-empty .inline-answer-select {
  border-color: rgba(245, 158, 11, 0.65);
  background: #fef3c7;
  color: #92400e;
}

.ielts-summary-completion {
  margin: 14px 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 14px;
  background: rgba(240, 249, 255, 0.72);
}

.ielts-summary-completion h4 {
  margin: 0 0 10px;
  color: var(--text, #172033);
  font-size: 1.05em;
}

.ielts-summary-completion > .q-note {
  margin: 0 0 12px;
  color: var(--text, #172033);
  font-weight: 700;
  line-height: 2.35;
}

.ielts-summary-completion > .q-note:last-child {
  margin-bottom: 0;
}

.ielts-summary-completion .ielts-inline-answer-host {
  gap: 6px;
  margin: 3px 6px;
}

.ielts-inline-question-number {
  color: #0369a1;
  font-weight: 900;
  line-height: 38px;
}

.ielts-summary-completion .ielts-smart-card.ielts-inline-answer-card.is-inline-text {
  min-width: 150px;
  max-width: min(210px, 34vw);
}

.ielts-summary-completion .smart-text-input {
  min-width: 150px;
  max-width: 210px;
  background: #ffffff;
  color: #0f172a;
}

body.night .ielts-summary-completion {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.74);
}

body.night .ielts-inline-question-number {
  color: #7dd3fc;
}

body.night .ielts-summary-completion .smart-text-input {
  background: #111827;
  color: #f8fafc;
}

/* The reviewed Passage 1 tests use the unified Submit Test bar. The legacy
   controls remain available to its handler without taking up workspace. */
body.ielts-reading-p1-submit-only .questions-panel .answer-tools {
  display: none !important;
}

/* Exercise 9: restore the missing anchor-escapement diagram so Questions
   9-13 can be answered in their real visual positions. */
.ielts-clock-diagram {
  margin: 16px 0 22px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.32);
  border-radius: 14px;
  background: rgba(240, 249, 255, 0.9);
}

.ielts-clock-diagram h4 {
  margin: 0 0 14px;
  color: #0f172a;
  text-align: center;
}

.ielts-clock-diagram__layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
}

.ielts-clock-diagram__machine {
  grid-column: 1 / -1;
  grid-row: 1;
}

.ielts-clock-diagram__labels { grid-row: 2; }

.ielts-clock-diagram__labels {
  display: grid;
  gap: 18px;
}

.ielts-clock-diagram__labels .q-note {
  position: relative;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 10px;
  background: #ffffff;
  color: #172033;
  font-weight: 700;
}

.ielts-clock-diagram__machine {
  position: relative;
  min-height: 260px;
  border: 2px solid #38bdf8;
  border-radius: 16px;
  background: linear-gradient(180deg, #e0f2fe 0 56%, #f8fafc 56%);
  overflow: hidden;
}

.ielts-clock-diagram__wheel {
  position: absolute;
  top: 55px;
  left: 50%;
  width: 118px;
  height: 118px;
  border: 12px dotted #0369a1;
  border-radius: 50%;
  background: repeating-conic-gradient(#38bdf8 0 8deg, transparent 8deg 30deg);
  box-shadow: inset 0 0 0 34px #e0f2fe, inset 0 0 0 38px #0369a1;
  transform: translateX(-50%);
}

.ielts-clock-diagram__anchor {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 50%;
  color: #7c2d12;
  font-size: 92px;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%) rotate(-8deg);
}

.ielts-clock-diagram__pendulum {
  position: absolute;
  top: 138px;
  left: 50%;
  width: 5px;
  height: 118px;
  border-radius: 999px;
  background: #92400e;
  transform: translateX(-50%) rotate(7deg);
  transform-origin: top center;
}

.ielts-clock-diagram__pendulum i {
  position: absolute;
  bottom: -24px;
  left: 50%;
  width: 50px;
  height: 50px;
  border: 5px solid #92400e;
  border-radius: 50%;
  background: #fbbf24;
  transform: translateX(-50%);
}

body.night .ielts-clock-diagram {
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(15, 23, 42, 0.9);
}

body.night .ielts-clock-diagram h4,
body.night .ielts-clock-diagram__labels .q-note {
  color: #f8fafc;
}

body.night .ielts-clock-diagram__labels .q-note {
  background: #111827;
}

body.night .ielts-clock-diagram__machine {
  background: linear-gradient(180deg, #172554 0 56%, #111827 56%);
}

body.night .ielts-clock-diagram__wheel {
  box-shadow: inset 0 0 0 34px #172554, inset 0 0 0 38px #38bdf8;
}

@media (max-width: 760px) {
  .ielts-clock-diagram__layout {
    grid-template-columns: 1fr;
  }

  .ielts-clock-diagram__machine {
    grid-column: auto;
    grid-row: auto;
    order: -1;
  }
  .ielts-clock-diagram__labels { grid-row: auto; }
  .ielts-clock-diagram__labels--left .q-note::after,
  .ielts-clock-diagram__labels--right .q-note::before { display: none; }
}

/* Exercise 22: readable two-stage schematic for the Mary Rose lifting task. */
.ielts-mary-rose-diagram {
  margin: 16px 0 22px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.32);
  border-radius: 14px;
  background: rgba(240, 249, 255, 0.9);
}

.ielts-mary-rose-diagram > h4 {
  margin: 0 0 14px;
  color: #0f172a;
  text-align: center;
}

.ielts-mary-rose-diagram__stages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ielts-mary-rose-diagram__stage {
  padding: 12px;
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 12px;
  background: #fff;
}

.ielts-mary-rose-diagram__stage h5 {
  margin: 0 0 10px;
  color: #075985;
  font-size: 0.95rem;
}

.ielts-mary-rose-diagram__scene {
  position: relative;
  height: 190px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #dbeafe 0 62%, #7dd3fc 62% 76%, #854d0e 76%);
  overflow: hidden;
}

.ielts-mary-rose-diagram__beam {
  position: absolute;
  top: 18px;
  left: 12%;
  width: 76%;
  height: 16px;
  border: 3px solid #0f172a;
  background: #f59e0b;
}

.ielts-mary-rose-diagram__wires {
  position: absolute;
  top: 34px;
  left: 25%;
  width: 50%;
  height: 70px;
  border-right: 2px solid #334155;
  border-left: 2px solid #334155;
  transform: perspective(80px) rotateX(-18deg);
}

.ielts-mary-rose-diagram__hull {
  position: absolute;
  z-index: 2;
  top: 102px;
  left: 20%;
  width: 60%;
  height: 42px;
  border-radius: 5px 5px 48% 48%;
  background: #92400e;
  color: #fff7ed;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 30px;
  text-align: center;
  transform: skewX(-7deg);
}

.ielts-mary-rose-diagram__mud {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 45px;
  background: repeating-linear-gradient(135deg, #713f12 0 8px, #854d0e 8px 16px);
}

.ielts-mary-rose-diagram__scene--cradle {
  background: linear-gradient(180deg, #dbeafe 0 72%, #7dd3fc 72%);
}

.ielts-mary-rose-diagram__scene--cradle .ielts-mary-rose-diagram__hull { top: 72px; }

.ielts-mary-rose-diagram__legs {
  position: absolute;
  top: 18px;
  left: 25%;
  width: 50%;
  height: 122px;
  border-right: 7px solid #334155;
  border-left: 7px solid #334155;
}

.ielts-mary-rose-diagram__cradle {
  position: absolute;
  right: 12%;
  bottom: 18px;
  left: 12%;
  height: 48px;
  border: 8px solid #475569;
  border-top: 0;
  border-radius: 0 0 50% 50%;
}

.ielts-mary-rose-diagram__cushion {
  position: absolute;
  z-index: 1;
  right: 22%;
  bottom: 40px;
  left: 22%;
  height: 25px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #fbbf24 0 8px, #fef3c7 9px 13px);
}

.ielts-mary-rose-diagram__stage .q-note {
  margin: 8px 0 0;
  color: #172033;
  font-weight: 700;
}

body.night .ielts-mary-rose-diagram,
body.night .ielts-mary-rose-diagram__stage {
  border-color: rgba(56, 189, 248, 0.34);
  background: #111827;
}

body.night .ielts-mary-rose-diagram > h4,
body.night .ielts-mary-rose-diagram__stage .q-note { color: #f8fafc; }
body.night .ielts-mary-rose-diagram__stage h5 { color: #7dd3fc; }

@media (max-width: 760px) {
  .ielts-mary-rose-diagram__stages { grid-template-columns: 1fr; }
}

/* Exercise 10: keep the three diagram-completion answers in their actual
   process positions instead of rendering them as detached fields below. */
.ielts-process-diagram {
  margin: 16px 0 22px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 14px;
  background: rgba(240, 249, 255, 0.82);
}

.ielts-process-diagram h4 {
  margin: 0 0 14px;
  color: var(--text, #172033);
  text-align: center;
  font-size: 1.08em;
}

.ielts-process-diagram__flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "machine machine"
    "six seven"
    "eight eight";
  gap: 10px 14px;
  align-items: stretch;
}

.ielts-process-diagram__callout {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
}

.ielts-process-diagram__callout--six { grid-area: six; }
.ielts-process-diagram__callout--seven {
  grid-area: seven;
  align-items: center;
  text-align: center;
}
.ielts-process-diagram__callout--eight { grid-area: eight; }

.ielts-process-diagram__callout > strong {
  font-size: 0.82em;
  line-height: 1.35;
}

.ielts-process-diagram__callout > span {
  color: #0ea5e9;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}

.ielts-process-diagram__callout > .q-note {
  margin: 0;
}

.ielts-process-diagram__machine {
  position: relative;
  grid-area: machine;
  min-height: 190px;
  padding: 40px 42px 32px 22px;
  border: 2px solid #38bdf8;
  border-radius: 12px;
  background: #f8fafc;
}

.ielts-process-diagram__zones {
  position: absolute;
  top: 12px;
  right: 34px;
  left: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: #334155;
  font-size: 0.78em;
  text-align: center;
}

.ielts-process-diagram__zones b:first-child {
  border-right: 1px dashed #94a3b8;
}

.ielts-process-diagram__inlet {
  position: absolute;
  top: 42px;
  left: 5px;
  color: #0284c7;
  font-size: 3.2rem;
  font-weight: 900;
  transform: rotate(45deg);
}

.ielts-process-diagram__ribbon {
  height: 22px;
  margin-top: 35px;
  border: 3px solid #0ea5e9;
  border-radius: 18px 18px 2px 2px;
  background: #bae6fd;
}

.ielts-process-diagram__bath-layer {
  height: 48px;
  border: 2px solid #a16207;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: repeating-linear-gradient(135deg, #fde68a 0 8px, #fef3c7 8px 16px);
}

.ielts-process-diagram__roller-picture {
  position: absolute;
  right: 6px;
  bottom: 47px;
  width: 34px;
  height: 50px;
}

.ielts-process-diagram__roller-picture i {
  position: absolute;
  right: 0;
  width: 25px;
  height: 25px;
  border: 4px solid #64748b;
  border-radius: 50%;
  background: #fff;
}

.ielts-process-diagram__roller-picture i:first-child { top: 0; }
.ielts-process-diagram__roller-picture i:last-child { bottom: 0; }

.ielts-process-diagram__roller-picture::before {
  content: "";
  position: absolute;
  top: 23px;
  right: 18px;
  width: 42px;
  height: 5px;
  background: #0f172a;
}

body.night .ielts-process-diagram {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(15, 23, 42, 0.82);
}

body.night .ielts-process-diagram__callout,
body.night .ielts-process-diagram__machine {
  background: #111827;
  color: #f8fafc;
}

body.night .ielts-process-diagram__zones {
  color: #cbd5e1;
}

body.night .ielts-process-diagram__ribbon {
  background: rgba(3, 105, 161, 0.65);
}

body.night .ielts-process-diagram__bath-layer {
  background: repeating-linear-gradient(135deg, rgba(161, 98, 7, 0.55) 0 8px, rgba(120, 53, 15, 0.45) 8px 16px);
}

body.night .ielts-process-diagram__roller-picture i {
  background: #111827;
}

@media (max-width: 720px) {
  .ielts-process-diagram__flow {
    grid-template-columns: 1fr;
    grid-template-areas: "six" "machine" "seven" "eight";
  }

  .ielts-process-diagram__machine {
    min-height: 175px;
  }
}

.ielts-smart-card.ielts-inline-answer-card.is-inline-choice {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border-style: dashed;
  background: rgba(248, 250, 252, 0.76);
}

.ielts-inline-answer-card.is-inline-choice .smart-answer-control {
  margin: 0;
}

body.night .ielts-smart-card {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(21, 27, 36, 0.98), rgba(17, 23, 34, 0.96));
}

body.night .ielts-smart-card .q-text {
  color: #e8eefc;
}

body.night .ielts-smart-card .answer-label {
  color: #a2afc9;
}

body.night .ielts-smart-card.ielts-inline-answer-card.is-inline-text {
  background: transparent;
}

body.night .ielts-smart-card.ielts-inline-answer-card.is-inline-choice-blank {
  background: transparent;
}

body.night .inline-answer-select {
  border-color: rgba(125, 211, 252, 0.52);
  background: #111827;
  color: #f8fafc;
}

body.night .ielts-smart-card.ielts-inline-answer-card.is-inline-choice {
  background: rgba(15, 21, 32, 0.72);
}

body.night .answer-choice {
  border-color: rgba(148, 163, 184, 0.28);
  background: #0f1520;
  color: #e8eefc;
}

body.night .answer-choice.is-selected {
  border-color: rgba(96, 165, 250, 0.68);
  background: rgba(30, 64, 175, 0.56);
  color: #dbeafe;
}

.ielts-paragraph-label {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0 10px 4px 0;
  border: 1px solid rgba(37, 99, 235, 0.4);
  border-radius: 8px;
  background: #e8f1ff;
  color: #174ea6;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

body.night .ielts-paragraph-label {
  border-color: rgba(96, 165, 250, 0.58);
  background: rgba(30, 64, 175, 0.5);
  color: #dbeafe;
}

.ielts-labeled-paragraph {
  scroll-margin-top: 18px;
}

.smart-answer-hidden {
  display: none !important;
}

body.ielts-reading-p1-test2 #uz-support-launcher,
body.ielts-reading-p1-test2 #uz-support-panel,
body.ielts-reading-p1-test2 .uz-support-launcher,
body.ielts-reading-p1-test2 .uz-support-panel {
  display: none !important;
}

@media (min-width: 1025px) {
  body.ielts-reading-p1-unified-layout .reading-panel,
  body.ielts-reading-p1-unified-layout .questions-panel {
    height: calc(82vh + 2cm) !important;
    max-height: calc(82vh + 2cm) !important;
  }
}

.ielts-submit-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
  padding: 14px 18px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

body.ielts-reading-p1-test1 {
  padding-bottom: 76px;
}

body.ielts-reading-p1-test1 .ielts-submit-bar {
  position: fixed;
  right: 18px;
  bottom: 10px;
  left: 18px;
  z-index: 80;
  min-height: 56px;
  margin: 0;
  padding: 8px 72px 8px 12px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(14px);
}

body.ielts-reading-p1-test1 .ielts-submit-nav-slot .q-nav {
  gap: 5px;
}

body.ielts-reading-p1-test1 .ielts-submit-nav-slot .q-nav-btn {
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 3px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
}

body.ielts-reading-p1-test1 .ielts-submit-button {
  min-width: 154px;
  padding: 10px 20px;
  font-size: 14px;
}

body.night.ielts-reading-p1-test1 .ielts-submit-bar {
  background: rgba(15, 23, 42, 0.94);
}

body.ielts-reading-p1-unified-layout {
  padding-bottom: 0;
}

body.ielts-reading-p1-unified-layout .ielts-submit-bar {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: auto;
  min-height: 0;
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 18px;
  backdrop-filter: none;
}

.ielts-submit-nav-slot {
  flex: 1 1 auto;
  min-width: 0;
}

.ielts-submit-nav-slot .q-nav-wrap.ielts-submit-nav {
  position: relative;
  inset: auto;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ielts-submit-nav-slot .q-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ielts-submit-button {
  flex: 0 0 auto;
  min-width: 170px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.ielts-completion-result {
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.ielts-result-hero {
  padding: 34px 20px;
  text-align: center;
  background: linear-gradient(135deg, #fb7185, #ef4444);
  color: #fff;
}

.ielts-result-hero > span { font-size: 30px; }
.ielts-result-hero h2 { margin: 8px 0 4px; font-size: clamp(28px, 4vw, 46px); }
.ielts-result-hero p { margin: 0; font-size: 18px; }
.ielts-result-hero small { display: block; margin-top: 8px; color: rgba(255, 255, 255, 0.88); font-size: 15px; font-weight: 700; }
.ielts-result-hero.is-celebration { background: linear-gradient(135deg, #16a34a, #059669); }

.ielts-result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 30px;
}

.ielts-result-summary > div {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 18px;
  border: 1px solid #fee2e2;
  border-radius: 20px;
  text-align: center;
}

.ielts-result-summary span { font-size: 27px; }
.ielts-result-summary small { color: #7f1d1d; font-weight: 800; text-transform: uppercase; }
.ielts-result-summary strong { color: #dc2626; font-size: 42px; }
.ielts-result-summary > div:first-child strong { color: #16a34a; }

.ielts-result-feedback,
.ielts-result-saved {
  margin: 0 30px 22px;
  padding: 18px;
  border-radius: 14px;
  text-align: center;
  font-weight: 800;
}

.ielts-result-feedback { text-align: left; }
.ielts-result-feedback strong { display: block; margin-bottom: 6px; font-size: 17px; }
.ielts-result-feedback p { margin: 0; line-height: 1.55; }
.ielts-result-feedback.is-coaching { color: #9a3412; background: #fff7ed; border-left: 5px solid #f97316; }
.ielts-result-feedback.is-celebration { color: #166534; background: #f0fdf4; border-left: 5px solid #22c55e; }
.ielts-result-saved { border-left: 5px solid #ef4444; background: #fff7f7; color: #7f1d1d; }
.ielts-completion-result > h3 { margin: 28px 30px 16px; font-size: 26px; }

.ielts-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 30px 30px;
}

.ielts-result-question {
  padding: 16px;
  border: 2px solid #bbf7d0;
  border-radius: 16px;
  background: #f0fdf4;
}

.ielts-result-question.is-wrong { border-color: #fecaca; background: #fff7f7; }
.ielts-result-question-head { display: flex; justify-content: space-between; color: #16a34a; font-size: 19px; }
.ielts-result-question.is-wrong .ielts-result-question-head { color: #dc2626; }
.ielts-result-question p { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; }
.ielts-result-question p span { color: #64748b; }
.ielts-result-question p b { text-align: right; overflow-wrap: anywhere; }

.ielts-result-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 6px 30px 34px;
}

.ielts-result-actions button,
.ielts-result-actions a {
  min-width: 170px;
  padding: 13px 22px;
  border: 2px solid #ef4444;
  border-radius: 999px;
  background: #fff;
  color: #dc2626;
  font: inherit;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.ielts-result-actions a { background: #ef4444; color: #fff; }
.ielts-result-actions .ielts-result-back { border-color: #64748b; background: #fff; color: #334155; }

body.night .ielts-submit-bar,
body.night .ielts-completion-result { border-color: rgba(148, 163, 184, 0.25); background: #111827; color: #e5e7eb; }
body.night .ielts-result-summary > div { border-color: #374151; background: #172033; }
body.night .ielts-result-question { border-color: #166534; background: #10241a; }
body.night .ielts-result-question.is-wrong { border-color: #991b1b; background: #2a1518; }
body.night .ielts-result-feedback.is-coaching { background: #2c1b10; color: #fdba74; }
body.night .ielts-result-feedback.is-celebration { background: #10251a; color: #86efac; }
body.night .ielts-result-saved { background: #26171a; color: #fecaca; }

.ielts-highlight-toolbar {
  position: fixed;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
  font-size: 12px;
  font-weight: 800;
  user-select: none;
}

.ielts-highlight-toolbar[hidden] { display: none !important; }

.ielts-highlight-toolbar [data-highlight] {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 7px;
  cursor: pointer;
}

.ielts-highlight-toolbar [data-highlight="yellow"] { background: #ffea00; }
.ielts-highlight-toolbar [data-highlight="pink"] { background: #ff5cad; }
.ielts-highlight-toolbar [data-highlight="blue"] { background: #4fc3ff; }

.ielts-highlight-clear {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 7px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.ielts-user-highlight {
  padding: 0.04em 0;
  border-radius: 3px;
  color: #0f172a;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.ielts-user-highlight.is-yellow {
  background: rgba(255, 234, 0, 0.92);
  box-shadow: inset 0 -1px 0 rgba(161, 98, 7, 0.28);
}
.ielts-user-highlight.is-pink { background: rgba(255, 92, 173, 0.82); }
.ielts-user-highlight.is-blue { background: rgba(79, 195, 255, 0.86); }
body.night .ielts-user-highlight.is-yellow { background: rgba(255, 234, 0, 0.94); color: #020617; }
body.night .ielts-user-highlight.is-pink { background: rgba(255, 92, 173, 0.9); color: #020617; }
body.night .ielts-user-highlight.is-blue { background: rgba(79, 195, 255, 0.92); color: #020617; }

@media (max-width: 720px) {
  body.ielts-smart-answer-pilot .passage-shell {
    width: 100% !important;
  }

  body.ielts-smart-answer-pilot .main {
    padding-left: 10px;
    padding-right: 10px;
  }
  .ielts-reading-source-status {
    width: 100%;
    justify-content: center;
  }

  .smart-answer-control,
  .smart-answer-control-roman {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .smart-answer-control-tfng,
  .smart-answer-control-yng {
    grid-template-columns: 1fr;
  }

  .ielts-inline-answer-host {
    display: inline-flex;
    width: min(100%, 240px);
    margin: 5px 0;
  }

  .ielts-smart-card.ielts-inline-answer-card.is-inline-text,
  .ielts-smart-card.ielts-inline-answer-card.is-inline-choice-blank,
  .ielts-inline-answer-card.is-inline-text .answer-input,
  .ielts-inline-answer-card.is-inline-text .smart-text-input {
    width: 100%;
    max-width: 100%;
  }

  .ielts-submit-bar { align-items: stretch; flex-direction: column; }
  .ielts-submit-nav-slot .q-nav { justify-content: center; }
  .ielts-submit-button { width: 100%; }
  .ielts-result-summary,
  .ielts-result-grid { grid-template-columns: 1fr; padding-left: 16px; padding-right: 16px; }
  .ielts-result-feedback,
  .ielts-result-saved { margin-left: 16px; margin-right: 16px; }
  .ielts-result-actions { flex-direction: column; padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 1024px) {
  .test-grid.ielts-resizable-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .ielts-panel-splitter {
    display: none;
  }
}

/* Semantic IELTS diagram fallbacks: readable without image loading and usable on mobile. */
.ielts-question-diagram {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #172033;
}

.ielts-question-diagram figcaption {
  margin-bottom: 14px;
  font-weight: 800;
  text-align: center;
}

.ielts-diagram-flow {
  display: grid;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
}

.ielts-diagram-node,
.ielts-diagram-note {
  padding: 12px 14px;
  border: 1px solid #94a3b8;
  border-radius: 12px;
  background: #fff;
  line-height: 1.5;
  text-align: center;
}

.ielts-diagram-note {
  border-style: dashed;
  background: #eff6ff;
}

.ielts-diagram-arrow {
  color: #64748b;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.ielts-diagram-blank {
  display: inline-block;
  min-width: 110px;
  margin: 0 4px;
  border-bottom: 2px solid currentColor;
  color: #075985;
  font-weight: 800;
  text-decoration: none;
}

.ielts-qanat-diagrams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.ielts-qanat-diagrams .ielts-question-diagram {
  margin: 0;
}

body.night .ielts-question-diagram {
  border-color: #475569;
  background: #111827;
  color: #e5e7eb;
}

body.night .ielts-diagram-node {
  border-color: #64748b;
  background: #1e293b;
}

body.night .ielts-diagram-note {
  border-color: #64748b;
  background: #172554;
}

body.night .ielts-diagram-blank {
  color: #7dd3fc;
}

@media (max-width: 720px) {
  .ielts-question-diagram {
    padding: 14px;
  }

  .ielts-qanat-diagrams {
    grid-template-columns: 1fr;
  }
}
