/* ==========================================================================
   Faseeh Recitation Lab (Figma "Annotation Platform — Desktop V2", 2654:60859)
   Page-only styles. Reuses tokens.css / base.css (.fsh-container, .fsh-btn, .fsh-tag).
   Illustrations are HTML/CSS/SVG; their loops are driven by assets/js/pages/recitation-lab.js.
   ========================================================================== */

.fsh-page-recitation-lab { --rl-ink: #2b2e35; --rl-red: #f1292c; --rl-line: #e8e8e8; --rl-line-2: #d6d6d6; }

/* ---------- Shared ---------- */
.rl-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.875rem, 1.3rem + 1.9vw, 2.625rem); /* 42px @1440 */
  line-height: 1.38;
  color: var(--c-ink);
}
.rl-head { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.rl-head--center { align-items: center; text-align: center; }
.rl-head .rl-h2 { max-width: 760px; }
.rl-lead { font-size: var(--fs-lead); line-height: 1.556; color: var(--c-muted); max-width: 660px; margin-top: -4px; }
.rl-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rl-actions--center { justify-content: center; }
.rl-label { font: 600 11px/1.2 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-muted); }
.rl-ico { flex: none; display: block; }
[lang="ar"] { font-family: var(--font-arabic); }

.rl-wave { display: inline-flex; align-items: center; gap: 3px; height: 28px; flex: none; }
.rl-wave i { display: block; width: 2px; height: var(--h); border-radius: 1px; background: currentColor; transform-origin: 50% 50%; }
.rl-wave--gold { color: var(--c-gold); }
.rl-wave--grey { color: var(--c-dark-300); }

.rl-dotbtn { width: 32px; height: 32px; border-radius: 50%; background: var(--c-ink); color: #fff; display: grid; place-items: center; flex: none; }
.rl-dotbtn .rl-ico { margin-left: 2px; }

.rl-pill {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 8px 14px; border-radius: 100px; background: #fff; border: 1px solid var(--rl-line);
  font-size: 14px; line-height: 1.2; color: var(--c-ink); white-space: nowrap;
}
.rl-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-gold); flex: none; }

.rl-caret { display: none; width: 1.5px; height: 1.1em; background: var(--c-gold); vertical-align: -0.15em; margin-left: 1px; }
.is-typing .rl-caret, .rl-field.is-typing .rl-caret { display: inline-block; animation: rl-blink 1s steps(1) infinite; }
@keyframes rl-blink { 50% { opacity: 0; } }

/* ==========================================================================
   10 · Hero
   ========================================================================== */
.rl-hero { background: var(--c-white); padding-bottom: 30px; }
.rl-hero__inner { padding-top: clamp(130px, 13.2vw, 190px); }
.rl-hero__lead { display: flex; flex-direction: column; align-items: center; text-align: center; }
.rl-hero__title {
  margin-top: 20px;
  max-width: 900px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.2rem + 3.3vw, 3.5rem); /* 56px @1440 */
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}
.rl-hero__sub { margin-top: 20px; max-width: 800px; font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem); line-height: 1.5; color: var(--c-muted); }
.rl-hero__lead .rl-actions { margin-top: 32px; }
.rl-hero__stage {
  max-width: calc(var(--container-wide));
  margin: clamp(48px, 5.2vw, 74px) clamp(12px, 1.7vw, 24px) 0;
  padding: clamp(12px, 2.6vw, 37px);
  background: var(--c-surface);
  border-radius: var(--r-xl);
}
@media (min-width: 1440px) { .rl-hero__stage { margin-inline: auto; } }
.rl-hero__screen { position: relative; aspect-ratio: 1319 / 879; border-radius: 14px; overflow: hidden; background: #1a1a1a; }
.rl-hero__video, .rl-hero__still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rl-hero__still { display: none; }
@media not all {
  .rl-hero__video { display: none; }
  .rl-hero__still { display: block; }
}

/* ==========================================================================
   20 · Introduction film
   ========================================================================== */
.rl-film { background: var(--c-white); padding: 56px 0 72px; }
.rl-film__frame {
  position: relative; margin-top: 44px;
  aspect-ratio: 16 / 9; width: 100%;
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--c-surface); border: 1px solid #e6e6e6;
}
.rl-film__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.rl-film__video:not(.is-playing) { background: var(--c-surface); }
.rl-film__play {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  display: grid; place-items: center; padding: 0; margin: 0;
  background: none; border: 0; cursor: pointer; border-radius: inherit;
}
.rl-film__play:focus-visible { outline: 3px solid var(--c-gold); outline-offset: -3px; }
.rl-film__veil { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.18); }
.rl-film__ring, .rl-film__btn { grid-area: 1 / 1; border-radius: 50%; }
.rl-film__ring { width: clamp(76px, 9.45vw, 136px); aspect-ratio: 1; background: rgba(255, 255, 255, 0.55); position: relative; }
.rl-film__btn {
  width: clamp(58px, 7.2vw, 104px); aspect-ratio: 1; background: var(--c-ink); position: relative;
  display: grid; place-items: center;
  transition: transform .35s var(--ease-out, ease);
}
.rl-film__btn svg { width: 29%; height: auto; margin-left: 6%; }
.rl-film__play:hover .rl-film__btn { transform: scale(1.05); }
.rl-film__frame.is-started .rl-film__play { display: none; }
.rl-film__meta { margin-top: 24px; text-align: center; font-size: 14px; color: var(--c-muted); }

/* ==========================================================================
   30 · Why annotation matters (01/02/03)
   ========================================================================== */
