/* vocab-preview-r5 */
/* Topic vocabulary page. Animate transform and opacity only.
   Reuses Question Types page spacing, hero, tabs and cards. */

.vt-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.vt-count {
  flex: none;
  margin-top: 4px;
  font: 700 12px/1 var(--font-ui, inherit);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--brand-50, #ECF0F5);
  color: var(--brand, #1D3557);
  box-shadow: inset 0 0 0 1px var(--brand-line, rgba(29,53,87,.12));
  white-space: nowrap;
}
html[data-theme=dark] .vt-count {
  background: #1A2740;
  color: #C9D6EA;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

/* Two-tab Intermediate / Advanced bar (same pill as Question Types) */
.qt-tabs.vt-tabs { grid-template-columns: 1fr 1fr; max-width: 360px; }

.vt-letter {
  width: 44px; height: 44px; flex: none; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--qt-c-bg, var(--brand-50));
  color: var(--qt-c, var(--brand));
  font: 700 18px/1 var(--font-head, inherit);
  letter-spacing: 0;
}
.vt-meta {
  display: block;
  margin-top: 8px;
  font: 600 13px/1.3 var(--font-ui, inherit);
  color: var(--ink, #1A1A1F);
}
html[data-theme=dark] .vt-meta { color: var(--ink, #EDE8DF); }
.vt-bar {
  display: block;
  margin-top: 8px;
  height: 6px;
  border-radius: 99px;
  background: var(--line, #E4DED3);
  overflow: hidden;
}
html[data-theme=dark] .vt-bar { background: rgba(255,255,255,.12); }
.vt-bar > i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: var(--qt-c, var(--brand, #1D3557));
  -webkit-transform: scaleX(var(--p, 0));
  transform: scaleX(var(--p, 0));
  -webkit-transform-origin: 0 50%;
  transform-origin: 0 50%;
}
.vt-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font: 700 13px/1 var(--font-ui, inherit);
  color: var(--qt-c, var(--brand, #1D3557));
}
.qt-card.vt-card { align-items: stretch; }
.qt-card.vt-card .qt-card-name { overflow-wrap: anywhere; }

/* Per-topic colours */
.vt-tone-voice   { --qt-c: #1D3557; --qt-c-bg: #ECF0F5; }
.vt-tone-edu     { --qt-c: #2B6B8A; --qt-c-bg: #E5F1F6; }
.vt-tone-env     { --qt-c: #3E7A52; --qt-c-bg: #E6F3EA; }
.vt-tone-health  { --qt-c: #2B7352; --qt-c-bg: #E5F3EB; }
.vt-tone-society { --qt-c: #6B4E9B; --qt-c-bg: #F0EAF7; }
.vt-tone-tech    { --qt-c: #2E63C9; --qt-c-bg: #E8EFFB; }
.vt-tone-data    { --qt-c: #94600F; --qt-c-bg: #F6EDD9; }
.vt-tone-work    { --qt-c: #8A4A2B; --qt-c-bg: #F6EBE5; }
.vt-tone-crime   { --qt-c: #8B3A4A; --qt-c-bg: #F6E6EA; }
.vt-tone-media   { --qt-c: #3B5B9A; --qt-c-bg: #E8EEF8; }
.vt-tone-culture { --qt-c: #B08440; --qt-c-bg: #F6EEDD; }
.vt-tone-travel  { --qt-c: #1F6B6B; --qt-c-bg: #E3F2F2; }
.vt-tone-money   { --qt-c: #6B5A1F; --qt-c-bg: #F3EED9; }
.vt-tone-family  { --qt-c: #7A4A6B; --qt-c-bg: #F6E8F1; }
html[data-theme=dark] .vt-tone-voice   { --qt-c: #A9C0E0; --qt-c-bg: #1A2740; }
html[data-theme=dark] .vt-tone-edu     { --qt-c: #7EC4DE; --qt-c-bg: #173039; }
html[data-theme=dark] .vt-tone-env     { --qt-c: #7ECFA0; --qt-c-bg: #173126; }
html[data-theme=dark] .vt-tone-health  { --qt-c: #6FCB9A; --qt-c-bg: #163226; }
html[data-theme=dark] .vt-tone-society { --qt-c: #C4A6E8; --qt-c-bg: #2A2140; }
html[data-theme=dark] .vt-tone-tech    { --qt-c: #8AB0F0; --qt-c-bg: #1A2740; }
html[data-theme=dark] .vt-tone-data    { --qt-c: #E0B56A; --qt-c-bg: #2C2314; }
html[data-theme=dark] .vt-tone-work    { --qt-c: #E0A888; --qt-c-bg: #2C1E16; }
html[data-theme=dark] .vt-tone-crime   { --qt-c: #E39AAB; --qt-c-bg: #2C1820; }
html[data-theme=dark] .vt-tone-media   { --qt-c: #9BB0E0; --qt-c-bg: #1A2238; }
html[data-theme=dark] .vt-tone-culture { --qt-c: #E2C47F; --qt-c-bg: #2A2416; }
html[data-theme=dark] .vt-tone-travel  { --qt-c: #7ED0D0; --qt-c-bg: #143030; }
html[data-theme=dark] .vt-tone-money   { --qt-c: #D8C57A; --qt-c-bg: #2A2514; }
html[data-theme=dark] .vt-tone-family  { --qt-c: #E0A8C8; --qt-c-bg: #2A1824; }

/* Learning view */
.vt-stage {
  margin: 0 0 18px;
  padding: 22px 20px 20px;
  border-radius: 20px;
  background:
    linear-gradient(var(--surface, #FFFDF9), var(--surface, #FFFDF9)) padding-box,
    linear-gradient(155deg, var(--qt-c, var(--brand-line)), var(--line, #E4DED3) 62%) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(45,36,22,.06));
  box-sizing: border-box;
  max-width: 100%;
}
html[data-theme=dark] .vt-stage {
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.vt-word {
  margin: 0 0 8px;
  font: 700 clamp(26px, 6vw, 36px)/1.2 var(--font-head, inherit);
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.vt-pos {
  display: inline-block;
  margin: 0 0 14px;
  font: 700 11px/1 var(--font-ui, inherit);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--qt-c-bg, var(--brand-50));
  color: var(--qt-c, var(--brand));
}
.vt-meaning, .vt-example {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.vt-example {
  color: var(--muted, #5F5B55);
  font-style: italic;
}
.vt-example strong { font-style: normal; color: var(--ink, #1A1A1F); font-weight: 700; }
html[data-theme=dark] .vt-example strong { color: var(--ink, #EDE8DF); }
.vt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.vt-actions .btn { min-height: 44px; }
.vt-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 18px;
}
.vt-nav .btn { min-width: 44px; min-height: 44px; }
.vt-step {
  font: 600 13px/1.3 var(--font-ui, inherit);
  color: var(--muted, #5F5B55);
  text-align: center;
  flex: 1;
  min-width: 0;
}
.vt-words {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.vt-words button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line, #E4DED3);
  background: var(--surface, #FFFDF9);
  color: inherit;
  font: 600 14px/1.3 var(--font-ui, inherit);
  cursor: pointer;
  box-sizing: border-box;
}
.vt-words button.is-on {
  box-shadow: inset 3px 0 0 var(--qt-c, var(--brand, #1D3557));
  border-color: var(--brand-line, rgba(29,53,87,.35));
}
.vt-words button.is-known { opacity: .72; }
.vt-tick {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--line, #E4DED3);
  color: transparent;
  font-size: 12px;
}
.vt-words button.is-known .vt-tick {
  background: var(--qt-c, var(--brand, #1D3557));
  color: #fff;
}
.vt-wlabel { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vt-wpos { flex: none; font-size: 12px; color: var(--muted, #5F5B55); }

html[data-motion=on] .vt-stage {
  animation: qt-rise 420ms cubic-bezier(.22, 1, .36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .vt-stage, .vt-bar > i { animation: none !important; transition: none !important; }
}
html[data-motion=off] .vt-stage,
html[data-motion=none] .vt-stage { animation: none !important; }

@media (max-width: 390px) {
  .vt-stage { padding: 16px 14px; }
  .vt-actions .btn { flex: 1 1 140px; }
}

.vt-cefr {
  display: block;
  margin-top: 2px;
  font: 650 10px/1 var(--font-ui, inherit);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted, #5F5B55);
  opacity: .85;
}
.qt-tab.is-on .vt-cefr { color: var(--brand, #1D3557); opacity: 1; }
html[data-theme=dark] .qt-tab.is-on .vt-cefr { color: #C9D6EA; }
.qt-page .qt-block { margin-bottom: 20px; }
