/* Styling for the JS challenge page.
 *
 * Served as a file by the Go service, so unlike the nginx template it has no
 * restrictions on quotes or dollar signs.
 *
 * The layout mirrors captcha.html: a left-aligned block centered on the page —
 * domain, lead, then a ring spinner beside the status line, then the closing
 * line. The spinner turns into a check when done and stops red on error. */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
  color-scheme: light;
  --rust: #a35638;
  --navy: #293a80;
  --blue: #537ec5;
  --gold: #f1bc31;
  --bg: #ffffff;
  --ink: #141a33;
  --muted: #5c6480;
  --line: #d8dce6;
  --track: #eaedf4;
  --bad: #b42318;
  --sans: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace
}

* {
  box-sizing: border-box
}

body {
  align-items: center;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  font-family: var(--sans);
  font-size: 16px;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: 24px
}

main {
  max-width: 720px;
  width: 100%
}

h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere
}

h1:empty {
  display: none
}

#lead {
  font-size: 16px;
  line-height: 1.5;
  margin: 16px 0 20px;
  text-wrap: pretty
}

.row {
  align-items: center;
  display: flex;
  gap: 12px
}

/* Ring spinner while working; a check when done, a stopped red ring on error. */
.spinner {
  animation: spin 0.8s linear infinite;
  border: 3px solid var(--track);
  border-radius: 50%;
  border-top-color: var(--navy);
  flex: none;
  height: 26px;
  position: relative;
  width: 26px
}

.done .spinner {
  animation: none;
  border-color: var(--navy)
}

.done .spinner::after {
  border: solid var(--navy);
  border-width: 0 3px 3px 0;
  content: '';
  height: 9px;
  left: 7px;
  position: absolute;
  top: 2px;
  transform: rotate(45deg);
  width: 5px
}

.error .spinner {
  animation: none;
  border-top-color: var(--bad)
}

#status {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  text-wrap: pretty
}

.action {
  background: var(--navy);
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  margin-top: 20px;
  min-height: 44px;
  padding: 12px 22px
}

.action[hidden] {
  display: none
}

.action:hover {
  opacity: 0.9
}

.action:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px
}

.tail {
  font-size: 15px;
  line-height: 1.5;
  margin: 30px 0 0;
  text-wrap: pretty
}

.meta {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 7px;
  margin-top: 30px;
  padding-top: 14px
}

.meta[hidden] {
  display: none
}

.meta code {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere
}

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

}

@media (prefers-reduced-motion:reduce) {
  .spinner {
    animation: none
}

}

.noscript {
  color: var(--bad);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px
}

.error #lead {
  color: var(--bad);
  font-weight: 500
}

