/* Vocabulary Mastery — pilot styles. Builds on site-shell + miftah-unified tokens. */
.vm-wrap { --vm-ink:#17324d; --vm-teal:#45a995; --vm-line:rgba(23,50,77,.12); }
.vm-intro { margin:0 0 26px; padding:18px 22px; border:1px solid rgba(69,169,149,.35); border-left:6px solid #45a995; border-radius:16px; background:#f1fbf8; color:#263746; }
.vm-intro strong { color:#17324d; }
.vm-lede { margin:0 0 18px; color:#3a4b58; font-size:1.05rem; }

/* Topic-area / collection cards (shared by index + collection pages) */
.vt-area { margin:0 0 40px; }
.vt-area__head { display:flex; align-items:baseline; gap:14px; margin:0 0 16px; padding-bottom:8px; border-bottom:2px solid rgba(23,50,77,.1); }
.vt-badge { display:inline-flex; width:38px; height:38px; align-items:center; justify-content:center; border-radius:12px; background:#17324d; color:#fff; font-weight:900; font-size:1.1rem; flex:none; }
.vt-area__head h2 { margin:0; color:#17324d; }
.vt-area__head .arabic { color:#244d69; font-size:1.05em; }
.vt-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.vt-card { display:flex; flex-direction:column; gap:6px; border:1px solid rgba(23,50,77,.12); border-radius:14px; padding:16px 18px; background:#fff; text-decoration:none; color:inherit; }
a.vt-card:hover { border-color:#45a995; box-shadow:0 3px 10px rgba(23,50,77,.08); transform:translateY(-1px); }
a.vt-card:focus-visible { outline:3px solid #45a995; outline-offset:2px; }
.vt-card h3 { margin:0; font-size:1.05rem; color:#17324d; }
.vt-card .arabic { color:#244d69; font-size:1.25rem; }
.vt-card__foot { margin-top:auto; display:flex; align-items:center; gap:8px; padding-top:8px; }
.vt-live { font-weight:800; color:#1d7a4d; }
.vt-soon { font-size:.8rem; font-weight:800; color:#8a6d1f; background:#fff8e7; border:1px solid #f2b84b; padding:2px 9px; border-radius:999px; }
.vt-count { font-size:.78rem; font-weight:800; color:#fff; background:#45a995; padding:2px 9px; border-radius:999px; }
.vt-card.is-soon { background:#f8fafb; }

/* Tabs */
.vm-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 22px; border-bottom:2px solid var(--vm-line); padding-bottom:2px; }
.vm-tab { appearance:none; border:0; background:transparent; padding:11px 18px; border-radius:12px 12px 0 0; font:inherit; font-weight:800; color:#5a6b78; cursor:pointer; }
.vm-tab:hover { color:#17324d; background:#eef4f8; }
.vm-tab.is-active { color:#17324d; background:#17324d; color:#fff; }
.vm-tab:focus-visible { outline:3px solid #45a995; outline-offset:2px; }
[data-panel][hidden] { display:none; }

/* Search + filters */
.vm-controls { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:0 0 20px; }
.vm-search { flex:1 1 240px; padding:12px 16px; border:2px solid var(--vm-line); border-radius:999px; font:inherit; }
.vm-search:focus-visible { outline:3px solid #45a995; outline-offset:1px; border-color:#45a995; }
.vm-filters { display:flex; flex-wrap:wrap; gap:8px; }
.vm-chip { appearance:none; border:2px solid var(--vm-line); background:#fff; color:#3a4b58; padding:8px 14px; border-radius:999px; font:inherit; font-weight:700; font-size:.9rem; cursor:pointer; }
.vm-chip:hover { border-color:#45a995; }
.vm-chip.is-active { background:#17324d; color:#fff; border-color:#17324d; }
.vm-chip:focus-visible { outline:3px solid #45a995; outline-offset:2px; }

/* Learn groups + cards */
.vm-group { margin:0 0 34px; }
.vm-group__head { display:flex; align-items:baseline; gap:12px; margin:0 0 14px; }
.vm-group__head h3 { margin:0; color:#17324d; }
.vm-group__head .arabic { color:#244d69; font-size:1.05em; }
.vm-group__head .vm-count { margin-inline-start:auto; font-size:.85rem; font-weight:800; color:#fff; background:#45a995; padding:3px 10px; border-radius:999px; }
.vm-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; }
.vm-card { border:1px solid var(--vm-line); border-radius:14px; padding:14px 16px; background:#fff; box-shadow:0 1px 2px rgba(23,50,77,.05); }
.vm-card__ar { font-size:1.9rem; line-height:1.5; color:#17324d; font-weight:700; }
.vm-card__en { font-size:1.02rem; color:#2b3c49; margin:2px 0 6px; }
.vm-card__meta { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 8px; }
.vm-tag { font-size:.72rem; font-weight:800; letter-spacing:.02em; padding:2px 8px; border-radius:999px; background:#eef4f8; color:#3a5a72; }
.vm-tag--f { background:#fbeef5; color:#8a2f63; }
.vm-tag--support { background:#eef0fb; color:#3d3f8a; }
.vm-card__note { color:#5a6b78; font-style:italic; }
.vm-extension { margin-top:28px; padding:18px 20px; border:1px solid rgba(61,63,138,.28); border-left:6px solid #5457b6; border-radius:16px; background:#f5f5fd; }
.vm-extension__head h3 { margin:0 0 6px; color:#2f3170; display:flex; flex-wrap:wrap; gap:10px; align-items:baseline; }
.vm-extension__head h3 .arabic { color:#4a4da0; font-size:1.05em; }
.vm-extension__head p { margin:0 0 10px; color:#4a5568; }
.vm-card__forms { font-size:.88rem; color:#4a5b68; line-height:1.7; }
.vm-card__forms b { color:#17324d; }
.vm-card__ex { margin:8px 0 0; padding-top:8px; border-top:1px dashed var(--vm-line); font-size:.92rem; color:#40525f; }
.vm-card__ex .arabic { display:block; font-size:1.15rem; color:#17324d; }
.vm-empty { padding:22px; text-align:center; color:#687986; }

/* Quiz / practise / play shared */
.vm-quiz__bar { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
.vm-quiz__progress { color:#5a6b78; font-weight:700; margin:0 0 12px; }
.vm-quiz__q { font-size:1.1rem; color:#26333d; margin:0 0 14px; }
.vm-quiz__prompt { font-size:2rem; color:#17324d; margin:8px 0; }
.vm-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:0 0 8px; }
.vm-option { display:flex; flex-direction:column; gap:2px; align-items:center; text-align:center; border:2px solid var(--vm-line); border-radius:12px; background:#fff; padding:14px 12px; font:inherit; font-size:1.15rem; color:#22333f; cursor:pointer; }
.vm-option small { font-size:.8rem; color:#6a7b88; }
.vm-option:hover { border-color:#45a995; }
.vm-option:focus-visible { outline:3px solid #45a995; outline-offset:2px; }
.vm-option.is-correct { border-color:#2e9e6b; background:#eafaf1; }
.vm-option.is-wrong { border-color:#d1495b; background:#fdeef0; }
label.vm-option { cursor:pointer; }
label.vm-option input { margin-inline-end:6px; }
.vm-feedback { margin:12px 0; padding:12px 14px; border-radius:12px; font-weight:700; }
.vm-feedback.is-ok { background:#eafaf1; color:#1d7a4d; }
.vm-feedback.is-no { background:#fdeef0; color:#a92d3e; }
.vm-next { margin-top:10px; appearance:none; border:0; background:#17324d; color:#fff; padding:11px 22px; border-radius:999px; font:inherit; font-weight:800; cursor:pointer; }
.vm-next:hover { background:#22405f; }
.vm-next:focus-visible { outline:3px solid #45a995; outline-offset:2px; }
.vm-hint { color:#5a6b78; margin:0 0 12px; }

/* Sort + tokens + match */
.vm-sort__words, .vm-match__col { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 14px; }
.vm-sort__bins, .vm-match { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.vm-token { border:2px solid var(--vm-line); border-radius:999px; background:#fff; padding:10px 16px; font:inherit; font-size:1.3rem; color:#17324d; cursor:pointer; }
.vm-token:hover { border-color:#45a995; }
.vm-token:focus-visible { outline:3px solid #45a995; outline-offset:2px; }
.vm-token.is-sel { border-color:#17324d; background:#eef4f8; }
.vm-token.is-correct { border-color:#2e9e6b; background:#eafaf1; color:#1d7a4d; }
.vm-token.is-wrong { border-color:#d1495b; }
.vm-bin { border:2px dashed var(--vm-line); border-radius:14px; background:#f7fafc; padding:14px; font:inherit; text-align:center; color:#3a4b58; cursor:pointer; }
.vm-bin .arabic { display:block; color:#244d69; }
.vm-bin:hover { border-color:#45a995; }
.vm-bin.is-shake { animation:vmshake .35s; border-color:#d1495b; }
@keyframes vmshake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.vm-match__col { flex-direction:column; }

/* Test */
.vm-test__q { border:1px solid var(--vm-line); border-radius:14px; padding:14px 16px; margin:0 0 14px; }
.vm-test__q legend { font-weight:800; color:#17324d; padding:0 6px; }
.vm-test__q legend span { color:#45a995; }
.vm-score { font-size:1.2rem; color:#17324d; }
.vm-revise { columns:2; }
.vm-revise li { break-inside:avoid; margin-bottom:4px; }

/* Review & print */
.vm-review__actions { margin:0 0 18px; }
.vm-print { width:100%; border-collapse:collapse; }
.vm-print caption { text-align:start; font-weight:800; color:#17324d; margin:14px 0 6px; font-size:1.1rem; }
.vm-print th, .vm-print td { border:1px solid var(--vm-line); padding:7px 10px; text-align:start; vertical-align:top; }
.vm-print th { background:#f1f6f9; color:#17324d; }
.vm-print td.ar { font-size:1.3rem; color:#17324d; }

@media (max-width:640px){ .vm-revise{columns:1;} .vm-card__ar{font-size:1.7rem;} }

/* Sticky secondary menu (mirrors Grammar Mastery .top) */
.vm-top { position:sticky; top:var(--vm-header-h,72px); z-index:1100; background:rgba(23,50,77,.97); border-bottom:3px solid #f2b84b; box-shadow:0 6px 20px rgba(23,50,77,.18); }
.vm-wrap .vm-tabs, #vm-hero { scroll-margin-top:calc(var(--vm-header-h,72px) + 62px); }
.vm-top__in { width:min(1240px,96%); margin:auto; min-height:58px; display:flex; align-items:center; gap:12px; }
.vm-top__brand { display:flex; align-items:center; gap:9px; color:#fff; font-weight:900; white-space:nowrap; }
.vm-top__brand .mark { width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:linear-gradient(135deg,#45a995,#3f7fb0); font-size:1.1rem; }
.vm-top__links { display:flex; gap:6px; overflow-x:auto; scrollbar-width:thin; padding:9px 0; flex:1; }
.vm-top__links a { color:#fff; text-decoration:none; font-size:.82rem; font-weight:800; padding:6px 12px; border-radius:999px; border:1px solid rgba(255,255,255,.22); white-space:nowrap; }
.vm-top__links a:hover, .vm-top__links a.active, .vm-top__links a:focus-visible { background:#f2b84b; color:#17324d; border-color:#f2b84b; outline:none; }
@media (max-width:700px){ .vm-top__brand span:last-child{ display:none; } }

/* Progress meter (mirrors Grammar Mastery .mastery-meter) */
.vm-meter { position:fixed; right:16px; bottom:16px; z-index:900; background:#fff; border:1px solid rgba(23,50,77,.12); box-shadow:0 10px 30px rgba(23,50,77,.16); border-radius:15px; padding:12px 14px; min-width:200px; }
.vm-meter__head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.vm-meter__head strong { color:#17324d; font-size:.85rem; }
.vm-meter__pct { color:#1d7a4d; font-weight:900; }
.vm-meter__track { height:8px; border-radius:999px; background:rgba(23,50,77,.12); overflow:hidden; margin:6px 0 5px; }
.vm-meter__track span { display:block; height:100%; width:0; background:linear-gradient(90deg,#45a995,#2e9e6b); transition:width .3s; }
.vm-meter__text { font-size:.76rem; color:#677885; margin:0 0 8px; }
.vm-meter__reset { appearance:none; border:1px solid rgba(23,50,77,.2); background:#f7fafc; color:#3a4b58; border-radius:999px; padding:5px 12px; font:inherit; font-size:.78rem; font-weight:800; cursor:pointer; }
.vm-meter__reset:hover, .vm-meter__reset:focus-visible { border-color:#d1495b; color:#a92d3e; outline:none; }
@media (max-width:700px){ .vm-meter{ position:static; margin:0 0 20px; min-width:0; } }

/* Round counter + summary */
.vm-round { margin:0 0 14px; }
.vm-round__count { font-weight:800; color:#17324d; }
.vm-round__track { height:7px; border-radius:999px; background:rgba(23,50,77,.1); overflow:hidden; margin-top:6px; }
.vm-round__track span { display:block; height:100%; width:0; background:linear-gradient(90deg,#45a995,#3f7fb0); transition:width .3s; }
.vm-summary { border:1px solid rgba(23,50,77,.12); border-radius:14px; padding:16px 18px; background:#f8fbfd; margin-top:8px; }
.vm-summary__actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; align-items:center; }

/* Test score badges */
.vm-scores { display:flex; gap:10px; flex-wrap:wrap; margin:0 0 12px; }
.vm-scorebadge { font-size:.82rem; font-weight:800; color:#17324d; background:#eef4f8; border:1px solid rgba(23,50,77,.12); padding:5px 12px; border-radius:999px; }
.vm-scorebadge b { color:#1d7a4d; }

@media print { .vm-top, .vm-meter { display:none !important; } }

@media print {
  body * { visibility:hidden; }
  [data-panel="review"], [data-panel="review"] * { visibility:visible; }
  [data-panel="review"] { position:absolute; inset:0; padding:0; }
  .vm-review__actions, .vm-tabs, .miftah-path-hero, .miftah-path-crumbs { display:none !important; }
  .vm-print th { background:#eee !important; -webkit-print-color-adjust:exact; }
}

/* Miftah Extension badges (Area D third page) */
.vm-ext-badge{display:inline-block;margin-inline-start:8px;padding:2px 10px;border-radius:999px;
  background:#fbe7c6;color:#7a5b12;font-size:.72rem;font-weight:700;letter-spacing:.02em;vertical-align:middle}
.vt-ext{display:inline-block;padding:2px 9px;border-radius:999px;background:#fbe7c6;color:#7a5b12;
  font-size:.7rem;font-weight:700}
@media (prefers-color-scheme:dark){.vm-ext-badge,.vt-ext{background:#4a3d1a;color:#ffdc8a}}
