/* Keep Safari's page canvas and display cutouts in the LP's dark blue. */
:root {
  color-scheme: light;
  --lp-edge-background: #071b50;
  --lp-bottom-background: #0646b8;
  --lp-safe-top: env(safe-area-inset-top, 0px);
  --lp-safe-right: env(safe-area-inset-right, 0px);
  --lp-safe-bottom: env(safe-area-inset-bottom, 0px);
  --lp-safe-left: env(safe-area-inset-left, 0px);
  --lp-edge-grid: linear-gradient(90deg, #ffffff12 1px, transparent 1px), linear-gradient(#ffffff12 1px, transparent 1px);
}

html,
body {
  background-color: var(--lp-edge-background);
  background-image: var(--lp-edge-grid);
  background-size: 44px 44px;
}

/* Cover the unsafe strips even when a light section scrolls underneath. */
body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  z-index: 30;
  background-color: var(--lp-edge-background);
  background-image: var(--lp-edge-grid);
  background-size: 44px 44px;
  pointer-events: none;
}

body::before {
  top: 0;
  height: var(--lp-safe-top);
}

body::after {
  bottom: 0;
  height: var(--lp-safe-bottom);
  background-color: var(--lp-bottom-background);
}

/* Extend section backgrounds to the edges while keeping content safe. */
main > section {
  padding-left: var(--lp-safe-left);
  padding-right: var(--lp-safe-right);
}

main > section:first-child {
  padding-top: var(--lp-safe-top);
}

main > section:last-child {
  padding-bottom: var(--lp-safe-bottom);
}
