/* Business English — chunks + examples (reader branch) */

body.reader.be-page {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

body.reader.be-page .reader-flow {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

body.reader.be-page .reader-foot {
  flex-shrink: 0;
}

.be-dock {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  padding: 10px clamp(12px, 3vw, 28px);
  background: rgba(236, 253, 245, 0.96);
  border-bottom: 1px solid var(--line);
}

.be-dock a {
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.be-dock a:hover {
  color: var(--ink);
  border-color: #94a3b8;
  background: var(--paper);
}

.be-dock a[aria-current="page"] {
  color: var(--paper);
  background: #0f766e;
  border-color: #0f766e;
}

.be-article {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(16px, 3vw, 28px) var(--reader-inset);
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.be-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: linear-gradient(90deg, #0d9488, #0f766e);
  padding: 4px 12px;
  border-radius: 999px;
}

.be-lede {
  margin: 0 0 18px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.be-toc {
  margin: 0 0 22px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.be-toc h2 {
  margin: 0 0 10px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  direction: rtl;
  text-align: right;
}

.be-toc ul {
  margin: 0;
  padding: 0 1.1rem 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  direction: rtl;
}

.be-toc a {
  color: #0f766e;
  text-decoration: none;
  border-bottom: 1px dashed rgba(15, 118, 110, 0.35);
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.be-toc a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.be-block {
  margin: 0 0 26px;
  scroll-margin-top: 5rem;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.be-block h2 {
  margin: 0 0 6px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  direction: rtl;
  text-align: right;
}

.be-block__en {
  display: block;
  margin: 0 0 14px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  direction: ltr;
  text-align: left;
}

.be-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.be-item {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(240, 253, 250, 0.92);
  border: 1px solid rgba(13, 148, 136, 0.28);
}

.be-phrase {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(13, 148, 136, 0.35);
  font-family: var(--font-ui);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.45;
  color: #134e4a;
  direction: ltr;
  text-align: left;
}

.be-mean {
  margin: 0 0 10px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.55;
  color: #0f766e;
  direction: rtl;
  text-align: right;
}

.be-explain {
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(45, 212, 191, 0.35);
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.58;
  color: #475569;
  direction: rtl;
  text-align: right;
}

.be-explain strong {
  color: #115e59;
}

.be-examples {
  margin: 0;
}

.be-examples__head {
  margin: 0 0 8px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f766e;
  direction: rtl;
  text-align: right;
  text-transform: uppercase;
}

.be-ex-pair {
  margin: 0 0 12px;
  padding: 10px 0 12px;
  border-top: 1px dashed rgba(203, 213, 225, 0.9);
}

.be-ex-pair:first-of-type {
  border-top: none;
  padding-top: 0;
}

.be-ex-pair:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.be-ex {
  margin: 0 0 5px;
  font-family: var(--font-ui);
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.45;
  direction: ltr;
  text-align: left;
  color: var(--ink);
}

.be-ex-ar {
  margin: 0;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.48;
  direction: rtl;
  text-align: right;
  color: var(--ink-soft);
}

.be-cross {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(15, 118, 110, 0.08);
  border: 1px dashed rgba(15, 118, 110, 0.35);
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #334155;
  direction: rtl;
}

.be-cross a {
  color: #126e60;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed rgba(18, 110, 96, 0.4);
}

.be-cross a:hover {
  color: var(--ink);
}

.be-footnote {
  margin: 22px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(204, 251, 241, 0.45);
  border: 1px dashed rgba(13, 148, 136, 0.35);
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #334155;
  direction: rtl;
}

/* Common mistakes — weak vs natural business English */
.be-item--mistake {
  background: rgba(255, 251, 235, 0.95);
  border-color: rgba(217, 119, 6, 0.35);
}

.be-mistake-tag {
  margin: 0 0 6px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #b45309;
  direction: rtl;
  text-align: right;
}

.be-better-tag {
  margin: 0 0 6px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #047857;
  direction: rtl;
  text-align: right;
}

.be-wrong-line {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(254, 226, 226, 0.7);
  border: 1px solid rgba(248, 113, 113, 0.45);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  direction: ltr;
  text-align: left;
  color: #991b1b;
}

.be-right-line {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(209, 250, 229, 0.75);
  border: 1px solid rgba(52, 211, 153, 0.45);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  direction: ltr;
  text-align: left;
  color: #065f46;
}

.be-item--mistake .be-explain {
  margin-top: 4px;
}

/* Mini dialogues — EN line + AR gloss */
.be-block--dialogue .be-dialogue__context {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.55;
  color: #334155;
  direction: rtl;
  text-align: right;
}

.be-dialogue {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.be-turn {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(13, 148, 136, 0.22);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.be-turn--a {
  border-inline-start: 4px solid #0d9488;
}

.be-turn--b {
  border-inline-start: 4px solid #6366f1;
}

.be-speaker {
  margin: 0 0 8px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0f766e;
  direction: rtl;
  text-align: right;
}

.be-speaker .be-speaker-role {
  font-weight: 600;
  color: #64748b;
}

.be-dialogue .be-line {
  margin: 0 0 6px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.48;
  direction: ltr;
  text-align: left;
  color: var(--ink);
}

.be-dialogue .be-line:last-of-type {
  margin-bottom: 0;
}

.be-dialogue .be-line-ar {
  margin: 0;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  color: var(--ink-soft);
}

/* Conversation tracks — opening → discussion → closing (3 levels per topic) */
.be-conv-track {
  margin: 0 0 28px;
  padding: 18px 18px 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(13, 148, 136, 0.22);
  box-shadow: var(--shadow);
}

.be-conv-track:last-child {
  margin-bottom: 0;
}

.be-conv-track__head {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(13, 148, 136, 0.28);
}

.be-conv-level {
  display: inline-block;
  margin: 0 0 8px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  padding: 4px 10px;
  border-radius: 999px;
}

.be-conv-level--2 {
  background: linear-gradient(90deg, #0e7490, #0284c7);
}

.be-conv-level--3 {
  background: linear-gradient(90deg, #6d28d9, #7c3aed);
}

.be-conv-track__head h2 {
  margin: 0 0 8px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
  direction: rtl;
  text-align: right;
}

.be-conv-track__head .be-conv-meta-en {
  display: block;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-soft);
  direction: ltr;
  text-align: left;
}

.be-conv-situation {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(240, 253, 250, 0.85);
  border: 1px solid rgba(45, 212, 191, 0.35);
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.55;
  color: #334155;
  direction: rtl;
  text-align: right;
}

.be-conv-flow {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
}

.be-phase {
  margin: 0;
  padding: 14px 14px 16px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.be-phase--open {
  border-inline-start: 4px solid #0d9488;
}

.be-phase--mid {
  border-inline-start: 4px solid #2563eb;
}

.be-phase--close {
  border-inline-start: 4px solid #7c3aed;
}

.be-phase__title {
  margin: 0 0 12px;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  direction: rtl;
  text-align: right;
}

.be-phase__title .be-phase__step {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: 0.04em;
  margin-inline-end: 8px;
}

.be-phase__title .be-phase__en {
  display: block;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  direction: ltr;
  text-align: left;
}

.be-phase .be-dialogue {
  gap: 8px;
}

.be-conv-topic-grid {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

@media (min-width: 540px) {
  .be-conv-topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.be-conv-topic-card {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.be-conv-topic-card:hover {
  border-color: #0d9488;
  transform: translateY(-1px);
}

.be-conv-topic-card strong {
  display: block;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  direction: rtl;
  text-align: right;
}

.be-conv-topic-card .be-conv-topic-card__en {
  display: block;
  margin-top: 6px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  direction: ltr;
  text-align: left;
}

.be-conv-topic-card .be-conv-topic-card__hint {
  margin: 8px 0 0;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.45;
  color: #64748b;
  direction: rtl;
  text-align: right;
}

/* Vocabulary / key phrases after each conversation track */
.be-conv-vocab {
  margin: 20px 0 0;
  padding: 14px 16px 16px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(254, 252, 232, 0.96), rgba(255, 251, 235, 0.88));
  border: 1px solid rgba(180, 83, 9, 0.28);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.be-conv-vocab__title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(180, 83, 9, 0.35);
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  color: #713f12;
  direction: rtl;
  text-align: right;
}

.be-conv-vocab__list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.be-conv-vocab__item {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.be-conv-vocab__item dt {
  margin: 0 0 4px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1e293b;
  direction: ltr;
  text-align: left;
}

.be-conv-vocab__item dd {
  margin: 0;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.52;
  color: #475569;
  direction: rtl;
  text-align: right;
}