.rl-why { background: var(--c-white); padding: 104px 0 76px; }
.rl-why__inner { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 624px); justify-content: space-between; gap: 48px; }
.rl-why__head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.rl-why__list { list-style: none; margin: 0; padding: 0; }
.rl-why__row {
  display: grid; grid-template-columns: minmax(0, 360px) 216px; justify-content: space-between; align-items: center; gap: 24px;
  padding: 27px 0 28px; border-top: 1px solid var(--rl-line);
}
.rl-why__text { display: flex; flex-direction: column; gap: 8px; }
.rl-why__num { font: 500 13px/16px var(--font-sans); color: var(--c-gold); }
.rl-why__h { font-family: var(--font-sans); font-size: 22px; line-height: 30px; color: var(--c-ink); }
.rl-why__p { font-size: 16px; line-height: 24px; color: #4a4a4a; }

.rl-frag { width: 216px; height: 112px; background: var(--c-surface); border-radius: var(--r); position: relative; }
.rl-frag--word { display: grid; place-items: center; }
.rl-accent { position: relative; display: inline-block; font-family: var(--font-arabic); font-weight: 700; font-size: 50px; line-height: 80px; color: var(--c-ink); }
.rl-accent__base, .rl-accent__hi { display: block; white-space: nowrap; }
/* Same word, clipped to the shadda area (never per-letter spans). */
.rl-accent__hi { position: absolute; inset: 0; color: var(--c-gold); clip-path: inset(11% 14% 71% 64%); }

.rl-frag--verdict { padding: 20px 18px 0; }
.rl-verdict__top { display: flex; align-items: center; gap: 10px; }
.rl-verdict__tile {
  width: 40px; height: 46px; flex: none; display: grid; place-items: center;
  background: #fff; border: 1.5px solid var(--rl-line); border-radius: 9px;
  font-weight: 700; font-size: 26px; line-height: 1; color: var(--c-ink); padding-top: 4px;
  transition: border-color .45s ease, background-color .45s ease;
}
.rl-verdict__tile.is-sel { border-color: var(--c-gold); }
.rl-verdict__txt { display: flex; flex-direction: column; gap: 5px; }
.rl-verdict__t { font: 500 12px/15px var(--font-sans); color: var(--c-ink); }
.rl-verdict__s { font-size: 12px; line-height: 15px; color: var(--c-muted); }
.rl-verdict__ok { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; line-height: 16px; color: var(--c-muted); }
.rl-verdict__ok .rl-ico { color: var(--c-gold); }

.rl-frag--compare { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0 16px; }
.rl-compare__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--c-muted); }

/* ==========================================================================
   40 · Built around expert review (dark notched panel, like .fsh-showcase)
   ========================================================================== */
.rl-ws { background: var(--c-white); padding: 0 clamp(12px, 1.7vw, 24px) 24px; }
.rl-ws__panel {
  --notch-w: clamp(180px, 29%, 404px);
  --notch-h: clamp(48px, 5.55vw, 80px);
  position: relative; isolation: isolate; overflow: hidden;
  max-width: var(--container-wide); margin-inline: auto;
  background: var(--c-white); border-radius: var(--r-xl);
  padding: calc(var(--notch-h) + clamp(56px, 8.3vw, 120px)) clamp(20px, 6.1vw, 88px) clamp(32px, 6.1vw, 88px);
}
.rl-ws__panel::before, .rl-ws__panel::after { content: ""; position: absolute; background: var(--c-dark); z-index: -1; border-top-right-radius: var(--r-xl); }
.rl-ws__panel::before { top: 0; left: 0; width: calc(100% - var(--notch-w)); height: calc(var(--notch-h) + 2px); }
.rl-ws__panel::after { top: var(--notch-h); left: 0; right: 0; bottom: 0; }
.rl-ws__nc {
  position: absolute; z-index: -1;
  left: calc(100% - var(--notch-w)); top: calc(var(--notch-h) - var(--r-xl));
  width: var(--r-xl); height: var(--r-xl);
  background: radial-gradient(circle at top right, transparent var(--r-xl), var(--c-dark) calc(var(--r-xl) + 0.5px));
}
.rl-ws__intro { display: flex; flex-direction: column; align-items: flex-start; max-width: 1016px; }
.rl-ws__title { margin-top: 13px; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h2-dark); line-height: 1.34; letter-spacing: -0.01em; color: #fff; }
.rl-ws__body { margin-top: 27px; max-width: 618px; font-size: var(--fs-lead); line-height: 1.5; color: var(--c-dark-200); }
.rl-ws__intro .rl-actions { margin-top: 27px; }
.rl-ws__intro .fsh-btn--white .fsh-icon { width: 20px; height: 20px; }

