*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem 1rem 3.5rem;
  background-color: #f7f7f5;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

/* Baseline (no JS required): the bold verdict wash appears instantly. */
body[data-band="green"] {
  background-color: #86efac;
}

body[data-band="orange"] {
  background-color: #fcd34d;
}

body[data-band="red"] {
  background-color: #fca5a5;
}

body[data-band="error"] {
  background-color: #d1d5db;
}

/* Enhancement: with JS, start neutral and fade into the verdict color. */
.js body[data-band] {
  background-color: #f7f7f5;
  transition: background-color 1s ease;
}

.js body.band-ready[data-band="green"] {
  background-color: #86efac;
}

.js body.band-ready[data-band="orange"] {
  background-color: #fcd34d;
}

.js body.band-ready[data-band="red"] {
  background-color: #fca5a5;
}

.js body.band-ready[data-band="error"] {
  background-color: #d1d5db;
}

@media (prefers-reduced-motion: reduce) {
  .js body[data-band] {
    transition: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.spinner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(247, 247, 245, 0.85);
  z-index: 10;
}

body.is-loading .spinner-overlay {
  display: flex;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.page {
  max-width: 600px;
  margin: 0 auto;
}

.site-footer {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  text-align: left;
  font-size: 0.8rem;
  color: #777;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #666;
}

.title {
  font-size: 2rem;
  margin: 0 0 0.25rem;
}

.subtitle {
  margin: 0 0 1.5rem;
  color: #444;
}

.check-form__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

.cf-turnstile {
  margin: 1rem 0;
}

.check-form__input {
  flex: 1 1 260px;
  font-size: 16px;
  padding: 0.75rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: inherit;
}

.check-form__input:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.check-form__submit {
  font-size: 16px;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
}

.check-form__submit:hover {
  background: #333;
}

.check-form__submit:active {
  background: #000;
}

.check-form__submit:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.result {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 8px;
  border: 2px solid transparent;
}

.result__message {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.result__url {
  margin: 0 0 0.5rem;
  word-break: break-all;
}

.result__url a {
  color: #15803d;
}

.result__url-text {
  color: #555;
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.result__report {
  margin: 0;
}

.report-link {
  font-size: 0.9rem;
  color: #444;
}

.result--green {
  background: #ffffff;
  border-color: #16a34a;
}

.result--orange {
  background: #ffffff;
  border-color: #d97706;
}

.result--red {
  background: #ffffff;
  border-color: #dc2626;
}

.result--error {
  background: #ffffff;
  border-color: #6b7280;
}

.result--error .result__message {
  font-weight: 500;
  color: #374151;
}

a {
  color: #2563eb;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
