/* ============================================
   PEAKPOINT SAT PREP — Vocabulary Practice
   ============================================ */

.vocab-screen {
  background:
    radial-gradient(circle at 86% 8%, rgba(14, 165, 233, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0, var(--bg-primary) 340px);
}

.vocab-main {
  background: transparent;
}

.vocab-screen.sidebar-collapsed .vocab-main {
  margin-left: 58px;
}

.vocab-inner {
  width: min(1160px, calc(100% - 56px));
  margin: 0 auto;
  padding: 54px 0 84px;
}

.vocab-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}

.vocab-header .eyebrow {
  color: var(--accent);
  margin-bottom: 10px;
}

.vocab-header h1 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 2.35rem;
  letter-spacing: 0;
}

.vocab-title-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: var(--accent);
}

.vocab-title-icon::before,
.vocab-title-icon::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 24px;
  border-radius: 6px;
  border: 3px solid currentColor;
  background: rgba(14, 165, 233, 0.08);
}

.vocab-title-icon::before {
  left: 2px;
  top: 7px;
  transform: rotate(-5deg);
}

.vocab-title-icon::after {
  right: 1px;
  top: 2px;
  transform: rotate(7deg);
}

.vocab-options,
.start-practice {
  min-height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--border-default);
  background: #fff;
  color: var(--text-heading);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0 18px;
  box-shadow: inset 0 -3px 0 var(--surface-2), var(--card-shadow);
}

.vocab-tabs {
  width: min(470px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  margin-bottom: 28px;
}

.vocab-tab {
  min-height: 42px;
  border-radius: 13px;
  border: 1.5px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 700;
}

.vocab-tab.active {
  background: #fff;
  border-color: var(--border-default);
  color: var(--text-heading);
  box-shadow: var(--card-shadow);
}

.vocab-tab:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--glow-soft), var(--card-shadow);
}

.vocab-tab span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
}

.vocab-panel {
  display: none;
}

.vocab-panel.active {
  display: block;
}

.vocab-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.vocab-mode-card,
.vocab-bank-card,
.word-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: var(--card-shadow);
}

.vocab-mode-card {
  min-height: 220px;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.vocab-mode-card h2,
.vocab-bank-card h2 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.vocab-mode-card p,
.vocab-bank-card p {
  color: var(--text-secondary);
  max-width: 300px;
  line-height: 1.55;
}

.vocab-mode-card button,
.vocab-bank-card button {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0 16px;
  box-shadow: inset 0 -4px 0 var(--accent-deep);
}

.mode-art {
  position: absolute;
  right: 20px;
  bottom: 16px;
  width: 76px;
  height: 76px;
  opacity: 0.12;
  color: var(--accent-deep);
}

.learn-art::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 16px;
  border: 8px solid currentColor;
  transform: rotate(-12deg);
}

.learn-art::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  right: 22px;
  top: 26px;
  border-radius: 50%;
  background: currentColor;
}

.match-art::before,
.match-art::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 4px;
  height: 18px;
  border: 8px solid currentColor;
  border-left: 0;
  border-radius: 0 14px 14px 0;
}

.match-art::before {
  top: 16px;
}

.match-art::after {
  bottom: 16px;
  transform: rotate(180deg);
}

.card-art::before,
.card-art::after {
  content: "";
  position: absolute;
  width: 38px;
  height: 58px;
  border-radius: 14px;
  background: currentColor;
}

.card-art::before {
  right: 4px;
  top: 8px;
  transform: rotate(16deg);
}

.card-art::after {
  left: 6px;
  bottom: 6px;
}

.vocab-explore-board {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: stretch;
}

.vocab-progress-card,
.vocab-game-card {
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--card-shadow);
}

.vocab-progress-card {
  min-height: 360px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
}

.vocab-progress-card h2 {
  font-size: 1.55rem;
  margin: 6px 0 10px;
}

.vocab-progress-card p:not(.eyebrow) {
  color: var(--text-secondary);
  line-height: 1.55;
}

