:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #657080;
  --line: #d9dee7;
  --control-line: #7b8797;
  --primary: #2463eb;
  --danger: #b42318;
  --success: #047857;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(480px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

section {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(24, 32, 42, .05);
}

h1,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 25px;
  line-height: 1.25;
}

form,
label {
  display: grid;
  gap: 12px;
}

label {
  color: #2f3a48;
  font-weight: 700;
}

input,
button {
  width: 100%;
  border-radius: 8px;
  font: inherit;
}

input {
  border: 1px solid var(--control-line);
  padding: 12px;
  background: #fff;
  color: var(--text);
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

button {
  border: 0;
  padding: 12px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: wait;
}

.muted {
  color: var(--muted);
}

.notice {
  margin: 14px 0;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.55;
}

.error {
  background: #fef3f2;
  color: var(--danger);
}

.success {
  background: #ecfdf3;
  color: var(--success);
}

@media (forced-colors: active) {
  input,
  button {
    border: 1px solid CanvasText;
  }

  input:focus-visible,
  button:focus-visible {
    outline-color: Highlight;
  }
}
