:root {
  --bg: #0f0f0f;
  --fg: #f5f5f5;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f5;
    --fg: #0f0f0f;
  }
}

* {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  overflow: hidden;
}

/*
  The frame — not the SVG — is what gets pinned to the viewport. An <svg> is a
  replaced element, so an auto height resolves from its intrinsic aspect ratio
  and the opposing inset is ignored: insetting the SVG itself made it as tall as
  its own width demanded (1340x1173 in a 1440x900 viewport) and ran it off the
  bottom of the screen. A div is non-replaced, so top/bottom genuinely size it.

  position: fixed resolves against the visible viewport, so there is no
  percentage-height chain to keep intact and no vh overshoot on mobile.
*/
.frame {
  position: fixed;
  inset: 0;
  padding: 50px;
  box-sizing: border-box;
}

/*
  Explicit 100%/100% against the frame's content box — every dimension is
  definite, so nothing falls back to intrinsic sizing. That leaves
  preserveAspectRatio="xMidYMid meet" free to do its job: scale the mark until
  the tighter axis fills, and center it on the slack axis.
*/
.hi {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--fg);
}
