:root {
  color-scheme: dark;
  --bg-0: #04060d;
  --bg-1: #070b18;
  --bg-2: #0c1426;

  --ink: #e8f1ff;
  --muted: #93a8c6;
  --dim: #5d7390;

  --line: rgba(120, 180, 230, 0.14);
  --line-strong: rgba(120, 180, 230, 0.34);

  --panel: rgba(13, 22, 41, 0.55);
  --panel-strong: rgba(18, 30, 54, 0.78);

  --teal: #22d3ee;
  --teal-2: #5eead4;
  --aqua: #67e8f9;
  --indigo: #6366f1;
  --violet: #a78bfa;
  --gold: #fbbf24;
  --danger: #f87171;

  --grad-iota: linear-gradient(
    120deg,
    #5eead4 0%,
    #22d3ee 35%,
    #6366f1 70%,
    #a78bfa 100%
  );
  --grad-iota-soft: linear-gradient(
    120deg,
    rgba(94, 234, 212, 0.18),
    rgba(34, 211, 238, 0.18) 40%,
    rgba(99, 102, 241, 0.18) 75%,
    rgba(167, 139, 250, 0.18)
  );

  --shadow-lg: 0 30px 90px -30px rgba(34, 211, 238, 0.35),
    0 8px 30px -10px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px var(--line) inset,
    0 0 60px -10px rgba(34, 211, 238, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-0);
  color: var(--ink);
  font-family: "Inter", "SF Pro Text", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(167, 139, 250, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 40%, var(--bg-2) 100%);
}

/* ---------- background layers ---------- */

.tangle {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* Static aurora — painted once, no infinite filter animation. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 8% 8%, rgba(34, 211, 238, 0.22), transparent 60%),
    radial-gradient(46vmax 46vmax at 100% 18%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(38vmax 38vmax at 60% 110%, rgba(94, 234, 212, 0.16), transparent 60%);
  opacity: 0.85;
}

.aurora span {
  display: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 180, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 230, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(
    ellipse 80% 60% at 50% 30%,
    #000 30%,
    transparent 80%
  );
  opacity: 0.55;
}

/* ---------- top bar ---------- */

.topbar {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  animation: spin 24s linear infinite;
}

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

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name strong {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1rem;
}

.brand-name em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mode {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.12),
    rgba(99, 102, 241, 0.08)
  );
  color: var(--teal-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 24px -8px rgba(34, 211, 238, 0.55);
  position: relative;
}

.mode::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 1px;
  background: var(--grad-iota);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  pointer-events: none;
}

.mode[data-state="live"] {
  color: var(--gold);
}

.topbar-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-sep {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
  margin: 0 2px;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(13, 22, 41, 0.55);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 200ms, border-color 200ms, background 200ms,
    transform 160ms, box-shadow 200ms;
}

.repo-link:hover {
  color: var(--ink);
  border-color: rgba(94, 234, 212, 0.5);
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -10px rgba(34, 211, 238, 0.55);
  text-decoration: none;
}

.repo-link:focus-visible {
  outline: 2px solid var(--teal-2);
  outline-offset: 2px;
}

.repo-mark {
  width: 16px;
  height: 16px;
  color: var(--teal-2);
  flex-shrink: 0;
  transition: color 200ms, transform 200ms;
}

.repo-link:hover .repo-mark {
  color: var(--aqua);
  transform: rotate(-6deg) scale(1.05);
}

.repo-arrow {
  font-size: 0.78rem;
  color: var(--dim);
  transition: transform 200ms, color 200ms;
}

.repo-link:hover .repo-arrow {
  color: var(--teal-2);
  transform: translate(2px, -2px);
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ---------- shell ---------- */

.shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.panel {
  position: relative;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(20, 32, 58, 0.92), rgba(10, 16, 32, 0.88));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    140deg,
    rgba(94, 234, 212, 0.45),
    rgba(99, 102, 241, 0.18) 45%,
    transparent 70%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.9;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px 220px at 0% 0%,
    rgba(34, 211, 238, 0.08),
    transparent 60%
  );
  pointer-events: none;
}

/* ---------- claim surface ---------- */

.claim-surface {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  padding-top: 12px;
}

.claim-copy {
  padding: clamp(28px, 4.4vw, 52px);
  animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(34, 211, 238, 0.06);
  color: var(--teal-2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-2);
  box-shadow: 0 0 12px var(--teal-2);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--teal-2);
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  0% {
    opacity: 1;
    transform: scale(0.8);
  }
  80%,
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-weight: 800;
}

