/* Before / After — draggable comparison (brand dark tokens) */
.ba-intro { text-align: center; max-width: 620px; margin: 6px auto 22px; }
.ba-intro h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin: 12px 0 8px; }
.ba-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }

/* Stage — kept LTR so the wipe/clip stays physical and consistent in RTL */
.ba-stage { direction: ltr; position: relative; height: 440px; border-radius: var(--radius); border: 1px solid var(--steel); overflow: hidden; -webkit-user-select: none; user-select: none; --pos: 50%; }
.ba-pane { position: absolute; inset: 0; overflow: hidden; }
.ba-before { background: #c9cdd2; }
.ba-after { background: var(--bg-2); clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-divider { position: absolute; inset-block: 0; left: var(--pos); width: 3px; background: var(--accent); transform: translateX(-50%); z-index: 4; pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #04222b; display: grid; place-items: center; font-weight: 900; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.ba-tag { position: absolute; top: 14px; z-index: 4; font-size: .68rem; font-weight: 800; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.tag-after { left: 14px; background: var(--accent); color: #04222b; }
.tag-before { right: 14px; background: rgba(20,30,45,.78); color: #fff; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 5; }

/* Both skins fill the pane; the window sits in an identical box in each so the
   wipe morphs the SAME screen between skins. */
.lg, .md { position: absolute; inset: 0; }
.lg-bar, .md-bar { height: 32px; display: flex; align-items: center; padding: 0 12px; flex: none; }
.ba-win { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); width: min(360px, 84%); border-radius: 10px; padding: 18px 20px; }
.ba-win h3 { font-size: 1.15rem; margin-bottom: 14px; }
.lg-field, .md-field { margin-bottom: 12px; }

/* Legacy skin (deliberately dated) */
.lg { background: linear-gradient(#d6dade, #c2c7cd); }
.lg-bar { background: linear-gradient(#9aa1a8, #7d848c); color: #20242a; font: 12px "Times New Roman", serif; border-bottom: 1px solid #6c727a; }
.lg-bar .dots { color: #4a4f56; letter-spacing: 1px; margin-inline-end: 6px; }
.lg-win { background: #eceef0; border: 2px outset #b8bcc2; font-family: "Times New Roman", Georgia, serif; color: #1c2228; }
.lg-win h3 { font-weight: 700; text-decoration: underline; }
.lg-field label { display: block; font-size: .76rem; margin-bottom: 4px; color: #3a4048; }
.lg-in { display: block; background: #fff; border: 1px inset #9aa1a8; padding: 5px 8px; font-size: .9rem; }
.lg-total { margin: 14px 0; font-weight: 700; }
.lg-btn { font-family: inherit; background: linear-gradient(#e6e8ea, #c4c9cf); border: 2px outset #b0b5bc; padding: 5px 18px; cursor: pointer; color: #1c2228; }

/* Modern skin */
.md { background: var(--bg-2); }
.md-bar { border-bottom: 1px solid var(--steel); }
.md-win { background: var(--surface); border: 1px solid var(--steel); box-shadow: var(--shadow); }
.md-field label { display: block; color: var(--muted); font-size: .76rem; margin-bottom: 4px; }
.md-in { background: var(--bg-2); border: 1px solid var(--steel); border-radius: 9px; padding: 8px 12px; font-weight: 600; }
.md-total { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; font-size: 1.05rem; }
.md-total strong { color: var(--accent); }

/* Metrics that swing as you drag */
.ba-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 20px 0; }
.ba-metric { background: var(--surface); border: 1px solid var(--steel); border-radius: var(--radius); padding: 18px; text-align: center; }
.bm-val { font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.bm-lab { color: var(--muted); font-size: .82rem; margin-top: 4px; }

/* Transformation list */
.ba-trans { background: var(--surface); border: 1px solid var(--steel); border-radius: var(--radius); padding: 22px 24px; text-align: center; }
.ba-th { font-size: 1.1rem; margin-bottom: 14px; }
.ba-th.good { color: var(--good); } .ba-th.bad { color: var(--bad); }
.ba-list { list-style: none; display: inline-flex; flex-direction: column; gap: 9px; text-align: start; margin-bottom: 18px; }
.ba-list li { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.ba-list li.ok { color: var(--good); } .ba-list li.no { color: var(--bad); }
.ba-list li span { color: var(--text); }

@media (max-width: 720px) {
  .ba-stage { height: 380px; }
  .ba-metrics { grid-template-columns: 1fr; }
}
