

.chapters-and-content,
.mw,
.pv-test-backdrop {
  --pv-ok: #15803d;
  --pv-ok-soft: #e9f8ef;
  --pv-ok-line: #86d6a4;
  --pv-warn: #b45309;
  --pv-warn-soft: #fff4e0;
  --pv-warn-line: #f5b04a;
}

body.active .chapters-and-content,
body.active .mw,
body.active .pv-test-backdrop {
  --pv-ok: #4ade80;
  --pv-ok-soft: rgba(74, 222, 128, 0.12);
  --pv-ok-line: rgba(74, 222, 128, 0.45);
  --pv-warn: #fbbf24;
  --pv-warn-soft: rgba(251, 191, 36, 0.12);
  --pv-warn-line: rgba(251, 191, 36, 0.55);
}

.pv-i {
  width: 1em;
  height: 1em;
  vertical-align: -0.13em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#chapter-content.pv-pending .rd-next-cta,
#chapter-content.pv-fresh .rd-next-cta {
  display: none;
}

.pv-block {
  font-family: var(--rd-ui, 'Nunito', system-ui, sans-serif);
  color: var(--rd-ink, #1f2937);
}

.pv-block:empty {
  display: none;
}

.pv-mark-wrap {
  margin: 28px 0 4px;
  text-align: center;
}

.pv-mark,
.pv-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 340px);
  min-height: 52px;
  padding: 0 24px;
  background: var(--rd-blue, #1d4ed8);
  color: #fff;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--rd-blue, #1d4ed8) 25%, transparent);
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.pv-mark:hover,
.pv-next:hover {
  background: var(--rd-blue-dark, #1e3a8a);
}

.pv-mark:active,
.pv-next:active {
  transform: translateY(1px);
}

.pv-mark:focus-visible,
.pv-next:focus-visible,
.pv-tile:focus-visible,
.pv-link:focus-visible {
  outline: 3px solid #f5b301;
  outline-offset: 3px;
}

body.active .pv-mark,
body.active .pv-next {
  color: #0b1220;
}

body.active .pv-mark:hover,
body.active .pv-next:hover {
  background: #93c5fd;
}

.pv-mark-hint {
  margin: 10px 0 0;
  color: var(--rd-muted, #5b6678);
  font-weight: 700;
  font-size: 0.9rem;
}

.pv-ex {
  margin-top: 28px;
  padding: 20px 22px 16px;
  border: 1px solid var(--rd-line, #e2e8f0);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--rd-blue-soft, #eaf1ff), var(--rd-surface, #fff) 70px);
}

.pv-read-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 3px 10px;
  border: 1.5px solid var(--pv-ok-line);
  border-radius: 999px;
  background: var(--pv-ok-soft);
  color: var(--pv-ok);
  font-size: 0.8rem;
  font-weight: 800;
}

.pv-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.pv-title {
  margin: 0;
  font-family: inherit;
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--rd-ink, #1f2937);
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.25;
}

#chapter-content .pv-title { text-align: left; letter-spacing: normal; text-shadow: none; color: var(--rd-ink, #1f2937); }
body.active #chapter-content .pv-title { color: var(--rd-ink, #e5e7eb); text-shadow: none; }

.pv-instr {
  margin: 2px 0 0;
  color: var(--rd-muted, #5b6678);
  font-size: 0.95rem;
  font-weight: 800;
}

.pv-dots {
  display: flex;
  gap: 6px;
  padding-top: 6px;
}

.pv-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rd-line-strong, #cbd5e1);
}

.pv-dots i.on {
  background: var(--pv-ok);
}

.pv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pv-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pv-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 54px;
  padding: 8px 12px 8px 16px;
  text-align: left;
  border: 2px solid var(--rd-line-strong, #cbd5e1);
  border-bottom-width: 4px;
  border-radius: 14px;
  background: var(--rd-surface, #fff);
  color: var(--rd-ink, #1f2937);
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pv-tile.pv-en {
  font-family: var(--rd-serif, 'Source Serif 4', Georgia, serif);
  font-size: 1.08rem;
  font-weight: 700;
}

.pv-tile:hover {
  border-color: var(--rd-blue, #1d4ed8);
}

.pv-tile.is-sel {
  border-color: var(--rd-blue, #1d4ed8);
  background: var(--rd-blue-soft, #eaf1ff);
  color: var(--rd-blue, #1d4ed8);
}

.pv-tile.is-ok {
  border-color: var(--pv-ok-line);
  border-bottom-width: 2px;
  background: var(--pv-ok-soft);
  color: var(--pv-ok);
  cursor: default;
}

.pv-tile.is-wrong {
  border-color: var(--pv-warn-line);
  background: var(--pv-warn-soft);
  color: var(--pv-warn);
  animation: pv-shake 0.4s ease;
}

.pv-sub {
  display: block;
  font-family: var(--rd-ui, 'Nunito', system-ui, sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.85;
}

.pv-chk,
.pv-spk {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
}

.pv-chk {
  background: var(--pv-ok);
  color: #fff;
}

.pv-spk {
  background: var(--rd-blue-soft, #eaf1ff);
  color: var(--rd-blue, #1d4ed8);
}

.pv-spk.is-playing {
  background: var(--rd-blue, #1d4ed8);
  color: #fff;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--rd-blue, #1d4ed8) 18%, transparent);
}

body.active .pv-chk,
body.active .pv-spk.is-playing {
  color: #0b1220;
}

.pv-msg {
  min-height: 22px;
  margin: 12px 0 0;
  text-align: center;
  color: var(--rd-muted, #5b6678);
  font-size: 0.93rem;
  font-weight: 800;
}

.pv-msg.is-warn { color: var(--pv-warn); }
.pv-msg.is-ok { color: var(--pv-ok); }

@keyframes pv-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.pv-block.pv-nudge > * {
  animation: pv-pulse 0.9s ease;
}

@keyframes pv-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rd-blue, #1d4ed8) 35%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}

.pv-fin {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid var(--pv-ok-line);
  border-radius: 20px;
  background: var(--pv-ok-soft);
  text-align: center;
}

.pv-fin-top {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.pv-fin-ic {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pv-ok);
  color: #fff;
  font-size: 20px;
}

body.active .pv-fin-ic {
  color: #0b1220;
}

.pv-fin-t {
  flex: 1;
  color: var(--pv-ok);
  font-weight: 900;
  line-height: 1.25;
}

.pv-fin-t small {
  display: block;
  margin-top: 2px;
  color: var(--rd-muted, #5b6678);
  font-size: 0.86rem;
  font-weight: 700;
}

.pv-hard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--rd-surface, #fff);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
}

.pv-hard-lbl {
  color: var(--rd-muted, #5b6678);
}

.pv-hard-w {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rd-ink, #1f2937);
  font: inherit;
  cursor: pointer;
}

.pv-hard-w b {
  font-family: var(--rd-serif, 'Source Serif 4', Georgia, serif);
}

.pv-fin .pv-next {
  margin: 16px auto 2px;
}

.pv-visitor {
  margin: 12px 0 0;
  text-align: center;
  color: var(--rd-muted, #5b6678);
  font-size: 0.86rem;
  font-weight: 600;
}

.pv-visitor a {
  color: var(--rd-blue, #1d4ed8);
  font-weight: 800;
}

.pv-account {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--rd-line-strong, #cbd5e1);
  border-radius: 16px;
  background: var(--rd-surface, #fff);
  text-align: center;
}

.pv-account p {
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.4;
}

.pv-account .pv-next {
  margin: 0 auto;
  text-decoration: none;
}

.pv-account .pv-next:hover,
.pv-account .pv-next:focus {
  color: #fff;
  text-decoration: none;
}

body.active .pv-account .pv-next,
body.active .pv-account .pv-next:hover,
body.active .pv-account .pv-next:focus {
  color: #0b1220;
}

.pv-account .pv-link {
  display: inline-block;
  margin-top: 10px;
}

.pv-book-end {
  margin-top: 16px;
  padding: 24px 16px 18px;
  border: 1px solid #f2dca6;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff6e0, var(--rd-surface, #fff) 70%);
  text-align: center;
}

.pv-book-end-pics {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.pv-book-end-pics img {
  width: 72px;
  height: 72px;
  margin: 0 -5px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.pv-book-end-t {
  margin: 4px 0;
  font-family: var(--ds-ui, 'Nunito', system-ui, sans-serif);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.pv-book-end-tiles .pv-tile-btn:only-child {
  grid-column: 1 / -1;
}

.pv-book-end-s {
  margin: 0;
  color: var(--rd-muted, #5b6678);
  font-weight: 700;
}

.pv-book-end-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.pv-tile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 14px 8px 12px;
  border: 1.5px solid var(--rd-line, #e2e8f0);
  border-radius: 16px;
  background: var(--rd-surface, #fff);
  color: inherit;
  font: 800 0.98rem var(--ds-ui, 'Nunito', system-ui, sans-serif);
  letter-spacing: normal;
  cursor: pointer;
}

.pv-tile-btn small {
  color: var(--rd-muted, #5b6678);
  font-size: 0.78rem;
  font-weight: 700;
}

.pv-tile-btn:hover {
  border-color: var(--rd-blue, #1d4ed8);
}

.pv-tile-ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 14px;
  background: var(--rd-blue-soft, #eaf1ff);
  color: var(--rd-blue, #1d4ed8);
}

.pv-tile-btn.is-gold .pv-tile-ic {
  background: #fff1cc;
  color: #b7791f;
}

.pv-tile-ic .pv-i {
  width: 24px;
  height: 24px;
}

.pv-book-end .pv-book-end-go {
  margin: 14px auto 0;
  text-decoration: none;
}

body.active .pv-book-end {
  border-color: #6b5520;
  background: linear-gradient(180deg, #2d2615, transparent 70%);
}

body.active .pv-book-end-pics img {
  border-color: #1f2937;
}

body.active .pv-tile-btn {
  border-color: #334155;
  background: #1e293b;
}

body.active .pv-tile-btn.is-gold .pv-tile-ic {
  background: #3b3016;
  color: #f5c451;
}

.pv-again {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--rd-line, #e2e8f0);
}

.pv-again-t {
  margin: 0 0 10px;
  color: var(--rd-muted, #5b6678);
  font: 800 0.95rem var(--ds-ui, 'Nunito', system-ui, sans-serif);
}

.pv-again-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pv-again-btns.is-single {
  grid-template-columns: 1fr;
}

.pv-again-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid var(--rd-line, #e2e8f0);
  border-radius: 14px;
  background: var(--rd-surface, #fff);
  color: inherit;
  font: 800 0.95rem var(--ds-ui, 'Nunito', system-ui, sans-serif);
  letter-spacing: normal;
  text-align: left;
  cursor: pointer;
}

.pv-again-btn .pv-i {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--rd-blue, #1d4ed8);
}

.pv-again-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.pv-again-btn small {
  color: var(--rd-muted, #5b6678);
  font-size: 0.78rem;
  font-weight: 700;
}

.pv-again-btn:hover {
  border-color: var(--rd-blue, #1d4ed8);
}

.pv-again-btn:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

body.active .pv-again {
  border-top-color: #334155;
}

body.active .pv-again-btn {
  border-color: #334155;
  background: #1e293b;
}

body.active .pv-again-btn .pv-i {
  color: #93c5fd;
}

@media (max-width: 480px) {
  .pv-again-btns {
    grid-template-columns: 1fr;
  }
}

.pv-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.sw-save.sw-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--rd-line, #e2e8f0);
  border-radius: 999px;
  background: var(--rd-surface, #fff);
  color: inherit;
  font: 700 0.95rem var(--ds-ui, 'Nunito', system-ui, sans-serif);
  text-align: left;
  cursor: pointer;
}

.sw-save.sw-chip b {
  font-family: var(--rd-serif, 'Source Serif 4', Georgia, serif);
}

.sw-save.sw-chip em {
  font-style: normal;
}

.sw-save.sw-chip .sw-i {
  flex: none;
  color: var(--rd-blue, #1d4ed8);
}

.sw-save.sw-chip.is-saved {
  border-color: var(--rd-blue, #1d4ed8);
  background: var(--rd-blue, #1d4ed8);
  color: #fff;
}

.sw-save.sw-chip.is-saved .sw-i {
  color: #fff;
  fill: currentColor;
}

body.active .sw-save.sw-chip:not(.is-saved) {
  border-color: #334155;
  background: #1e293b;
}

.pv-chips-hint {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--rd-muted, #5b6678);
  font-size: 0.86rem;
  font-weight: 700;
}

.pv-chips-hint .pv-save-link {
  margin: 0;
}

.pv-test-title.pv-test-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff6e0;
  color: #8a5a00;
  font-size: 0.9rem;
  font-weight: 800;
}

.pv-test-pill .pv-i {
  width: 16px;
  height: 16px;
}

body.active .pv-test-title.pv-test-pill {
  background: #3b3016;
  color: #f5c451;
}

.pv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pv-tr-row {
  margin: -6px 0 10px;
}

.pv-test .pv-tr-row {
  text-align: center;
}

.chapters-and-content .translated-word.pv-word-done {
  border-bottom: 0;
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--pv-ok) 30%, transparent) 62%);
  color: var(--pv-ok);
  border-radius: 2px;
}

.chapters-and-content .translated-word.pv-word-done::after {
  content: '✓';
  position: relative;
  top: -0.55em;
  margin-left: 1px;
  font-family: var(--rd-ui, 'Nunito', system-ui, sans-serif);
  font-size: 0.68em;
  font-weight: 900;
}

.chapters-and-content .translated-word.pv-word-learned {
  border-bottom: 2px dotted var(--pv-ok-line);
}

.pv-back {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.pv-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1.5px solid var(--pv-ok-line);
  border-radius: 999px;
  background: var(--pv-ok-soft);
  color: var(--pv-ok);
  font-size: 0.9rem;
  font-weight: 800;
}

.pv-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 1.5px solid currentColor;
  background: none;
  color: var(--rd-blue, #1d4ed8);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.chapters-and-content .chaptersList .button.pv-ahead,
body.active .chapters-and-content .chaptersList .button.pv-ahead,
.chapters-and-content .page-pager .page-button.pv-ahead,
.chapters-and-content #pages.page-pager .page-button.pv-ahead {
  background: transparent;
  border-style: dashed;
  border-color: var(--rd-line-strong, #cbd5e1);
  color: var(--rd-muted, #5b6678);
  opacity: 0.6;
  cursor: default;
}

.chapters-and-content .chaptersList .button.pv-front:not(.selected-chapter) {
  border-color: var(--rd-green, #f59e0b);
  color: var(--rd-green-dark, #b45309);
}

.pv-wait {
  opacity: 0.45;
}

.pv-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 1200;
  width: min(92vw, 440px);
  padding: 12px 16px;
  border: 1px solid var(--ds-line-strong, #cbd5e1);
  border-radius: 14px;
  background: var(--ds-surface, #fff);
  color: var(--ds-ink, #1f2937);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  font-family: var(--ds-ui, 'Nunito', system-ui, sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pv-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.pv-toast strong {
  font-weight: 900;
}

.pv-toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
}

.pv-toast-btn,
.pv-toast-btn:hover {
  text-decoration: none;
  color: var(--ds-blue, #1d4ed8);
}

.pv-toast-btn {
  padding: 0;
  border: 0;
  border-bottom: 1.5px solid currentColor;
  background: none;
  color: var(--ds-blue, #1d4ed8);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 480px) {
  .pv-ex {
    margin-left: -4px;
    margin-right: -4px;
    padding: 16px 12px 14px;
  }

  .pv-grid,
  .pv-col {
    gap: 8px;
  }

  .pv-tile {
    min-height: 50px;
    padding: 6px 8px 6px 12px;
    font-size: 0.95rem;
  }

  .pv-tile.pv-en {
    font-size: 1rem;
  }

  .pv-spk,
  .pv-chk {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .pv-fin {
    margin-left: -4px;
    margin-right: -4px;
    padding: 14px 12px;
  }

  .pv-mark,
  .pv-fin .pv-next {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-tile.is-wrong,
  .pv-block.pv-nudge > * {
    animation: none;
  }
}

body.pv-test-open {
  overflow: hidden;
}

.pv-test-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020; 
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.pv-test-backdrop.is-open {
  display: flex;
}

.pv-test {
  width: min(100%, 460px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px 20px 20px;
  border: 1px solid var(--ds-line-strong, #cbd5e1);
  border-radius: 20px;
  background: var(--ds-surface, #fff);
  color: var(--ds-ink, #1f2937);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  font-family: var(--ds-ui, 'Nunito', system-ui, sans-serif);
}

.pv-test-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pv-test-title {
  margin: 0;
  font-family: inherit;
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: normal;
  text-align: left;
  color: inherit;
}

.pv-test-close {
  flex: none;
  width: 36px;
  height: 36px;
  margin: -6px -8px 0 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ds-muted, #5b6678);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.pv-test-instr,
.pv-test-msg {
  margin: 4px 0 0;
  color: var(--ds-muted, #5b6678);
  font-weight: 800;
  font-size: 0.95rem;
}

.pv-test-msg {
  margin: 18px 0 4px;
}

.pv-test-dots {
  display: flex;
  gap: 5px;
  margin: 14px 0 0;
}

.pv-test-dots i {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--ds-line, #e5e7eb);
}

.pv-test-dots i.is-done {
  background: var(--pv-ok);
}

.pv-test-dots i.is-now {
  background: var(--ds-blue, #1d4ed8);
}

.pv-test-word {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 18px;
  font-family: var(--rd-serif, Georgia, serif);
  font-size: 1.7rem;
  font-weight: 700;
}

.pv-test-say {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--ds-blue-soft, #e8efff);
  color: var(--ds-blue, #1d4ed8);
  font-size: 1rem;
  cursor: pointer;
}

.pv-test-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pv-test-opt {
  min-height: 54px;
  padding: 8px 12px;
  border: 2px solid var(--ds-line-strong, #cbd5e1);
  border-bottom-width: 4px;
  border-radius: 14px;
  background: var(--ds-surface, #fff);
  color: inherit;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.pv-test-opt:disabled {
  cursor: default;
  opacity: 0.7;
}

.pv-test-opt.is-ok {
  opacity: 1;
  border-color: var(--pv-ok-line);
  background: var(--pv-ok-soft);
  color: var(--pv-ok);
}

.pv-test-opt.is-wrong {
  opacity: 1;
  border-color: var(--pv-warn-line);
  background: var(--pv-warn-soft);
  color: var(--pv-warn);
}

.pv-test-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.pv-test-btn {
  min-height: 48px;
  padding: 10px 16px;
  border: 1.5px solid var(--ds-line-strong, #cbd5e1);
  border-radius: 14px;
  background: var(--ds-surface, #fff);
  color: var(--ds-ink, #1f2937);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}

.pv-test-btn.is-primary {
  border-color: var(--ds-blue, #1d4ed8);
  background: var(--ds-blue, #1d4ed8);
  color: #fff;
}

body.active .pv-test-btn.is-primary {
  color: #0b1220;
}

.pv-test-result {
  margin: 18px 0 0;
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  font-weight: 700;
}

.pv-test-result p {
  margin: 6px 0 0;
}

.pv-test-result.is-pass {
  border: 1px solid var(--pv-ok-line);
  background: var(--pv-ok-soft);
}

.pv-test-result.is-pass strong {
  color: var(--pv-ok);
}

.pv-test-result.is-fail {
  border: 1px dashed var(--ds-line-strong, #cbd5e1);
}

.pv-test-score {
  display: block;
  font-size: 2rem;
  font-weight: 900;
}

@media (max-width: 480px) {
  .pv-test-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .pv-test {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  }
}

#pv-test .pv-test-title,
body.active #pv-test .pv-test-title {
  color: var(--ds-ink, #1f2937);
  text-shadow: none;
}

.pv-test-statement {
  margin: 20px 0 18px;
  font-family: var(--rd-serif, Georgia, serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.pv-test-why {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
}

.pv-test-why.is-ok {
  background: var(--pv-ok-soft);
  color: var(--ds-ink, #1f2937);
}

.pv-test-why.is-ok strong {
  color: var(--pv-ok);
}

.pv-test-why.is-wrong {
  background: var(--pv-warn-soft);
  color: var(--ds-ink, #1f2937);
}

.pv-test-why.is-wrong strong {
  color: var(--pv-warn);
}

.pv-review {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--rd-surface, #fff);
  text-align: left;
}

.pv-review-title {
  margin: 0;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: normal;
  text-align: left;
  color: var(--rd-ink, #1f2937);
  text-shadow: none;
}

#chapter-content .pv-review-title {
  text-align: left;
  color: var(--rd-ink, #1f2937);
  text-shadow: none;
}

.pv-review-instr {
  margin: 2px 0 6px;
  color: var(--rd-muted, #5b6678);
  font-size: 0.88rem;
  font-weight: 700;
}

.pv-review-item {
  padding: 12px 0;
  border-top: 1px solid var(--rd-line, #e5e7eb);
}

.pv-review-item:first-of-type {
  border-top: 0;
}

.pv-review-s {
  margin: 0 0 10px;
  font-family: var(--rd-serif, Georgia, serif);
  font-size: 1.05rem;
  line-height: 1.45;
}

.pv-review .pv-test-opt {
  min-height: 44px;
  border-color: var(--rd-line-strong, #cbd5e1);
  background: var(--rd-surface, #fff);
}

.pv-review .pv-test-why {
  color: var(--rd-ink, #1f2937);
}

.pv-review-score {
  margin: 8px 0 0;
  font-weight: 900;
  color: var(--pv-ok);
}

.pv-review .pv-test-opt.is-ok {
  border-color: var(--pv-ok-line);
  background: var(--pv-ok-soft);
}

.pv-review .pv-test-opt.is-wrong {
  border-color: var(--pv-warn-line);
  background: var(--pv-warn-soft);
}

.pv-test-opt .pv-i {
  stroke-width: 3;
}

.pv-test .pv-test-opt.is-ok {
  border-color: var(--pv-ok);
  animation: pv-pop 0.35s ease;
}

.pv-test-cheer {
  margin: 16px 0 0;
  text-align: center;
  color: var(--pv-ok);
  font-weight: 900;
  font-size: 1.05rem;
}

@keyframes pv-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .pv-test .pv-test-opt.is-ok {
    animation: none;
  }
}

.pv-save {
  display: block;
}

.pv-save .pv-hard-lbl {
  display: block;
  margin-bottom: 6px;
}

.pv-save-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pv-save-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-top: 1px solid var(--rd-line, #e5e7eb);
}

.pv-save-row:first-child {
  border-top: 0;
}

.pv-save-row .pv-hard-w {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  line-height: 1.35;
}

.pv-save-row .pv-hard-w .pv-i {
  margin-right: 4px;
}

.pv-save-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pv-warn-soft);
  color: var(--pv-warn);
  font-size: 0.76rem;
  font-weight: 800;
}

.sw-save {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1.5px solid var(--rd-line-strong, #cbd5e1);
  border-radius: 999px;
  background: var(--rd-surface, #fff);
  color: var(--rd-blue, #1d4ed8);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.sw-save .sw-i {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.sw-save.is-saved {
  border-color: var(--rd-blue, #1d4ed8);
  background: var(--rd-blue, #1d4ed8);
  color: #fff;
}

.sw-save.is-saved .sw-i {
  fill: currentColor;
}

.sw-save:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--rd-blue, #1d4ed8) 40%, transparent);
  outline-offset: 2px;
}

body.active .sw-save {
  color: #93c5fd;
}

body.active .sw-save.is-saved {
  border-color: #93c5fd;
  background: #93c5fd;
  color: #0b1220;
}

.pv-save-one {
  margin-top: 10px;
  text-align: center;
}

.sw-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 10030;
  width: min(420px, calc(100% - 32px));
  padding: 14px 40px 14px 16px;
  border-radius: 16px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.3);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.sw-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.sw-toast p {
  margin: 0 0 8px;
  line-height: 1.4;
}

.sw-toast a {
  display: inline-block;
  margin-right: 14px;
  color: #93c5fd;
  font-weight: 800;
}

.sw-toast-x {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.pv-review-cta {
  margin-top: 14px;
  text-align: center;
}

.pv-back + .pv-save {
  margin-top: 12px;
  border: 1px solid var(--rd-line, #e5e7eb);
}

@media (max-width: 480px) {
  .sw-save.is-compact {
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .sw-save.is-compact span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .sw-save.is-compact .sw-i {
    width: 18px;
    height: 18px;
  }
}

.pv-test-title:focus {
  outline: none;
}

.pv-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 4px;
  padding: 0;
  border: 1.5px solid var(--rd-line, #e2e8f0);
  border-radius: 12px;
  background: var(--rd-surface, #fff);
  color: var(--rd-muted, var(--ds-muted, #5b6678));
  font-size: 1.05rem;
  vertical-align: middle;
  cursor: pointer;
}

.pv-eye.is-open {
  border-color: #c9d8ff;
  background: var(--rd-blue-soft, #eaf1ff);
}

.pv-eye:hover,
.pv-eye.is-open {
  color: var(--rd-blue, var(--ds-blue, #1d4ed8));
  opacity: 1;
}

.pv-eye:focus-visible {
  outline: 2px solid var(--rd-blue, var(--ds-blue, #1d4ed8));
  outline-offset: 1px;
}

.pv-test-statement .pv-eye {
  font-size: 1.1rem;
}

.pv-stmt-es {
  margin: -4px 0 12px;
  color: var(--rd-muted, var(--ds-muted, #5b6678));
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
  text-align: inherit;
}

.pv-test .pv-stmt-es {
  text-align: center;
}

body.active .pv-eye {
  color: #94a3b8;
}

body.active .pv-eye:hover,
body.active .pv-eye.is-open {
  color: #93c5fd;
}

body.pv-book-end-pending #book-complete-bar {
  display: none;
}

.pv-save-link {
  display: inline-block;
  margin: 0 0 6px;
  color: var(--rd-blue, #1d4ed8);
  font-size: 0.86rem;
  font-weight: 800;
}

.pv-save-link[hidden] {
  display: none;
}

.pv-save-one .pv-save-link {
  margin: 0 0 0 10px;
}

.pv-save-row .pv-hard-w {
  min-height: 44px;
}

.pv-eye {
  width: 44px;
  height: 44px;
  margin: 0;
}

.pv-eye .pv-i {
  width: 22px;
  height: 22px;
}

body.active .pv-eye {
  border-color: #334155;
  background: #1e293b;
}

@media (max-width: 600px) {
  .pv-test-close,
  .pv-test-say {
    min-width: 44px;
    min-height: 44px;
  }
}

.pv-test-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
