/* Giao tiếp hằng ngày. Scoped dưới .bv-ed, dùng token của styles.css. */
.bv-ed { --bved-ok: #0a7d72; --bved-no: #dc3545; }
.bv-ed .container { max-width: 860px; }

.bv-ed-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-ed-crumbs a { color: var(--muted, rgba(15,23,42,.62)); text-decoration: none; }
.bv-ed-crumbs a:hover { color: var(--brand, #2f6fed); text-decoration: underline; }
.bv-ed-crumbs > span { opacity: .5; }
.bv-ed-crumbs__here { opacity: 1; color: var(--ink, #0f172a); font-weight: 600; }

/* ---- đầu bài ---- */
.bv-ed-head { margin-bottom: 1rem; }
.bv-ed-head__badges { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .6rem; }
.bv-ed-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-ed-pill {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 700;
  padding: .25rem .65rem; border-radius: 999px;
  background: var(--soft, rgba(15,23,42,.05)); color: var(--muted, rgba(15,23,42,.62));
}
.bv-ed-pill i { color: #0a7d72; }
.bv-ed-title { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; margin: 0 0 .3rem; line-height: 1.3; }
.bv-ed-subtitle { color: var(--muted, rgba(15,23,42,.62)); font-size: .95rem; margin: 0; }
.bv-ed-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: .9rem 1.1rem;
  margin-bottom: 1.4rem; font-size: .93rem; line-height: 1.6;
}
.bv-ed-goal i { color: var(--brand, #2f6fed); margin-right: .35rem; }

/* ---- thanh công cụ ---- */
.bv-ed-toolbar {
  position: sticky; top: 76px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--border, rgba(15,23,42,.1)); border-radius: 12px;
  padding: .5rem .65rem; margin-bottom: 1.5rem;
}
.bv-ed-select {
  border: 1px solid var(--border, rgba(15,23,42,.16)); border-radius: 9px; background: #fff;
  padding: .4rem .6rem; font-size: .88rem; font-family: inherit; max-width: 100%;
}
.bv-ed-hide {
  border: 1px solid var(--border, rgba(15,23,42,.16)); background: #fff; cursor: pointer;
  border-radius: 9px; padding: .4rem .8rem; font-size: .85rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: .35rem; color: var(--ink, #0f172a);
}
.bv-ed-hide:hover { border-color: var(--brand, #2f6fed); color: var(--brand, #2f6fed); }
.bv-ed-hide[aria-pressed="true"] { background: rgba(47,111,237,.1); border-color: rgba(47,111,237,.4); color: var(--brand, #2f6fed); }

/* ---- một tình huống ---- */
.bv-eds { margin-bottom: 2rem; scroll-margin-top: 150px; }
.bv-eds__h { display: flex; align-items: flex-start; gap: .65rem; margin: 0 0 .8rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border, rgba(15,23,42,.1)); }
.bv-eds__no {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; background: rgba(47,111,237,.1); color: var(--brand, #2f6fed);
}
.bv-eds__t { font-size: 1.05rem; font-weight: 800; line-height: 1.35; }
.bv-eds__t em { display: block; font-style: normal; font-size: .85rem; font-weight: 600; color: var(--muted, rgba(15,23,42,.6)); margin-top: .1rem; }

/* ---- mẫu câu ---- */
.bv-edp { list-style: none; margin: 0 0 .9rem; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.bv-edp__i {
  background: #fff; border: 1px solid var(--border, rgba(15,23,42,.1)); border-left: 3px solid rgba(47,111,237,.35);
  border-radius: 10px; padding: .6rem .8rem;
}
.bv-edp__en { display: block; font-size: .98rem; font-weight: 600; color: var(--ink, #0f172a); line-height: 1.5; }
.bv-edp__vi { display: block; font-size: .89rem; color: var(--muted, rgba(15,23,42,.68)); margin-top: .15rem; line-height: 1.5; }
.bv-edp__note { display: block; font-size: .8rem; color: var(--muted, rgba(15,23,42,.55)); margin-top: .35rem; line-height: 1.5; }
.bv-edp__note i { color: #b4780a; }

/* Chế độ tự kiểm tra: che bản dịch, bấm vào câu thì hé ra. */
.is-vi-hidden .bv-edp__i { cursor: pointer; }
.is-vi-hidden .bv-edp__vi { filter: blur(5px); opacity: .55; user-select: none; transition: filter .15s ease, opacity .15s ease; }
.is-vi-hidden .bv-edp__i.is-peeked .bv-edp__vi { filter: none; opacity: 1; }

/* ---- từ vựng ---- */
.bv-edv { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.bv-edv__i {
  display: inline-flex; align-items: baseline; gap: .4rem;
  background: var(--soft, rgba(15,23,42,.04)); border-radius: 999px; padding: .3rem .75rem; font-size: .84rem;
}
.bv-edv__i b { font-weight: 700; color: var(--ink, #0f172a); }
.bv-edv__i span { color: var(--muted, rgba(15,23,42,.62)); }
.is-vi-hidden .bv-edv__i span { filter: blur(4px); opacity: .55; }

/* ---- bài kiểm tra ---- */
.bv-edq { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px solid var(--border, rgba(15,23,42,.12)); }
.bv-edq__h { font-size: 1.2rem; font-weight: 800; margin: 0 0 .3rem; }
.bv-edq__h i { color: var(--brand, #2f6fed); }
.bv-edq__lead { font-size: .88rem; color: var(--muted, rgba(15,23,42,.62)); margin: 0 0 1.1rem; }
.bv-edq__list { list-style: none; counter-reset: bved; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.bv-edqi {
  counter-increment: bved; position: relative; border-radius: 12px; border: 1px solid transparent;
  background: var(--soft, rgba(15,23,42,.025)); padding: .8rem .9rem .8rem 2.5rem;
}
.bv-edqi::before {
  content: counter(bved) "."; position: absolute; left: .85rem; top: .85rem;
  font-weight: 800; font-size: .85rem; color: var(--muted, rgba(15,23,42,.45));
}
.bv-edqi.is-correct { background: rgba(0,184,169,.07); border-color: rgba(0,184,169,.35); }
.bv-edqi.is-wrong { background: rgba(220,53,69,.05); border-color: rgba(220,53,69,.3); }
.bv-edqi__p { font-size: .95rem; margin: 0 0 .6rem; line-height: 1.55; }
.bv-edqi__opts { display: grid; gap: .35rem; }
.bv-edopt {
  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: .92rem;
}
.bv-edopt:hover { border-color: var(--brand, #2f6fed); }
.bv-edopt input { margin-top: .2rem; flex-shrink: 0; }
.bv-edopt.is-answer { background: rgba(0,184,169,.12); border-color: var(--bved-ok); }
.bv-edopt.is-picked-wrong { background: rgba(220,53,69,.1); border-color: var(--bved-no); }
.bv-edqi__gap { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .95rem; line-height: 2; }
.bv-edinput {
  border: 1px solid var(--border, rgba(15,23,42,.18)); border-radius: 9px; padding: .35rem .6rem;
  font-size: .95rem; font-family: inherit; background: #fff; min-width: 150px;
}
.bv-edinput:focus { outline: 2px solid rgba(47,111,237,.35); outline-offset: 1px; border-color: var(--brand, #2f6fed); }
.is-graded .bv-edinput { background: var(--soft, rgba(15,23,42,.03)); }

.bv-edfb { margin-top: .55rem; display: flex; flex-direction: column; gap: .2rem; font-size: .86rem; }
.bv-edfb__v { font-weight: 700; }
.is-correct .bv-edfb__v { color: var(--bved-ok); }
.is-wrong .bv-edfb__v { color: var(--bved-no); }
.bv-edfb__a b { color: var(--bved-ok); }
.bv-edfb__e { color: var(--muted, rgba(15,23,42,.65)); line-height: 1.5; }

.bv-edq__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.2rem; }
.bv-ed-saved { font-size: .82rem; color: var(--muted, rgba(15,23,42,.55)); }
.bv-edq__result { margin-top: 1.2rem; }
.bv-ed-score { display: flex; align-items: baseline; gap: .75rem; }
.bv-ed-score__n { font-size: 2rem; font-weight: 800; color: var(--brand, #2f6fed); }
.bv-ed-score__n small { font-size: 1rem; color: var(--muted, rgba(15,23,42,.5)); font-weight: 600; }
.bv-ed-score__pct { font-size: 1rem; font-weight: 700; color: var(--muted, rgba(15,23,42,.6)); }
.bv-ed-score__msg { margin: .3rem 0 0; font-size: .95rem; }

@media (max-width: 575.98px) {
  .bv-ed-toolbar { top: 66px; }
  .bv-eds { scroll-margin-top: 130px; }
  .bv-edqi { padding-left: 2.2rem; }
}

/* ---- nút phát âm ---- */
.bv-edsay {
  border: 0; background: transparent; cursor: pointer; padding: .1rem .3rem;
  color: var(--muted, rgba(15,23,42,.35)); font-size: .95rem; line-height: 1;
  border-radius: 6px; flex-shrink: 0;
}
.bv-edsay:hover { color: var(--brand, #2f6fed); background: rgba(47,111,237,.1); }
.bv-edp__i, .bv-edr__i, .bv-eddt { position: relative; }
.bv-edp__i > .bv-edsay, .bv-edr__i > .bv-edsay { position: absolute; top: .5rem; right: .5rem; }
.bv-edv__i > .bv-edsay { margin-left: .1rem; }
.has-speech .bv-edp__i, .has-speech .bv-edr__i { padding-right: 2rem; }

/* ---- câu phía bên kia ---- */
.bv-edr {
  background: rgba(180,120,10,.06); border: 1px solid rgba(180,120,10,.2);
  border-radius: 12px; padding: .7rem .85rem; margin-bottom: .9rem;
}
.bv-edr__h {
  font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: #b4780a; margin-bottom: .5rem;
}
.bv-edr__h i { margin-right: .2rem; }
.bv-edr ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.bv-edr__en { display: block; font-size: .94rem; font-weight: 600; color: var(--ink, #0f172a); line-height: 1.5; }
.bv-edr__vi { display: block; font-size: .86rem; color: var(--muted, rgba(15,23,42,.66)); margin-top: .1rem; line-height: 1.5; }
.is-vi-hidden .bv-edr__vi { filter: blur(5px); opacity: .55; }

/* ---- hội thoại ---- */
.bv-edd { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--border, rgba(15,23,42,.12)); }
.bv-edd__h { font-size: 1.15rem; font-weight: 800; margin: 0 0 .3rem; }
.bv-edd__h i { color: var(--brand, #2f6fed); }
.bv-edd__lead { font-size: .87rem; color: var(--muted, rgba(15,23,42,.62)); margin: 0 0 1.1rem; }
.bv-edd__box {
  background: #fff; border: 1px solid var(--border, rgba(15,23,42,.1));
  border-radius: 14px; padding: .9rem 1rem; margin-bottom: 1rem;
}
.bv-edd__t { font-size: .9rem; font-weight: 700; margin-bottom: .75rem; color: var(--ink, #0f172a); }
.bv-edd__turns { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.bv-eddt { display: flex; gap: .6rem; align-items: flex-start; }
.has-speech .bv-eddt { padding-right: 2rem; }
.bv-eddt__who {
  flex-shrink: 0; min-width: 66px; font-size: .71rem; font-weight: 800;
  padding: .2rem .45rem; border-radius: 999px; text-align: center; margin-top: .1rem;
  background: var(--soft, rgba(15,23,42,.06)); color: var(--muted, rgba(15,23,42,.6));
}
.bv-eddt.is-me .bv-eddt__who { background: rgba(47,111,237,.12); color: var(--brand, #2f6fed); }
.bv-eddt__body { min-width: 0; }
.bv-eddt__en { display: block; font-size: .94rem; line-height: 1.5; color: var(--ink, #0f172a); }
.bv-eddt.is-me .bv-eddt__en { font-weight: 600; }
.bv-eddt__vi { display: block; font-size: .84rem; color: var(--muted, rgba(15,23,42,.62)); margin-top: .1rem; line-height: 1.5; }
.is-vi-hidden .bv-eddt__vi { filter: blur(5px); opacity: .55; }
.bv-eddt > .bv-edsay { position: absolute; right: .1rem; top: .15rem; }

/* ---- dạng bài gõ lại cả câu ---- */
.bv-edqi__translate { display: flex; flex-direction: column; gap: .4rem; }
.bv-edinput--full { width: 100%; }
.bv-edqi__hint { font-size: .8rem; color: var(--muted, rgba(15,23,42,.58)); }
.bv-edqi__hint i { color: #b4780a; }

/* Câu đã có file thu sẵn: nút đậm hơn một chút. */
.bv-edsay.has-file { color: var(--brand, #2f6fed); }
.bv-edsay.has-file:hover { color: #fff; background: var(--brand, #2f6fed); }

/* ---- dọn lại khoảng trống & nhịp trang ---- */
.bv-ed.section { padding-top: 1.25rem; }
.bv-ed-crumbs { margin-bottom: 1rem; }
/* Banner quảng cáo giờ nằm dưới phần mục tiêu, tách bạch với nội dung bài. */
.bv-ed .bv-tax-banner { margin: 0 0 1.6rem; }

/* ---- vị trí hiện tại trong bài ---- */
.bv-ed-where {
  font-size: .82rem; font-weight: 600; color: var(--muted, rgba(15,23,42,.6));
  white-space: nowrap; margin-left: auto; margin-right: .3rem;
}
.bv-ed-where b { color: var(--brand, #2f6fed); font-weight: 800; }

/* ---- nhãn cho hàng từ vựng ---- */
.bv-edv-h {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted, rgba(15,23,42,.45)); margin: .2rem 0 .45rem;
}

/* ---- mẫu câu: bớt nặng nề ----
   36 mẫu câu + câu đáp mà mỗi câu một cái hộp viền đầy đủ thì cả trang thành
   bức tường ô vuông. Bỏ viền bao, chỉ giữ vạch màu bên trái làm nhịp đọc. */
.bv-edp__i {
  border: 0; border-left: 3px solid rgba(47,111,237,.35);
  border-radius: 0 10px 10px 0; background: var(--soft, rgba(15,23,42,.028));
  padding: .65rem .85rem;
}
.bv-edp__i:hover { background: rgba(47,111,237,.05); }
.bv-edp { gap: .4rem; }

/* Tiêu đề tình huống nổi hơn để mắt bắt được nhịp khi cuộn nhanh */
.bv-eds__h { padding-bottom: .55rem; margin-bottom: .9rem; }
.bv-eds__t { font-size: 1.08rem; }
.bv-eds { margin-bottom: 2.4rem; }

/* Nút phát âm to hơn một chút cho dễ bấm trên điện thoại */
.bv-edsay { padding: .25rem .4rem; font-size: 1rem; }

@media (max-width: 575.98px) {
  .bv-ed-where { margin-left: 0; width: 100%; order: 3; }
  .bv-ed-toolbar { gap: .45rem; }
}
