:root {
  --ink: #1b2a4a;
  --paper: #f7f5f2;
  --accent: #c8532b;
  --accent-dark: #a34120;
  --positive-bg: #e6f2e6;
  --positive-ink: #1f4d24;
  --negative-bg: #fbeaea;
  --negative-ink: #7a1f1f;
  --error-bg: #fdf3e7;
  --error-ink: #7a4a12;
  --border: #d8d2c8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 34rem;
  width: 100%;
  align-self: center;
  box-shadow: 0 2px 8px rgba(27, 42, 74, 0.08);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  line-height: 1.2;
}

.lede { margin-top: 0; color: var(--ink); }

label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

input {
  flex: 1 1 12rem;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

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

button {
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

button:hover { background: var(--accent-dark); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.error {
  color: var(--negative-ink);
  margin: 0.5rem 0 0;
  font-weight: 600;
}

.result {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
}

.result.positive { background: var(--positive-bg); color: var(--positive-ink); }
.result.negative { background: var(--negative-bg); color: var(--negative-ink); }
.result.error { background: var(--error-bg); color: var(--error-ink); }

.spinner-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  color: var(--ink);
}

.spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.support {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.support a { color: var(--accent-dark); }

@media (max-width: 480px) {
  body { padding: 1rem 0.75rem; }
  .card { padding: 1.25rem; }
  h1 { font-size: 1.4rem; }
  .row { flex-direction: column; }
  button { width: 100%; }
}
