/*
 * Tester thank-you. The supporter card's sibling: the same one authored moment (a card presented in a bloom of light), in mint,
 * because gold belongs to supporters. Everything that moves is transform or opacity; the particles are one canvas (supporter.js).
 */
.kt-celebrate {
  --kt-mint: var(--accent, var(--k-mint, #00f5a0));
  --kt-mint-hi: #6dfac4;
  --kt-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: fixed; inset: 0; z-index: 100100;
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(5, 6, 10, 0.78);
  -webkit-backdrop-filter: blur(12px) saturate(1.15); backdrop-filter: blur(12px) saturate(1.15);
  perspective: 1400px;
  animation: kt-fade 0.45s ease both;
}
.kt-celebrate.is-leaving { animation: kt-out 0.3s ease-in forwards; pointer-events: none; }
.kt-celebrate.is-leaving .kt-card { animation: kt-card-out 0.3s ease-in forwards; }
.kt-canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }

.kt-glow {
  position: absolute; left: 50%; top: 50%; width: min(1100px, 150vmax); aspect-ratio: 1; margin: calc(min(1100px, 150vmax) / -2) 0 0 calc(min(1100px, 150vmax) / -2);
  background: radial-gradient(closest-side, rgba(0, 245, 160, 0.2), rgba(0, 245, 160, 0.07) 45%, rgba(0, 245, 160, 0) 72%);
  pointer-events: none; will-change: transform, opacity;
  animation: kt-bloom 1.8s var(--kt-ease) both, kt-breathe 7s 1.8s ease-in-out infinite;
}

.kt-card {
  position: relative; isolation: isolate; width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding: 44px 32px 24px; text-align: center; border-radius: 24px;
  background: linear-gradient(180deg, #171b26 0%, #0e1118 62%);
  box-shadow: 0 44px 90px -24px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform-origin: 50% 70%; will-change: transform, opacity;
  animation: kt-present 1s 0.12s var(--kt-ease) both;
}
/* A mint hairline edge, brighter at the corners. */
.kt-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1; pointer-events: none;
  background: linear-gradient(155deg, rgba(109, 250, 196, 0.9), rgba(0, 245, 160, 0.2) 32%, rgba(0, 245, 160, 0.08) 62%, rgba(109, 250, 196, 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.kt-foil { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 0; }
.kt-foil::before {
  content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 48%;
  background: linear-gradient(105deg, transparent 18%, rgba(214, 255, 238, 0.08) 42%, rgba(255, 255, 255, 0.2) 50%, rgba(214, 255, 238, 0.08) 58%, transparent 82%);
  transform: translateX(-150%) skewX(-16deg); will-change: transform;
  animation: kt-foil 1.7s 1s var(--kt-ease) both;
}
.kt-card > :not(.kt-foil) { position: relative; z-index: 1; }

.kt-crest { position: relative; width: 84px; height: 84px; margin: 0 auto 20px; }
.kt-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(109, 250, 196, 0.55); opacity: 0; will-change: transform, opacity; animation: kt-ring 2s 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.kt-ring-2 { animation-delay: 0.95s; }
.kt-badge {
  position: absolute; inset: 6px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #04130d;
  background: linear-gradient(145deg, #b6ffe0 0%, var(--kt-mint) 55%, #00b87a 100%);
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -3px 6px rgba(0, 90, 60, 0.4);
  will-change: transform, opacity; animation: kt-stamp 0.8s 0.4s var(--kt-ease) both;
}
.kt-badge svg { width: 30px; height: 30px; }

.kt-title { margin: 0; font-family: Outfit, Inter, sans-serif; color: #fff; }
.kt-line { display: block; overflow: hidden; padding-bottom: 0.12em; }
.kt-line-in { display: block; will-change: transform; animation: kt-line 0.9s var(--kt-ease) both; }
.kt-title-main { font-weight: 800; font-size: clamp(2.3rem, 9vw, 3rem); line-height: 1.05; letter-spacing: -0.025em; animation-delay: 0.62s; text-wrap: balance; }
.kt-title-sub { margin-top: 2px; font-weight: 500; font-size: 1.1rem; line-height: 1.3; letter-spacing: 0.01em; color: var(--kt-mint-hi); animation-delay: 0.76s; }
.kt-copy { margin: 14px auto 0; max-width: 38ch; color: hsl(240, 5%, 78%); font-size: 0.95rem; line-height: 1.6; animation: kt-up 0.8s 1s var(--kt-ease) both; text-wrap: pretty; }

/* The tools in testing: a quiet list of links, the reason the card exists. */
.kt-tools { list-style: none; margin: 24px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.08); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: left; animation: kt-up 0.8s 1.15s var(--kt-ease) both; }
.kt-tool { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; height: 100%; border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.08); color: inherit; text-decoration: none; transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease; }
.kt-tool:hover { border-color: rgba(109, 250, 196, 0.55); background: rgba(0, 245, 160, 0.06); transform: translateY(-1px); }
.kt-tool:focus-visible { outline: 2px solid var(--kt-mint-hi); outline-offset: 2px; }
.kt-tool-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(0, 245, 160, 0.1); color: var(--kt-mint-hi); }
.kt-tool-icon svg { width: 19px; height: 19px; }
.kt-tool-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.kt-tool-text strong { font: 700 0.92rem Inter, sans-serif; color: #fff; }
.kt-tool-text span { font-size: 0.78rem; line-height: 1.35; color: hsl(240, 5%, 70%); }
.kt-tool-go { flex: none; width: 16px; height: 16px; color: hsl(240, 5%, 55%); transition: color 0.18s ease, transform 0.18s ease; }
.kt-tool-go svg { width: 16px; height: 16px; display: block; }
.kt-tool:hover .kt-tool-go { color: var(--kt-mint-hi); transform: translateX(2px); }

.kt-continue {
  display: block; margin: 22px auto 0; min-height: 48px; padding: 0 40px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--kt-mint); color: var(--on-accent, #04130d); font: 700 0.95rem Inter, sans-serif;
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.18s ease; animation: kt-up 0.8s 1.3s var(--kt-ease) both;
}
.kt-continue:hover { transform: translateY(-1px); }
.kt-continue:active { transform: scale(0.98); }
.kt-continue:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.kt-tip { display: flex; width: max-content; max-width: 100%; align-items: center; justify-content: center; min-height: 44px; margin: 8px auto 0; padding: 0 14px; border-radius: 10px; color: hsl(240, 5%, 70%); font: 500 0.82rem Inter, sans-serif; text-decoration: none; transition: color 0.18s ease, background-color 0.18s ease; animation: kt-up 0.8s 1.4s var(--kt-ease) both; }
.kt-tip:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.kt-tip:focus-visible { outline: 2px solid var(--kt-mint-hi); outline-offset: 2px; }

@media (max-width: 560px) {
  .kt-card { padding: 36px 18px 18px; border-radius: 22px; }
  .kt-tools { grid-template-columns: 1fr; }
  .kt-continue { width: 100%; }
}

@keyframes kt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kt-out { to { opacity: 0; } }
@keyframes kt-card-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes kt-present { from { opacity: 0; transform: translateY(34px) rotateX(14deg) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes kt-bloom { from { opacity: 0; transform: scale(0.55); } to { opacity: 1; transform: scale(1); } }
@keyframes kt-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
@keyframes kt-stamp { 0% { opacity: 0; transform: scale(1.7); } 55% { opacity: 1; transform: scale(0.93); } 100% { opacity: 1; transform: scale(1); } }
@keyframes kt-ring { 0% { opacity: 0.6; transform: scale(0.7); } 100% { opacity: 0; transform: scale(2.3); } }
@keyframes kt-line { from { transform: translateY(110%); } to { transform: none; } }
@keyframes kt-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes kt-foil { to { transform: translateX(330%) skewX(-16deg); } }

/* Still version: the same card, no motion beyond a quick fade. */
.kt-celebrate.is-still { animation: kt-fade 0.2s ease both; }
.kt-celebrate.is-still .kt-card, .kt-celebrate.is-still .kt-glow, .kt-celebrate.is-still .kt-badge, .kt-celebrate.is-still .kt-line-in,
.kt-celebrate.is-still .kt-tip, .kt-celebrate.is-still .kt-copy, .kt-celebrate.is-still .kt-tools, .kt-celebrate.is-still .kt-continue { animation: none; }
.kt-celebrate.is-still .kt-ring, .kt-celebrate.is-still .kt-foil { display: none; }
.kt-celebrate.is-still .kt-glow { opacity: 0.8; }
@media (prefers-reduced-motion: reduce) {
  .kt-celebrate { animation: kt-fade 0.2s ease both; }
  .kt-celebrate .kt-card, .kt-celebrate .kt-glow, .kt-celebrate .kt-badge, .kt-celebrate .kt-line-in,
  .kt-celebrate .kt-tip, .kt-celebrate .kt-copy, .kt-celebrate .kt-tools, .kt-celebrate .kt-continue { animation: none; }
  .kt-celebrate .kt-ring, .kt-celebrate .kt-foil { display: none; }
  .kt-celebrate .kt-glow { opacity: 0.8; }
  .kt-continue, .kt-tool, .kt-tool-go { transition: none; }
}

/* The landing page's "open your tools" button, shown in the test-code box once someone is a tester. */
.title-test-code-tools { margin-top: 10px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(0, 245, 160, 0.4); border-radius: 10px; background: rgba(0, 245, 160, 0.08); color: var(--accent, #00f5a0); font: 600 0.85rem Inter, sans-serif; cursor: pointer; transition: background-color 0.18s ease; }
.title-test-code-tools:hover { background: rgba(0, 245, 160, 0.14); }
.title-test-code-tools[hidden] { display: none; }
