/* ============================================
   READING LESSON 4 — Flowchart Completion
   ============================================ */

.rl4-wrap { width: 100%; }

.rl4-inst-header { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 14px 20px; margin-bottom: 18px; }
.rl4-inst-label  { font-size: .88rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gold); margin-bottom: 4px; }
.rl4-inst-tips   { font-size: .9rem; color: rgba(255,255,255,0.45); font-style: italic; }

.rl4-score-banner { display: flex; align-items: center; gap: 16px; background: rgba(251,191,36,0.08); border: 1.5px solid rgba(251,191,36,0.3); border-radius: 12px; padding: 16px 22px; margin-bottom: 20px; flex-wrap: wrap; }
.rl4-score-big   { font-size: 2.6rem; font-weight: 900; color: var(--gold); line-height: 1; }
.rl4-score-denom { font-size: 1.4rem; color: rgba(255,255,255,0.4); }
.rl4-score-label { font-size: 1.05rem; color: rgba(255,255,255,0.8); flex: 1; }

.rl4-content-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; position: relative; }
@media (max-width: 900px) { .rl4-content-wrap { grid-template-columns: 1fr; } }

.rl4-left-col { min-width: 0; }
.rl4-left-col::-webkit-scrollbar { width: 4px; }
.rl4-left-col::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.rl4-right-col { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 0; min-width: 0; overflow: hidden; position: relative; }

/* Flowchart exam box */
.rl4-exam-box { background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 22px 20px; font-family: 'Inter', sans-serif; color: rgba(255,255,255,0.88); margin-bottom: 20px; font-size: 1rem; }
.rl4-exam-title { font-size: 1.08rem; font-weight: 700; text-align: center; margin-bottom: 18px; color: var(--gold); border-bottom: 1px solid rgba(255,255,255,0.12); padding-bottom: 10px; }

/* Flowchart diagram */
.rl4-flow { display: flex; flex-direction: column; align-items: center; gap: 0; width: 100%; }

.rl4-flow-box {
  width: 100%; max-width: 420px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
  text-align: center;
  line-height: 1.65;
}
.rl4-flow-box.rl4-flow-start { border-color: rgba(124,58,237,0.5); background: rgba(124,58,237,0.1); font-weight: 600; }
.rl4-flow-box.rl4-flow-end   { border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.06); font-weight: 600; }
.rl4-flow-box.rl4-flow-split-label { background: rgba(251,191,36,0.07); border-color: rgba(251,191,36,0.3); color: var(--gold); font-weight: 700; font-size: .9rem; font-style: italic; }

.rl4-flow-arrow { font-size: 1.5rem; color: rgba(251,191,36,0.55); line-height: 1; padding: 2px 0; user-select: none; }

