/* Psychometric vocabulary */
.psychometric-page {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.psychometric-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.psychometric-hero > div {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  padding: clamp(26px, 4vw, 52px);
}

.psychometric-hero h1 {
  max-width: 760px;
  margin: 8px 0 16px;
  color: var(--navy);
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  line-height: 1.04;
}

.psychometric-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.psychometric-overview {
  display: flex;
  align-items: center;
  gap: 24px;
}

.psychometric-progress-ring {
  --vocabulary-progress: 0deg;
  width: 136px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 59%, transparent 61%),
    conic-gradient(var(--blue) var(--vocabulary-progress), #e9f1f6 0);
}

.psychometric-progress-ring strong {
  color: var(--navy);
  font-size: 2rem;
}

.psychometric-progress-ring span,
.psychometric-overview-copy small {
  color: var(--muted);
}

.psychometric-overview-copy {
  flex: 1;
}

.psychometric-overview-copy > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 1.08rem;
}

.psychometric-progress-track {
  height: 9px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f1f6;
}

.psychometric-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.psychometric-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.vocabulary-units,
.vocabulary-workspace {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.vocabulary-units {
  position: sticky;
  top: 96px;
  padding: 18px;
  max-height: calc(100vh - 118px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vocabulary-units-head {
  padding: 8px 8px 16px;
}

.vocabulary-units-head h2,
.vocabulary-toolbar h2 {
  margin: 4px 0 0;
  color: var(--navy);
}

.vocabulary-unit-list {
  display: grid;
  gap: 7px;
}

.vocabulary-unit-button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  width: 100%;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  text-align: right;
  cursor: pointer;
}

.vocabulary-unit-button:hover,
.vocabulary-unit-button.active {
  border-color: #cfe0eb;
  background: #f4f8fb;
  color: var(--navy);
}

.vocabulary-unit-button.active {
  box-shadow: inset -4px 0 var(--blue);
}

.vocabulary-unit-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--navy);
  background: #e9f2f7;
  font-weight: 900;
}

.vocabulary-unit-button strong,
.vocabulary-unit-button small {
  display: block;
}

.vocabulary-unit-button small {
  margin-top: 2px;
  font-size: 0.75rem;
}

.vocabulary-unit-mini {
  grid-column: 2;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3edf3;
}

.vocabulary-unit-mini i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.vocabulary-workspace {
  min-width: 0;
  padding: clamp(20px, 3vw, 34px);
}

.vocabulary-attribution {
  margin: 18px 4px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.vocabulary-attribution a {
  color: var(--blue);
  font-weight: 800;
}

.vocabulary-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding-bottom: 22px;
}

.vocabulary-toolbar p {
  max-width: 640px;
  margin: 7px 0 0;
  color: var(--muted);
}

.vocabulary-search {
  width: min(330px, 100%);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.vocabulary-search span {
  display: block;
  margin-bottom: 7px;
}

.vocabulary-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy);
  background: #fbfcfd;
  font: inherit;
  font-size: 0.95rem;
}

.vocabulary-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 10px;
  border-radius: 14px;
  background: #f3f7fa;
}

.vocabulary-filter-row button,
.vocabulary-unit-footer button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #d5e2ea;
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.vocabulary-filter-row button.active,
.vocabulary-unit-footer button.primary {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.vocabulary-list-head,
.vocabulary-word-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(240px, 1.35fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: center;
}

.vocabulary-list-head {
  padding: 0 18px 9px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
}

.vocabulary-word-list {
  display: grid;
  gap: 9px;
}

.vocabulary-word-card {
  min-height: 86px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease;
}

.vocabulary-word-card[data-word-status="known"] {
  border-color: #a7d8c0;
  background: #f7fcf9;
}

.vocabulary-word-card[data-word-status="partial"] {
  border-color: #e6cf91;
  background: #fffdf6;
}

.vocabulary-word-card[data-word-status="unknown"] {
  border-color: #e8b4b4;
  background: #fffafa;
}

.vocabulary-word-primary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--navy);
}

.vocabulary-word-primary strong {
  font-size: 1.2rem;
}

.vocabulary-word-primary button {
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: grayscale(1);
}

.vocabulary-word-meaning strong,
.vocabulary-word-meaning small {
  display: block;
}

