/* Cloudflare-inspired interstitial challenge page.
   Visual language only — neutral "Sentinel" brand mark (rename freely). */

:root {
  --bg: #ffffff;
  --fg: #313131;
  --muted: #595959;
  --muted2: #8a8a8a;
  --accent: #f6821f; /* warm orange accent */
  --ok: #1ca152;
  --err: #d93b3b;
  --widget-bg: #fafafa;
  --widget-border: #e4e4e4;
  --track-bg: #f0f0f2;
  --track-border: #e1e1e3;
  --link: #6b6b6b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --fg: #e9e9ea;
    --muted: #a9a9ad;
    --muted2: #7e7e84;
    --accent: #f6821f;
    --ok: #36c46f;
    --err: #f06262;
    --widget-bg: #262629;
    --widget-border: #3a3a3f;
    --track-bg: #2a2a2e;
    --track-border: #3a3a3f;
    --link: #b3b3b8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
}

.challenge {
  width: 100%;
  max-width: 600px;
  padding: clamp(56px, 16vh, 170px) 24px 40px;
  text-align: center;
}

/* Desktop: anchor the challenge to the upper-left, like Cloudflare. */
@media (min-width: 768px) {
  body {
    justify-content: flex-start;
  }
  .challenge {
    max-width: 620px;
    text-align: left;
    padding-top: clamp(64px, 12vh, 140px);
    padding-left: clamp(40px, 8vw, 130px);
  }
  .widget,
  .captcha {
    margin-left: 0;
    margin-right: 0;
  }
  .review {
    margin-left: 0;
  }
  .foot {
    align-items: flex-start;
  }
}

.headline {
  font-size: 1.6rem;
  line-height: 1.3;
  font-weight: 500;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.subhead {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

/* --- Verification widget (Turnstile-style) --- */
.widget {
  width: 300px;
  margin: 28px auto 0;
  min-height: 66px;
  background: var(--widget-bg);
  border: 1px solid var(--widget-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  text-align: left;
}

.widget-main {
  display: flex;
  align-items: center;
  min-height: 30px;
}

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

.vlabel {
  font-size: 0.95rem;
  color: var(--fg);
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(127, 127, 127, 0.25);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
  flex: none;
}

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

.badge-check,
.badge-x {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: none;
}

.badge-check {
  background: var(--ok);
}

.badge-x {
  background: var(--err);
}

.widget-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: var(--accent);
}

.brandlinks {
  font-size: 0.62rem;
  color: var(--muted2);
  white-space: nowrap;
}

.brandlinks a {
  color: var(--muted2);
  text-decoration: none;
}

.brandlinks a:hover {
  text-decoration: underline;
}

/* --- Slider captcha (restyled, light) --- */
.captcha {
  margin: 24px auto 0;
  width: 300px;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 50px;
  background: var(--track-bg);
  border: 1px solid var(--track-border);
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.slider-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(28, 161, 82, 0.16);
}

.slider-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.slider-handle {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #fff;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--track-border);
}

.slider-handle:active {
  cursor: grabbing;
}

.slider-track.success .slider-fill {
  background: rgba(28, 161, 82, 0.3);
}

.slider-track.success .slider-text span {
  color: var(--ok);
}

.slider-track.cooldown {
  opacity: 0.55;
}

.slider-handle.locked {
  background: var(--track-bg);
  color: var(--muted2);
  cursor: not-allowed;
  box-shadow: none;
}

/* --- Review note + footer --- */
.review {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 28px auto 0;
  max-width: 440px;
  line-height: 1.5;
}

.foot {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted2);
}

.foot code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.foot .by strong {
  font-weight: 600;
  color: var(--muted);
}

/* --- Honeypot (off-screen, never display:none) --- */
.hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
