:root {
  --bg: #0d0e11;
  --grid: #1a1d23;
  --card: #16181d;
  --card-2: #1b1e24;
  --line: #262a31;
  --text: #f4f1ea;
  --text-2: #c9c5bd;
  --muted: #8b929c;
  --faint: #5d636c;
  --amber: #f0b429;
  --teal: #4fd1b5;
  --blue: #6ea8fe;
  --ok: #5fd38d;
  --err: #ff7b72;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}

.stack {
  width: 100%;
  max-width: 640px;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 5vw, 40px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.head { display: flex; gap: clamp(20px, 4vw, 32px); align-items: center; }

/* Avatar ring: arcs show agent token share by provider (/api/usage); it spins while the human check runs. */
.ring {
  position: relative;
  flex: none;
  width: clamp(112px, 22vw, 140px);
  aspect-ratio: 1;
}
.arcs { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arcs circle { fill: none; stroke-width: 3; }
.arcs .track { stroke: #2a2620; }
.arcs .arc {
  stroke: var(--amber);
  stroke-linecap: round;
  transition: stroke-dasharray .9s cubic-bezier(.3, .7, .2, 1), opacity .3s;
}
.arc.anthropic { stroke: var(--amber); }
.arc.openai { stroke: var(--teal); }
.arc.google { stroke: var(--blue); }
.arc.xai { stroke: var(--text); }
.arc.other { stroke: var(--muted); }
.ring.thinking .arcs { animation: sweep 1.1s linear infinite; }
.ring-inner {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #1f232a;
  display: grid;
  place-items: center;
  color: #ebe7df;
}
.ring-inner svg { width: 64%; height: auto; display: block; }
@keyframes sweep { to { transform: rotate(360deg); } }

h1 {
  margin: 0;
  font-size: clamp(28px, 5.4vw, 38px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tag {
  margin: 10px 0 12px;
  min-height: 1.4em;
  font: 400 clamp(13px, 2.2vw, 15px) / 1.45 var(--mono);
  color: var(--muted);
  animation: rise .5s ease-out both;
}
.tag b { font-weight: 400; color: var(--text); }
.tag .cl { white-space: nowrap; }  /* wrap between the two clauses, never mid-phrase */

/* The contact reveal reads as a link, not a form button. */
.humans {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber);
  font: 500 15px var(--mono);
  text-decoration: underline;
  text-decoration-color: rgba(240, 180, 41, .4);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  cursor: pointer;
  transition: opacity .2s, text-decoration-color .2s;
}
.humans:hover { text-decoration-color: var(--amber); }
.humans .arr { display: inline-block; transition: transform .2s; }
.humans:hover .arr { transform: translateX(4px); }
.humans:focus-visible, .copy:focus-visible, .links a:focus-visible, .status a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
.humans[disabled] { opacity: .6; cursor: progress; }
.humans[hidden] { display: none; }

.card.revealed .tag { margin-bottom: 0; }

.usage {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(22, 24, 29, .7);
  font: 400 12px/1.5 var(--mono);
  color: var(--faint);
  text-align: center;
  animation: rise .6s ease-out;
}
.usage[hidden] { display: none; }
.usage b { font-weight: 400; color: var(--muted); }
.usage .via {
  padding-right: 14px;
  border-right: 1px solid var(--line);
  color: var(--text-2);
  letter-spacing: .02em;
}
.usage i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 1px;
}

.note { color: var(--muted); font-size: 13px; }

.ts:not(:empty) { margin-top: 18px; display: flex; justify-content: center; }

.contact {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  animation: rise .35s ease-out;
}
.contact[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.email-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 6px 16px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.email {
  font: 400 clamp(14px, 2.6vw, 16px) var(--mono);
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.email:hover { color: var(--amber); }
.copy {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--amber);
  font: 500 13px var(--mono);
  cursor: pointer;
}

.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #2c3038;
  border-radius: 999px;
  color: var(--text-2);
  font: 400 14px var(--mono);
  text-decoration: none;
}
.links a:hover { border-color: var(--amber); color: var(--text); }
.links span { color: var(--faint); margin: 0 6px; }

.status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-top: 1px solid #1d2026;
  background: rgba(13, 14, 17, .85);
  font: 400 12px var(--mono);
  color: var(--faint);
}
.status a { color: var(--muted); text-decoration: none; }
.status a:hover { color: var(--amber); }
.status .ok { color: var(--ok); }
.status .err { color: var(--err); }

@media (max-width: 560px) {
  .head { flex-direction: column; text-align: center; }
  .intro { width: 100%; }
  .email-row { padding-left: 12px; }
  .email { font-size: 13px; }
  .copy { padding: 0 10px; }
  .links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