h1 span {
  display: block;
}

h1 .grad {
  background: var(--grad-iota);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 60ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

/* ---------- wallet panel ---------- */

.wallet-panel {
  margin-top: 30px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(10, 18, 36, 0.6);
  border: 1px solid var(--line);
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--teal-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wallet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(4, 8, 18, 0.7);
  font: inherit;
  transition: border-color 200ms, box-shadow 200ms, background 200ms;
}

input::placeholder {
  color: var(--dim);
}

input:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.6);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16);
  background: rgba(4, 8, 18, 0.9);
}

.wallet-panel p,
.live-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

[data-wallet-status] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

[data-wallet-status]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 0 0 transparent;
  transition: background 200ms, box-shadow 200ms;
}

body[data-state="wallet-connected"] [data-wallet-status]::before,
body[data-state="checking-sponsorship-policy"] [data-wallet-status]::before,
body[data-state="gas-reserved"] [data-wallet-status]::before,
body[data-state="waiting-for-user-signature"] [data-wallet-status]::before,
body[data-state="executing-sponsored-transaction"] [data-wallet-status]::before,
body[data-state="success-with-digest"] [data-wallet-status]::before {
  background: var(--teal-2);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.2);
}

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

button {
  position: relative;
  font: inherit;
  cursor: pointer;
  border: 0;
  height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(180deg, #1a2a4d, #0f1a32);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 160ms, box-shadow 200ms, background 200ms,
    color 200ms, border-color 200ms;
  overflow: hidden;
  isolation: isolate;
}

button:focus-visible {
  outline: 2px solid var(--teal-2);
  outline-offset: 2px;
}

button.primary,
.cta {
  background: var(--grad-iota);
  color: #001018;
  box-shadow:
    0 10px 30px -10px rgba(34, 211, 238, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

button.primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

button.primary svg {
  width: 14px;
  height: 14px;
  transition: transform 200ms;
}

button.primary:hover svg {
  transform: translateX(3px);
}

.cta {
  min-height: 52px;
  padding: 0 26px;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cta-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 700ms ease;
  pointer-events: none;
}

.cta:not(:disabled):hover .cta-shine {
  transform: translateX(120%);
}

.cta-label {
  position: relative;
  z-index: 1;
}

button.primary:hover,
.cta:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 40px -10px rgba(34, 211, 238, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

button.secondary {
  background: rgba(34, 211, 238, 0.08);
  color: var(--teal-2);
  border: 1px solid var(--line-strong);
}

button.secondary:hover {
  background: rgba(34, 211, 238, 0.16);
  color: var(--ink);
}

button.quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

button.quiet:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.4);
  animation: none;
}

button:disabled .cta-shine {
  display: none;
}

/* ---------- badge panel ---------- */

.badge-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 32, 58, 0.5), rgba(8, 14, 28, 0.5));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: rise 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: 80ms;
}

.badge-art {
  position: relative;
  border-radius: 14px;
  min-height: 360px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.25), transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.25), transparent 60%),
    linear-gradient(160deg, #0a1530 0%, #08122a 60%, #0a1530 100%);
  isolation: isolate;
}

.badge-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(2px 2px at 12% 22%, rgba(255, 255, 255, 0.55), transparent 40%),
    radial-gradient(1.5px 1.5px at 80% 12%, rgba(255, 255, 255, 0.5), transparent 40%),
    radial-gradient(2px 2px at 30% 80%, rgba(255, 255, 255, 0.45), transparent 40%),
    radial-gradient(1.5px 1.5px at 70% 70%, rgba(255, 255, 255, 0.45), transparent 40%),
    radial-gradient(1.5px 1.5px at 90% 60%, rgba(255, 255, 255, 0.5), transparent 40%);
  opacity: 0.55;
}