.rl-ws__card {
  margin-top: 64px; padding: 24px; display: grid; grid-template-columns: 348px minmax(0, 1fr); gap: 24px;
  background: var(--c-dark-card); border: 1px solid var(--c-dark-border); border-radius: var(--r-lg);
}
.rl-ws__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-rows: repeat(5, 1fr); gap: 8px; }
.rl-ws__step {
  display: flex; gap: 14px; padding: 14px; min-height: 96px;
  background: var(--c-dark-raised); border: 1.5px solid var(--c-dark-border); border-radius: var(--r);
  transition: border-color .5s ease;
}
.rl-ws__idx {
  width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.10); color: #fff; font: 500 14px/1 var(--font-sans);
  transition: background-color .5s ease;
}
.rl-ws__stxt { display: flex; flex-direction: column; gap: 4px; }
.rl-ws__sh { font-size: 20px; line-height: 26px; color: #fff; }
.rl-ws__sp { font-size: 14px; line-height: 21px; color: var(--c-dark-300); }
.rl-ws__step.is-active { border-color: var(--c-gold); }
.rl-ws__step.is-active .rl-ws__idx { background: var(--c-gold); }

/* Workspace window: a fixed 796×672 canvas scaled to fit (JS sets --s). */
.rl-ws__window { position: relative; border-radius: var(--r); overflow: hidden; background: var(--c-surface); height: 672px; }
.rl-fit__canvas { position: absolute; top: 0; left: 0; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.rl-ws__canvas { width: 796px; height: 672px; display: flex; }
.rl-ws__main { position: relative; width: 381px; flex: none; overflow: hidden; background: var(--c-surface); }
.rl-ws__side { width: 415px; flex: none; background: #fff; border-left: 1px solid var(--rl-line); padding: 24px 24px 0; display: flex; flex-direction: column; gap: 12px; }
.rl-ws__verse { position: absolute; right: 137px; top: 70px; margin: 0; white-space: nowrap; font-family: var(--font-arabic); font-size: 34px; line-height: 1.4; color: var(--rl-ink); }
.rl-ws__player { position: absolute; right: 194px; top: 141px; width: 260px; height: 85px; background: #fff; border: 1px solid var(--rl-line); border-radius: 16px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-right: 12px; }
.rl-ws__time { position: absolute; left: 59px; top: 58px; font: 500 12px/15px var(--font-sans); color: var(--c-muted); }
.rl-ws__replay { width: 36px; height: 36px; display: grid; place-items: center; background: var(--c-surface); border-radius: 10px; color: var(--c-muted); }
.rl-ws__hint { position: absolute; right: 340px; top: 251px; white-space: nowrap; font-size: 14px; color: var(--c-muted); }

.rl-speed { position: relative; display: inline-flex; gap: 2px; padding: 3px; background: var(--c-surface); border-radius: 10px; flex: none; }
.rl-speed__o { position: relative; z-index: 1; padding: 6px 10px; border-radius: 8px; font: 500 13px/16px var(--font-sans); color: var(--c-muted); transition: color .35s ease, background-color .35s ease; }
.rl-speed__o.is-on { background: #fff; color: var(--rl-ink); font-weight: 600; }

.rl-wsw { position: absolute; background: #fff; border: 1px solid var(--rl-line); border-radius: 14px; padding: 8px 9px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rl-wsw__word { font-size: 26px; line-height: 36px; color: var(--rl-ink); white-space: nowrap; }
.rl-wsw__units { display: flex; gap: 3px; border-top: 1px solid var(--rl-line); padding-top: 6px; }
.rl-wsw__u { position: relative; width: 36px; height: 54px; display: grid; place-items: center; background: var(--c-surface); border: 1.5px solid transparent; border-radius: 9px; font-size: 24px; color: var(--rl-ink); transition: border-color .4s ease, background-color .4s ease, color .4s ease; }
.rl-wsw__u.is-err { border-color: var(--rl-red); background: #fff; color: var(--rl-red); }
.rl-wsw__badge { position: absolute; top: -6px; right: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--rl-red); color: #fff; font: 600 10px/14px var(--font-sans); text-align: center; font-style: normal; transition: transform .35s ease; }
.rl-wsw__u:not(.is-err) .rl-wsw__badge { transform: scale(0); }

.rl-ws__sidet { display: flex; align-items: baseline; gap: 10px; font: 600 17px/21px var(--font-sans); color: var(--rl-ink); }
.rl-ws__sidet b { font-size: 12px; color: var(--rl-red); }
.rl-ws__sides { display: block; margin-top: 4px; font-size: 13px; line-height: 16px; color: var(--c-muted); }
.rl-ws__add { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: 1px dashed var(--rl-line-2); border-radius: 10px; font: 500 13px/16px var(--font-sans); color: var(--c-muted); }

/* Annotation card (workspace side panel + structured annotation card). */
.rl-note { background: #fff; border: 1px solid var(--rl-line); border-radius: 12px; padding: 14px 15px; display: flex; flex-direction: column; gap: 10px; transition: border-color .4s ease, opacity .5s ease, transform .5s ease; }
.rl-note__top { display: flex; align-items: center; gap: 6px; }
.rl-note__idx { width: 22px; height: 22px; border-radius: 50%; background: var(--rl-red); color: #fff; display: grid; place-items: center; font: 600 11px/1 var(--font-sans); flex: none; margin-right: 8px; }
.rl-note__syl { color: var(--rl-red); font-size: 20px; line-height: 32px; min-width: 24px; text-align: center; }
.rl-note__in, .rl-note__pos { font-size: 12px; color: var(--c-muted); }
.rl-note__word { font-size: 20px; line-height: 32px; color: var(--rl-ink); }
.rl-note__acts { margin-left: auto; display: flex; gap: 12px; color: var(--c-muted); }
.rl-note__cls { padding-left: 36px; font-size: 13px; line-height: 16px; }
.rl-note__cat { font-weight: 500; font-size: 12px; color: var(--c-muted); }
.rl-note__type { font-weight: 600; color: var(--rl-ink); }
.rl-note__ar { display: block; text-align: left; font-size: 15px; line-height: 24px; color: var(--c-muted); margin-top: 2px; }
.rl-note__corr { position: relative; overflow: hidden; display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: var(--c-surface); border-radius: 10px; }
.rl-note__play { width: 26px; height: 26px; border-radius: 50%; background: var(--rl-ink); color: #fff; display: grid; place-items: center; flex: none; }
.rl-note__play .rl-ico { margin-left: 1px; }
.rl-note__ct { flex: 1; font: 500 13px/16px var(--font-sans); color: var(--rl-ink); }
.rl-note__dur { font: 500 12px/15px var(--font-sans); color: var(--c-muted); }
.rl-note__ok { color: var(--c-muted); transition: transform .4s var(--ease-out, ease), opacity .4s ease; }
.rl-note__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--c-gold); transform-origin: 0 50%; transform: scaleX(0); }

.rl-note--lg { padding: 16px; gap: 11.5px; border-radius: 16px; border-width: 1.15px; }
.rl-note--lg .rl-note__idx { width: 25px; height: 25px; font-size: 12.6px; margin-right: 6px; }
.rl-note--lg .rl-note__syl, .rl-note--lg .rl-note__word { font-size: 23px; line-height: 37px; }
.rl-note--lg .rl-note__in, .rl-note--lg .rl-note__pos { font-size: 13.8px; }
.rl-note--lg .rl-note__acts { gap: 14px; }
.rl-note--lg .rl-note__cls { padding-left: 37px; font-size: 15px; line-height: 18px; }
.rl-note--lg .rl-note__cat { font-size: 13.8px; }
.rl-note--lg .rl-note__ar { font-size: 16px; line-height: 28px; }
.rl-note--lg .rl-note__corr { padding: 9px 11.5px; border-radius: 11.5px; }
.rl-note--lg .rl-note__play { width: 30px; height: 30px; }
.rl-note--lg .rl-note__ct { font-size: 15px; line-height: 18px; }
.rl-note--lg .rl-note__dur { font-size: 13.8px; }

/* Workspace loop states (data-step on .rl-ws__card, set by JS; default markup = Figma state). */
.rl-ws__card.is-live .rl-note[data-note="1"] { transition: border-color .4s ease; }
.rl-ws__card.is-live[data-step="0"] .rl-note[data-note="1"],
.rl-ws__card.is-live[data-step="1"] .rl-note[data-note="1"] { border-style: dashed; border-color: var(--rl-line-2); }
.rl-ws__card.is-live[data-step="0"] .rl-note[data-note="1"] > *,
.rl-ws__card.is-live[data-step="1"] .rl-note[data-note="1"] > * { opacity: 0; }
.rl-ws__card.is-live .rl-note[data-note="1"] > * { transition: opacity .5s ease; }
.rl-ws__card.is-live[data-step="2"] .rl-note[data-note="1"] { border-color: var(--c-gold); }
.rl-ws__card.is-live[data-step="2"] .rl-note[data-note="1"] .rl-note__corr,
.rl-ws__card.is-live[data-step="2"] .rl-note[data-note="1"] .rl-note__ok { opacity: 0; }
.rl-ws__card.is-live[data-step="3"] .rl-note[data-note="1"] { border-color: var(--c-gold); }
.rl-ws__card.is-live[data-step="3"] .rl-note[data-note="1"] .rl-note__bar { animation: rl-bar 2s linear forwards; }
.rl-ws__card.is-live[data-step="3"] .rl-note[data-note="1"] .rl-note__ok { opacity: 0; animation: rl-pop .45s var(--ease-out, ease) 2s forwards; }
.rl-ws__card.is-live[data-step="4"] .rl-note .rl-note__ok { color: var(--c-gold); }
@keyframes rl-bar { to { transform: scaleX(1); } }
@keyframes rl-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }

/* ==========================================================================
   50 · A precise annotation workflow
   ========================================================================== */
.rl-flow { background: var(--c-surface); padding: 104px 0 112px; scroll-margin-top: 90px; }
.rl-flow__grid { margin-top: 60px; display: grid; grid-template-columns: minmax(0, 492fr) minmax(0, 184fr) minmax(0, 492fr); gap: 24px; }
.rl-fc { background: #fff; border: 1px solid var(--rl-line); border-radius: var(--r-lg); padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.rl-fc__cap { display: flex; flex-direction: column; gap: 6px; }
.rl-fc__t { font-family: var(--font-sans); font-size: 20px; line-height: 28px; color: var(--c-ink); }
.rl-fc__p { font-size: 16px; line-height: 24px; color: var(--c-muted); }
.rl-fc--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 332px minmax(0, 1fr); gap: 20px; padding: 16px; }
.rl-fc__cap--side { padding: 16px; }
.rl-fc--play { grid-column: 1 / 3; min-height: 316px; }
.rl-fc--takes { grid-column: 3; }
.rl-fc--expl { grid-column: 1; }
.rl-fc--note { grid-column: 2 / 4; display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 14px; padding: 32px; }
.rl-fc__cap--narrow { align-self: start; }

/* A · Segmentation */
.rl-segill { background: var(--c-surface); border-radius: var(--r); min-height: 284px; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 24px; flex-wrap: wrap; }
.rl-seg {
  display: flex; flex-direction: column; align-items: stretch; gap: 9px;
  padding: 12px 13.5px 15px; background: #fff; border: 1.5px solid var(--rl-line); border-radius: 21px;
  transition: border-color .45s ease;
}
.rl-seg.is-active { border-color: rgba(43, 46, 53, 0.22); }
.rl-seg__word { display: block; text-align: center; font-size: 39px; line-height: 54px; color: var(--rl-ink); padding-bottom: 9px; border-bottom: 2px solid var(--rl-line); white-space: nowrap; }
.rl-seg__units { display: flex; gap: 4.5px; justify-content: center; }
.rl-seg__unit {
  position: relative; width: 54px; height: 81px; flex: 0 1 54px; min-width: 0;
  display: grid; place-items: center; padding-bottom: 6px;
  background: var(--c-surface); border: 2.25px solid transparent; border-radius: 13.5px;
  font-size: 36px; line-height: 1; color: var(--rl-ink);
  transition: border-color .45s ease, background-color .45s ease;
}
.rl-seg__unit.is-sel { background: #fff; border-color: var(--c-gold); }
.rl-seg__mk { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 21px; height: 7px; }
.rl-seg__mk--shadda { border-top: 2px solid var(--c-muted); border-bottom: 2px solid var(--c-muted); border-radius: 1.5px; }
.rl-seg__mk--madd { height: 2px; width: 30px; background: var(--c-muted); border-radius: 1px; bottom: 6px; }

/* B · Error classification */
.rl-cls { display: grid; grid-template-columns: minmax(0, 368px) minmax(0, 367px); gap: 36px; padding: 16px 16px 20px 0; }
.rl-cls__col { display: flex; flex-direction: column; min-width: 0; }
.rl-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--rl-line); border-radius: 10px; color: var(--rl-ink); transition: border-color .35s ease; }
.rl-search.is-focus { border-color: var(--c-gold); }
.rl-search__field { position: relative; flex: 1; min-width: 0; font-size: 14px; line-height: 17px; color: var(--rl-ink); white-space: nowrap; overflow: hidden; }
.rl-search__ph { color: var(--c-muted); }
.rl-search__field.has-q .rl-search__ph { display: none; }
.rl-search__key { flex: none; padding: 2px 6px; border-radius: 6px; background: var(--c-surface); font: 600 11px/13px var(--font-sans); color: var(--c-muted); }
.rl-cls__hd { display: flex; justify-content: space-between; gap: 8px; margin: 16px 0 13px; font-size: 11px; line-height: 13px; color: var(--c-muted); }
.rl-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.rl-recent__row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px 8px 10px; border: 1px solid var(--rl-line); border-radius: 12px; transition: border-color .35s ease, background-color .35s ease, opacity .35s ease; }
.rl-recent__k { width: 22px; height: 22px; flex: none; display: grid; place-items: center; background: var(--c-surface); border: 1px solid var(--rl-line); border-radius: 6px; font: 600 11px/1 var(--font-sans); color: var(--c-muted); transition: background-color .35s ease, color .35s ease, border-color .35s ease; }
.rl-recent__en { flex: 1; font: 600 14px/17px var(--font-sans); color: var(--rl-ink); }
.rl-recent__ar { font-size: 15px; line-height: 26px; color: var(--rl-ink); text-align: right; }
.rl-recent__row.is-hit { border-color: var(--c-gold); background: rgba(195, 143, 63, 0.06); }
.rl-recent__row.is-hit .rl-recent__k { background: var(--c-gold); border-color: var(--c-gold); color: #fff; }
.rl-recent.is-filtering .rl-recent__row:not(.is-hit) { opacity: 0.45; }
.rl-cls__hd2 { margin: 4px 0 13px; }
.rl-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rl-cat { padding: 6px 10px 7px; border: 1px solid var(--rl-line); border-radius: 10px; transition: border-color .35s ease, background-color .35s ease; min-width: 0; }
.rl-cat__top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; font-size: 11px; color: var(--c-muted); }
.rl-cat__top b { font: 600 12px/15px var(--font-sans); color: var(--rl-ink); }
.rl-cat__ar { display: block; text-align: right; font-size: 15px; line-height: 20px; color: var(--c-muted); white-space: nowrap; }
.rl-cat.is-hit { border-color: var(--c-gold); background: rgba(195, 143, 63, 0.06); }

/* C · Audio playback */
.rl-player { margin-top: auto; display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; border: 1px solid var(--rl-line); border-radius: 16px; margin-inline: 6px; margin-bottom: 6px; }
.rl-player__btn { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--rl-ink); color: #fff; display: grid; place-items: center; }
.rl-player__btn .rl-ico--play { display: none; margin-left: 2px; }
.rl-player.is-stopped .rl-player__btn .rl-ico--play { display: block; }
.rl-player.is-stopped .rl-player__btn .rl-ico--pause { display: none; }
.rl-player__tl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rl-player__wave { position: relative; display: block; height: 40px; }
.rl-wave--play { display: flex; width: 100%; height: 40px; justify-content: space-between; gap: 1px; }
.rl-wave--play i { width: 3px; flex: none; background: var(--rl-line-2); transition: background-color .15s linear; }
.rl-wave--play i.is-on { background: var(--c-gold); }
.rl-player__head { position: absolute; top: -2px; bottom: -2px; left: calc(var(--p) * 100%); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--rl-ink); }
.rl-player__times { display: flex; justify-content: space-between; font: 500 12px/15px var(--font-sans); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.rl-player__ctl { display: flex; align-items: center; gap: 8px; flex: none; }
.rl-player__rep { width: 36px; height: 36px; display: grid; place-items: center; background: var(--c-surface); border-radius: 10px; color: var(--c-muted); }
.rl-player__rep.is-spin .rl-ico { animation: rl-spin .7s var(--ease-out, ease); }
@keyframes rl-spin { to { transform: rotate(360deg); } }

/* C · Audio correction takes */
.rl-takes { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.rl-take { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--rl-line); border-radius: 10px; transition: border-color .4s ease; }
.rl-take__idx { position: relative; width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--rl-ink); color: #fff; font: 500 12px/1 var(--font-sans); transition: background-color .4s ease, color .4s ease; }
.rl-take__idx > * { grid-area: 1 / 1; transition: opacity .3s ease, transform .3s ease; }
.rl-take__idx > span { opacity: 0; }
.rl-take__txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rl-take__txt b { font: 500 13px/16px var(--font-sans); color: var(--rl-ink); }
.rl-take__st { font-size: 12px; line-height: 15px; color: var(--c-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rl-take .rl-wave--take { height: 17px; gap: 2px; color: var(--rl-line-2); margin-right: auto; }
.rl-take .rl-wave--take i { transition: background-color .15s linear, transform .3s ease; }
.rl-take .rl-wave--take i.is-on { background: var(--rl-ink); }
.rl-take__acts { display: flex; align-items: center; gap: 6px; flex: none; }
.rl-take__pp { width: 32px; height: 32px; border-radius: 50%; background: var(--c-surface); color: var(--rl-ink); display: grid; place-items: center; }
.rl-take__pp .rl-ico--play { margin-left: 2px; }
.rl-take__pp .rl-ico--pause { display: none; }
.rl-take.is-playing .rl-take__pp .rl-ico--pause { display: block; }
.rl-take.is-playing .rl-take__pp .rl-ico--play { display: none; }
.rl-take__btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; font: 500 14px/20px var(--font-sans); color: var(--c-muted); white-space: nowrap; }
.rl-take__btn--rec { height: 38px; background: #fff; border: 1px solid var(--rl-line); color: var(--rl-ink); }
.rl-take__btn--rec .rl-ico { transition: color .3s ease; }
.rl-take:not(.is-empty):not(.is-rec) .rl-take__btn--rec { display: none; }
.rl-take.is-empty .rl-take__btn--rerec, .rl-take.is-rec .rl-take__btn--rerec { display: none; }
.rl-take.is-empty .rl-take__pp, .rl-take.is-rec .rl-take__pp { display: none; }
.rl-take.is-empty { border-style: dashed; border-color: var(--rl-line-2); }
.rl-take.is-empty .rl-take__idx, .rl-take.is-rec .rl-take__idx { background: var(--c-surface); color: var(--c-muted); }
.rl-take.is-empty .rl-take__idx > svg, .rl-take.is-rec .rl-take__idx > svg { opacity: 0; transform: scale(.4); }
.rl-take.is-empty .rl-take__idx > span, .rl-take.is-rec .rl-take__idx > span { opacity: 1; }
.rl-take.is-empty .rl-wave--take { visibility: hidden; }
.rl-take.is-rec { border-color: var(--c-gold); }
.rl-take.is-rec .rl-wave--take { visibility: visible; }
.rl-take.is-rec .rl-wave--take i { transform: scaleY(.15); }
.rl-take.is-rec .rl-wave--take i.is-on { transform: scaleY(1); background: var(--c-gold); }
.rl-take.is-rec .rl-take__btn--rec { border-color: var(--c-gold); }
.rl-take.is-rec .rl-take__btn--rec .rl-ico { color: var(--rl-red); animation: rl-rec 1s ease-in-out infinite; }
@keyframes rl-rec { 50% { opacity: .35; } }

/* C · Written explanation */
.rl-area { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.rl-area__lbl { display: flex; align-items: center; gap: 8px; }
.rl-area__lbl b { font: 500 14px/17px var(--font-sans); color: var(--rl-ink); }
.rl-pill-s { padding: 2px 6px; border-radius: 6px; background: var(--c-surface); font: 500 11px/13px var(--font-sans); color: var(--c-muted); }
.rl-area__help { font-size: 13px; line-height: 18px; color: var(--c-muted); }
.rl-area__field { display: block; min-height: 68px; padding: 10px 12px; border: 1px solid var(--rl-line-2); border-radius: 10px; font-size: 14px; line-height: 20px; color: var(--rl-ink); transition: border-color .35s ease; }
.rl-area__field [lang="ar"] { font-size: 17px; line-height: 1; }
.rl-area.is-typing .rl-area__field { border-color: var(--c-gold); }
.rl-area__count { align-self: flex-end; font-size: 12px; line-height: 15px; color: var(--c-muted); font-variant-numeric: tabular-nums; }

/* B · One structured annotation (loop states) */
.rl-note.is-live > *, .rl-note.is-live .rl-note__top > * { transition: opacity .45s ease, transform .45s ease; }
.rl-note.is-live:not(.s1) .rl-note__idx, .rl-note.is-live:not(.s1) .rl-note__syl { opacity: 0; transform: scale(.6); }
.rl-note.is-live:not(.s2) .rl-note__in, .rl-note.is-live:not(.s2) .rl-note__word, .rl-note.is-live:not(.s2) .rl-note__pos { opacity: 0; transform: translateX(-6px); }
.rl-note.is-live:not(.s3) .rl-note__cls { opacity: 0; transform: translateY(6px); }
.rl-note.is-live:not(.s4) .rl-note__corr { opacity: 0; transform: translateY(6px); }
.rl-note.is-live.s5 .rl-note__bar { animation: rl-bar 1.8s linear forwards; }
.rl-note.is-live:not(.s6) .rl-note__ok { opacity: 0; transform: scale(.4); }
.rl-note.is-live.s6 .rl-note__ok { color: var(--c-gold); }

/* ==========================================================================
   60 · Independent expert annotation
   ========================================================================== */
.rl-ind { background: var(--c-white); padding: 104px 0 112px; }
.rl-ind__diagram { margin-top: 56px; display: grid; grid-template-columns: 248fr 64fr 640fr 64fr 200fr; align-items: center; }
.rl-ind__rec { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--c-surface); border-radius: var(--r-lg); min-height: 184px; }
.rl-ind__ref { font-size: 20px; line-height: 28px; color: var(--c-ink); }
.rl-ind__play { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.rl-ind__lines { width: 100%; height: 288px; overflow: visible; }
.rl-ind__lines path { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rl-ind__lines--in path { stroke: var(--c-gold); }
.rl-ind__lines--out path { stroke: var(--rl-line-2); }
.rl-ind__lanes { display: flex; flex-direction: column; gap: 20px; }
.rl-lane { background: #fff; border: 1px solid var(--rl-line); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.rl-lane__hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rl-lane__name { font: 500 15px/18px var(--font-sans); color: var(--c-ink); }
.rl-lane__hidden { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--c-muted); }
.rl-lane__count { margin-left: auto; font-size: 13px; color: var(--c-ink); transition: opacity .4s ease; }
.rl-lane__words { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
.rl-lane__w {
  padding: 0 9px; border-radius: 8px; background: var(--c-surface); border: 1.5px solid transparent;
  font-weight: 700; font-size: 22px; line-height: 45px; color: var(--c-ink); white-space: nowrap;
  transition: border-color .45s ease, background-color .45s ease;
}
.rl-lane__w.is-mk { background: #fff; border-color: var(--c-gold); }
.rl-ind__kept { background: var(--c-dark-card); border-radius: var(--r-lg); padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; min-height: 208px; transition: background-color .5s ease; }
.rl-ind__kt { font-size: 20px; line-height: 28px; color: #fff; }
.rl-ind__kp { font-size: 14px; line-height: 21px; color: var(--c-dark-300); }
.rl-ind__note { margin: 36px auto 0; max-width: 760px; text-align: center; font-size: 15px; line-height: 23px; color: var(--c-muted); }
/* Loop states */
.rl-ind__diagram.is-live .rl-lane__count { opacity: 0; }
.rl-ind__diagram.is-live .rl-lane.is-done .rl-lane__count { opacity: 1; }
.rl-ind__lines path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.rl-ind__diagram.is-live .rl-ind__lines path { transition: stroke-dashoffset 1s var(--ease-soft, ease); }
.rl-ind__diagram.is-live:not(.is-in) .rl-ind__lines--in path,
.rl-ind__diagram.is-live:not(.is-out) .rl-ind__lines--out path { stroke-dashoffset: 1; }

/* ==========================================================================
   70 · For research & organisations
   ========================================================================== */
.rl-res { background: var(--c-surface); padding: 112px 0; }
.rl-res__inner { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 580px); justify-content: space-between; gap: 48px; align-items: start; }
.rl-res__head { display: flex; flex-direction: column; align-items: flex-start; }
.rl-res__title { margin-top: 14px; }
.rl-res__p { margin-top: 18px; max-width: 500px; font-size: 16px; line-height: 25px; color: var(--c-muted); }
.rl-res__head .rl-pill { margin-top: 24px; }
.rl-res__flow { --fill: 1; position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.rl-res__flow::before, .rl-res__flow::after { content: ""; position: absolute; left: -33px; top: 48px; width: 2px; height: calc(100% - 64px); background: var(--rl-line-2); }
.rl-res__flow::after { background: var(--c-gold); transform-origin: 50% 0; transform: scaleY(0); opacity: 0; }
.rl-res__flow.is-live::after { opacity: 1; transform: scaleY(var(--fill)); }
.rl-res__card { position: relative; display: flex; align-items: center; gap: 20px; min-height: 144px; padding: 20px; background: #fff; border: 1px solid var(--rl-line); border-radius: var(--r-lg); transition: border-color .45s ease; }
.rl-res__dot { position: absolute; left: -38px; top: 56px; width: 12px; height: 12px; border-radius: 50%; background: var(--c-gold); z-index: 1; transition: transform .45s var(--ease-out, ease); }
.rl-res__flow.is-live .rl-res__card:not(.is-on) .rl-res__dot { transform: scale(.6); }
.rl-res__txt { display: flex; flex-direction: column; gap: 4px; max-width: 320px; align-self: flex-start; }
.rl-res__t { font-size: 20px; line-height: 28px; color: var(--c-ink); }
.rl-res__d { font-size: 14px; line-height: 21px; color: var(--c-muted); }
.rl-res__ill { margin-left: auto; flex: none; display: flex; align-items: center; }
.rl-res__ill--play { gap: 8px; }
.rl-res__ill--rev { gap: 4px; }
.rl-res__ill--rev i { width: 32px; height: 32px; border-radius: 50%; background: var(--c-surface); display: grid; place-items: center; font: 500 13px/1 var(--font-sans); font-style: normal; color: var(--c-ink); transition: background-color .4s ease, color .4s ease; }
.rl-res__ill--rev i.is-on { background: var(--c-ink); color: #fff; }
.rl-res__ill--doc { flex-direction: column; align-items: flex-start; gap: 6px; width: 120px; }
.rl-res__ill--doc i { display: block; height: 6px; border-radius: 3px; background: var(--c-surface); transform-origin: 0 50%; transition: transform .6s var(--ease-out, ease), background-color .4s ease; }
.rl-res__ill--doc i:nth-child(1) { width: 120px; }
.rl-res__ill--doc i:nth-child(2) { width: 90px; }
.rl-res__ill--doc i:nth-child(3) { width: 104px; }
.rl-res__flow.is-live .rl-res__ill--doc i { transform: scaleX(0); }
.rl-res__flow.is-live .rl-res__ill--doc i.is-on { transform: scaleX(1); background: #ececec; }

/* Shared live waveform (E, D): bars light up as the playhead passes. */
.rl-wave.is-live i { opacity: .45; transition: opacity .2s linear, background-color .2s linear; }
.rl-wave.is-live i.is-on { opacity: 1; }

/* ==========================================================================
   80 · Join as a Qur'an reviewer
   ========================================================================== */
.rl-join { background: var(--c-white); padding: 104px 0; }
.rl-join__head { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 520px); justify-content: space-between; gap: 32px; align-items: start; }
.rl-join__hl { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.rl-join__p { padding-top: 44px; font-size: var(--fs-lead); line-height: 28px; color: var(--c-muted); }
.rl-join__steps { --fill: 1; position: relative; list-style: none; margin: 74px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.rl-join__steps::before, .rl-join__steps::after { content: ""; position: absolute; top: -28px; height: 2px; left: 12.5%; right: 12.5%; margin-inline: -2px; background: var(--rl-line-2); }
.rl-join__steps::after { background: var(--c-gold); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; }
.rl-join__steps.is-live::after { opacity: 1; transform: scaleX(var(--fill)); }
.rl-join__card { position: relative; display: flex; flex-direction: column; min-height: 320px; padding: 22px; background: var(--c-surface); border-radius: var(--r-lg); }
.rl-join__dot { position: absolute; top: -33px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--c-gold); transition: transform .45s var(--ease-out, ease); }
.rl-join__steps.is-live .rl-join__card:not(.is-on) .rl-join__dot { transform: scale(.6); }
.rl-join__ill { height: 168px; display: grid; place-items: center; }
.rl-join__ill--form { display: flex; flex-direction: column; gap: 8px; place-items: initial; justify-content: flex-start; }
.rl-join__txt { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 24px; }
.rl-join__t { font-size: 20px; line-height: 28px; color: var(--c-ink); }
.rl-join__d { font-size: 14px; line-height: 21px; color: var(--c-muted); }
.rl-join__note { margin-top: 24px; font-size: 15px; line-height: 23px; color: var(--c-muted); }
.rl-field { display: flex; align-items: center; height: 39px; padding: 0 12px; background: #fff; border: 1px solid var(--rl-line); border-radius: 10px; font-size: 14px; color: var(--c-muted); transition: border-color .35s ease; white-space: nowrap; overflow: hidden; }
.rl-field.is-typing { border-color: var(--c-gold); }
.rl-field.is-filled .rl-field__v { color: var(--c-ink); }
.rl-pill--status { align-self: center; }
.rl-pill--status i { animation: none; }
.rl-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--c-gold); display: grid; place-items: center; transition: transform .5s var(--ease-out, ease), opacity .4s ease; }
.rl-tick path { stroke-dasharray: 24; stroke-dashoffset: 0; }
.rl-join__steps.is-live .rl-tick { transform: scale(.85); opacity: .35; }
.rl-join__steps.is-live .rl-tick path { stroke-dashoffset: 24; transition: stroke-dashoffset .5s ease; }
.rl-join__steps.is-live .rl-tick.is-on { transform: scale(1); opacity: 1; }
.rl-join__steps.is-live .rl-tick.is-on path { stroke-dashoffset: 0; transition-delay: .2s; }
.rl-seg--sm { padding: 8px 9px 10px; gap: 6px; border-width: 1px; border-radius: 14px; }
.rl-seg--sm .rl-seg__word { font-size: 26px; line-height: 36px; padding-bottom: 6px; border-bottom-width: 1px; }
.rl-seg--sm .rl-seg__units { gap: 3px; }
.rl-seg--sm .rl-seg__unit { width: 36px; height: 54px; flex-basis: 36px; border-width: 1.5px; border-radius: 9px; font-size: 24px; padding-bottom: 4px; }
.rl-seg--sm .rl-seg__mk { bottom: 5px; width: 14px; height: 4px; }
.rl-seg--sm .rl-seg__mk--shadda { border-top-width: 1px; border-bottom-width: 1px; }
.rl-seg--sm .rl-seg__mk--madd { width: 22px; height: 1.5px; }

/* ==========================================================================
   90 · CTA (dark band, sits right above the footer)
   ========================================================================== */
.rl-cta { background: var(--c-dark); padding: 80px 0 12px; }
.rl-cta__panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 65px 48px 65px 40px; background: var(--c-dark-card); border: 1px solid var(--c-dark-border); border-radius: var(--r-xl); }
.rl-cta__main { display: flex; flex-direction: column; gap: 16px; }
.rl-cta__title { font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 1.6vw, 2.695rem); line-height: 1.104; color: #fff; }
.rl-cta__actions .fsh-btn { min-height: 40px; }
.rl-cta__note { max-width: 460px; margin-bottom: -17px; font-size: 16px; line-height: 24px; color: var(--c-dark-300); }

/* ==========================================================================
   Reveal (pre-hidden only when motion is allowed; GSAP reveals)
   ========================================================================== */
@media all {
  .fsh-motion .rl-reveal { opacity: 0; }
  .rl-accent__hi { animation: rl-accent 5.2s ease-in-out infinite; }
  .rl-pill--status i { animation: rl-dot 1.6s ease-in-out infinite; }
}
@keyframes rl-accent { 0%, 12% { opacity: 0; } 34%, 78% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes rl-dot { 50% { opacity: .3; transform: scale(.7); } }
.is-paused, .is-paused * { animation-play-state: paused !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .rl-ws__card { grid-template-columns: 1fr; }
  .rl-ws__steps { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: none; }
  .rl-ws__step { flex-direction: column; gap: 10px; min-height: 0; }
  .rl-ws__sh { font-size: 17px; line-height: 22px; }
  .rl-ws__sp { font-size: 13px; line-height: 19px; }
  .rl-ind__diagram { grid-template-columns: 1fr; gap: 16px; max-width: 680px; margin-inline: auto; }
  .rl-ind__lines { display: none; }
  .rl-ind__rec, .rl-ind__kept { min-height: 0; }
  .rl-ind__rec { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
  .rl-ind__rec .rl-label { flex-basis: 100%; }
  .rl-ind__play { margin: 0 0 0 auto; }
  .rl-cls { grid-template-columns: 1fr; gap: 24px; }
  .rl-fc--note { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .rl-flow__grid { grid-template-columns: minmax(0, 1fr); }
  .rl-fc--wide, .rl-fc--play, .rl-fc--takes, .rl-fc--expl, .rl-fc--note { grid-column: 1; }
  .rl-fc--wide { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .rl-fc__cap--side { padding: 12px 8px 8px; }
  .rl-cls { padding: 8px; }
  .rl-fc--play { min-height: 0; }
  .rl-player { margin-top: 12px; }
  .rl-join__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 48px; }
  .rl-join__steps::before, .rl-join__steps::after, .rl-join__dot { display: none; }
}

@media (max-width: 860px) {
  .rl-why { padding: 72px 0 48px; }
  .rl-why__inner, .rl-res__inner, .rl-join__head { grid-template-columns: 1fr; gap: 32px; }
  .rl-join__p { padding-top: 0; }
  .rl-film, .rl-ind, .rl-flow, .rl-res, .rl-join { padding-block: 72px; }
  .rl-film { padding-top: 48px; }
  .rl-film__frame { border-radius: var(--r-lg); margin-top: 32px; }
  .rl-flow__grid, .rl-ind__diagram { margin-top: 40px; }
  .rl-res__flow { margin-left: 33px; }
  .rl-cta { padding-top: 56px; }
  .rl-cta__panel { flex-direction: column; align-items: flex-start; gap: 24px; padding: 40px 28px; }
  .rl-cta__note { margin-bottom: 0; }
  .rl-ws__card { margin-top: 48px; padding: 16px; }
  .rl-ws__steps { grid-template-columns: 1fr; }
  .rl-ws__step { flex-direction: row; padding: 12px; }
}

/* Phone: the workspace window keeps only its annotation panel (legible scale). */
@media (max-width: 640px) {
  .rl-ws__panel { --notch-w: 0px; --notch-h: 0px; background: var(--c-dark); padding-top: 56px; }
  .rl-ws__panel::before, .rl-ws__panel::after, .rl-ws__nc { display: none; }
  .rl-ws__canvas { width: 415px; }
  .rl-ws__main { display: none; }
  .rl-ws__side { border-left: 0; }
  .rl-segill { padding: 16px 10px; gap: 12px; min-height: 0; }
  .rl-seg { padding: 10px 8px 12px; border-radius: 16px; max-width: 100%; }
  .rl-seg__word { font-size: 32px; line-height: 46px; }
  .rl-seg__units { gap: 3px; }
  .rl-seg__unit { height: 64px; font-size: 28px; border-radius: 10px; }
  .rl-seg__mk { bottom: 6px; }
}

@media (max-width: 520px) {
  .rl-hero__lead .rl-actions .fsh-btn, .rl-cta .rl-actions .fsh-btn { flex: 1 1 100%; }
  .rl-why__row { grid-template-columns: 1fr; gap: 16px; }
  .rl-frag { width: 100%; }
  .rl-frag--compare .rl-compare__row { gap: 10px; }
  .rl-fc { padding: 22px 16px 16px; }
  .rl-fc--wide { padding: 8px; }
  .rl-fc--note { padding: 22px 12px 12px; }
  .rl-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rl-recent__row { flex-wrap: wrap; gap: 4px 12px; }
  .rl-recent__ar { flex-basis: 100%; padding-left: 34px; text-align: left; }
  .rl-player { flex-wrap: wrap; margin-inline: 0; gap: 12px; }
  .rl-player__tl { flex-basis: calc(100% - 64px); }
  .rl-player__ctl { margin-left: 60px; }
  .rl-take .rl-wave--take { display: none; }
  .rl-take__txt { margin-right: auto; }
  .rl-take__btn { padding: 0 8px; }
  .rl-note--lg { padding: 12px; }
  .rl-note--lg .rl-note__cls { padding-left: 0; }
  .rl-note--lg .rl-note__ct { font-size: 14px; }
  .rl-note--lg .rl-note__acts { gap: 8px; }
  .rl-note--lg .rl-note__pos { white-space: nowrap; }
  .rl-lane { padding: 12px; }
  .rl-lane__w { font-size: 20px; line-height: 40px; padding: 0 7px; }
  .rl-res__flow { margin-left: 24px; }
  .rl-res__flow::before, .rl-res__flow::after { left: -24px; }
  .rl-res__dot { left: -29px; }
  .rl-res__card { flex-direction: column; align-items: flex-start; }
  .rl-res__ill { margin-left: 0; }
  .rl-join__steps { grid-template-columns: 1fr; }
  .rl-join__card { min-height: 0; }
}

/* 02 · verdict loop states */
.rl-frag--verdict.is-live .rl-verdict__t, .rl-frag--verdict.is-live .rl-verdict__s, .rl-frag--verdict.is-live .rl-verdict__ok { transition: opacity .45s ease, transform .45s ease; }
.rl-frag--verdict.is-live .rl-verdict__t:not(.is-on), .rl-frag--verdict.is-live .rl-verdict__s:not(.is-on) { opacity: 0; transform: translateX(-4px); }
.rl-frag--verdict.is-live .rl-verdict__ok:not(.is-on) { opacity: 0; transform: translateY(4px); }
.rl-frag--verdict.is-live .rl-verdict__tile:not(.is-sel) { border-color: var(--rl-line); }

/* QA adjustments */
.rl-frag--verdict { padding: 20px 12px 0 18px; }
.rl-verdict__t, .rl-verdict__s { white-space: nowrap; }
.rl-lane { min-height: 124px; }
.rl-join__txt { margin-top: 0; }
@media (max-width: 1024px) { .rl-join__card { min-height: 0; } .rl-join__txt { padding-bottom: 6px; } }
.rl-seg { min-width: 0; max-width: 100%; }
.rl-seg__unit { width: 54px; flex: 0 1 auto; min-width: 0; }
.rl-seg--sm .rl-seg__unit { width: 36px; }
@media (max-width: 640px) { .rl-segill .rl-seg { width: 100%; } .rl-segill .rl-seg__unit { flex: 1 1 0; width: auto; max-width: 54px; } }
@media (max-width: 1180px) { .rl-lane { min-height: 0; } }
.rl-fc--takes { gap: 10px; }
.rl-take.is-empty, .rl-take.is-rec { padding-block: 6px; }
.rl-cls { padding-bottom: 8px; }
.rl-fc--expl { gap: 22px; padding-bottom: 20px; }
.rl-take { padding-block: 7px; }