.vocabulary-word-meaning {
  color: var(--navy);
}

.vocabulary-word-meaning small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.vocabulary-status-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.vocabulary-status-buttons button {
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid #d8e3ea;
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.vocabulary-status-buttons button.active.unknown {
  border-color: #c95f5f;
  color: #8c3232;
  background: #fceaea;
}

.vocabulary-status-buttons button.active.partial {
  border-color: #c89a27;
  color: #775600;
  background: #fff4d4;
}

.vocabulary-status-buttons button.active.known {
  border-color: #3f9c70;
  color: #216745;
  background: #e8f6ef;
}

.vocabulary-empty {
  margin: 28px 0;
  padding: 34px;
  border-radius: 14px;
  color: var(--muted);
  background: #f5f8fa;
  text-align: center;
}

.vocabulary-unit-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.vocabulary-unit-footer button:disabled {
  opacity: 0.38;
  cursor: default;
}

.probability-table-card,
.probability-tree-card {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid #cfe0eb;
  border-radius: 16px;
  background: #f8fbfd;
}

.probability-table-card figcaption,
.probability-tree-card figcaption {
  margin-bottom: 14px;
  color: var(--navy);
  font-weight: 900;
}

.probability-table-scroll {
  overflow-x: auto;
}

.probability-table-card table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  color: var(--navy);
  text-align: center;
}

.probability-table-card th,
.probability-table-card td {
  padding: 12px 10px;
  border: 1px solid #d7e4ec;
}

.probability-table-card thead th,
.probability-table-card tbody th {
  background: #eaf3f8;
  font-weight: 900;
}

.probability-tree-card svg {
  display: block;
  width: min(100%, 760px);
  height: auto;
  margin-inline: auto;
}

.probability-tree-lines line {
  stroke: var(--blue);
  stroke-width: 3;
}

.probability-tree-nodes circle {
  fill: var(--blue);
}

.probability-tree-labels text {
  direction: rtl;
  fill: var(--navy);
  font-size: 18px;
  font-weight: 800;
  text-anchor: middle;
}

@media (max-width: 620px) {
  .probability-table-card,
  .probability-tree-card {
    margin-inline: -8px;
    padding: 12px;
  }

  .probability-tree-labels text {
    font-size: 15px;
  }
}

@media (max-width: 1050px) {
  .psychometric-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .vocabulary-units {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: none;
    overflow: visible;
  }

  .vocabulary-unit-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .vocabulary-unit-button {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .vocabulary-list-head,
  .vocabulary-word-card {
    grid-template-columns: minmax(130px, 0.55fr) minmax(220px, 1fr);
  }

  .vocabulary-status-buttons {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .psychometric-page {
    width: min(100% - 22px, 1440px);
    padding-top: 22px;
  }

  .psychometric-hero {
    grid-template-columns: 1fr;
  }

  .psychometric-overview {
    padding: 24px !important;
  }

  .psychometric-progress-ring {
    width: 106px;
  }

  .vocabulary-unit-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .vocabulary-unit-button {
    min-width: 170px;
  }

  .vocabulary-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .vocabulary-search {
    width: 100%;
  }

  .vocabulary-list-head {
    display: none;
  }

  .vocabulary-word-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .vocabulary-word-primary {
    justify-content: flex-start;
  }

  .vocabulary-status-buttons {
    grid-column: auto;
  }

  .vocabulary-unit-footer {
    flex-wrap: wrap;
  }

  .vocabulary-unit-footer span {
    order: -1;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .psychometric-hero > div,
  .vocabulary-workspace,
  .vocabulary-units {
    border-radius: 16px;
  }

  .psychometric-overview {
    align-items: flex-start;
    flex-direction: column;
  }

  .vocabulary-filter-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .vocabulary-filter-row button:first-child {
    grid-column: 1 / -1;
  }

  .vocabulary-status-buttons {
    grid-template-columns: 1fr;
  }
}

/* Psychometric flashcards */
.flashcard-page {
  width: min(100% - 40px, 1180px);
  padding-top: 34px;
}

.flashcard-hero {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  margin-bottom: 18px;
}

.flashcard-hero > div {
  padding: clamp(24px, 3vw, 38px);
  border-radius: 20px;
}

.flashcard-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
}

.flashcard-learning-shell {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.flashcard-unit-bar,
.flashcard-workspace {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.flashcard-unit-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 15px 18px;
}

.flashcard-unit-bar > div:first-child {
  flex: 0 0 auto;
}

.flashcard-unit-bar .eyebrow {
  margin-bottom: 2px;
  font-size: 0.7rem;
}

.flashcard-unit-bar > div:first-child > strong {
  color: var(--navy);
}

.flashcard-unit-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(54px, 1fr));
  gap: 7px;
  flex: 1;
}

.flashcard-unit-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid #d8e4eb;
  border-radius: 12px;
  color: var(--muted);
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.flashcard-unit-button strong {
  color: inherit;
  font-size: 0.95rem;
}

.flashcard-unit-button small {
  font-size: 0.66rem;
}

.flashcard-unit-button:hover,
.flashcard-unit-button.active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.flashcard-workspace {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 38px);
}