.badge-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.badge-orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-a {
  width: 84%;
  aspect-ratio: 1;
  background: conic-gradient(
    from 0deg,
    rgba(34, 211, 238, 0.0),
    rgba(34, 211, 238, 0.85),
    rgba(167, 139, 250, 0.85),
    rgba(94, 234, 212, 0.85),
    rgba(34, 211, 238, 0.0)
  );
  -webkit-mask: radial-gradient(circle, transparent 47%, #000 49%, #000 50%, transparent 52%);
  mask: radial-gradient(circle, transparent 47%, #000 49%, #000 50%, transparent 52%);
  animation: spin 18s linear infinite;
  will-change: transform;
}

.orbit-b {
  width: 64%;
  aspect-ratio: 1;
  border: 1px dashed rgba(94, 234, 212, 0.45);
  animation: spin 36s linear infinite reverse;
  will-change: transform;
}

.orbit-c {
  width: 96%;
  aspect-ratio: 1;
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: inset 0 0 60px rgba(34, 211, 238, 0.18);
}

.badge-glow {
  position: absolute;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.55),
    rgba(99, 102, 241, 0.25) 50%,
    transparent 70%
  );
  filter: blur(20px);
  opacity: 0.85;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.badge-core {
  position: relative;
  z-index: 2;
  width: 56%;
  aspect-ratio: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 18px;
  border-radius: 50%;
  color: #f8fbff;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)) padding-box,
    radial-gradient(circle, #0c1a3a 0%, #060c1d 70%) padding-box,
    var(--grad-iota) border-box;
  border: 1.5px solid transparent;
  box-shadow:
    0 22px 60px -10px rgba(34, 211, 238, 0.55),
    inset 0 0 28px rgba(34, 211, 238, 0.18);
}

.badge-core span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-2);
}

.badge-core strong {
  display: block;
  margin: 6px 0;
  max-width: 8ch;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad-iota);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.badge-core small {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge-particles {
  display: none;
}

/* Particles only appear and animate during the active execution beat. */
body[data-state="executing-sponsored-transaction"] .badge-particles,
body[data-state="success-with-digest"] .badge-particles {
  display: block;
}

.badge-particles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal-2);
  opacity: 0;
}

body[data-state="executing-sponsored-transaction"] .badge-particles i,
body[data-state="success-with-digest"] .badge-particles i {
  animation: float 6s ease-in-out infinite;
}

.badge-particles i:nth-child(1) { top: 18%; left: 24%; animation-delay: 0s; }
.badge-particles i:nth-child(2) { top: 30%; right: 18%; animation-delay: 0.6s; }
.badge-particles i:nth-child(3) { bottom: 22%; left: 30%; animation-delay: 1.1s; }
.badge-particles i:nth-child(4) { bottom: 18%; right: 26%; animation-delay: 1.5s; }
.badge-particles i:nth-child(5) { top: 50%; left: 12%; animation-delay: 0.3s; }
.badge-particles i:nth-child(6) { top: 56%; right: 12%; animation-delay: 1.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  50% { transform: translateY(-18px); opacity: 0.9; }
  80% { opacity: 0.4; }
}

/* badge state effects */
body[data-state="executing-sponsored-transaction"] .orbit-a {
  animation-duration: 6s;
}

body[data-state="success-with-digest"] .badge-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(94, 234, 212, 0.6),
    transparent 55%
  );
  animation: burst 1.4s ease-out forwards;
  pointer-events: none;
}

@keyframes burst {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(2);
  }
}

body[data-state="success-with-digest"] .badge-core {
  animation: victory 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes victory {
  0% {
    transform: scale(0.92);
  }
  60% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

body[data-state="policy-rejected"] .orbit-a,
body[data-state="failed-safe-error"] .orbit-a,
body[data-state="live-testnet-unavailable"] .orbit-a {
  background: conic-gradient(
    from 0deg,
    rgba(248, 113, 113, 0),
    rgba(248, 113, 113, 0.85),
    rgba(248, 113, 113, 0)
  );
  animation-duration: 18s;
}

/* ---------- status card ---------- */

.status-card {
  padding: 20px;
}

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

.status-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 0 0 transparent;
  flex-shrink: 0;
  transition: background 200ms, box-shadow 200ms;
}

body[data-state="checking-sponsorship-policy"] .status-led,
body[data-state="gas-reserved"] .status-led,
body[data-state="waiting-for-user-signature"] .status-led,
body[data-state="executing-sponsored-transaction"] .status-led {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.18);
  animation: blink 1.4s ease-in-out infinite;
}

body[data-state="success-with-digest"] .status-led {
  background: var(--teal-2);
  box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.22);
}

body[data-state="policy-rejected"] .status-led,
body[data-state="failed-safe-error"] .status-led,
body[data-state="live-testnet-unavailable"] .status-led {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(248, 113, 113, 0.22);
}

.status-card h2 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.status-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.live-note {
  font-size: 0.86rem;
  color: var(--dim);
}

