@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Pixelify Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/pixelify-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }
html, body, main, iframe { margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;
  -webkit-font-smoothing: antialiased;
}

/* Safari's vh may include space behind expanded browser chrome. */
@supports (height: 100dvh) {
  body { height: 100dvh; }
}

/* The bar frames the app from above; the app has the rest of the window. */
.work {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  position: relative;
}

.work main { min-width: 0; min-height: 0; }

main {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.stage {
  flex: 1;
  display: flex;
  position: relative;
  min-height: 0;
  background: #000;
}

.compare-panes { display: contents; }
.interaction-relay { position: fixed; width: 0; height: 0; border: 0; visibility: hidden; pointer-events: none; }

.pane {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
  position: relative;
  background: #fff;
  overflow: hidden;
  container-type: inline-size;
}

.stage--compare::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--border);
  transform: translateX(-0.5px);
  pointer-events: none;
}

.stage:not(.stage--compare) .pane.left { display: none; }

/* A phone compares one version at a time. Both panes keep their layout, so scrolling and highlights stay in step,
   and the side not on screen is hidden rather than removed. */
.stage--solo .pane { position: absolute; inset: 0; }
.stage--solo-left .pane.right,
.stage--solo-right .pane.left { visibility: hidden; }
.stage--solo::after { display: none; }
.stage:not(.stage--compare) .pane.right { flex-basis: 100%; border-left: none; }

.pane > iframe { width: 100%; height: 100%; border: none; background: white; display: block; }

.pane--scaled iframe {
  width: var(--design-width, 100vw);
  height: calc(100% / var(--scale, 1));
  transform: scale(var(--scale, 1));
  transform-origin: top left;
}
