*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

/* 19px вместо 16px: крупный текст по умолчанию, при этом настройка размера шрифта в браузере продолжает работать */
html {
  font-size: 118.75%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.4;
  color: var(--ink);
  background: var(--page);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
p,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[tabindex="-1"]:focus {
  outline: none;
}

/* Сцена: на телефоне приложение занимает весь экран, на компьютере стоит в рамке телефона рядом с пультом */
.stage {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

.phone {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

.screen {
  flex: 1;
  min-height: 0;
  padding: 20px 18px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 560px;
  min-height: 100%;
  margin-inline: auto;
}

.view__title {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.view__lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.view__spacer {
  flex: 1;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.hint {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .stage {
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
  }

  .phone {
    flex: none;
    order: 1;
    width: 412px;
    height: min(860px, calc(100vh - 48px));
    height: min(860px, calc(100dvh - 48px));
    border: 10px solid var(--bezel);
    border-radius: 40px;
    box-shadow: 0 24px 48px -24px var(--shade);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
