/* Viewport shell: the document does not scroll. Only main scrolls if needed. */

html,
body {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body > header,
body > footer {
  flex: 0 0 auto;
  width: 100%;
}

body > main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.container-block,
.container-product {
  width: 100%;
  min-height: 100%;
}

/* Document pages */
body.site-page main > .container-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35em;
  text-align: center;
}

body.site-page main > .container-block > p {
  margin-block: 0.8em;
}

/* Product pages */
body.site-rail main > .container-product {
  --rail-space: clamp(16px, 4vh, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: stretch;
  width: min(72vw, 420px);
  margin-inline: auto;
  padding: clamp(16px, 3vw, 28px) 0;
  row-gap: 0;
}

body.site-rail main > .container-product > h2 + p {
  margin-top: 0.4em;
}

body.site-rail main > .container-product > p + .step-form,
body.site-rail main > .container-product > p + .start-steps,
body.site-rail main > .container-product > p + .complete-steps {
  margin-top: var(--rail-space);
}

body.site-rail main > .container-product > .step-form + h2,
body.site-rail main > .container-product > .start-steps + h2,
body.site-rail main > .container-product > .complete-steps + h2 {
  margin-top: var(--rail-space);
}

body.site-rail main > .container-product > p.is-right {
  text-align: right;
}

body.site-rail .step-box,
body.site-rail .step-form,
body.site-rail .step-form input,
body.site-rail .step-order-text {
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .02em;
}

body.site-rail .step-box,
body.site-rail .step-form {
  display: flex;
  align-items: center;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  padding: 0 18px;
  overflow: visible;
}

.step-count {
  font-size: .62em;
  font-weight: 500;
  line-height: 0;
  vertical-align: super;
  margin-left: .08em;
}

.start-steps,
.complete-steps {
  gap: 8px;
}

.footer-inner,
.footer-inner nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
