/* The Islamic vocabulary dictionary (/glossary): A to Z, term pages and practice.
   Colours come from the site tokens (layout.css), so light and dark themes follow automatically. */

.voc {
  --voc-gold: #d9b45f;
  --voc-gold-deep: #a47a2c;
  --voc-gold-soft: rgba(217, 180, 95, .16);
  --voc-ink-hero: #f4ead2;
  --voc-night: #0b3324;
  --voc-night-2: #10503a;
  padding-bottom: var(--ip-space-9);
  color: var(--ip-ink);
}

/* English content on Arabic and Urdu pages keeps the Latin interface font; specific classes below still win. */
:where(html[lang="ar"], html[lang="ur"]) .voc [dir="auto"] { font-family: var(--ip-font-sans); }

.voc [lang="ar"] { font-family: "Amiri", "Noto Naskh Arabic", serif; }
.voc .voc-flip{ display: inline-block; }
[dir="rtl"] .voc .voc-flip{ transform: scaleX(-1); }
.voc .voc-muted{ color: var(--ip-muted); }
.voc .voc-small{ font-size: var(--ip-text-sm); }

.voc .voc-btn{ display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: var(--ip-text-sm); text-decoration: none; cursor: pointer; transition: transform .2s var(--ip-ease), background-color .2s; }
.voc .voc-btn small{ font-weight: 500; opacity: .8; }
.voc .voc-btn:hover{ transform: translateY(-1px); }
.voc .voc-btn:focus-visible, .voc .voc-card:focus-visible, .voc .voc-cat:focus-visible, .voc .voc-choice:focus-visible, .voc .voc-flash:focus-visible{ outline: 3px solid var(--ip-focus); outline-offset: 2px; }
.voc .voc-btn--gold{ background: linear-gradient(135deg, #e8c776, #c39537); color: #2b1d02; }
.voc .voc-btn--gold:hover{ color: #2b1d02; }
.voc .voc-btn--light{ background: #fff; color: #0d3b29; }
.voc .voc-btn--light:hover{ color: #0d3b29; }
.voc .voc-btn--soft{ background: var(--ip-primary-soft); color: var(--ip-primary); }
.voc .voc-btn--soft:hover{ color: var(--ip-primary-hover); }
.voc .voc-btn--outline{ background: transparent; border-color: var(--ip-line-strong); color: var(--ip-ink); }
.voc .voc-link{ color: var(--voc-gold); font-weight: 600; }

.voc .voc-crumbs{ display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: var(--ip-text-sm); color: rgba(244, 234, 210, .78); margin-bottom: var(--ip-space-4); }
.voc .voc-crumbs a{ color: rgba(244, 234, 210, .92); text-decoration: none; }
.voc .voc-crumbs a:hover{ color: #fff; text-decoration: underline; }
.voc .voc-crumbs i{ font-size: .7rem; opacity: .7; }
.voc .voc-kicker{ display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 var(--ip-space-3); font-size: var(--ip-text-sm); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--voc-gold); }
.voc .voc-kicker a{ color: var(--voc-gold); text-decoration: none; }
.voc .voc-badge{ display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; background: rgba(217, 180, 95, .2); color: #f6e3b3; text-transform: none; letter-spacing: 0; font-size: var(--ip-text-xs); }

/* ---------- Hero ---------- */
.voc .voc-hero, .voc .voc-term-hero, .voc .voc-page-hero{
  color: var(--voc-ink-hero);
  background:
    var(--ip-pattern-light),
    radial-gradient(900px 460px at 90% -20%, rgba(217, 180, 95, .2), transparent 60%),
    linear-gradient(155deg, var(--voc-night) 0%, var(--voc-night-2) 100%);
}
.voc .voc-hero{ padding: var(--ip-space-8) 0 var(--ip-space-8); }
.voc .voc-hero__inner{ display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: var(--ip-space-8); align-items: center; }
.voc .voc-hero__title{ font-family: var(--ip-font-display); font-weight: 600; font-size: var(--ip-text-4xl); line-height: 1.08; color: #fff; margin: 0 0 var(--ip-space-3); }
.voc .voc-hero__lead{ font-size: var(--ip-text-lg); line-height: 1.65; color: rgba(244, 234, 210, .88); margin: 0 0 var(--ip-space-5); max-width: 40rem; }
.voc .voc-search{ position: relative; display: flex; gap: .5rem; max-width: 560px; padding: .35rem; border-radius: 999px; background: rgba(255, 255, 255, .96); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); }
.voc .voc-search i{ position: absolute; inset-inline-start: 1.15rem; top: 50%; transform: translateY(-50%); color: #5a6963; }
.voc .voc-search input{ flex: 1; min-width: 0; min-height: 46px; border: 0; background: transparent; padding-inline-start: 2.4rem; color: #13221d; font-size: 1rem; }
.voc .voc-search input:focus{ outline: none; }
.voc .voc-search:focus-within{ outline: 3px solid var(--voc-gold); outline-offset: 2px; }
.voc .voc-hero__actions{ display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--ip-space-4); }
.voc .voc-chip-link{ display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid rgba(244, 234, 210, .3); color: #f4ead2; text-decoration: none; font-weight: 600; font-size: var(--ip-text-sm); }
.voc .voc-chip-link:hover{ background: rgba(255, 255, 255, .1); color: #fff; }

.voc .voc-today{ position: relative; padding: var(--ip-space-6); border-radius: var(--ip-radius-xl); text-align: center; background: linear-gradient(160deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .03)); border: 1px solid rgba(217, 180, 95, .4); box-shadow: inset 0 0 0 6px rgba(217, 180, 95, .06); }
.voc .voc-today__label{ display: inline-flex; gap: .4rem; align-items: center; margin: 0 0 var(--ip-space-3); color: var(--voc-gold); font-weight: 600; font-size: var(--ip-text-sm); letter-spacing: .06em; text-transform: uppercase; }
.voc .voc-today__ar[lang]{ margin: 0; font-size: clamp(2.6rem, 2rem + 2.5vw, 3.8rem); line-height: 1.7; color: #fff; }
.voc .voc-today__term{ margin: 0; font-family: var(--ip-font-display); font-size: var(--ip-text-2xl); color: #fff; }
.voc .voc-today__say{ margin: .1rem 0 0; color: var(--voc-gold); font-weight: 600; letter-spacing: .04em; }
.voc .voc-today__mean{ margin: var(--ip-space-3) auto var(--ip-space-4); max-width: 24rem; color: rgba(244, 234, 210, .88); line-height: 1.6; }

/* ---------- Categories and letters ---------- */
.voc .voc-cats{ display: flex; flex-wrap: wrap; gap: .5rem; padding: var(--ip-space-6) 0 var(--ip-space-3); }
.voc .voc-cat{ display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--ip-line); background: var(--ip-surface); color: var(--ip-ink-2); text-decoration: none; font-weight: 600; font-size: var(--ip-text-sm); transition: border-color .2s, background-color .2s; }
.voc .voc-cat span{ padding: 0 .45rem; border-radius: 999px; background: var(--ip-surface-2); color: var(--ip-muted); font-size: var(--ip-text-xs); }
.voc .voc-cat:hover{ border-color: var(--voc-gold); color: var(--ip-ink); }
.voc .voc-cat.is-active{ background: var(--ip-primary); border-color: var(--ip-primary); color: var(--ip-primary-ink); }
.voc .voc-cat.is-active span{ background: rgba(0, 0, 0, .22); color: inherit; }
:root[data-theme="dark"] .voc .voc-cat.is-active span{ background: rgba(255, 255, 255, .3); }
.voc .voc-letters{ position: sticky; top: calc(var(--ip-header-h) + .25rem); z-index: 5; display: flex; flex-wrap: wrap; gap: .25rem; padding: .5rem; margin: var(--ip-space-2) 0 var(--ip-space-4); border-radius: var(--ip-radius-lg); background: color-mix(in srgb, var(--ip-bg-elevated) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--ip-line); }
.voc .voc-letters a{ display: inline-grid; place-items: center; min-width: 36px; height: 36px; border-radius: 10px; color: var(--ip-ink); font-weight: 700; text-decoration: none; }
.voc .voc-letters a:hover, .voc .voc-letters a.is-active{ background: var(--voc-gold-soft); color: var(--voc-gold-deep); }
:root[data-theme="dark"] .voc .voc-letters a:hover, :root[data-theme="dark"] .voc .voc-letters a.is-active{ color: var(--voc-gold); }
.voc .voc-filter-note{ display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-weight: 600; }
.voc .voc-filter-note a{ font-weight: 600; color: var(--ip-link); }
.voc .voc-count{ min-height: 1.2em; font-size: var(--ip-text-sm); }

/* ---------- Term cards ---------- */
.voc .voc-group{ padding-top: var(--ip-space-4); scroll-margin-top: calc(var(--ip-header-h) + 4.5rem); }
.voc .voc-group__letter{ display: flex; align-items: center; gap: var(--ip-space-3); font-family: var(--ip-font-display); font-size: var(--ip-text-3xl); color: var(--voc-gold-deep); margin: 0 0 var(--ip-space-3); }
:root[data-theme="dark"] .voc .voc-group__letter{ color: var(--voc-gold); }
.voc .voc-group__letter::after{ content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ip-line-strong), transparent); }
[dir="rtl"] .voc .voc-group__letter::after{ background: linear-gradient(270deg, var(--ip-line-strong), transparent); }
.voc .voc-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--ip-space-3); }
.voc .voc-card{ display: flex; flex-direction: column; gap: .4rem; padding: var(--ip-space-4) var(--ip-space-5); border-radius: var(--ip-radius-lg); border: 1px solid var(--ip-line); background: var(--ip-surface); color: var(--ip-ink); text-decoration: none; box-shadow: var(--ip-shadow-sm); transition: transform .25s var(--ip-ease), box-shadow .25s, border-color .25s; }
.voc .voc-card:hover{ transform: translateY(-3px); box-shadow: var(--ip-shadow-md); border-color: var(--voc-gold); color: var(--ip-ink); }
.voc .voc-card__top{ display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.voc .voc-card__term{ font-family: var(--ip-font-display); font-size: 1.2rem; font-weight: 600; }
.voc .voc-card__ar[lang]{ font-size: 1.55rem; line-height: 1.5; color: var(--ip-tile-lapis-fg); }
:root[data-theme="dark"] .voc .voc-card__ar[lang]{ color: #f1dfb0; }
.voc .voc-card__mean{ color: var(--ip-ink-2); font-size: var(--ip-text-sm); line-height: 1.55; }
.voc .voc-card__cat{ align-self: flex-start; margin-top: auto; padding: .1rem .55rem; border-radius: 999px; background: var(--ip-surface-2); color: var(--ip-muted); font-size: var(--ip-text-xs); font-weight: 600; }
.voc .voc-empty{ padding: var(--ip-space-8) var(--ip-space-4); text-align: center; color: var(--ip-muted); border: 1px dashed var(--ip-line-strong); border-radius: var(--ip-radius-lg); }
.voc .voc-empty i{ font-size: 2rem; color: var(--voc-gold); }
.voc .voc-about{ margin-top: var(--ip-space-8); padding: var(--ip-space-6); border-radius: var(--ip-radius-xl); background: var(--ip-pattern), var(--ip-surface-2); border: 1px solid var(--ip-line); }
.voc .voc-about h2{ font-family: var(--ip-font-display); font-size: var(--ip-text-xl); }
.voc .voc-about p{ color: var(--ip-ink-2); line-height: 1.7; max-width: 60rem; }

/* ---------- Term page ---------- */
.voc .voc-term-hero{ padding: var(--ip-space-7) 0 var(--ip-space-8); }
.voc .voc-term-hero__card{ display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--ip-space-6); align-items: center; }
.voc .voc-term-hero__title{ font-family: var(--ip-font-display); font-size: var(--ip-text-4xl); font-weight: 600; color: #fff; margin: 0; line-height: 1.1; }
.voc .voc-term-hero__say{ display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .5rem 0 0; color: rgba(244, 234, 210, .85); }
.voc .voc-translit{ font-style: italic; }
.voc .voc-say{ color: var(--voc-gold); font-weight: 600; letter-spacing: .04em; }
.voc .voc-term-hero__mean{ font-size: var(--ip-text-xl); line-height: 1.5; color: #fff; margin: var(--ip-space-4) 0; max-width: 44rem; }
.voc .voc-term-hero__actions{ display: flex; flex-wrap: wrap; gap: .5rem; }
.voc .voc-term-hero__ar[lang]{ min-width: 12rem; padding: var(--ip-space-5) var(--ip-space-6); border-radius: var(--ip-radius-xl); border: 1px solid rgba(217, 180, 95, .4); background: radial-gradient(circle at 50% 40%, rgba(217, 180, 95, .2), transparent 70%); font-size: clamp(3rem, 2rem + 4vw, 5.2rem); line-height: 1.6; color: #fff; text-align: center; text-shadow: 0 8px 30px rgba(217, 180, 95, .35); }
.voc .voc-voice-note{ margin: var(--ip-space-3) 0 0; font-size: var(--ip-text-sm); color: rgba(244, 234, 210, .75); }

.voc .voc-detail{ display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--ip-space-7); align-items: start; }
.voc .voc-block{ margin-top: var(--ip-space-6); padding: var(--ip-space-6); border-radius: var(--ip-radius-xl); background: var(--ip-surface); border: 1px solid var(--ip-line); box-shadow: var(--ip-shadow-sm); }
.voc .voc-block h2{ font-family: var(--ip-font-display); font-size: var(--ip-text-xl); font-weight: 600; margin: 0 0 var(--ip-space-3); }
.voc .voc-block__head{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.voc .voc-block__head h2{ margin: 0 0 var(--ip-space-3); }
.voc .voc-block--quiet{ background: var(--ip-surface-2); box-shadow: none; }
.voc .voc-block--quiet p{ color: var(--ip-ink-2); line-height: 1.6; word-break: break-word; }
.voc .voc-prose p{ font-size: 1.05rem; line-height: 1.8; color: var(--ip-ink-2); }
.voc .voc-examples{ list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.voc .voc-examples li{ position: relative; padding: .7rem 1rem; padding-inline-start: 2.6rem; border-radius: var(--ip-radius); background: var(--voc-gold-soft); line-height: 1.6; }
.voc .voc-examples li::before{ content: "\201C"; position: absolute; inset-inline-start: .9rem; top: .15rem; font-family: var(--ip-font-display); font-size: 2rem; color: var(--voc-gold-deep); }
.voc .voc-detail__side{ position: sticky; top: calc(var(--ip-header-h) + 1rem); display: grid; gap: var(--ip-space-4); margin-top: var(--ip-space-6); }
.voc .voc-panel{ padding: var(--ip-space-5); border-radius: var(--ip-radius-lg); background: var(--ip-surface); border: 1px solid var(--ip-line); }
.voc .voc-panel__title{ font-size: var(--ip-text-base); font-weight: 700; margin: 0 0 .6rem; }
.voc .voc-panel__actions{ display: flex; flex-wrap: wrap; gap: .4rem; }
.voc .voc-tags{ display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.voc .voc-tags span{ padding: .2rem .65rem; border-radius: 999px; background: var(--ip-surface-2); font-weight: 600; font-size: var(--ip-text-sm); }
.voc .voc-related, .voc .voc-more{ list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.voc .voc-related a{ display: grid; grid-template-columns: 1fr auto; gap: 0 .5rem; padding: .55rem .7rem; border-radius: var(--ip-radius); text-decoration: none; color: var(--ip-ink); }
.voc .voc-related a:hover{ background: var(--ip-surface-2); }
.voc .voc-related span[lang="ar"]:not(html){ font-size: 1.25rem; color: var(--ip-tile-lapis-fg); }
:root[data-theme="dark"] .voc .voc-related span[lang="ar"]:not(html){ color: #f1dfb0; }
.voc .voc-related small{ grid-column: 1 / -1; color: var(--ip-muted); line-height: 1.4; }
.voc .voc-more a{ display: flex; gap: .5rem; align-items: center; padding: .45rem .2rem; color: var(--ip-link); font-weight: 600; text-decoration: none; }
.voc .voc-more a:hover{ text-decoration: underline; }

/* ---------- Practice ---------- */
.voc .voc-page-hero{ padding: var(--ip-space-6) 0 var(--ip-space-6); }
.voc .voc-page-hero .voc-hero__title{ font-size: var(--ip-text-3xl); }
.voc .voc-options label{ display: inline-flex; flex-direction: column; gap: .3rem; font-size: var(--ip-text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: rgba(244, 234, 210, .8); }
.voc .voc-options select{ min-width: 220px; min-height: 40px; }
.voc .voc-practice{ max-width: 820px; padding-top: var(--ip-space-6); }
.voc .voc-practice__more{ display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--ip-space-6); padding-top: var(--ip-space-5); border-top: 1px solid var(--ip-line); }
.voc .voc-counter{ color: var(--ip-muted); font-size: var(--ip-text-sm); }
.voc .voc-flash{ position: relative; min-height: 300px; perspective: 1400px; cursor: pointer; border-radius: var(--ip-radius-xl); }
.voc .voc-flash__face{ position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: var(--ip-space-6); text-align: center; border-radius: var(--ip-radius-xl); border: 1px solid var(--ip-line); box-shadow: var(--ip-shadow-md); backface-visibility: hidden; transition: transform .6s var(--ip-ease); }
.voc .voc-flash__front{ background: radial-gradient(120% 80% at 50% 0%, var(--voc-gold-soft), transparent 70%), var(--ip-surface); }
.voc .voc-flash__back{ background: linear-gradient(155deg, var(--voc-night), var(--voc-night-2)); color: var(--voc-ink-hero); transform: rotateY(180deg); }
.voc .voc-flash.is-flipped .voc-flash__front{ transform: rotateY(-180deg); }
.voc .voc-flash.is-flipped .voc-flash__back{ transform: rotateY(0); }
.voc .voc-flash__term{ font-family: var(--ip-font-display); font-size: var(--ip-text-3xl); margin: 0; }
.voc .voc-flash__term--sm{ font-size: var(--ip-text-xl); color: var(--voc-gold); }
.voc .voc-flash__ar[lang]{ font-size: 2.4rem; line-height: 1.6; margin: 0; color: var(--ip-tile-lapis-fg); }
:root[data-theme="dark"] .voc .voc-flash__ar[lang]{ color: #f1dfb0; }
.voc .voc-flash__say{ color: var(--voc-gold-deep); font-weight: 600; margin: 0; }
.voc .voc-flash__mean{ font-size: var(--ip-text-lg); line-height: 1.6; max-width: 32rem; margin: .25rem 0 .5rem; color: #fff; }
.voc .voc-flash__hint{ color: var(--ip-muted); font-size: var(--ip-text-sm); margin: var(--ip-space-3) 0 0; }
.voc .voc-flash__controls{ display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: var(--ip-space-4); }
.voc .voc-question{ text-align: center; padding: var(--ip-space-5); margin-bottom: var(--ip-space-4); border-radius: var(--ip-radius-xl); border: 1px solid var(--ip-line); background: radial-gradient(120% 80% at 50% 0%, var(--voc-gold-soft), transparent 70%), var(--ip-surface); }
.voc .voc-question__prompt{ color: var(--ip-muted); font-weight: 600; margin: 0 0 .5rem; }
.voc .voc-question__big{ font-family: var(--ip-font-display); font-size: var(--ip-text-2xl); margin: 0; line-height: 1.35; }
.voc .voc-question__ar[lang]{ font-size: 2rem; margin: .25rem 0 0; color: var(--ip-tile-lapis-fg); }
.voc .voc-choices{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.voc .voc-choice{ min-height: 52px; padding: .65rem 1rem; border-radius: var(--ip-radius); border: 1px solid var(--ip-line-strong); background: var(--ip-surface); color: var(--ip-ink); font-weight: 600; text-align: start; cursor: pointer; }
.voc .voc-choice:hover:not(:disabled){ border-color: var(--voc-gold); background: var(--ip-surface-2); }
.voc .voc-choice.is-right{ border-color: #2b9479; background: rgba(43, 148, 121, .14); }
.voc .voc-choice.is-wrong{ border-color: #d0647c; background: rgba(208, 100, 124, .12); }
.voc .voc-choice:disabled{ opacity: .75; cursor: default; }
.voc .voc-feedback{ min-height: 1.5em; margin: var(--ip-space-3) 0; font-weight: 600; }
.voc .voc-feedback.is-right{ color: var(--ip-tile-emerald-fg); }
.voc .voc-feedback.is-wrong{ color: var(--ip-tile-rose-fg); }
.voc .voc-done{ text-align: center; padding: var(--ip-space-7) var(--ip-space-4); border-radius: var(--ip-radius-xl); border: 1px solid var(--ip-line); background: var(--ip-surface); }
.voc .voc-done__icon{ font-size: 2.4rem; color: var(--voc-gold); }
.voc .voc-done h2{ font-family: var(--ip-font-display); outline: none; }

@media (max-width: 991.98px) {
  .voc .voc-hero__inner, .voc .voc-detail{ grid-template-columns: minmax(0, 1fr); }
  .voc .voc-detail__side{ position: static; margin-top: 0; }
  .voc .voc-term-hero__card{ grid-template-columns: minmax(0, 1fr); }
  .voc .voc-term-hero__ar[lang]{ order: -1; justify-self: start; min-width: 0; padding: var(--ip-space-3) var(--ip-space-5); }
}
@media (max-width: 767.98px) {
  .voc .voc-hero{ padding: var(--ip-space-6) 0; }
  .voc .voc-cats{ flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--ip-space-3); margin-inline: calc(-.5 * var(--bs-gutter-x, 1.5rem)); padding-inline: calc(.5 * var(--bs-gutter-x, 1.5rem)); }
  .voc .voc-cat{ flex: none; }
  .voc .voc-letters{ flex-wrap: nowrap; overflow-x: auto; }
  .voc .voc-letters a{ flex: none; }
  .voc .voc-grid{ grid-template-columns: minmax(0, 1fr); }
  .voc .voc-block{ padding: var(--ip-space-4); }
  .voc .voc-choices{ grid-template-columns: minmax(0, 1fr); }
  .voc .voc-search .voc-btn{ padding-inline: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .voc *, .voc *::before, .voc *::after { animation: none !important; transition: none !important; }
}
.voc .voc-details { margin-top: .5rem; border: 1px solid var(--ip-line); border-radius: var(--ip-radius); padding: .1rem 1rem; background: var(--ip-surface-2); }
.voc .voc-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--ip-link); }

/* ---------- A to Z as a dense list with hover definitions (voc--list; vocabulary.js remembers the choice) ---------- */
.voc .voc-viewbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-top: var(--ip-space-2); }
.voc .voc-viewbar__hint { margin: 0; color: var(--ip-muted); font-size: .85rem; }
.voc .voc-viewbar__hint kbd { padding: .05rem .4rem; border: 1px solid var(--ip-line); border-radius: 6px; background: var(--ip-surface); color: var(--ip-ink-2); font-size: .75rem; box-shadow: none; }
.voc .voc-viewbar__switch { display: inline-flex; padding: .2rem; border: 1px solid var(--ip-line); border-radius: 999px; background: var(--ip-surface); }
.voc .voc-view-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border: 0; border-radius: 999px; background: transparent; color: var(--ip-ink-2); font-size: .82rem; font-weight: 600; cursor: pointer; }
.voc .voc-view-btn[aria-pressed="true"] { background: var(--ip-primary); color: var(--ip-primary-ink); }
.voc .voc-letters a.is-empty { opacity: .3; pointer-events: none; }
.voc .voc-pop { display: none; }
.voc .voc-group { scroll-margin-top: calc(var(--ip-header-h) + 70px); }

.voc.voc--list .voc-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .4rem; }
.voc.voc--list .voc-card { position: relative; gap: .1rem; padding: .55rem .8rem; border-radius: 12px; box-shadow: none; }
.voc.voc--list .voc-card:hover { transform: none; box-shadow: var(--ip-shadow-sm); z-index: 3; }
.voc.voc--list .voc-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.voc.voc--list .voc-card__term { font-size: .95rem; }
.voc.voc--list .voc-card__ar { font-size: 1.15rem; }
.voc.voc--list .voc-card__cat { display: none; }
.voc.voc--list .voc-card__mean { font-size: .8rem; color: var(--ip-muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) and (pointer: fine) {
  .voc.voc--list .voc-card__mean { display: none; }
  .voc.voc--list .voc-pop {
    position: absolute; top: calc(100% + 8px); inset-inline: -6px; z-index: 30; display: grid; gap: .35rem;
    padding: .85rem 1rem; border: 1px solid var(--ip-line); border-radius: 14px;
    background: var(--ip-surface); box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .45);
    opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .18s var(--ip-ease), transform .18s var(--ip-ease);
  }
  .voc.voc--list .voc-pop::before { content: ""; position: absolute; top: -7px; inset-inline-start: 1.25rem; width: 12px; height: 12px; border-top: 1px solid var(--ip-line); border-inline-start: 1px solid var(--ip-line); background: var(--ip-surface); transform: rotate(45deg); }
  .voc.voc--list .voc-card:hover .voc-pop, .voc.voc--list .voc-card:focus-visible .voc-pop { opacity: 1; transform: none; }
}
.voc .voc-pop__say { color: var(--voc-gold-deep, #8a6414); font-style: italic; font-size: .82rem; }
.voc .voc-pop__mean { color: var(--ip-ink); font-size: .88rem; line-height: 1.5; }
.voc .voc-pop__foot { display: flex; justify-content: space-between; gap: .5rem; padding-top: .35rem; border-top: 1px dashed var(--ip-line-strong); color: var(--ip-muted); font-size: .74rem; }
.voc .voc-pop__open { color: var(--ip-primary); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .voc.voc--list .voc-pop { transition: none; } }

/* ---------- Experience layer: my words, the entry's bar, the pager and the practice stage ---------- */
.voc .voc-btn--glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; }
.voc .voc-btn--glass:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.voc .voc-mine { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: var(--ip-space-4); }
.voc .voc-mine__btn {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .4rem .95rem; border-radius: 999px;
  border: 1px solid rgba(244, 234, 210, .35); background: rgba(255, 255, 255, .06); color: var(--voc-ink-hero); font-weight: 600; font-size: var(--ip-text-sm); cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .2s var(--ip-ease);
}
.voc .voc-mine__btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .12); }
.voc .voc-mine__btn:focus-visible { outline: 3px solid var(--voc-gold); outline-offset: 2px; }
.voc .voc-mine__btn .bi-star-fill, .voc .voc-mine__btn .bi-check-circle-fill { display: none; }
.voc .voc-mine__btn[aria-pressed="true"] { border-color: var(--voc-gold); background: var(--voc-gold-soft); color: #fff; }
.voc .voc-mine__btn[aria-pressed="true"] .bi-star, .voc .voc-mine__btn[aria-pressed="true"] .bi-check2-circle { display: none; }
.voc .voc-mine__btn[aria-pressed="true"] .bi-star-fill, .voc .voc-mine__btn[aria-pressed="true"] .bi-check-circle-fill { display: inline; color: var(--voc-gold); animation: voc-pop .4s var(--ip-spring, ease) both; }
@keyframes voc-pop { from { transform: scale(.4); } }
.voc .voc-mine__count { color: rgba(244, 234, 210, .78); font-size: var(--ip-text-sm); }
.voc .voc-rail { margin-bottom: var(--ip-space-5); }
.voc .voc-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: var(--ip-space-5); }
.voc .voc-pager__link {
  display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 1px solid var(--ip-line); border-radius: var(--ip-radius-lg);
  background: var(--ip-surface); color: var(--ip-ink); text-decoration: none; box-shadow: var(--ip-shadow-sm); transition: transform .2s var(--ip-ease), border-color .2s;
}
.voc .voc-pager__link:hover { transform: translateY(-2px); border-color: var(--ip-primary); color: var(--ip-ink); }
.voc .voc-pager__link span:not(.voc-pager__ar) { display: grid; min-width: 0; }
.voc .voc-pager__link small { color: var(--ip-muted); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.voc .voc-pager__link i { color: var(--ip-primary); }
.voc .voc-pager__ar { margin-inline-start: auto; color: var(--ip-accent-strong); font-size: 1.3rem; line-height: 1.4; }
.voc .voc-pager__link.is-next { grid-column: 2; justify-content: flex-end; text-align: end; }
.voc .voc-pager__link.is-next .voc-pager__ar { margin-inline: 0 auto; }

/* Practice */
.voc .voc-practice-hero { margin-bottom: 0; }
.voc .voc-modes { display: inline-flex; gap: .25rem; margin-bottom: 1rem; padding: .25rem; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; background: rgba(255, 255, 255, .07); }
.voc .voc-mode { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .9rem; border-radius: 999px; color: rgba(255, 255, 255, .85); font-weight: 600; font-size: .88rem; text-decoration: none; }
.voc .voc-mode:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.voc .voc-mode.is-active { background: var(--voc-gold); color: #2b1d02; }
.voc .voc-live .ip-btn { justify-content: center; }
.voc .voc-practice { max-width: 860px; }
.voc .voc-cats { display: flex; gap: .4rem; margin-bottom: var(--ip-space-5); padding-bottom: .25rem; overflow-x: auto; scrollbar-width: none; }
.voc .voc-cats::-webkit-scrollbar { display: none; }
.voc .voc-cats .lx-chip { flex: none; }
.voc .voc-stage-wrap { position: relative; padding: clamp(1rem, .8rem + 1vw, 1.5rem); border: 1px solid var(--ip-line); border-radius: var(--ip-radius-xl); background: var(--ip-surface); box-shadow: var(--ip-shadow-md); overflow: hidden; }
.voc .voc-stage-bar { position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--ip-surface-3); }
.voc .voc-stage-bar span { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0); background: linear-gradient(90deg, var(--ip-green-500), var(--voc-gold)); transition: transform .45s var(--ip-ease); }
[dir="rtl"] .voc .voc-stage-bar span { transform-origin: right center; }
.voc .voc-quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.voc .voc-streak { margin: 0; padding: .2rem .7rem; border-radius: 999px; background: var(--ip-surface-2); color: var(--ip-muted); font-size: .8rem; font-weight: 700; transition: background-color .3s, color .3s; }
.voc .voc-streak.is-hot { background: var(--voc-gold-soft); color: var(--voc-gold-deep); }
.voc .voc-choice { display: flex; align-items: center; gap: .65rem; transition: border-color .2s, background-color .2s, transform .2s var(--ip-ease); }
.voc .voc-choice:hover:not(:disabled) { transform: translateY(-1px); }
.voc .voc-choice__key { display: grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 8px; background: var(--ip-surface-2); color: var(--ip-muted); font-size: .78rem; font-weight: 800; }
.voc .voc-choice.is-right { animation: voc-pop .35s var(--ip-spring, ease); }
.voc .voc-choice.is-right .voc-choice__key { background: #2b9479; color: #fff; }
.voc .voc-choice.is-wrong .voc-choice__key { background: #d0647c; color: #fff; }
.voc .voc-choice.is-answer { border-color: #2b9479; border-style: dashed; }
.voc .voc-missed { width: 100%; max-width: 520px; margin: .5rem auto 1rem; text-align: start; }
.voc .voc-missed__title { margin: 0 0 .4rem; font-weight: 700; }
.voc .voc-missed__list { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.voc .voc-missed__list li { display: grid; gap: .1rem; padding: .5rem .75rem; border-radius: var(--ip-radius); background: var(--ip-surface-2); }
.voc .voc-missed__list a { font-weight: 700; color: var(--ip-primary); }
.voc .voc-missed__list span { color: var(--ip-muted); font-size: .88rem; }

@media (max-width: 575.98px) {
  .voc .voc-pager { grid-template-columns: 1fr; }
  .voc .voc-pager__link.is-next { grid-column: 1; }
  .voc .voc-choices { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .voc .voc-mine__btn, .voc .voc-choice, .voc .voc-stage-bar span { transition: none; animation: none !important; }
}

@media (hover: none) and (pointer: coarse) {
  .voc .voc-keys-fact { display: none; }
}