.flashcard-workspace-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.flashcard-workspace-head h2 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.flashcard-workspace-head > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.flashcard-unit-progress {
  height: 5px;
  margin: 18px 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0f5;
}

.flashcard-unit-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.vocabulary-flashcard {
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 26px;
  padding: clamp(30px, 6vw, 62px);
  border: 1px solid #cddde7;
  border-radius: 24px;
  outline: 0;
  color: var(--navy);
  background: #fbfcfd;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.vocabulary-flashcard:hover,
.vocabulary-flashcard:focus-visible {
  border-color: #9bbbd0;
  box-shadow: 0 18px 50px rgba(13, 56, 99, 0.08);
}

.vocabulary-flashcard.revealed {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.vocabulary-flashcard-front {
  display: grid;
  place-items: center;
  gap: 13px;
}

.vocabulary-flashcard-front > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.vocabulary-flashcard-front > strong {
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.vocabulary-flashcard-front button {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid #d5e2ea;
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.vocabulary-flashcard-reveal {
  color: var(--muted);
  font-size: 0.85rem;
}

.vocabulary-flashcard-back {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.vocabulary-flashcard-back strong {
  display: block;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
}

.vocabulary-flashcard-back p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.flashcard-status-label {
  margin: 22px 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.flashcard-status-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.flashcard-status-buttons button {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d7e3ea;
  border-radius: 17px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.flashcard-status-buttons svg {
  width: 27px;
  height: 27px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flashcard-status-buttons .partial .half-fill {
  fill: currentColor;
  stroke: none;
}

.flashcard-status-buttons button:hover,
.flashcard-status-buttons button.active {
  transform: translateY(-1px);
}

.flashcard-status-buttons .unknown:hover,
.flashcard-status-buttons .unknown.active {
  border-color: #d58b8b;
  color: #873737;
  background: #fff2f2;
}

.flashcard-status-buttons .partial:hover,
.flashcard-status-buttons .partial.active {
  border-color: #d8b75e;
  color: #705300;
  background: #fff8e4;
}

.flashcard-status-buttons .known:hover,
.flashcard-status-buttons .known.active {
  border-color: #76b99b;
  color: #1e6847;
  background: #eef9f3;
}

.flashcard-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.flashcard-navigation button {
  min-width: 88px;
  min-height: 40px;
  border: 1px solid #d8e3ea;
  border-radius: 11px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.flashcard-navigation button:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 820px) {
  .flashcard-page {
    width: min(100% - 22px, 1180px);
  }

  .flashcard-hero {
    grid-template-columns: 1fr;
  }

  .flashcard-unit-bar {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
  }

  .flashcard-unit-list {
    width: 100%;
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .flashcard-unit-button {
    min-width: 62px;
  }
}

@media (max-width: 520px) {
  .flashcard-page {
    padding-top: 18px;
  }

  .flashcard-hero h1 {
    font-size: 3rem;
  }

  .flashcard-workspace {
    padding: 16px;
    border-radius: 16px;
  }

  .flashcard-workspace-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .vocabulary-flashcard {
    min-height: 320px;
    padding: 30px 18px;
    border-radius: 18px;
  }

  .vocabulary-flashcard-front > strong {
    font-size: clamp(2.8rem, 16vw, 4.2rem);
  }

  .flashcard-status-buttons {
    gap: 10px;
  }

  .flashcard-status-buttons button {
    width: 54px;
    height: 54px;
  }
}

/* Interactive vocabulary cards */
.vocabulary-word-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.vocabulary-word-card.vocabulary-study-card {
  position: relative;
  display: flex;
  min-height: 174px;
  padding: 12px;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  cursor: default;
}

.vocabulary-study-card .vocabulary-card-face {
  display: flex;
  min-height: 108px;
  width: 100%;
  padding: 22px 12px 14px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  color: var(--navy);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.vocabulary-study-card .vocabulary-card-face:focus-visible,
.vocabulary-card-audio:focus-visible,
.vocabulary-card-controls button:focus-visible {
  outline: 3px solid rgba(23, 90, 143, 0.2);
  outline-offset: 2px;
}

.vocabulary-study-card .vocabulary-word-primary {
  position: static;
  display: block;
  padding: 0;
}

.vocabulary-study-card .vocabulary-word-primary strong {
  font-size: 1.3rem;
}

.vocabulary-study-card.revealed .vocabulary-word-primary strong {
  color: var(--muted);
  font-size: 0.92rem;
}

.vocabulary-study-card .vocabulary-word-meaning {
  width: 100%;
}

.vocabulary-card-audio {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dbe7ee;
  border-radius: 50%;
  color: #587086;
  background: #f7fafc;
  cursor: pointer;
}

.vocabulary-card-audio:hover {
  color: var(--blue);
  background: #edf5f9;
}

.vocabulary-card-audio svg,
.vocabulary-action-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vocabulary-card-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid #edf2f5;
}

.vocabulary-study-card .vocabulary-example-button {
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid #dbe7ee;
  border-radius: 11px;
  color: #587086;
  background: #fff;
}

.vocabulary-study-card .vocabulary-example-button:hover,
.vocabulary-study-card .vocabulary-example-button.active {
  color: var(--blue);
  background: #edf5f9;
}

.vocabulary-study-card .vocabulary-example-button small {
  display: none;
}

.vocabulary-study-card .vocabulary-status-buttons {
  display: flex;
  width: auto;
  gap: 6px;
}

.vocabulary-study-card .vocabulary-status-buttons button {
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 11px;
  background: #fff;
  opacity: 0.62;
}

.vocabulary-study-card .vocabulary-status-buttons button:hover,
.vocabulary-study-card .vocabulary-status-buttons button.active {
  opacity: 1;
  transform: translateY(-1px);
}

.vocabulary-study-card .vocabulary-status-buttons button.unknown {
  color: #c45151;
}

.vocabulary-study-card .vocabulary-status-buttons button.partial {
  color: #b17a16;
}

.vocabulary-study-card .vocabulary-status-buttons button.known {
  color: #23815a;
}

.vocabulary-study-card .vocabulary-status-buttons button.active {
  color: #fff;
}

.vocabulary-study-card .vocabulary-status-buttons button.unknown.active {
  background: #c45151;
}

.vocabulary-study-card .vocabulary-status-buttons button.partial.active {
  background: #b17a16;
}

.vocabulary-study-card .vocabulary-status-buttons button.known.active {
  background: #23815a;
}

.vocabulary-study-card .vocabulary-status-buttons button > span.vocabulary-action-icon {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  border: 0;
}

.vocabulary-study-card .vocabulary-status-buttons small {
  display: none;
}

.vocabulary-action-icon .icon-fill {
  fill: currentColor;
  stroke: none;
  opacity: 0.18;
}

.vocabulary-study-card .vocabulary-example {
  width: 100%;
  margin: 10px 0 2px;
  padding: 10px;
  border-radius: 10px;
  color: #536579;
  background: #f6f9fb;
  font-size: 0.76rem;
}

@media (max-width: 1050px) {
  .vocabulary-word-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .vocabulary-word-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .vocabulary-word-card.vocabulary-study-card {
    min-height: 156px;
    padding: 9px;
  }

  .vocabulary-study-card .vocabulary-card-face {
    min-height: 100px;
    padding-inline: 6px;
  }

  .vocabulary-card-controls {
    gap: 5px;
  }

  .vocabulary-study-card .vocabulary-status-buttons {
    gap: 4px;
  }

  .vocabulary-study-card .vocabulary-status-buttons button,
  .vocabulary-study-card .vocabulary-example-button {
    width: 32px;
    min-height: 32px;
  }
}

/* Final list layout overrides */
.vocabulary-word-list {
  display: block;
  border-top: 1px solid #dbe5eb;
}

.vocabulary-word-card.vocabulary-study-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "face controls audio"
    "example example example";
  min-height: 58px;
  padding: 0 12px;
  align-items: center;
  gap: 10px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid #e4ebef;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  text-align: start;
}

.vocabulary-word-card.vocabulary-study-card:hover,
.vocabulary-word-card.vocabulary-study-card:focus-within {
  border-color: #d5e2e9;
  background: #f8fbfd;
  box-shadow: none;
}

.vocabulary-word-card.vocabulary-study-card[data-word-status="known"] {
  background: #f7fcf9;
  box-shadow: inset 3px 0 #58a982;
}

.vocabulary-word-card.vocabulary-study-card[data-word-status="partial"] {
  background: #fffdf7;
  box-shadow: inset 3px 0 #d2a542;
}

.vocabulary-word-card.vocabulary-study-card[data-word-status="unknown"] {
  background: #fff9f9;
  box-shadow: inset 3px 0 #d47777;
}

.vocabulary-study-card .vocabulary-card-face {
  grid-area: face;
  display: grid;
  grid-template-columns: minmax(150px, 0.48fr) minmax(0, 1fr);
  min-height: 57px;
  width: 100%;
  padding: 10px 4px;
  align-items: center;
  gap: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: start;
}

.vocabulary-study-card .vocabulary-word-primary {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
}

.vocabulary-study-card .vocabulary-word-primary strong,
.vocabulary-study-card.revealed .vocabulary-word-primary strong {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 850;
}

.vocabulary-study-card .vocabulary-word-meaning {
  min-width: 0;
  color: var(--navy);
  direction: rtl;
  text-align: right;
}

.vocabulary-study-card .vocabulary-word-meaning > strong {
  font-size: 0.96rem;
  font-weight: 750;
}

.vocabulary-card-audio {
  position: static;
  grid-area: audio;
  width: 34px;
  height: 34px;
}

.vocabulary-card-controls {
  grid-area: controls;
  width: auto;
  padding: 0;
  gap: 8px;
  border: 0;
}

.vocabulary-study-card .vocabulary-example {
  grid-area: example;
  width: auto;
  margin: 0 4px 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
}

@media (max-width: 680px) {
  .vocabulary-word-card.vocabulary-study-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "face audio"
      "controls controls"
      "example example";
    min-height: 54px;
    padding: 0 8px;
  }

  .vocabulary-study-card .vocabulary-card-face {
    grid-template-columns: 1fr;
    min-height: 53px;
    gap: 5px;
    padding-block: 9px;
  }

  .vocabulary-study-card .vocabulary-card-controls {
    justify-content: flex-start;
    padding: 0 4px 9px;
  }

  .vocabulary-study-card .vocabulary-word-primary strong,
  .vocabulary-study-card.revealed .vocabulary-word-primary strong {
    font-size: 1rem;
  }
}

/* Dense vocabulary list */
.vocabulary-word-list {
  display: block;
  border-top: 1px solid #dbe5eb;
}

.vocabulary-word-card.vocabulary-study-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "face controls audio"
    "example example example";
  min-height: 58px;
  padding: 0 12px;
  align-items: center;
  gap: 10px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid #e4ebef;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  text-align: start;
}

.vocabulary-word-card.vocabulary-study-card:hover,
.vocabulary-word-card.vocabulary-study-card:focus-within {
  border-color: #d5e2e9;
  background: #f8fbfd;
  box-shadow: none;
}

.vocabulary-word-card.vocabulary-study-card[data-word-status="known"] {
  background: #f7fcf9;
  box-shadow: inset 3px 0 #58a982;
}

.vocabulary-word-card.vocabulary-study-card[data-word-status="partial"] {
  background: #fffdf7;
  box-shadow: inset 3px 0 #d2a542;
}

.vocabulary-word-card.vocabulary-study-card[data-word-status="unknown"] {
  background: #fff9f9;
  box-shadow: inset 3px 0 #d47777;
}

.vocabulary-study-card .vocabulary-card-face {
  grid-area: face;
  display: grid;
  grid-template-columns: minmax(150px, 0.48fr) minmax(0, 1fr);
  min-height: 57px;
  width: 100%;
  padding: 10px 4px;
  align-items: center;
  gap: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: start;
}

.vocabulary-study-card .vocabulary-word-primary {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
}

.vocabulary-study-card .vocabulary-word-primary strong,
.vocabulary-study-card.revealed .vocabulary-word-primary strong {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 850;
}

.vocabulary-study-card .vocabulary-word-meaning {
  min-width: 0;
  color: var(--navy);
  direction: rtl;
  text-align: right;
}

.vocabulary-study-card .vocabulary-word-meaning > strong {
  font-size: 0.96rem;
  font-weight: 750;
}

.vocabulary-card-audio {
  position: static;
  grid-area: audio;
  width: 34px;
  height: 34px;
}

.vocabulary-card-controls {
  grid-area: controls;
  width: auto;
  padding: 0;
  gap: 8px;
  border: 0;
}

.vocabulary-study-card .vocabulary-example {
  grid-area: example;
  width: auto;
  margin: 0 4px 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
}

@media (max-width: 680px) {
  .vocabulary-word-card.vocabulary-study-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "face audio"
      "controls controls"
      "example example";
    min-height: 54px;
    padding: 0 8px;
  }

  .vocabulary-study-card .vocabulary-card-face {
    grid-template-columns: 1fr;
    min-height: 53px;
    gap: 5px;
    padding-block: 9px;
  }

  .vocabulary-study-card .vocabulary-card-controls {
    justify-content: flex-start;
    padding: 0 4px 9px;
  }

  .vocabulary-study-card .vocabulary-word-primary strong,
  .vocabulary-study-card.revealed .vocabulary-word-primary strong {
    font-size: 1rem;
  }
}

/* Minimal vocabulary cards */
.psychometric-page {
  width: min(1180px, calc(100% - 32px));
  padding-top: 24px;
}

.psychometric-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: 12px;
  margin-bottom: 12px;
}

.psychometric-hero > div {
  padding: 24px 28px;
  border-radius: 18px;
}

.psychometric-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.psychometric-hero p:not(.eyebrow) {
  font-size: 0.95rem;
  line-height: 1.6;
}

.psychometric-progress-ring {
  width: 82px;
}

.psychometric-progress-ring strong {
  font-size: 1.35rem;
}

.psychometric-shell {
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
}

.vocabulary-units,
.vocabulary-workspace {
  border-radius: 18px;
}

.vocabulary-units {
  padding: 10px;
}

.vocabulary-units-head {
  padding: 6px 8px 10px;
}

.vocabulary-units-head h2 {
  margin: 0;
  font-size: 1rem;
}

.vocabulary-unit-list {
  gap: 3px;
}

.vocabulary-unit-button {
  display: block;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.vocabulary-unit-button.active {
  box-shadow: inset -3px 0 var(--blue);
}

.vocabulary-workspace {
  padding: 24px;
}

.vocabulary-toolbar {
  align-items: center;
  padding-bottom: 18px;
}

.vocabulary-toolbar h2 {
  margin: 2px 0 0;
  font-size: 1.55rem;
}

.vocabulary-toolbar p {
  margin-top: 3px;
  font-size: 0.84rem;
}

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

.vocabulary-search input {
  min-height: 42px;
  border-radius: 10px;
}

.vocabulary-word-list {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.vocabulary-word-card.vocabulary-study-card {
  display: flex;
  min-height: 132px;
  padding: 18px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  outline: none;
}

.vocabulary-word-card.vocabulary-study-card:hover,
.vocabulary-word-card.vocabulary-study-card:focus-visible {
  border-color: #9fc3d9;
  box-shadow: 0 5px 18px rgba(24, 65, 102, 0.08);
}

.vocabulary-study-card .vocabulary-word-primary {
  position: static;
  justify-content: center;
  padding: 0;
}

.vocabulary-study-card .vocabulary-word-primary strong {
  font-size: 1.35rem;
}

.vocabulary-study-card.revealed .vocabulary-word-primary strong {
  color: var(--muted);
  font-size: 1rem;
}

.vocabulary-study-card .vocabulary-word-meaning {
  width: 100%;
}

.vocabulary-study-card .vocabulary-word-meaning > strong {
  color: var(--navy);
  font-size: 1.05rem;
}

.vocabulary-example-button {
  margin-top: 12px;
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.vocabulary-example {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.vocabulary-study-card .vocabulary-status-buttons {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.vocabulary-study-card .vocabulary-status-buttons button {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: 32px;
  min-height: 32px;
  padding: 0;
}

.vocabulary-study-card .vocabulary-status-buttons button > span {
  width: 26px;
  height: 26px;
}

.vocabulary-study-card .vocabulary-status-buttons small {
  display: none;
}

.vocabulary-unit-footer {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .psychometric-page {
    width: min(100% - 20px, 1180px);
  }

  .psychometric-hero {
    grid-template-columns: 1fr;
  }

  .psychometric-overview {
    justify-content: center;
  }

  .psychometric-shell {
    grid-template-columns: 1fr;
  }

  .vocabulary-units {
    position: static;
    max-height: none;
  }

  .vocabulary-unit-list {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .vocabulary-unit-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 88px;
    text-align: center;
  }

  .vocabulary-unit-button.active {
    box-shadow: inset 0 -3px var(--blue);
  }

  .vocabulary-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .vocabulary-search {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .psychometric-hero > div,
  .vocabulary-workspace {
    padding: 18px;
  }

  .psychometric-progress-ring {
    width: 70px;
  }

  .vocabulary-word-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .vocabulary-word-card.vocabulary-study-card {
    min-height: 116px;
    padding: 14px 10px;
  }

  .vocabulary-study-card .vocabulary-word-primary strong {
    font-size: 1.08rem;
  }
}

/* Psychometric unit list + filtered flashcard game */
.vocabulary-view-switch {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid #d5e2ea;
  border-radius: 13px;
  background: #f3f7fa;
}

.vocabulary-view-switch button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.vocabulary-view-switch button.active {
  color: #fff;
  background: var(--blue);
}

.vocabulary-word-card {
  align-items: start;
}

.vocabulary-word-primary {
  position: sticky;
  top: 92px;
  padding-top: 2px;
}

.vocabulary-word-meaning p {
  margin: 7px 0 0;
}

.vocabulary-english-definition {
  color: var(--navy);
  font-size: 0.88rem;
  line-height: 1.55;
}

.vocabulary-memory-aid {
  margin-top: 11px;
  padding: 8px 10px;
  border: 1px solid #dce8ef;
  border-radius: 10px;
  background: #f7fafc;
}

.vocabulary-memory-aid summary {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.vocabulary-memory-aid summary::-webkit-details-marker {
  display: none;
}

.vocabulary-memory-aid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.vocabulary-status-buttons button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
}

.vocabulary-status-buttons button > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 9px;
  font-size: 1.1rem;
  line-height: 1;
}

.vocabulary-status-buttons button > small {
  font: inherit;
  font-size: 0.72rem;
}

.vocabulary-game {
  min-height: 570px;
}

.vocabulary-game-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 15px;
  background: #f3f7fa;
}

.vocabulary-game-toolbar .eyebrow {
  margin: 0 0 9px;
}

.vocabulary-game-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.vocabulary-game-filters button,
.vocabulary-shuffle {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #d5e2ea;
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.vocabulary-game-filters button.active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.vocabulary-shuffle {
  flex: 0 0 auto;
}

.vocabulary-game-empty {
  min-height: 390px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px dashed #cbdce7;
  border-radius: 20px;
  color: var(--muted);
  background: #fbfcfd;
}

.vocabulary-game-empty strong {
  color: var(--navy);
  font-size: 1.2rem;
}

.vocabulary-game-empty p {
  margin: 8px 0 0;
}

.vocabulary-game .vocabulary-flashcard {
  min-height: 390px;
}

.vocabulary-game-memory {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 700px;
  margin: 18px auto 0;
  padding: 12px 16px;
  border-radius: 13px;
  background: #edf5f9;
}

.vocabulary-game-memory > span {
  flex: 0 0 auto;
  font-size: 1.8rem;
}

.vocabulary-game-memory p {
  margin: 0;
  color: var(--navy);
  text-align: right;
}

.vocabulary-game .flashcard-status-buttons button > span {
  font-size: 1.65rem;
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1050px) {
  .vocabulary-word-primary {
    position: static;
  }
}

@media (max-width: 760px) {
  .vocabulary-view-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .vocabulary-game-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .vocabulary-shuffle {
    align-self: flex-start;
  }

  .vocabulary-game {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .vocabulary-filter-row,
  .vocabulary-game-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .vocabulary-filter-row button:first-child,
  .vocabulary-game-filters button:first-child {
    grid-column: 1 / -1;
  }

  .vocabulary-status-buttons {
    grid-template-columns: repeat(3, 1fr);
  }

  .vocabulary-status-buttons button {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 62px;
  }

  .vocabulary-game .vocabulary-flashcard {
    min-height: 350px;
  }
}

/* Final vocabulary list layout */
.vocabulary-word-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
  margin-inline: auto;
  gap: 10px;
  border-top: 0;
}

.vocabulary-word-card.vocabulary-study-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "face"
    "example";
  min-height: 68px;
  padding: 0 14px;
  align-items: center;
  gap: 0;
  overflow: visible;
  border: 1px solid #d7e2e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(18, 47, 77, 0.055);
  text-align: center;
  cursor: default;
}

.vocabulary-word-card.vocabulary-study-card:hover,
.vocabulary-word-card.vocabulary-study-card:focus-within {
  border-color: #a9c9dc;
  background: #f8fbfd;
  box-shadow: 0 5px 16px rgba(18, 47, 77, 0.08);
}

.vocabulary-word-card.vocabulary-study-card[data-word-status="known"] {
  background: #f7fcf9;
  box-shadow: inset 3px 0 #58a982;
}

.vocabulary-word-card.vocabulary-study-card[data-word-status="partial"] {
  background: #fffdf7;
  box-shadow: inset 3px 0 #d2a542;
}

.vocabulary-word-card.vocabulary-study-card[data-word-status="unknown"] {
  background: #fff9f9;
  box-shadow: inset 3px 0 #d47777;
}

.vocabulary-study-card .vocabulary-card-face {
  grid-area: face;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 66px;
  width: 100%;
  padding: 10px 180px;
  align-items: center;
  justify-items: center;
  gap: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.vocabulary-study-card .vocabulary-word-primary {
  display: flex;
  width: 100%;
  justify-content: center;
  min-width: 0;
  text-align: center;
}

.vocabulary-study-card .vocabulary-word-primary strong,
.vocabulary-study-card.revealed .vocabulary-word-primary strong {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 850;
}

.vocabulary-study-card .vocabulary-word-meaning {
  min-width: 0;
  color: var(--navy);
  direction: rtl;
  text-align: center;
}

.vocabulary-study-card .vocabulary-word-meaning > strong {
  font-size: 0.96rem;
  font-weight: 750;
}

.vocabulary-card-audio {
  position: absolute;
  top: 50%;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
}

.vocabulary-card-controls {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 2;
  width: auto;
  padding: 0;
  gap: 8px;
  border: 0;
  transform: translateY(-50%);
}

.vocabulary-study-card .vocabulary-example {
  grid-area: example;
  width: auto;
  margin: 0 4px 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
}

@media (max-width: 680px) {
  .vocabulary-word-list {
    gap: 9px;
  }

  .vocabulary-word-card.vocabulary-study-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "face"
      "controls"
      "example";
    min-height: 92px;
    padding: 0 10px 9px;
    border-radius: 12px;
  }

  .vocabulary-study-card .vocabulary-card-face {
    grid-template-columns: 1fr;
    min-height: 52px;
    gap: 5px;
    padding: 9px 44px 5px;
  }

  .vocabulary-study-card .vocabulary-card-controls {
    position: static;
    grid-area: controls;
    justify-content: center;
    padding: 0;
    transform: none;
  }

  .vocabulary-card-audio {
    top: 10px;
    right: 10px;
    transform: none;
  }

  .vocabulary-study-card .vocabulary-word-primary strong,
  .vocabulary-study-card.revealed .vocabulary-word-primary strong {
    font-size: 1rem;
  }
}