/* Inline blank */
.rl4-blank { display: inline-block; border: none; border-bottom: 2px solid rgba(255,255,255,0.35); background: transparent; width: 110px; font-size: 1rem; font-family: 'Inter', sans-serif; color: rgba(255,255,255,0.9); padding: 1px 4px; outline: none; vertical-align: baseline; margin: 0 2px; transition: border-color .15s; }
.rl4-blank:focus    { border-bottom-color: #60a5fa; }
.rl4-blank:disabled { cursor: not-allowed; opacity: 1; }
.rl4-blank-ok  { border-bottom-color: #4ade80 !important; color: #4ade80; font-weight: 700; }
.rl4-blank-err { border-bottom-color: #f87171 !important; color: #f87171; }
.rl4-q-num     { font-size: .78rem; font-weight: 700; color: var(--gold); vertical-align: super; margin-right: 1px; }
.rl4-correct-ans { color: #4ade80; font-weight: 700; font-size: .88rem; margin-left: 4px; }

.rl4-why-btn { background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.4); color: var(--gold); border-radius: 6px; padding: 2px 9px; font-size: .78rem; font-weight: 700; cursor: pointer; transition: background .15s; vertical-align: middle; margin-left: 4px; white-space: nowrap; }
.rl4-why-btn:hover { background: rgba(251,191,36,0.25); }

.rl4-check-btn { display: block; width: 100%; padding: 14px; margin-bottom: 8px; background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #fff; border: none; border-radius: 10px; font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: opacity .15s; }
.rl4-check-btn:hover { opacity: .88; }

.rl4-retry-btn { display: block; width: 100%; padding: 13px; margin-top: 10px; background: transparent; color: rgba(255,255,255,0.6); border: 1.5px solid rgba(255,255,255,0.18); border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s; }
.rl4-retry-btn:hover { border-color: rgba(255,255,255,0.45); color: #fff; }

.rl4-exp-box { background: rgba(251,191,36,0.07); border: 1px solid rgba(251,191,36,0.3); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; font-size: .95rem; color: rgba(255,255,255,0.85); line-height: 1.7; }

.rl4-arrow-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; overflow: visible; }

.rl4-passage-title-bar { font-size: 1rem; font-weight: 700; color: var(--gold); padding: 14px 22px 12px; background: rgba(14,14,28,0.97); border-bottom: 1px solid rgba(255,255,255,0.07); position: sticky; top: 0; z-index: 2; }
.rl4-passage-card { font-size: 1.1rem; line-height: 2.15; color: rgba(255,255,255,0.88); padding: 20px 26px 32px; font-family: 'Georgia', serif; letter-spacing: 0.01em; }
.rl4-passage-card p { margin: 0 0 16px; }
.rl4-passage-title { font-size: 1.2rem; font-weight: 700; color: rgba(255,255,255,0.97); font-family: 'Inter', sans-serif; margin-bottom: 20px; line-height: 1.4; }

.rl4-ctx { background: rgba(251,191,36,0.12); border-radius: 4px; padding: 1px 3px; border-bottom: 2px solid rgba(251,191,36,0.35); transition: background .3s; }
.rl4-ctx.active { background: rgba(245,200,66,0.3); border-bottom-color: #f5c842; animation: rl4-pulse 1.4s ease-in-out; }
@keyframes rl4-pulse { 0%,100%{background:rgba(245,200,66,0.22);} 50%{background:rgba(245,200,66,0.5);} }
.rl4-ans { color: var(--gold); font-weight: 700; }
.rl4-no-hl .rl4-ctx { background: none; border-bottom: none; padding: 0; border-radius: 0; }
.rl4-no-hl .rl4-ans { color: inherit; font-weight: inherit; }

/* INFO PAGES */
.rl4-info-page { width: 100%; padding: 8px 0 48px; }
.rl4-info-badge { display: inline-block; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--gold); background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.3); border-radius: 20px; padding: 4px 14px; margin-bottom: 14px; }
.rl4-info-h2 { font-size: 2rem; font-weight: 900; color: #fff; margin: 0 0 16px; }
.rl4-info-lead { font-size: 1.18rem; color: rgba(255,255,255,0.82); line-height: 1.85; margin-bottom: 32px; width: 100%; }

.rl4-info-section { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.09); border-radius: 12px; padding: 22px 28px; margin-bottom: 16px; }
.rl4-info-section-title { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--gold); margin-bottom: 14px; }
.rl4-info-section p { font-size: 1.05rem; color: rgba(255,255,255,0.82); line-height: 1.85; margin: 0 0 10px; }
.rl4-info-section p:last-child { margin-bottom: 0; }

.rl4-info-ol { margin: 0; padding-left: 22px; color: rgba(255,255,255,0.82); font-size: 1.05rem; line-height: 1.95; }
.rl4-info-ol li { margin-bottom: 8px; }
.rl4-info-ul { margin: 0; padding-left: 0; color: rgba(255,255,255,0.82); font-size: 1.05rem; line-height: 1.95; list-style: none; }
.rl4-info-ul li { margin-bottom: 8px; padding-left: 4px; }

.rl4-task-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 6px; }
@media (max-width: 700px) { .rl4-task-preview-grid { grid-template-columns: repeat(2, 1fr); } }
.rl4-task-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; border-radius: 12px; background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.25); }
.rl4-tp-num { width: 36px; height: 36px; border-radius: 50%; background: #7c3aed; color: #fff; font-weight: 800; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.rl4-tp-label { font-size: .88rem; color: rgba(255,255,255,0.7); text-align: center; line-height: 1.4; }

.rl4-tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 4px; }
@media (max-width: 900px) { .rl4-tips-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .rl4-tips-grid { grid-template-columns: 1fr; } }
.rl4-tip-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 12px; padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.rl4-tip-icon { font-size: 1.6rem; line-height: 1; }
.rl4-tip-title { font-size: 1rem; font-weight: 700; color: var(--gold); line-height: 1.35; }
.rl4-tip-body { font-size: .95rem; color: rgba(255,255,255,0.75); line-height: 1.75; }