@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --space: 4px;
  --text: #f4f4f4;
  --muted: #b0b0b0;
  --surface: #1a1a1a;
  --bg: #0b0b0b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Instrument Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  padding: calc(var(--space) * 8);
}

main {
  min-height: calc(100vh - calc(var(--space) * 16));
  display: grid;
  align-items: center;
}

.shell {
  width: min(100%, 540px);
  margin: 0 auto;
  display: grid;
  gap: calc(var(--space) * 12);
  text-align: center;
}

h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(30px, 5.6vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

h1 em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
}

.lead {
  margin: 0;
  margin-inline: auto;
  max-width: 46ch;
  font-size: clamp(16px, 2.7vw, 20px);
  line-height: 1.36;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.lead em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--text);
}

form {
  display: grid;
  gap: calc(var(--space) * 3);
}

input,
button {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 0;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: -0.01em;
}

input {
  background: var(--surface);
  color: var(--text);
  padding: calc(var(--space) * 4) calc(var(--space) * 5);
  text-align: center;
}

input::placeholder {
  color: #7f7f7f;
}

button {
  background: var(--text);
  color: #0b0b0b;
  padding: calc(var(--space) * 4) calc(var(--space) * 5);
  font-weight: 500;
  cursor: pointer;
}

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

.note {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.status {
  min-height: calc(var(--space) * 5);
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.status[data-tone='ok'] {
  color: #8ee2b4;
}

.status[data-tone='error'] {
  color: #ff9f9f;
}

.small-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (min-width: 768px) {
  body {
    padding: calc(var(--space) * 12);
  }

  .shell {
    gap: calc(var(--space) * 14);
  }

  input,
  button {
    font-size: 17px;
  }
}