.vocab-progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
  margin-top: 20px;
}

.vocab-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width 300ms ease;
}

.vocab-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vocab-score-grid span,
.game-metrics span,
.summary-stats span {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-weight: 700;
}

.vocab-score-grid strong,
.game-metrics strong,
.summary-stats strong {
  color: var(--text-heading);
  font-size: 1.3rem;
  line-height: 1;
}

.vocab-game-card {
  min-height: 360px;
  padding: 24px;
}

.vocab-game-empty {
  min-height: 312px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 10px;
}

.vocab-game-empty h2 {
  font-size: 1.7rem;
}

.vocab-game-empty p:not(.eyebrow) {
  max-width: 500px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.game-empty-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  box-shadow: inset 0 -7px 0 rgba(3, 105, 161, 0.34), 0 16px 30px rgba(14, 165, 233, 0.22);
  position: relative;
}

.game-empty-icon::before {
  content: "?";
  position: absolute;
  inset: 10px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
}

.vocab-game-shell {
  display: grid;
  gap: 18px;
}

.vocab-game-empty[hidden],
.vocab-game-shell[hidden] {
  display: none;
}

.vocab-game-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.vocab-game-head h2 {
  font-size: 1.45rem;
  margin-top: 4px;
}

.game-metrics,
.summary-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.game-metrics span {
  min-width: 92px;
  min-height: 56px;
}

.practice-prompt {
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, var(--surface-2));
  border: 1px solid var(--border-soft);
}

.practice-prompt h3,
.deck-card h3,
.game-summary-card h3 {
  color: var(--text-heading);
  font-size: 2rem;
  margin: 10px 0;
}

.practice-prompt p,
.game-summary-card p {
  color: var(--text-secondary);
}

.practice-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.practice-choices button,
.match-column button {
  min-height: 64px;
  padding: 14px 16px;
  border: 1.5px solid var(--border-default);
  border-radius: 18px;
  background: #fff;
  color: var(--text-heading);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  box-shadow: var(--card-shadow);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.practice-choices button:hover,
.match-column button:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 165, 233, 0.42);
}

.practice-choices button.is-correct,
.match-column button.is-matched {
  background: #dcfce7;
  border-color: #22c55e;
  color: #047857;
}

.practice-choices button.is-wrong {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.vocab-game-feedback {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text-heading);
  font-weight: 700;
}

.vocab-game-feedback.is-correct {
  background: #dcfce7;
  color: #047857;
}

.vocab-game-feedback.is-wrong {
  background: #fef3c7;
  color: #a16207;
}

.vocab-game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vocab-secondary-action {
  min-height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--border-default);
  background: #fff;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-weight: 800;
  padding: 0 16px;
  box-shadow: inset 0 -3px 0 var(--surface-2), var(--card-shadow);
}

.match-board {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 14px;
}

.match-column {
  display: grid;
  gap: 10px;
}

.match-column h3 {
  color: var(--text-heading);
  font-size: 1rem;
}

.match-column button.is-selected {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--glow-soft), var(--card-shadow);
}

.deck-card {
  min-height: 248px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 30px;
  text-align: center;
  border-radius: 24px;
  border: 1.5px solid var(--border-default);
  background:
    radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.16), transparent 28%),
    linear-gradient(145deg, #ffffff, #eaf7ff);
  box-shadow: var(--card-shadow);
}

.deck-card p {
  max-width: 560px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

.deck-card.is-revealed {
  border-color: rgba(14, 165, 233, 0.36);
}

.game-summary-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #ffffff, var(--surface-2));
  border: 1px solid var(--border-soft);
}

.summary-stats {
  justify-content: center;
  margin-top: 8px;
}

.vocab-library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--card-shadow);
}

.vocab-library-head h2 {
  font-size: 1.65rem;
  margin: 4px 0 8px;
}

.vocab-library-head p:not(.eyebrow) {
  color: var(--text-secondary);
  margin: 0;
}

.vocab-library-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vocab-library-stats span {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-weight: 700;
}

