/* Before and after: a picture with rounded corners on a white page, pencil on the left, paint on the right, a
   white round handle on the brushed edge between them. */
:root {
  --page: #ffffff;          /* the page */
  --ink: #1d1c1a;
  --muted: #8a867e;
  --paper: #f6f1e7;         /* the sketch's paper */
  --pencil: #57534b;        /* the sketch's lines */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Schibsted Grotesk Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.ba {
  position: relative;
  width: min(600px, 100%);
  margin: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  -webkit-tap-highlight-color: transparent;
}

.ba__art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  background: var(--paper);
}

.ba__edge {
  fill: none;
  stroke: rgba(40, 32, 20, 0.16);
  stroke-width: 3;
  stroke-linejoin: round;
}

/* the two names, in the top corners: each fades as the edge comes near */
.ba__tag {
  position: absolute;
  top: 14px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.ba__tag--before {
  left: 14px;
}

.ba__tag--after {
  right: 14px;
}

/* the handle: on the edge, moved and tilted by the script */
.ba__handle {
  position: absolute;
  left: 0;
  top: calc(50% - 40px);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 4px rgba(29, 28, 26, 0.12), 0 10px 26px -8px rgba(29, 28, 26, 0.4);
  outline: none;
  cursor: grab;
}

.ba__handle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ba__handle:focus-visible {
  box-shadow: 0 0 0 3px var(--page), 0 0 0 5px var(--ink), 0 10px 26px -8px rgba(29, 28, 26, 0.4);
}

.ba.is-held .ba__handle {
  cursor: grabbing;
}

.ba__caption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
