/* Writing practice player. Scoped under .bv-writing, uses site tokens from styles.css. */
.bv-writing { --bvw-ok: #0a7d72; --bvw-no: #dc3545; }
.bv-w-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted, rgba(15,23,42,.6)); margin-bottom: .85rem; }
.bv-w-crumbs a { color: var(--muted, rgba(15,23,42,.62)); text-decoration: none; }
.bv-w-crumbs a:hover { color: var(--brand, #2f6fed); text-decoration: underline; }
.bv-w-crumbs > span { opacity: .5; }
.bv-w-crumbs__here { opacity: 1; color: var(--ink, #0f172a); font-weight: 600; }

/* ---- header ---- */
.bv-w-head { margin-bottom: 1.1rem; }
.bv-w-head__badges { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .6rem; }
.bv-w-level {
  display: inline-flex; align-items: center; font-size: .78rem; font-weight: 800; letter-spacing: .04em;
  padding: .25rem .7rem; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, var(--brand, #2f6fed), var(--brand2, #00b8a9));
}
.bv-w-title { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; margin: 0 0 .25rem; line-height: 1.3; }
.bv-w-subtitle { color: var(--muted, rgba(15,23,42,.6)); font-size: .95rem; margin: 0; font-style: italic; }

/* ---- goal + tips ---- */
.bv-w-goal {
  background: linear-gradient(120deg, rgba(47,111,237,.06), rgba(0,184,169,.05));
  border: 1px solid rgba(47,111,237,.18); border-radius: 14px; padding: 1rem 1.15rem; margin-bottom: 1.5rem;
}
.bv-w-goal__text { margin: 0 0 .6rem; font-size: .95rem; line-height: 1.55; }
.bv-w-goal__text i { color: var(--brand, #2f6fed); }
.bv-w-tips { margin: 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: .3rem; }
.bv-w-tips li { font-size: .89rem; color: var(--muted, rgba(15,23,42,.72)); line-height: 1.5; }

/* ---- section heads ---- */
.bv-w-sec__head { display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem; padding-bottom: .55rem; border-bottom: 1px solid var(--border, rgba(15,23,42,.1)); }
.bv-w-sec__title { font-size: 1.15rem; font-weight: 800; margin: 0; }
.bv-w-sec__title i { color: var(--brand, #2f6fed); }
.bv-w-sec__count { margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--muted, rgba(15,23,42,.55)); }
.bv-w-sec__more { font-size: .82rem; font-weight: 700; color: var(--brand, #2f6fed); text-decoration: none; white-space: nowrap; }
.bv-w-sec__more:hover { text-decoration: underline; }
@media (max-width: 480px) { .bv-w-sec__more { display: none; } }

/* ---- sentence patterns ---- */
.bv-w-patterns { margin-bottom: 2rem; }
.bv-w-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .75rem; }
.bv-wpat { display: flex; gap: .75rem; background: #fff; border: 1px solid var(--border, rgba(15,23,42,.1)); border-radius: 14px; padding: .85rem .95rem; }
.bv-wpat__no {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; background: rgba(47,111,237,.1); color: var(--brand, #2f6fed);
}
.bv-wpat__body { min-width: 0; }
.bv-wpat__formula { font-weight: 800; color: var(--ink, #0f172a); font-size: .98rem; line-height: 1.35; }
.bv-wpat__meaning { font-size: .86rem; color: var(--muted, rgba(15,23,42,.65)); margin-top: .1rem; }
.bv-wpat__ex { margin-top: .5rem; padding-left: .65rem; border-left: 3px solid rgba(0,184,169,.4); }
.bv-wpat__en { display: block; font-size: .92rem; color: var(--ink, #0f172a); }
.bv-wpat__vi { display: block; font-size: .84rem; color: var(--muted, rgba(15,23,42,.55)); margin-top: .1rem; }
.bv-wpat__note { margin-top: .5rem; font-size: .8rem; color: var(--muted, rgba(15,23,42,.62)); }
.bv-wpat__note i { color: #b4780a; }

/* ---- exercises ---- */
.bv-wex { background: #fff; border: 1px solid var(--border, rgba(15,23,42,.1)); border-radius: 16px; padding: 1.1rem 1.15rem; margin-bottom: 1rem; }
.bv-wex__head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.bv-wex__id {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; background: var(--brand, #2f6fed); color: #fff;
}
.bv-wex__title { font-size: 1.02rem; font-weight: 700; margin: 0; }
.bv-wex__kind { margin-left: auto; font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; background: var(--soft, rgba(15,23,42,.05)); color: var(--muted, rgba(15,23,42,.6)); white-space: nowrap; }
.bv-wex__instr { font-size: .88rem; color: var(--muted, rgba(15,23,42,.68)); margin: 0 0 .9rem; }

.bv-wq { list-style: none; counter-reset: bvwq; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.bv-wqi { counter-increment: bvwq; position: relative; padding: .7rem .8rem .7rem 2.4rem; border-radius: 12px; border: 1px solid transparent; background: var(--soft, rgba(15,23,42,.025)); }
.bv-wqi::before {
  content: counter(bvwq) "."; position: absolute; left: .8rem; top: .75rem;
  font-weight: 800; font-size: .85rem; color: var(--muted, rgba(15,23,42,.45));
}
.bv-wqi.is-correct { background: rgba(0,184,169,.07); border-color: rgba(0,184,169,.35); }
.bv-wqi.is-wrong { background: rgba(220,53,69,.05); border-color: rgba(220,53,69,.3); }
.bv-wqi__line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; line-height: 2.1; }
.bv-wqi__txt { font-size: .96rem; }
.bv-wqi__prompt { font-size: .96rem; font-weight: 500; margin-bottom: .5rem; }
.bv-wqi__prompt--src { font-style: italic; color: var(--muted, rgba(15,23,42,.75)); }
.bv-wqi__cue { font-size: .82rem; color: var(--muted, rgba(15,23,42,.6)); margin-bottom: .45rem; }
.bv-wqi__cue strong { color: var(--brand, #2f6fed); }

.bv-winput { border: 1px solid var(--border, rgba(15,23,42,.18)); border-radius: 9px; padding: .35rem .6rem; font-size: .95rem; background: #fff; font-family: inherit; }
.bv-winput:focus { outline: 2px solid rgba(47,111,237,.35); outline-offset: 1px; border-color: var(--brand, #2f6fed); }
.bv-winput--gap { min-width: 130px; width: 150px; }
.bv-winput--sent { width: 100%; }
.bv-winput--match { min-width: 90px; }
.is-graded .bv-winput { background: var(--soft, rgba(15,23,42,.03)); }

/* mcq */
.bv-wopts { display: grid; gap: .4rem; }
.bv-wopt { display: flex; align-items: flex-start; gap: .5rem; padding: .45rem .6rem; border-radius: 9px; border: 1px solid var(--border, rgba(15,23,42,.12)); background: #fff; cursor: pointer; font-size: .93rem; }
.bv-wopt:hover { border-color: var(--brand, #2f6fed); }
.bv-wopt input { margin-top: .2rem; flex-shrink: 0; }
.bv-wopt.is-answer { background: rgba(0,184,169,.12); border-color: var(--bvw-ok); }
.bv-wopt.is-picked-wrong { background: rgba(220,53,69,.1); border-color: var(--bvw-no); }

/* word-order */
.bv-word__bank { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 34px; }
.bv-word__line { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 44px; margin-top: .5rem; padding: .4rem; border: 1px dashed var(--border, rgba(15,23,42,.22)); border-radius: 10px; background: #fff; }
.bv-word__tok { border: 1px solid var(--border, rgba(15,23,42,.16)); background: #fff; border-radius: 8px; padding: .3rem .6rem; font-size: .92rem; cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.bv-word__tok:hover { background: rgba(47,111,237,.08); border-color: var(--brand, #2f6fed); }
.bv-word__line .bv-word__tok { background: rgba(47,111,237,.1); border-color: rgba(47,111,237,.35); }
.bv-word__clear { margin-top: .4rem; border: 0; background: transparent; color: var(--muted, rgba(15,23,42,.55)); font-size: .8rem; cursor: pointer; padding: 0; }
.bv-word__clear:hover { color: var(--bvw-no); }

.bv-wlegend { margin-top: .8rem; padding: .7rem .85rem; background: var(--soft, rgba(15,23,42,.04)); border-radius: 10px; display: grid; gap: .3rem; }
.bv-wlegend__i { font-size: .88rem; }
.bv-wlegend__i b { color: var(--brand, #2f6fed); }

/* feedback */
.bv-wfb { margin-top: .55rem; font-size: .86rem; }
.bv-wfb__tag { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .78rem; padding: .15rem .55rem; border-radius: 999px; }
.bv-wfb__tag.is-ok { background: rgba(0,184,169,.15); color: var(--bvw-ok); }
.bv-wfb__tag.is-no { background: rgba(220,53,69,.12); color: #b02a37; }
.bv-wfb__ans { margin-top: .3rem; }
.bv-wfb__ans b { color: var(--bvw-ok); }
.bv-wfb__ex { margin-top: .25rem; color: var(--muted, rgba(15,23,42,.68)); }
.bv-wfb__ex i { color: #b4780a; }

/* ---- guided write ---- */
.bv-wwrite__task { background: rgba(47,111,237,.06); border-left: 3px solid var(--brand, #2f6fed); border-radius: 0 10px 10px 0; padding: .75rem .9rem; font-size: .93rem; line-height: 1.6; margin-bottom: .9rem; }
.bv-wwrite__task i { color: var(--brand, #2f6fed); }
.bv-wwrite__rubric { background: var(--soft, rgba(15,23,42,.035)); border-radius: 11px; padding: .75rem .9rem; margin-bottom: .9rem; }
.bv-wwrite__rubric-h { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, rgba(15,23,42,.55)); margin-bottom: .45rem; }
.bv-wwrite__rubric ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.bv-wwrite__rubric li { display: flex; align-items: flex-start; gap: .5rem; font-size: .88rem; line-height: 1.45; }
.bv-wwrite__rubric li i { color: var(--muted, rgba(15,23,42,.35)); margin-top: .15rem; flex-shrink: 0; }
.bv-wwrite__rubric li.is-met { color: var(--bvw-ok); }
.bv-wwrite__rubric li.is-met i { color: var(--bvw-ok); }
/* Tiêu chí máy không kiểm được: người học tự đánh dấu, có nhãn nói rõ điều đó. */
.bv-wwrite__rubric li.is-self label { display: flex; align-items: flex-start; gap: .4rem; cursor: pointer; margin: 0; }
.bv-wwrite__rubric li.is-self input { margin-top: .28rem; flex-shrink: 0; }
.bv-wwrite__rubric li.is-self em {
  font-style: normal; font-size: .72rem; font-weight: 700; white-space: nowrap;
  padding: .05rem .4rem; border-radius: 999px; align-self: center;
  color: var(--muted, rgba(15,23,42,.6)); background: rgba(15,23,42,.07);
}
/* ---- đồng hồ phòng thi ---- */
.bv-wtimer {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  background: rgba(180,120,10,.08); border: 1px solid rgba(180,120,10,.25);
  border-radius: 12px; padding: .55rem .75rem; margin-bottom: .8rem;
}
.bv-wtimer__btn {
  border: 0; border-radius: 9px; cursor: pointer; padding: .4rem .85rem;
  font-size: .85rem; font-weight: 700; color: #fff; background: #b4780a;
}
.bv-wtimer__btn:hover { filter: brightness(1.08); }
.bv-wtimer__clock {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.15rem;
  color: #b4780a; min-width: 3.6em;
}
.bv-wtimer.is-running .bv-wtimer__clock { color: var(--brand, #2f6fed); }
.bv-wtimer.is-over .bv-wtimer__clock { color: var(--bvw-no, #dc3545); }
.bv-wtimer__hint { font-size: .8rem; color: var(--muted, rgba(15,23,42,.6)); }
.bv-wtimer.is-running .bv-wtimer__hint, .bv-wtimer.is-done .bv-wtimer__hint { display: none; }
.bv-wtimer__note { font-size: .84rem; font-weight: 600; color: #b4780a; flex: 1 1 100%; }
.bv-wtimer.is-over .bv-wtimer__note { color: var(--bvw-no, #dc3545); }

.bv-wwrite__ta { width: 100%; border: 1px solid var(--border, rgba(15,23,42,.18)); border-radius: 12px; padding: .8rem .95rem; font-size: .96rem; line-height: 1.7; font-family: inherit; resize: vertical; background: #fff; }
.bv-wwrite__ta:focus { outline: 2px solid rgba(47,111,237,.3); border-color: var(--brand, #2f6fed); }
.bv-wwrite__foot { display: flex; justify-content: flex-end; margin-top: .4rem; }
.bv-wwrite__wc { font-size: .82rem; color: var(--muted, rgba(15,23,42,.55)); font-weight: 600; }
.bv-wwrite__wc.is-ok { color: var(--bvw-ok); }
.bv-wwrite__wc.is-off { color: #b4780a; }
.bv-wwrite__model { margin-top: .9rem; }
.bv-wwrite__note { font-size: .86rem; color: #b4780a; margin-bottom: .5rem; }
.bv-wwrite__score { font-size: .95rem; font-weight: 600; margin-bottom: .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.bv-wwrite__score b { color: var(--brand, #2f6fed); }

/* ---- vòng viết lại ---- */
.bv-wwrite__round {
  font-size: .72rem; font-weight: 800; padding: .12rem .5rem; border-radius: 999px;
  background: var(--soft, rgba(15,23,42,.06)); color: var(--muted, rgba(15,23,42,.6));
}
.bv-wwrite__delta { font-size: .8rem; font-weight: 700; }
.bv-wwrite__delta.is-up { color: var(--bvw-ok, #0a7d72); }
.bv-wwrite__delta.is-down { color: var(--bvw-no, #dc3545); }
.bv-wwrite__delta.is-same { color: var(--muted, rgba(15,23,42,.55)); }
.bv-wwrite__diff { border-radius: 10px; padding: .6rem .8rem; margin-bottom: .55rem; font-size: .87rem; }
.bv-wwrite__diff b { display: block; margin-bottom: .2rem; font-size: .82rem; }
.bv-wwrite__diff ul { margin: 0; padding-left: 1.1rem; }
.bv-wwrite__diff li { line-height: 1.5; }
.bv-wwrite__diff.is-up { background: rgba(10,125,114,.08); color: #0a7d72; }
.bv-wwrite__diff.is-down { background: rgba(220,53,69,.07); color: #b4232f; }
.bv-wwrite__wdiff { font-size: .84rem; color: var(--muted, rgba(15,23,42,.62)); margin-bottom: .6rem; }
.bv-wwrite__olds { margin-bottom: .6rem; }
.bv-wwrite__olds > summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--muted, rgba(15,23,42,.62)); }
.bv-wwrite__old { border-left: 3px solid var(--border, rgba(15,23,42,.14)); padding: .4rem 0 .4rem .7rem; margin-top: .5rem; }
.bv-wwrite__old-h { display: block; font-size: .78rem; font-weight: 700; color: var(--muted, rgba(15,23,42,.55)); margin-bottom: .2rem; }
.bv-wwrite__old p { margin: 0; font-size: .88rem; line-height: 1.6; white-space: pre-wrap; color: var(--muted, rgba(15,23,42,.75)); }
.bv-wwrite__again {
  border-top: 1px dashed var(--border, rgba(15,23,42,.16)); margin-top: .8rem; padding-top: .8rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
}
.bv-wwrite__again p { margin: 0; flex: 1 1 240px; font-size: .86rem; color: var(--muted, rgba(15,23,42,.68)); line-height: 1.55; }
.bv-wwrite__again-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.bv-wwrite__ma { border: 1px solid var(--border, rgba(15,23,42,.12)); border-radius: 11px; padding: .6rem .85rem; background: var(--soft, rgba(15,23,42,.03)); }
.bv-wwrite__ma summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--brand, #2f6fed); }
.bv-wwrite__ma-en { margin: .6rem 0 .4rem; font-size: .93rem; line-height: 1.7; }
.bv-wwrite__ma-vi { margin: 0; font-size: .87rem; line-height: 1.65; color: var(--muted, rgba(15,23,42,.6)); }

/* ---- past submissions ---- */
.bv-whist { margin-top: 1rem; border-top: 1px dashed var(--border, rgba(15,23,42,.15)); padding-top: .85rem; }
.bv-whist__h { font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, rgba(15,23,42,.55)); margin-bottom: .5rem; }
.bv-whist__h i { color: var(--brand, #2f6fed); }
.bv-whist__n { background: rgba(47,111,237,.12); color: var(--brand, #2f6fed); border-radius: 999px; padding: .05rem .45rem; margin-left: .2rem; }
.bv-whist__i { border: 1px solid var(--border, rgba(15,23,42,.1)); border-radius: 10px; padding: .5rem .75rem; margin-bottom: .4rem; background: var(--soft, rgba(15,23,42,.02)); }
.bv-whist__i summary { cursor: pointer; display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
.bv-whist__d { color: var(--muted, rgba(15,23,42,.6)); }
.bv-whist__s { margin-left: auto; font-weight: 800; color: var(--brand, #2f6fed); }
.bv-whist__t { margin: .6rem 0 0; font-size: .9rem; line-height: 1.7; white-space: pre-wrap; }

/* ---- actions + result ---- */
.bv-w-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.25rem; }
.bv-w-saved { font-size: .8rem; color: var(--bvw-ok); font-weight: 600; }
.bv-w-result { margin-top: 1.1rem; text-align: center; background: #fff; border: 1px solid var(--border, rgba(15,23,42,.1)); border-radius: 16px; padding: 1.5rem; }
.bv-w-score { display: flex; align-items: baseline; justify-content: center; gap: 1rem; }
.bv-w-score__n { font-size: 2.4rem; font-weight: 800; color: var(--brand, #2f6fed); }
.bv-w-score__n small { font-size: 1.1rem; font-weight: 700; color: var(--muted, rgba(15,23,42,.5)); }
.bv-w-score__pct { font-size: 1.2rem; font-weight: 700; color: var(--bvw-ok); }
.bv-w-score__msg { margin: .5rem 0 0; color: var(--muted, rgba(15,23,42,.65)); }

/* ---- responsive: keep the exercise near the top on phones ---- */
@media (max-width: 640px) {
  .bv-w-plist { grid-template-columns: 1fr; }
  .bv-wex { padding: .9rem .85rem; border-radius: 13px; }
  .bv-wqi { padding-left: 2.1rem; }
  .bv-winput--gap { width: 100%; min-width: 0; }
  .bv-wqi__line { line-height: 1.9; }
  .bv-w-actions { position: sticky; bottom: 0; background: #fff; padding: .6rem 0; margin-inline: -.25rem; z-index: 5; border-top: 1px solid var(--border, rgba(15,23,42,.08)); }
  .bv-w-actions .btn { flex: 1 1 0; }
  .bv-w-saved { display: none; }
}
@media (max-width: 576px) {
  .bv-w-crumbs > *:nth-last-child(-n+2) { display: none; }
  .bv-w-title { font-size: 1.15rem; }
}

/* ---- dark mode ---- */
@media (prefers-color-scheme: dark) {
  .bv-wpat, .bv-wex, .bv-wopt, .bv-word__tok, .bv-word__line,
  .bv-winput, .bv-wwrite__ta, .bv-w-result { background: rgba(255,255,255,.04); }
  .bv-wpat__formula, .bv-wpat__en, .bv-w-title { color: inherit; }
}
:root[data-theme="dark"] .bv-wpat,
:root[data-theme="dark"] .bv-wex,
:root[data-theme="dark"] .bv-wopt,
:root[data-theme="dark"] .bv-word__tok,
:root[data-theme="dark"] .bv-word__line,
:root[data-theme="dark"] .bv-winput,
:root[data-theme="dark"] .bv-wwrite__ta,
:root[data-theme="dark"] .bv-w-result { background: rgba(255,255,255,.04); }
:root[data-theme="dark"] .bv-wpat__formula,
:root[data-theme="dark"] .bv-wpat__en,
:root[data-theme="dark"] .bv-w-title { color: inherit; }

/* =====================================================================
   Lộ trình Writing — archive layout (template-parts/writing/path.php)
   ===================================================================== */
.bv-wpath { max-width: 1060px; margin-inline: auto; }
/* Banner quảng cáo phía trên vốn rộng bằng .container; kéo nó về đúng bề ngang
   của lộ trình để cả trang chỉ có một mép trái - phải. */
.term-writing .bv-tax-banner { max-width: 1060px; margin-inline: auto; }

/* ---- stage jump nav ---- */
.bv-wpath__nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem;
  width: max-content; max-width: 100%; margin: 0 auto 1.25rem;
  padding: .3rem; border-radius: 999px; background: var(--soft, rgba(15,23,42,.05));
}
.bv-wpath__chip {
  display: inline-flex; align-items: baseline; gap: .4rem; text-decoration: none;
  padding: .42rem .95rem; border-radius: 999px; color: var(--muted, rgba(15,23,42,.62));
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.bv-wpath__chip:hover { background: #fff; color: var(--brand, #2f6fed); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.bv-wpath__chip-lv { font-weight: 800; font-size: .85rem; letter-spacing: .03em; }
.bv-wpath__chip-n { font-size: .78rem; opacity: .75; }
.bv-wpath__chip.is-done .bv-wpath__chip-lv { color: var(--bvw-ok, #0a7d72); }

/* ---- start / resume ---- */
.bv-wpath__start {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  background: linear-gradient(120deg, rgba(47,111,237,.07), rgba(0,184,169,.06));
  border: 1px solid rgba(47,111,237,.2); border-radius: 16px;
  padding: 1.1rem 1.35rem; margin-bottom: 2.5rem;
}
.bv-wpath__start-body { flex: 1 1 260px; min-width: 0; }
.bv-wpath__start-kicker { margin: 0 0 .45rem; font-size: .98rem; color: var(--ink, #0f172a); }
.bv-wpath__start-next { margin: .45rem 0 0; font-size: .86rem; color: var(--muted, rgba(15,23,42,.62)); line-height: 1.5; }
.bv-wpath__bar { height: 7px; border-radius: 999px; background: rgba(15,23,42,.1); overflow: hidden; }
.bv-wpath__bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand, #2f6fed), var(--brand2, #00b8a9));
}
.bv-wpath__start-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }

/* ---- one stage ---- */
.bv-wstage { margin-bottom: 2.5rem; scroll-margin-top: 108px; }
.bv-wstage__head {
  padding-bottom: .9rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border, rgba(15,23,42,.1));
}
.bv-wstage__top { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: .75rem; }
.bv-wstage__level {
  flex-shrink: 0; min-width: 46px; height: 46px; padding: 0 .55rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px; color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: .03em;
  background: linear-gradient(135deg, var(--brand, #2f6fed), var(--brand2, #00b8a9));
  box-shadow: 0 4px 12px rgba(47,111,237,.25);
}
.bv-wstage__count { font-size: .82rem; font-weight: 700; color: var(--muted, rgba(15,23,42,.6)); white-space: nowrap; }
.bv-wstage__note {
  font-size: .72rem; font-weight: 700; white-space: nowrap;
  padding: .15rem .55rem; border-radius: 999px;
  color: #b4780a; background: rgba(180,120,10,.12);
}
.bv-wstage__kicker {
  margin: 0 0 .15rem; font-size: .73rem; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; color: var(--brand, #2f6fed);
}
.bv-wstage__title { font-size: 1.14rem; font-weight: 800; margin: 0 0 .4rem; line-height: 1.32; }
.bv-wstage__title i { color: var(--brand, #2f6fed); font-size: .95em; margin-right: .12rem; }
.bv-wstage__desc { margin: 0; font-size: .875rem; color: var(--muted, rgba(15,23,42,.66)); line-height: 1.6; }

/* Màn rộng: mô tả chặng thành cột trái dính theo cuộn, danh sách bài chiếm phần
   còn lại — hết khoảng trắng thừa bên phải mà một cột hẹp để lại. */
@media (min-width: 992px) {
  .bv-wstage {
    display: grid; grid-template-columns: 258px minmax(0, 1fr);
    gap: 2.25rem; align-items: start; margin-bottom: 3rem;
  }
  .bv-wstage__head { padding: 0; margin: 0; border-bottom: 0; position: sticky; top: 108px; }
}

/* ---- lesson steps ---- */
.bv-wstage__list { list-style: none; margin: 0; padding: 0; }
.bv-wstep { margin: 0 0 .55rem; }
.bv-wstep:last-child { margin-bottom: 0; }
.bv-wstep__link {
  display: flex; align-items: center; gap: .85rem; text-decoration: none;
  background: #fff; border: 1px solid var(--border, rgba(15,23,42,.1)); border-radius: 14px;
  padding: .8rem .95rem;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.bv-wstep__link:hover {
  border-color: rgba(47,111,237,.45); box-shadow: var(--shadow, 0 8px 22px rgba(15,23,42,.08));
  transform: translateX(2px);
}
/* Cùng kiểu với số thứ tự ở danh sách Từ vựng (.bv-vocab-index__no) — ô bo góc
   nằm gọn trong thẻ, không đè lên vạch nào cả. */
.bv-wstep__no {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .88rem; color: var(--brand, #2f6fed);
  background: rgba(47,111,237,.1);
}
.bv-wstep.is-done .bv-wstep__no { color: #fff; background: var(--bvw-ok, #0a7d72); }
.bv-wstep.is-done .bv-wstep__no-n { display: none; }
.bv-wstep.is-next .bv-wstep__link { border-color: rgba(47,111,237,.55); box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
.bv-wstep__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .18rem; }
.bv-wstep__title { font-weight: 700; color: var(--ink, #0f172a); line-height: 1.4; }
.bv-wstep__link:hover .bv-wstep__title { color: var(--brand, #2f6fed); }
.bv-wstep__focus { font-size: .845rem; color: var(--muted, rgba(15,23,42,.62)); line-height: 1.45; }
.bv-wstep__meta { display: flex; flex-wrap: wrap; gap: .7rem; font-size: .76rem; color: var(--muted, rgba(15,23,42,.5)); margin-top: .12rem; }
.bv-wstep__meta i { color: #0a7d72; }
.bv-wstep__state { flex-shrink: 0; display: inline-flex; align-items: center; }
.bv-wstep__arrow { color: var(--muted, rgba(15,23,42,.3)); transition: transform .15s ease, color .15s ease; }
.bv-wstep__link:hover .bv-wstep__arrow { color: var(--brand, #2f6fed); transform: translateX(3px); }
.bv-wstep__pct { font-size: .78rem; font-weight: 800; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; }
.bv-wstep__pct.is-high { color: #0a7d72; background: rgba(10,125,114,.12); }
.bv-wstep__pct.is-mid  { color: #b4780a; background: rgba(180,120,10,.14); }
.bv-wstep__pct.is-low  { color: #b4232f; background: rgba(220,53,69,.12); }

.bv-wpath__hint {
  font-size: .87rem; color: var(--muted, rgba(15,23,42,.62));
  background: var(--soft, rgba(15,23,42,.04)); border-radius: 12px; padding: .85rem 1.1rem; margin: 0;
}
.bv-wpath__hint i { color: var(--brand, #2f6fed); }

@media (max-width: 575.98px) {
  .bv-wstage__level { min-width: 40px; height: 40px; font-size: .92rem; border-radius: 11px; }
  .bv-wstep__no { width: 28px; height: 28px; border-radius: 9px; font-size: .8rem; }
  .bv-wstep__link { gap: .65rem; padding: .7rem .8rem; }
  .bv-wstep__focus { display: none; }
  .bv-wpath__start-btn { width: 100%; justify-content: center; }
}

/* CỐ Ý KHÔNG có khối @media (prefers-color-scheme: dark) ở đây: styles.css của
   theme không hề có chế độ tối, nên trang luôn nền sáng. Vài file player cũ vẫn
   còn khối đó và nó làm hỏng đúng những chỗ nó chạm tới khi máy người dùng để
   chế độ tối — vd nền ô số hoá gần như trong suốt trên nền trắng. */