.vocab-library-stats strong {
  color: var(--text-heading);
  font-size: 1.35rem;
}

.vocab-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
}

.vocab-search,
.vocab-select {
  display: grid;
  gap: 7px;
}

.vocab-search {
  grid-column: span 2;
}

.vocab-select span {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.vocab-search input,
.vocab-select select,
.vocab-reset {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid var(--border-default);
  border-radius: 16px;
  background: #fff;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--card-shadow);
}

.vocab-search input {
  padding: 0 16px;
  font-family: var(--font-body);
  font-weight: 600;
}

.vocab-select select {
  appearance: none;
  padding: 0 36px 0 14px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-deep) 50%),
    linear-gradient(135deg, var(--accent-deep) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 21px,
    calc(100% - 12px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.vocab-search input:focus,
.vocab-select select:focus,
.vocab-reset:focus-visible,
.word-card:focus-visible,
.word-action:focus-visible,
.start-practice:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--glow-soft), var(--card-shadow);
}

.vocab-reset {
  color: var(--accent-deep);
  padding: 0 16px;
}

.start-practice {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent);
  color: #fff;
  border-color: rgba(3, 105, 161, 0.25);
  box-shadow: inset 0 -4px 0 var(--accent-deep), var(--card-shadow);
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.word-card {
  min-height: 206px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  text-align: left;
  border-width: 1.5px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.word-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.36);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.16);
}

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

.word-card strong {
  color: var(--text-heading);
  font-size: 1.12rem;
  line-height: 1.1;
}

.word-definition {
  flex: 1;
  color: var(--text-secondary);
  line-height: 1.48;
  margin: 0;
}

.word-tags,
.word-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-tag,
.word-status,
.word-action {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
}

.word-tag {
  background: var(--surface-2);
  color: var(--accent-deep);
}

.word-status {
  background: #e0f2fe;
  color: var(--accent-deep);
  white-space: nowrap;
}

.word-status.mastered,
.word-action.mastered.is-active {
  background: #dcfce7;
  color: #047857;
}

.word-status.shaky,
.word-action.shaky.is-active {
  background: #fef3c7;
  color: #b45309;
}

.word-status.learning,
.word-action.learning.is-active {
  background: #dff4ff;
  color: var(--accent-deep);
}

.word-status.new {
  background: #f1f5f9;
  color: var(--text-secondary);
}

.word-action {
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--text-secondary);
}

.word-action:hover {
  color: var(--accent-deep);
  border-color: rgba(14, 165, 233, 0.34);
}

.word-empty {
  display: none;
  margin-top: 28px;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 700;
}

.word-empty.show {
  display: block;
}

.word-results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.word-results-footer p {
  color: var(--text-secondary);
  font-weight: 700;
}

.word-results-footer .start-practice[hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .vocab-explore-board {
    grid-template-columns: 1fr;
  }

  .word-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vocab-toolbar {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .start-practice {
    justify-self: stretch;
  }
}

@media (max-width: 860px) {
  .vocab-screen.sidebar-collapsed .vocab-main {
    margin-left: 58px;
  }

  .vocab-inner {
    width: calc(100% - 32px);
    padding-top: 34px;
  }

  .vocab-mode-grid {
    grid-template-columns: 1fr;
  }

  .vocab-game-head {
    align-items: stretch;
    flex-direction: column;
  }

  .game-metrics {
    justify-content: flex-start;
  }

  .practice-choices,
  .match-board {
    grid-template-columns: 1fr;
  }

  .vocab-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .vocab-library-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .word-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .vocab-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .vocab-header h1 {
    font-size: 1.9rem;
  }

  .vocab-bank-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .vocab-toolbar {
    grid-template-columns: 1fr;
  }

  .vocab-search {
    grid-column: span 1;
  }

  .word-results-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .vocab-score-grid {
    grid-template-columns: 1fr;
  }

  .practice-prompt h3,
  .deck-card h3,
  .game-summary-card h3 {
    font-size: 1.55rem;
  }
}
