:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #52606d;
  --border: #d9e2ec;
  --accent: #0f6cbd;
  --accent-hover: #0b5cab;
  --error-bg: #fff1f0;
  --error-border: #ffb4ad;
  --error-text: #9f1d18;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 560px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

h1 {
  margin: 0 0 24px;
  font-size: 28px;
  line-height: 1.2;
}

.form {
  display: grid;
  gap: 16px;
}

label,
legend {
  font-weight: 700;
}

input[type="file"],
input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

legend {
  padding: 0 6px;
}

.radio {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  font-weight: 400;
  color: var(--muted);
}

.radio input {
  margin-top: 2px;
}

button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

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

.error {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--error-border);
  border-radius: 6px;
  background: var(--error-bg);
  color: var(--error-text);
  font-weight: 700;
}

.summary {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
}

.secondary {
  display: inline-block;
  margin-left: 14px;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 560px) {
  .panel {
    padding: 24px;
  }

  h1 {
    font-size: 24px;
  }

  .button,
  .secondary {
    width: 100%;
    margin: 12px 0 0;
    text-align: center;
  }
}
