/* /bespoke-software: "Before and after" drag-to-compare (Nov 2026).
   Built on the idea of 21st.dev's Comparison Slider with Highlights (id 19262): one stage, two states, a draggable divider,
   highlights underneath. Both states are drawn in HTML/CSS (no images) so every word stays crisp. Light page, white card. */

.ba-section{padding:100px 0 110px;color:#1b1235}
.ba-shell{width:min(1240px,calc(100% - 48px));margin:0 auto}
.ba-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.8fr);gap:56px;align-items:end;margin-bottom:36px}
.ba-eyebrow{display:block;margin:0 0 12px;font:600 11.5px/1.3 Inter,sans-serif;letter-spacing:1.8px;text-transform:uppercase;color:#6d28d9}
.ap-inner-page main .ba-h2{margin:0;font:600 clamp(32px,3.8vw,50px)/1.06 Fustat,Inter,sans-serif;letter-spacing:-.04em;color:#0e0a17}
.ap-inner-page main .ba-h2 em{font:italic 400 1.06em/1 "Instrument Serif",Georgia,serif;letter-spacing:-.02em;color:#6d28d9}
.ba-lead{margin:0;font:400 16.5px/1.7 Inter,sans-serif;color:#4f4860}

.ba-card{padding:14px;border-radius:32px;background:#fff;box-shadow:0 0 0 1px rgba(76,29,149,.07),0 50px 100px -55px rgba(59,26,98,.45)}
.ba-stage{--pos:50%;position:relative;height:clamp(420px,52vw,700px);border-radius:22px;overflow:hidden;isolation:isolate;user-select:none;touch-action:pan-y;cursor:ew-resize;background:#f3eefb}
.ba-layer{position:absolute;inset:0}
.ba-after{clip-path:inset(0 0 0 var(--pos))}
.ba-tag{position:absolute;z-index:6;top:18px;padding:8px 13px;border-radius:999px;font:700 11.5px/1 Inter,sans-serif;letter-spacing:1.4px;text-transform:uppercase;pointer-events:none}
.ba-tag--before{left:18px;background:#fff;color:#7a2e2e;box-shadow:0 6px 18px -8px rgba(0,0,0,.25)}
.ba-tag--after{right:18px;background:#6d28d9;color:#fff;box-shadow:0 8px 20px -8px rgba(109,40,217,.6)}

/* divider + handle */
.ba-divider{position:absolute;z-index:5;top:0;bottom:0;left:var(--pos);width:2px;margin-left:-1px;background:#fff;box-shadow:0 0 0 1px rgba(109,40,217,.25),0 0 24px rgba(109,40,217,.35);pointer-events:none}
.ba-handle{position:absolute;top:50%;left:50%;display:grid;place-items:center;width:54px;height:54px;margin:-27px 0 0 -27px;border-radius:50%;background:#fff;color:#6d28d9;
  box-shadow:0 0 0 6px rgba(109,40,217,.14),0 14px 30px -10px rgba(59,26,98,.55)}
.ba-handle svg{width:24px;height:24px}
.ba-range{position:absolute;z-index:7;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:ew-resize}
.ba-range:focus-visible+.ba-divider .ba-handle{outline:3px solid #6d28d9;outline-offset:4px}
.ba-hint{position:absolute;z-index:6;left:50%;bottom:18px;transform:translateX(-50%);padding:8px 14px;border-radius:999px;background:rgba(27,18,53,.78);color:#fff;font:500 12.5px/1 Inter,sans-serif;pointer-events:none;transition:opacity .4s ease}
.ba-stage.is-touched .ba-hint{opacity:0}

/* ---------- BEFORE: the scattered week ---------- */
.ba-before{background:radial-gradient(70% 80% at 30% 40%,#fff7ed,#f6efe4 70%);overflow:hidden}
.ba-before::before{content:"";position:absolute;inset:0;background-image:radial-gradient(rgba(120,90,60,.07) 1px,transparent 1px);background-size:18px 18px}
.bb{position:absolute;border-radius:12px;background:#fff;box-shadow:0 18px 40px -22px rgba(60,40,20,.45),0 0 0 1px rgba(60,40,20,.06);font-family:Inter,sans-serif;color:#2b2420}
.bb-bar{display:flex;align-items:center;gap:6px;padding:8px 10px;border-bottom:1px solid #eee5da;font:600 11px/1 Inter,sans-serif;color:#6a5b4e}
.bb-bar i{width:8px;height:8px;border-radius:50%;background:#f87171}.bb-bar i+i{background:#fbbf24}.bb-bar i+i+i{background:#4ade80}
.bb-sheet{left:4%;top:10%;width:46%;transform:rotate(-2deg)}
.bb-sheet table{width:100%;border-collapse:collapse;font:500 11px/1 Inter,sans-serif}
.bb-sheet th,.bb-sheet td{border:1px solid #ece4d8;padding:7px 6px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:90px}
.bb-sheet th{background:#f2f6ef;color:#47603a;font-weight:700}
.bb-sheet td.err{background:#fee2e2;color:#b91c1c;font-weight:700}
.bb-sheet td.hl{background:#fef9c3}
.bb-chat{left:30%;top:46%;width:32%;padding:10px;transform:rotate(1.5deg);background:#efe6dc}
.bb-chat .who{font:700 11px/1 Inter,sans-serif;color:#0f766e;margin-bottom:8px}
.bb-msg{max-width:88%;margin-bottom:6px;padding:7px 9px;border-radius:10px;background:#fff;font:400 11.5px/1.35 Inter,sans-serif}
.bb-msg.me{margin-left:auto;background:#d9fdd3}
.bb-msg small{display:block;margin-top:3px;font-size:9.5px;color:#8a7d70;text-align:right}
.bb-note{right:6%;top:9%;width:22%;padding:14px 14px 18px;border-radius:4px;background:#fde68a;transform:rotate(4deg);font:600 13px/1.35 "Segoe Print","Bradley Hand",cursive;color:#5a4410;box-shadow:0 16px 30px -18px rgba(90,60,10,.6)}
.bb-note::before{content:"";position:absolute;left:50%;top:-8px;width:44px;height:16px;margin-left:-22px;background:rgba(255,255,255,.6);transform:rotate(-3deg)}
.bb-note s{opacity:.6}
.bb-mail{right:4%;top:44%;width:30%;transform:rotate(-1.5deg)}
.bb-mail ul{list-style:none;margin:0;padding:4px 0}
.bb-mail li{display:flex;gap:8px;align-items:center;padding:7px 10px;font:400 11.5px/1.2 Inter,sans-serif;border-bottom:1px solid #f3ece3}
.bb-mail li b{font-weight:700}
.bb-mail li i{flex:none;width:7px;height:7px;border-radius:50%;background:#3b82f6}
.bb-badge{position:absolute;right:-8px;top:-8px;min-width:26px;height:26px;padding:0 7px;border-radius:13px;display:grid;place-items:center;background:#ef4444;color:#fff;font:700 12px/1 Inter,sans-serif;box-shadow:0 6px 14px -6px rgba(239,68,68,.8)}
.bb-paper{left:6%;bottom:7%;width:22%;padding:12px;border-radius:3px;transform:rotate(-4deg);background:#fffdf7;font:500 11.5px/1.5 "Courier New",monospace;color:#3d342c}
.bb-paper b{display:block;font:700 12px/1 Inter,sans-serif;margin-bottom:6px;letter-spacing:.5px}

/* ---------- AFTER: one system ---------- */


/* highlights under the stage */
.ba-points{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:14px}
.ba-point{padding:20px 22px;border-radius:20px;background:#faf7fe;border:1px solid #efe8f8}
.ba-point .from{display:flex;align-items:center;gap:8px;font:500 13px/1.3 Inter,sans-serif;color:#8a7fa0}
.ba-point .from s{text-decoration-color:rgba(185,28,28,.5)}
.ba-point .from svg{flex:none;width:16px;height:16px;color:#6d28d9}
.ba-point b{display:block;margin-top:8px;font:650 16.5px/1.3 Inter,sans-serif;letter-spacing:-.01em;color:#1b1235}
.ba-point p{margin:6px 0 0;font:400 14px/1.55 Inter,sans-serif;color:#5d526e}

@media (max-width:980px){
  .ba-head{grid-template-columns:1fr;gap:16px}
  .ba-stage{height:clamp(480px,78vw,640px)}
  .ba-points{grid-template-columns:1fr}
}
@media (max-width:640px){
  .ba-section{padding:64px 0 72px}
  .ba-shell{width:calc(100% - 32px)}
  .ba-card{padding:8px;border-radius:24px}
  .ba-stage{height:520px;border-radius:18px}
  .bb-sheet{left:3%;top:9%;width:78%}
  .bb-sheet th:nth-child(n+4),.bb-sheet td:nth-child(n+4){display:none}
  .bb-chat{left:4%;top:44%;width:62%}
  .bb-note{right:3%;top:auto;bottom:24%;width:38%;font-size:12px}
  .bb-mail{display:none}
  .bb-paper{left:auto;right:6%;bottom:5%;width:44%}
}
@media (prefers-reduced-motion:reduce){.ba-hint{transition:none}}
/* touch screens: only a band round the handle drags, so the page still scrolls over the stage */
@media (hover:none){.ba-range{inset:auto 0 auto 0;top:calc(50% - 45px);height:90px}.ba-stage{cursor:default}}

/* ---------- AFTER: the dashboard (Max, 4 Nov 2026: "a proper dashboard, built with proper software, not AI") ----------
   Product-UI conventions: neutral greys, hairline borders, tabular numbers, real axes and a real table; purple only as the accent.
   Drawn on a fixed canvas (1200×752, smaller canvases on tablet and phone) and scaled to the stage by before-after.js. */
.ba-after{background:linear-gradient(160deg,#f4f0fb 0%,#ece6f8 100%)}
.dx{--ink:#18181b;--ink2:#3f3f46;--mute:#71717a;--faint:#a1a1aa;--line:#ececef;--line2:#f4f4f5;--bg:#fff;--soft:#fafafa;--acc:#6d28d9;
  position:absolute;left:0;top:0;width:1200px;height:752px;transform-origin:0 0;display:grid;grid-template-columns:216px minmax(0,1fr);grid-template-rows:minmax(0,1fr);
  border-radius:12px;overflow:hidden;background:var(--bg);color:var(--ink);font:400 13px/1.4 Inter,system-ui,sans-serif;font-feature-settings:"tnum" 1,"cv11" 1;
  box-shadow:0 0 0 1px rgba(24,24,27,.08),0 1px 2px rgba(24,24,27,.04),0 30px 70px -30px rgba(46,16,101,.35)}
.dx svg{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.dx h5,.dx h6,.dx p,.dx ul{margin:0;padding:0}
.dx ul{list-style:none}
.dx em{font-style:normal}
.dx b{font-weight:500}

/* sidebar */
.dx-side{display:flex;flex-direction:column;min-height:0;padding:12px 10px;background:var(--soft);border-right:1px solid var(--line)}
.dx-ws{display:flex;align-items:center;gap:9px;padding:6px 8px;margin-bottom:14px;border-radius:7px}
.dx-ws b{font-weight:600;font-size:13px}
.dx-ws svg{width:14px;height:14px;margin-left:auto;color:var(--faint)}
.dx-mark{display:grid;place-items:center;width:22px;height:22px;border-radius:6px;background:#2a1454;color:#fff;font:600 11px/1 Inter,sans-serif}
.dx-nav{display:grid;gap:1px}
.dx-nav span,.dx-foot>span{display:flex;align-items:center;gap:10px;height:30px;padding:0 8px;border-radius:6px;font-size:13px;color:var(--ink2)}
.dx-nav svg,.dx-foot svg{width:16px;height:16px;flex:none;color:var(--mute)}
.dx-nav span.on{background:#fff;color:var(--ink);font-weight:500;box-shadow:0 0 0 1px var(--line),0 1px 2px rgba(24,24,27,.05)}
.dx-nav span.on svg{color:var(--acc)}
.dx-nav em{margin-left:auto;min-width:18px;padding:1px 5px;border-radius:5px;text-align:center;font-size:11px;font-weight:500;color:var(--mute);background:#ededf0}
.dx-sec{margin:16px 8px 6px!important;font-size:11px;font-weight:500;color:var(--faint)}
.dx-foot{margin-top:auto;display:grid;gap:6px}
.dx-me{display:flex;align-items:center;gap:9px;padding:10px 8px 2px;border-top:1px solid var(--line)}
.dx-me b{display:block;font-size:12.5px}
.dx-me small{display:block;font-size:11px;color:var(--mute)}
.dx-av{display:inline-grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;background:#e9e3f5;color:#4c1d95;font:600 10px/1 Inter,sans-serif}

/* top bar */
.dx-main{display:flex;flex-direction:column;min-width:0;min-height:0}
.dx-bar{display:flex;align-items:center;justify-content:space-between;height:52px;padding:0 20px;border-bottom:1px solid var(--line);flex:none}
.dx-crumb{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--mute)}
.dx-crumb svg{width:14px;height:14px;color:var(--faint)}
.dx-crumb b{color:var(--ink)}
.dx-tools{display:flex;align-items:center;gap:8px}
.dx-search{display:flex;align-items:center;gap:8px;width:280px;white-space:nowrap;height:32px;padding:0 10px;border-radius:7px;background:var(--soft);box-shadow:inset 0 0 0 1px var(--line);font-size:12.5px;color:var(--faint)}
.dx-search svg{width:14px;height:14px}
.dx-search kbd{margin-left:auto;padding:1px 5px;border-radius:4px;background:#fff;box-shadow:0 0 0 1px var(--line);font:500 10.5px/1.4 Inter,sans-serif;color:var(--mute)}
.dx-ib{position:relative;display:grid;place-items:center;width:32px;height:32px;border-radius:7px;color:var(--ink2);box-shadow:inset 0 0 0 1px var(--line)}
.dx-ib svg{width:16px;height:16px}
.dx-ib i{position:absolute;top:7px;right:8px;width:6px;height:6px;border-radius:50%;background:var(--acc);box-shadow:0 0 0 2px #fff}
.dx-btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:7px;background:var(--ink);color:#fff;font-size:12.5px;font-weight:500}
.dx-btn svg{width:14px;height:14px}

/* body */
.dx-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:14px;padding:18px 20px 20px;background:#fcfcfd}
.dx-head{display:flex;align-items:center;justify-content:space-between}
.dx-head h5{font:600 20px/1.2 Inter,sans-serif;letter-spacing:-.015em}
.dx-filters{display:flex;align-items:center;gap:8px}
.dx-seg{display:flex;padding:2px;border-radius:7px;background:#f1f1f3}
.dx-seg span{padding:4px 10px;border-radius:5px;font-size:12px;color:var(--mute)}
.dx-seg span.on{background:#fff;color:var(--ink);font-weight:500;box-shadow:0 0 0 1px var(--line),0 1px 2px rgba(24,24,27,.06)}
.dx-ghost{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:7px;font-size:12px;color:var(--ink2);box-shadow:inset 0 0 0 1px var(--line);background:#fff}
.dx-ghost svg{width:14px;height:14px;color:var(--mute)}

.dx-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-radius:10px;background:#fff;box-shadow:0 0 0 1px var(--line),0 1px 2px rgba(24,24,27,.04);flex:none}
.dx-metrics>div{padding:14px 16px}
.dx-metrics>div+div{border-left:1px solid var(--line)}
.dx-metrics small{font-size:12px;color:var(--mute)}
.dx-metrics b{display:block;margin-top:4px;font:600 24px/1.15 Inter,sans-serif;letter-spacing:-.02em}
.dx-metrics p{margin-top:4px;font-size:12px;color:var(--faint)}
.dx-metrics em{margin-right:6px;font-weight:500}
.dx .up{color:#15803d}
.dx .dn{color:#b91c1c}

.dx-grid{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.62fr) minmax(0,1fr);grid-template-rows:minmax(0,1.05fr) minmax(0,1fr);gap:14px}
.dx-card{display:flex;flex-direction:column;min-height:0;border-radius:10px;background:#fff;box-shadow:0 0 0 1px var(--line),0 1px 2px rgba(24,24,27,.04);overflow:hidden}
.dx-ch{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:13px 16px 0}
.dx-ch h6{font:600 13px/1.3 Inter,sans-serif}
.dx-sub{margin-top:2px!important;font-size:12px;color:var(--mute)}
.dx-big{margin-top:4px!important;font:600 20px/1.2 Inter,sans-serif;letter-spacing:-.015em}
.dx-big span{font:400 12px/1 Inter,sans-serif;color:var(--mute);letter-spacing:0;margin-left:4px}
.dx-link{font-size:12px;font-weight:500;color:var(--acc)}
.dx-leg{display:flex;gap:14px;padding-top:2px;font-size:12px;color:var(--mute)}
.dx-leg span{display:inline-flex;align-items:center;gap:6px}
.dx-leg i{width:8px;height:8px;border-radius:2px}
.dx-leg .c1{background:var(--acc)}
.dx-leg .c2{background:#ddd6ea}

/* bar chart with real axes */
.dx-plot{flex:1;min-height:0;display:grid;grid-template-columns:34px minmax(0,1fr);padding:12px 16px 12px 12px}
.dx-y{display:flex;flex-direction:column;justify-content:space-between;padding-bottom:20px;font-size:11px;color:var(--faint);text-align:right;padding-right:8px}
.dx-y span{line-height:0}
.dx-area{position:relative;min-height:0}
.dx-gl{position:absolute;inset:0 0 20px;display:flex;flex-direction:column;justify-content:space-between}
.dx-gl i{display:block;height:0;border-top:1px dashed #ebebee}
.dx-gl i:last-child{border-top:1px solid #e4e4e7}
.dx-cols{position:absolute;inset:0;display:grid;grid-template-columns:repeat(8,1fr)}
.dx-cols>div{position:relative;display:flex;align-items:flex-end;justify-content:center;gap:4px;padding-bottom:20px}
.dx-cols span{width:15px;height:calc(var(--v)*100%);border-radius:3px 3px 0 0}
.dx-cols span.p{background:#e4ddf0}
.dx-cols span.c{background:#a78bfa}
.dx-cols .hot span.c{background:var(--acc)}
.dx-cols .hot::before{content:"";position:absolute;inset:0 6px 20px;border-radius:6px;background:rgba(109,40,217,.05)}
.dx-cols small{position:absolute;bottom:0;left:0;right:0;text-align:center;font-size:11px;color:var(--faint)}
.dx-cols .hot small{color:var(--ink);font-weight:500}
.dx-tip{position:absolute;right:calc(100% - 4px);top:8%;z-index:2;padding:8px 10px;border-radius:8px;background:#fff;white-space:nowrap;
  box-shadow:0 0 0 1px var(--line),0 8px 24px -8px rgba(24,24,27,.25)}
.dx-tip small{position:static;display:block;text-align:left;font-size:11px;color:var(--mute)}
.dx-tip b{display:block;margin-top:2px;font:600 15px/1.2 Inter,sans-serif}
.dx-tip em{display:block;margin-top:1px;font-size:11px;color:#15803d}

/* schedule rows */
.dx-rows{flex:1;min-height:0;padding:6px 0 4px!important}
.dx-rows li{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;padding:7px 16px;border-top:1px solid var(--line2)}
.dx-rows li:first-child{border-top:0}
.dx-rows time{font-size:12px;color:var(--mute)}
.dx-rows b{display:block;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dx-rows small{display:block;font-size:11.5px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dx-st{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:var(--mute)}
.dx-st::before{content:"";width:6px;height:6px;border-radius:50%;background:#d4d4d8}
.dx-st.g{color:#15803d}
.dx-st.g::before{background:#22c55e}

/* invoices table */
.dx-tabs{display:flex;align-items:center;gap:14px}
.dx-tabs h6{margin-right:4px!important}
.dx-tabs span{font-size:12px;color:var(--mute)}
.dx-tabs span.on{color:var(--ink);font-weight:500}
.dx-tabs span em{margin-left:3px;padding:0 5px;border-radius:4px;background:#fee2e2;color:#b91c1c;font-size:10.5px;font-weight:500}
.dx-table table{width:calc(100% - 32px);margin:10px 16px 0;border-collapse:collapse;font-size:12.5px}
.dx-table th{padding:0 0 8px;text-align:left;font-size:11.5px;font-weight:500;color:var(--mute);border-bottom:1px solid var(--line)}
.dx-table td{padding:9px 0;border-bottom:1px solid var(--line2);color:var(--ink2)}
.dx-table tr:last-child td{border-bottom:0}
.dx-table .r{text-align:right}
.dx-table td.r{color:var(--ink);font-weight:500}
.dx-table td.m{font-family:ui-monospace,"SF Mono",Menlo,monospace;font-size:11.5px;color:var(--ink)}
.dx-badge{display:inline-flex;align-items:center;gap:5px;padding:1px 7px 1px 6px;border-radius:5px;font-size:11.5px;color:var(--ink2);box-shadow:inset 0 0 0 1px #e4e4e7}
.dx-badge::before{content:"";width:6px;height:6px;border-radius:50%;background:#a1a1aa}
.dx-badge.green{color:#166534;box-shadow:inset 0 0 0 1px #bbf7d0;background:#f0fdf4}
.dx-badge.green::before{background:#22c55e}
.dx-badge.red{color:#991b1b;box-shadow:inset 0 0 0 1px #fecaca;background:#fef2f2}
.dx-badge.red::before{background:#ef4444}

/* activity */
.dx-feed ul{position:relative;padding:12px 16px 0!important;display:grid;gap:13px}
.dx-feed ul::before{content:"";position:absolute;left:27.5px;top:24px;bottom:14px;width:1px;background:var(--line)}
.dx-feed li{position:relative;display:grid;grid-template-columns:24px minmax(0,1fr);gap:10px;align-items:start}
.dx-fi{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#fff;color:var(--mute);box-shadow:0 0 0 1px var(--line)}
.dx-fi svg{width:13px;height:13px}
.dx-feed p{font-size:12.5px;color:var(--ink2);line-height:1.35}
.dx-feed p b{color:var(--ink)}
.dx-feed small{display:block;margin-top:1px;font-size:11.5px;color:var(--faint)}

/* tablet canvas: icon sidebar */
@media (max-width:980px){
  .dx{width:960px;height:752px;grid-template-columns:56px minmax(0,1fr)}
  .dx-side{align-items:center;padding:12px 8px}
  .dx-ws{padding:6px 0}.dx-ws b,.dx-ws svg,.dx-sec,.dx-me div,.dx-nav em{display:none}
  .dx-nav span,.dx-foot>span{justify-content:center;width:36px;padding:0;font-size:0;gap:0}
  .dx-me{padding:10px 0 2px}
  .dx-search{width:200px}
  .dx-filters .dx-ghost{display:none}
}
/* phone canvas: no sidebar, two metrics, chart and schedule */
@media (max-width:640px){
  .dx{width:420px;height:700px;grid-template-columns:1fr;border-radius:12px}
  .dx-side,.dx-search,.dx-filters,.dx-table,.dx-feed,.dx-leg{display:none}
  .dx-bar{padding:0 14px}
  .dx-body{padding:14px;gap:12px}
  .dx-metrics{grid-template-columns:1fr 1fr}
  .dx-metrics>div:nth-child(n+3){display:none}
  .dx-grid{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto}
  .dx-cols span{width:9px}
  .dx-cols>div{gap:2px}
}
