:root {
  color: #172033;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #edf2f9;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 48px 20px;
  background:
    radial-gradient(circle at 15% 5%, rgba(80, 106, 255, .2), transparent 32%),
    radial-gradient(circle at 85% 90%, rgba(31, 196, 154, .16), transparent 30%),
    #edf2f9;
}

button { font: inherit; }

.demo-card {
  width: min(100%, 1280px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(42, 59, 92, .1);
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 30px 80px rgba(29, 44, 76, .16);
}

.hero {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 36px 38px 28px;
  color: #f8fbff;
  background: linear-gradient(135deg, #17233e 0%, #273f78 62%, #295c70 100%);
}

.brand-mark {
  display: grid;
  flex: 0 0 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 16px;
  background: linear-gradient(145deg, #6d7cff, #45d0ac);
  box-shadow: inset 0 1px rgba(255, 255, 255, .36), 0 12px 26px rgba(0, 0, 0, .2);
  font-size: 24px;
  font-weight: 800;
}

.eyebrow,
.step {
  margin: 0 0 7px;
  color: #9eadff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

h1,
h2,
h3 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.08; }
h2 { color: #172033; font-size: 24px; }
h3 { color: #172033; font-size: 18px; }

.intro {
  max-width: 520px;
  margin: 12px 0 0;
  color: #c9d5ef;
  font-size: 14px;
  line-height: 1.7;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 17px 38px;
  border-bottom: 1px solid #e8edf6;
  background: #f7f9fd;
}

.trust-strip span {
  padding: 6px 10px;
  border: 1px solid #dce4f3;
  border-radius: 999px;
  color: #53617d;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
}

.trust-strip span::before {
  margin-right: 6px;
  color: #1dad84;
  content: "✓";
}

.challenge-panel { padding: 30px 38px 38px; }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.step { color: #6071d9; }

.live-badge {
  padding: 6px 9px;
  border-radius: 7px;
  color: #13785e;
  background: #dbf7ee;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.privacy-note {
  margin: 12px 0 22px;
  color: #66728a;
  font-size: 13px;
  line-height: 1.65;
}

#start-all,
.mode-start,
challora-captcha [part="submit"] {
  min-height: 44px;
  padding: 0 19px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #4d61dd, #6175ee);
  box-shadow: 0 10px 22px rgba(76, 94, 213, .24);
  cursor: pointer;
  font-weight: 750;
}

challora-captcha [part="clear"] {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #d8dfed;
  border-radius: 12px;
  color: #53617a;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

#start-all:hover,
.mode-start:hover,
challora-captcha [part="submit"]:hover { filter: brightness(1.06); }
#start-all:disabled,
.mode-start:disabled,
challora-captcha [part="submit"]:disabled,
challora-captcha [part="clear"]:disabled { cursor: not-allowed; filter: grayscale(.35); opacity: .5; }

challora-captcha { display: block; margin-top: 18px; }

challora-captcha [part="challenge"] {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #dce3ef;
  border-radius: 16px;
  background: #f5f7fa;
  box-shadow: 0 12px 30px rgba(28, 42, 69, .1);
}

challora-captcha [part="challenge"] img {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  touch-action: none;
}

challora-captcha .challora-checkbox-card {
  width: min(100%, 390px);
  padding: 9px;
  background: linear-gradient(145deg, #f8fbff, #edf3fb);
}

challora-captcha .challora-checkbox-control {
  display: grid;
  grid-template-columns: 34px 1fr 32px;
  gap: 13px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 13px 15px;
  border: 1px solid #d9e2f0;
  border-radius: 12px;
  color: #172033;
  background: #fff;
  box-shadow: 0 8px 22px rgba(28, 42, 69, .07);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

challora-captcha .challora-checkbox-control:hover {
  border-color: #8b99e9;
  box-shadow: 0 10px 28px rgba(76, 94, 213, .14);
  transform: translateY(-1px);
}

challora-captcha .challora-checkbox-box {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #aeb9cc;
  border-radius: 8px;
  color: #fff;
  font-size: 19px;
  font-weight: 850;
}

challora-captcha .challora-checkbox-copy { display: grid; gap: 4px; }
challora-captcha .challora-checkbox-copy strong { font-size: 15px; }
challora-captcha .challora-checkbox-copy small { color: #79849a; font-size: 11px; }
challora-captcha .challora-checkbox-shield { color: #6071d9; font-size: 22px; text-align: center; }

challora-captcha .challora-checkbox-card[data-state="verifying"] .challora-checkbox-box {
  border-color: #6175ee transparent #6175ee #6175ee;
  border-radius: 50%;
  animation: challora-spin .75s linear infinite;
}

challora-captcha .challora-checkbox-card[data-state="solved"] .challora-checkbox-box {
  border-color: #1dad84;
  background: #1dad84;
}

challora-captcha .challora-checkbox-card[data-state="solved"] .challora-checkbox-control { border-color: #9fdcca; background: #f5fffb; }
challora-captcha .challora-checkbox-card[data-state="failed"] .challora-checkbox-box { border-color: #d95968; color: #d95968; }

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

challora-captcha .challora-image-stage { position: relative; }

challora-captcha .challora-selection-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

challora-captcha [part="actions"] {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

challora-captcha [part="actions"][hidden] { display: none !important; }

challora-captcha [role="status"] {
  display: inline-block;
  margin: 16px 0 0 12px;
  color: #526077;
  font-size: 13px;
}

.app-status {
  margin: 18px 0 0;
  padding: 11px 14px;
  border-left: 3px solid #6175ee;
  border-radius: 0 9px 9px 0;
  color: #53617a;
  background: #f2f5fb;
  font-size: 13px;
}

.showcase-toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid #dfe6f3;
  border-radius: 15px;
  background: #f7f9fd;
}

.showcase-toolbar p {
  margin: 0;
  color: #64718a;
  font-size: 13px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.showcase-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #dfe6f3;
  border-radius: 20px;
  background: linear-gradient(155deg, #fff 0%, #f8faff 100%);
  box-shadow: 0 10px 28px rgba(28, 42, 69, .07);
}

.showcase-card > header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.showcase-card > header > div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.showcase-card > p:not(.mode-status) {
  min-height: 45px;
  margin: 12px 0 16px;
  color: #68758d;
  font-size: 12px;
  line-height: 1.65;
}

.mode-index {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #5267dc;
  font-size: 10px;
  font-weight: 850;
}

.mode-badge {
  padding: 5px 7px;
  border-radius: 7px;
  color: #4658c3;
  background: #e8ebff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
}

.mode-start { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 12px; }

.mode-status {
  min-height: 42px;
  margin: 16px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #9ca8bf;
  border-radius: 0 9px 9px 0;
  color: #596780;
  background: #f2f5fa;
  font-size: 12px;
  line-height: 1.55;
}

.mode-status[data-state="running"] { border-color: #6071d9; background: #f0f2ff; }
.mode-status[data-state="ready"] { border-color: #d49a2a; background: #fff9ec; }
.mode-status[data-state="success"] { border-color: #1dad84; color: #157259; background: #edfbf6; }
.mode-status[data-state="error"] { border-color: #d95968; color: #a63847; background: #fff1f3; }

.showcase-card[data-actual-type="allow"] { border-color: #a9decf; }
.showcase-card[data-actual-type="pow"] { border-color: #b8c1f2; }

.showcase-card challora-captcha input[type="range"] {
  width: calc(100% - 28px);
  margin: 16px 14px;
  accent-color: #5267dc;
}

@media (max-width: 560px) {
  body { padding: 18px 12px; }
  .demo-card { border-radius: 20px; }
  .hero { padding: 26px 22px 22px; }
  .brand-mark { flex-basis: 44px; height: 44px; border-radius: 13px; }
  .trust-strip { padding: 14px 22px; }
  .challenge-panel { padding: 24px 22px 28px; }
  .panel-heading { align-items: center; }
  .showcase-toolbar { align-items: stretch; flex-direction: column; }
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-card > p:not(.mode-status) { min-height: 0; }
}

@media (min-width: 561px) and (max-width: 920px) {
  .showcase-grid { grid-template-columns: 1fr; }
}
