:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #5d6b62;
  --line: #d9e1dc;
  --panel: #ffffff;
  --bg: #eef3f1;
  --accent: #176b4c;
  --accent-strong: #0e5439;
  --warn: #a15b14;
  --bad: #9c2f2f;
  --good: #0e7a55;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(23, 107, 76, 0.14), transparent 38%),
    linear-gradient(315deg, rgba(38, 100, 156, 0.12), transparent 42%),
    var(--bg);
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
}

.checker {
  width: min(760px, 100%);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid rgba(23, 33, 27, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(23, 33, 27, 0.12);
}

.intro {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.1rem, 5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.summary {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.search {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 184px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 1.08rem;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(23, 107, 76, 0.14);
}

button {
  position: relative;
  display: inline-grid;
  min-width: 128px;
  justify-self: start;
  height: 56px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

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

button:active {
  transform: translateY(1px);
}

button[disabled] {
  cursor: wait;
  opacity: 0.84;
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.36);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

button.loading .button-text {
  display: none;
}

button.loading .spinner {
  display: block;
}

.result {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 112px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border-radius: 999px;
  background: #8c9a91;
}

.result h2 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.result p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.result.available .status-dot {
  background: var(--good);
}

.result.available h2 {
  color: var(--good);
}

.result.registered .status-dot {
  background: var(--bad);
}

.result.registered h2 {
  color: var(--bad);
}

.result.unknown .status-dot,
.result.error .status-dot {
  background: var(--warn);
}

.result.unknown h2,
.result.error h2 {
  color: var(--warn);
}

.result-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-item strong {
  display: block;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.result-item p {
  font-size: 0.92rem;
}

.result-item span {
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 800;
}

.result-item.available span {
  color: var(--good);
}

.result-item.registered span {
  color: var(--bad);
}

.result-item.unknown span,
.result-item.error span {
  color: var(--warn);
}

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

@media (max-width: 640px) {
  button {
    width: 100%;
  }

  .result-item {
    grid-template-columns: 1fr;
  }
}
