:root {
  --chal-bg: #fff;
  --chal-text: #222;
  --chal-muted: #626262;
  --chal-line: #e6e6e6;
  --chal-widget-line: #dadada;
  --chal-foot-bg: #fafafa;
  --chal-ok: #1fc15a;
  --chal-bad: #bd2426;
  --chal-link: #0055dc;
  --chal-orange: #f6821f;
  --chal-orange-soft: #ffbf7a;
  --chal-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--chal-font);
  background: var(--chal-bg);
  color: var(--chal-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
#gate-form {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.chal-profile {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.chal-page {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 5rem;
}
body[data-challenge="interactive"] .chal-status {
  display: none;
}
.chal-status {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 1.15rem;
  line-height: 1.45;
  text-align: center;
}
.chal-error {
  max-width: 36rem;
  color: var(--chal-bad);
  background: #fdecec;
  border: 1px solid #f6cfcf;
  border-radius: 4px;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
  margin: 0 auto 1rem;
}

.chal-box {
  width: 300px;
  max-width: 100%;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  overflow: hidden;
}
.chal-box-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 65px;
  padding: 0 14px;
}
.chal-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}
button.chal-icon { cursor: pointer; }
button.chal-icon:focus-visible {
  outline: 2px solid var(--chal-link);
  outline-offset: 2px;
}
button.chal-icon[disabled] { cursor: default; }
.chal-icon-box,
.chal-icon-wait,
.chal-icon-ok {
  grid-area: 1 / 1;
  display: none;
}
.chal-icon-box {
  width: 22px;
  height: 22px;
  border: 2px solid #c8c8c8;
  border-radius: 4px;
  background: #fff;
}
.chal-icon-wait {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px dashed var(--chal-ok);
  animation: chal-spin 0.85s linear infinite;
}
.chal-icon-ok {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--chal-ok);
  display: none;
  place-items: center;
}
.chal-box[data-state="idle"] .chal-icon-box { display: block; }
.chal-box[data-state="wait"] .chal-icon-wait { display: block; }
.chal-box[data-state="ok"] .chal-icon-ok { display: grid; }
.chal-label {
  font-size: 14px;
  font-weight: 400;
  color: #1f1f1f;
  line-height: 1.3;
  white-space: nowrap;
}
.chal-logo {
  margin-inline-start: auto;
  width: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1;
}
.chal-logo img {
  display: block;
  width: 70px;
  height: auto;
}
.chal-legal {
  width: 100%;
  font-size: 10px;
  color: #8a8a8a;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.chal-legal a {
  color: #8a8a8a;
  text-decoration: none;
}
.chal-legal a:hover {
  text-decoration: underline;
}
html[dir="rtl"] .chal-logo { align-items: flex-end; }
html[dir="rtl"] .chal-legal { text-align: right; }

body[data-need="captcha"] .chal-box { width: min(100%, 300px); }
body[data-need="captcha"] .chal-box-row { display: none; }
.chal-captcha {
  display: none;
  padding: 10px 12px 12px;
}
body[data-need="captcha"] .chal-captcha { display: block; }
.chal-captcha img {
  display: block;
  width: 100%;
  height: 56px;
  object-fit: contain;
  background: #f7f7f7;
  border: 1px solid var(--chal-widget-line);
  border-radius: 2px;
  margin-bottom: 8px;
}
.chal-captcha input {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 3px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.chal-captcha button {
  width: 100%;
  border: 0;
  border-radius: 3px;
  background: var(--chal-link);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
}
.chal-captcha button:disabled { opacity: 0.65; cursor: default; }

.chal-progress {
  display: none;
  margin: 1rem 0 0;
  height: 4px;
  width: 300px;
  max-width: 100%;
  background: #ececec;
  overflow: hidden;
}
body[data-challenge="js"] .chal-progress { display: block; }
.chal-progress[hidden] { display: none !important; }
body[data-challenge="js"] .chal-progress:not([hidden]) { display: block; }
.chal-progress > span {
  display: block;
  height: 100%;
  width: 8%;
  background: var(--chal-orange);
  transition: width 0.2s linear;
}

.chal-iuam {
  flex: 1;
  width: min(100%, 64rem);
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.chal-iuam[hidden] { display: none !important; }
.chal-iuam-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.85fr);
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 800px) {
  .chal-iuam { padding: 3rem 1.25rem 4rem; }
  .chal-iuam-grid { grid-template-columns: 1fr; }
  .chal-iuam-art { order: -1; max-width: 220px; }
}
.chal-iuam-copy h1 {
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  color: #1b1b1b;
}
.chal-iuam-lead {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1.35rem;
  line-height: 1.45;
}
.chal-iuam-copy p {
  color: var(--chal-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-top: 0.45rem;
  max-width: 34rem;
}
.chal-iuam-verify {
  color: var(--chal-text) !important;
  font-weight: 500;
  margin-top: 0.85rem !important;
}
.chal-dots {
  display: flex;
  gap: 10px;
  align-items: center;
  height: 22px;
}
.chal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--chal-orange);
  animation: chal-dot 1.05s ease-in-out infinite;
}
.chal-dots span:nth-child(2) { animation-delay: 0.15s; }
.chal-dots span:nth-child(3) { animation-delay: 0.3s; }
.chal-iuam-art svg {
  width: min(100%, 280px);
  height: auto;
  display: block;
}

@keyframes chal-dot {
  0%, 80%, 100% { transform: scale(0.65); opacity: 0.45; }
  40% { transform: scale(1); opacity: 1; }
}

.chal-foot {
  margin-top: auto;
  border-top: 1px solid var(--chal-line);
  padding: 0.85rem 1.5rem;
  font-size: 0.78rem;
  color: #767676;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.chal-foot code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.78rem;
  color: #555;
  unicode-bidi: isolate;
  direction: ltr;
}

.chal-noscript {
  max-width: 36rem;
  margin: 1rem auto;
  padding: 0.85rem 1rem;
  background: #fff8e5;
  border: 1px solid #ffe08a;
  color: #6b5300;
  font-size: 0.9rem;
}

@keyframes chal-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .chal-spin, .chal-check.is-wait::after, .chal-dots span { animation: none; }
}