.result {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

code {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(4, 8, 18, 0.65);
  border: 1px solid var(--line);
  color: var(--teal-2);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
  min-height: 20px;
}

code:empty {
  display: none;
}

a {
  color: var(--teal-2);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  color: var(--aqua);
  text-decoration: underline;
  text-underline-offset: 3px;
}

[data-explorer]:not([href]) {
  display: none;
}

/* ---------- timeline ---------- */

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 28px 0 32px;
}

.timeline-rail {
  position: absolute;
  top: 30px;
  left: 7%;
  right: 7%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(120, 180, 230, 0.18),
    rgba(120, 180, 230, 0.06)
  );
  border-radius: 1px;
  overflow: hidden;
}

.timeline-spark {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--grad-iota);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.65);
  transition: width 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body[data-state="checking-sponsorship-policy"] .timeline-spark { width: 10%; }
body[data-state="gas-reserved"] .timeline-spark { width: 30%; }
body[data-state="waiting-for-user-signature"] .timeline-spark { width: 55%; }
body[data-state="executing-sponsored-transaction"] .timeline-spark { width: 80%; }
body[data-state="success-with-digest"] .timeline-spark { width: 100%; }

.timeline > div[data-step] {
  position: relative;
  min-height: 130px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 32, 58, 0.85), rgba(8, 14, 28, 0.85));
  transition: border-color 250ms, background 250ms, transform 250ms;
}

.timeline > div[data-step] span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(120, 180, 230, 0.08);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
  transition: background 250ms, color 250ms, border-color 250ms,
    box-shadow 250ms;
}

.timeline > div[data-step] p {
  margin: 14px 0 5px;
  color: var(--dim);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.timeline > div[data-step] strong {
  display: block;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.timeline > div[data-status="complete"] {
  border-color: rgba(94, 234, 212, 0.28);
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.1),
    rgba(8, 14, 28, 0.5)
  );
}

.timeline > div[data-status="complete"] span {
  background: var(--grad-iota);
  color: #001018;
  border-color: transparent;
}

.timeline > div[data-status="active"] {
  border-color: rgba(34, 211, 238, 0.55);
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.18),
    rgba(8, 14, 28, 0.5)
  );
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -16px rgba(34, 211, 238, 0.55);
}

.timeline > div[data-status="active"] span {
  background: var(--grad-iota);
  color: #001018;
  border-color: transparent;
  box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.18);
  animation: blink 1.6s ease-in-out infinite;
}

/* ---------- info grid ---------- */

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}

.info-grid article {
  padding: 26px;
  border-radius: 18px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card-glyph {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(34, 211, 238, 0.08);
  color: var(--teal-2);
}

.card-glyph svg {
  width: 18px;
  height: 18px;
}

.info-grid h2 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.info-grid ol,
.info-grid ul {
  margin: 0;
  padding-left: 20px;
}

.info-grid li {
  margin: 9px 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.96rem;
}

.info-grid li::marker {
  color: var(--teal-2);
}

.info-grid code {
  display: inline;
  padding: 2px 6px;
  font-size: 0.84rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(4, 8, 18, 0.65);
  color: var(--teal-2);
}

/* ---------- footnote ---------- */

.footnote {
  margin: 28px 0 0;
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--line);
  content-visibility: auto;
  contain-intrinsic-size: 40px;
}

.dot-sep {
  color: var(--line-strong);
}

/* ---------- state banks (visually hidden but a11y-listed) ---------- */

.state-bank {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- error states ---------- */

body[data-state="policy-rejected"] [data-status-title],
body[data-state="failed-safe-error"] [data-status-title],
body[data-state="live-testnet-unavailable"] [data-status-title] {
  color: var(--danger);
}

body[data-state="policy-rejected"] .status-card,
body[data-state="failed-safe-error"] .status-card,
body[data-state="live-testnet-unavailable"] .status-card {
  border-color: rgba(248, 113, 113, 0.4);
}

/* ---------- entrance animation ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- scrollbar ---------- */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.35), rgba(99, 102, 241, 0.35));
  border-radius: 8px;
  border: 2px solid var(--bg-1);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.55), rgba(99, 102, 241, 0.55));
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .claim-surface,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: 1fr 1fr;
  }

  .timeline-rail {
    display: none;
  }

  .tangle {
    display: none;
  }
}

@media (max-width: 560px) {
  .topbar-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-sep {
    display: none;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .wallet-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .tangle,
  .aurora {
    display: none;
  }
}
