:root {
  color-scheme: light;
  --background: #f4f4f6;
  --surface: #ffffff;
  --text: #1c1c1e;
  --secondary: #636366;
  --line: #d8d8dc;
  --accent: #2457d6;
  --accent-hover: #1743b3;
  --success-background: #edf8f0;
  --success-text: #176b38;
  --error-background: #fff0f0;
  --error-text: #a31d28;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: var(--accent);
}

.page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.site-header {
  margin-bottom: 24px;
}

.brand {
  display: inline-block;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.document,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(24px, 5vw, 48px);
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(32px, 7vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

h2 {
  margin: 36px 0 10px;
  font-size: 22px;
  line-height: 1.3;
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

p,
ul {
  margin: 0 0 16px;
}

ul {
  padding-left: 24px;
}

.meta,
.lede,
.help-text {
  color: var(--secondary);
}

.lede {
  font-size: 18px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.action-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.action-link:hover {
  border-color: var(--accent);
}

.field {
  margin-top: 22px;
}

label,
legend {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #b9b9bf;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 12px 13px;
}

textarea {
  min-height: 168px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(36, 87, 214, 0.28);
  outline-offset: 2px;
}

fieldset {
  margin: 28px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

button {
  min-height: 48px;
  margin-top: 24px;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.status {
  display: none;
  margin-top: 18px;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 600;
}

.status.success {
  display: block;
  background: var(--success-background);
  color: var(--success-text);
}

.status.error {
  display: block;
  background: var(--error-background);
  color: var(--error-text);
}

.footer {
  margin-top: 22px;
  color: var(--secondary);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 20px, 760px);
    padding: 20px 0 36px;
  }

  .document,
  .card {
    border-radius: 12px;
    padding: 22px 18px;
  }
}
