/* ──────────────────────────────────────
   1. Design Tokens
   ────────────────────────────────────── */
:root {
  --bg: #faf7f2;
  --ink: #1a1a1a;
  --muted: #666666;
  --paper: #ffffff;

  --coral: #e07a5f;
  --sky: #81b29a;
  --mint: #6d9e87;
  --sunshine: #f2cc8f;
  --lavender: #f2cc8f;

  --coral-soft: rgba(224, 122, 95, 0.12);
  --sky-soft: rgba(129, 178, 154, 0.14);
  --mint-soft: rgba(129, 178, 154, 0.2);
  --sunshine-soft: rgba(242, 204, 143, 0.2);

  --stroke: #e5e0d8;
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.08);

  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", ui-serif, Georgia, serif;

  /* Typography scale */
  --text-3xs: 0.9375rem; /* 15 */
  --text-2xs: 0.9375rem; /* 15 */
  --text-xs: 0.9375rem; /* 15 */
  --text-sm: 1rem; /* 16 */
  --text-sm-plus: 1.0625rem; /* 17 */
  --text-base: clamp(1.125rem, 1.06rem + 0.24vw, 1.25rem); /* 18-20 */
  --text-base-plus: 1.25rem; /* 20 */
  --text-md: clamp(1.25rem, 1.16rem + 0.38vw, 1.4375rem); /* 20-23 */
  --text-title-xs: 1.4375rem; /* 23 */
  --text-title-sm: 1.625rem; /* 26 */
  --text-title-sm-plus: 1.75rem; /* 28 */
  --text-lg: clamp(1.875rem, 1.52rem + 1.02vw, 2.5rem); /* 30-40 */
  --text-xl: clamp(2.25rem, 1.75rem + 1.95vw, 3.25rem); /* 36-52 */
  --text-display-xl: 3.125rem; /* 50 */
  --text-display-2xl: 4.25rem; /* 68 */
  --text-hero-mobile: 2.375rem; /* 38 */
  --text-hero: clamp(2.65rem, 1.85rem + 3.05vw, 4.25rem); /* 42-68 */

  --lh-tight: 1.08;
  --lh-heading: 1.2;
  --lh-body: 1.6;
}

/* ──────────────────────────────────────
   2. Reset & Base
   ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

/* Sane modern defaults for document text hierarchy */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: var(--lh-heading);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
  font-size: 1em;
  line-height: var(--lh-body);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

.link {
  color: var(--sky);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link:hover {
  color: var(--coral);
}

/* ──────────────────────────────────────
   3. Background
   ────────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg__blob {
  position: absolute;
  width: 56rem;
  height: 56rem;
  filter: blur(60px);
  opacity: 0.3;
  transform: translateZ(0);
}

.bg__blob--a {
  background: radial-gradient(circle at 30% 30%, var(--coral), transparent 60%),
              radial-gradient(circle at 70% 40%, var(--sunshine), transparent 50%);
  top: -24rem;
  left: -16rem;
}

.bg__blob--b {
  background: radial-gradient(circle at 60% 40%, var(--sky), transparent 55%),
              radial-gradient(circle at 30% 70%, var(--mint), transparent 55%);
  bottom: -28rem;
  right: -20rem;
}

.bg__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(26, 26, 26, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
}

/* ──────────────────────────────────────
   4. Header
   ────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(250, 247, 242, 0.86);
  border-bottom: 1px solid var(--stroke);
}

.top__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
}

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

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid #d4cfc7;
  background:
    radial-gradient(circle at 35% 30%, var(--coral), transparent 60%),
    radial-gradient(circle at 65% 70%, var(--sky), transparent 55%),
    radial-gradient(circle at 50% 50%, var(--mint), transparent 60%);
  box-shadow: 0 4px 12px rgba(224, 122, 95, 0.18);
}

.brand__name {
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
}

/* ──────────────────────────────────────
   5. Progress Bar
   ────────────────────────────────────── */
.progress {
  max-width: 480px;
  margin: 0 auto 8px;
  padding: 0 20px;
  display: none;
}

.progress.is-visible {
  display: block;
}

.progress__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.progress__step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  transition: all 300ms ease;
}

.progress__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  background: rgba(26, 26, 26, 0.06);
  color: var(--muted);
  transition: all 300ms ease;
}

.progress__label {
  display: none;
}

.progress__step.is-active .progress__dot {
  background: var(--coral);
  color: white;
  box-shadow: 0 4px 16px rgba(224, 122, 95, 0.3);
}

.progress__step.is-active .progress__label {
  display: inline;
  color: var(--ink);
}

.progress__step.is-complete .progress__dot {
  background: var(--mint);
  color: white;
}

.progress__step.is-complete .progress__dot::after {
  content: "\2713";
  font-size: var(--text-sm);
}

.progress__step.is-complete .progress__dot > :first-child {
  display: none;
}

/* Connector lines between steps */
.progress__step + .progress__step::before {
  content: "";
  width: 24px;
  height: 2px;
  background: rgba(26, 26, 26, 0.1);
  border-radius: 2px;
  margin-right: 6px;
  transition: background 300ms ease;
}

.progress__step.is-complete + .progress__step::before,
.progress__step.is-active + .progress__step::before {
  /* leave as-is for now; the completed connector color comes from .is-complete */
}

.progress__step.is-complete + .progress__step.is-complete::before,
.progress__step.is-complete + .progress__step.is-active::before {
  background: var(--mint);
}

/* ──────────────────────────────────────
   6. Steps (show/hide)
   ────────────────────────────────────── */
.main {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  min-height: calc(100vh - 120px);
}

.step {
  display: none;
}

.step.is-active {
  display: block;
  animation: fadeInUp 400ms ease forwards;
}

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

/* ──────────────────────────────────────
   7. Landing Page
   ────────────────────────────────────── */
.landing {
  padding-top: 32px;
}

/* JustClawIt-inspired pre-onboarding layout */
.landing--jci {
  display: flex;
  flex-direction: column;
}

.jci-hero {
  padding-top: 12px;
}

.jci-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "title visual"
    "subtitle visual"
    "cta visual";
  gap: 18px 40px;
  align-items: start;
}

.jci-hero__title {
  grid-area: title;
  max-width: 520px;
}

.jci-hero__subtitle {
  grid-area: subtitle;
  max-width: 560px;
}

.jci-hero__subtitle p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.55;
}

.jci-hero__bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.45;
}

.jci-hero__bullets li {
  position: relative;
  padding-left: 36px;
}

.jci-hero__bullets li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--mint);
  display: grid;
  place-items: center;
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1;
}

.jci-hero__bullets li + li {
  margin-top: 8px;
}

.jci-hero__cta {
  grid-area: cta;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.jci-hero__micro {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.jci-hero__cta .btn--jumbo {
  margin-top: 0;
}

.jci-hero__visual {
  grid-area: visual;
}

.jci-hero__heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  letter-spacing: -0.03em;
  line-height: var(--lh-tight);
}

.jci-hero__highlight {
  color: var(--coral);
}

.jci-mockup {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1c1c1e;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.2);
  padding: 18px;
}

.jci-mockup__header {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.jci-mockup__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.jci-mockup__dot--red { background: #ff5f57; }
.jci-mockup__dot--yellow { background: #ffbd2e; }
.jci-mockup__dot--green { background: #27c93f; }

.jci-mockup__conversation {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jci-message {
  padding: 11px 13px;
  border-radius: 14px;
  font-size: var(--text-sm);
  line-height: 1.4;
  max-width: 92%;
  width: fit-content;
}

.jci-message--assistant {
  align-self: flex-start;
  background: #4a4a4e;
  color: #ffffff;
  border-bottom-left-radius: 4px;
}

.jci-message--user {
  align-self: flex-end;
  background: #25d366;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.jci-contrast {
  margin-top: 48px;
  border-radius: 26px;
  background: #1c1c1e;
  color: #fff;
  padding: 40px 24px;
  text-align: center;
}

.jci-contrast p {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.25;
}

.jci-contrast strong {
  color: var(--sunshine);
}

.jci-audience-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.jci-audience-card {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 28px 22px;
  text-align: center;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.jci-audience-card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 122, 95, 0.35);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.jci-audience-card__icon {
  font-size: var(--text-display-xl);
  line-height: 1;
  margin-bottom: 14px;
}

.jci-audience-card h3 {
  margin: 0;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
}

.jci-audience-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: var(--text-sm-plus);
  line-height: 1.45;
}

.jci-feature-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.jci-feature-card {
  text-align: left;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.76);
  padding: 24px 22px;
}

.jci-feature-card h3 {
  margin: 0;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
}

.jci-feature-card p {
  margin: 9px 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.5;
}

/* Flow steps (4-step visual) */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 32px;
  position: relative;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 12px;
  position: relative;
}

.flow-step__num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--text-title-xs);
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.flow-step__num--coral { background: var(--coral); box-shadow: 0 4px 16px rgba(224, 122, 95, 0.3); }
.flow-step__num--sky { background: var(--sky); box-shadow: 0 4px 16px rgba(129, 178, 154, 0.3); }
.flow-step__num--lavender { background: var(--lavender); box-shadow: 0 4px 16px rgba(242, 204, 143, 0.35); }
.flow-step__num--mint { background: var(--mint); box-shadow: 0 4px 16px rgba(129, 178, 154, 0.3); }

/* Connector line between steps */
.flow-step__connector {
  display: none;
}

.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  left: calc(50% + 28px);
  width: calc(100% - 56px);
  height: 2px;
  background: linear-gradient(90deg, var(--stroke), var(--stroke));
  z-index: 0;
}

.flow-step:nth-child(1)::after {
  background: linear-gradient(90deg, rgba(224, 122, 95, 0.35), rgba(129, 178, 154, 0.35));
}

.flow-step:nth-child(2)::after {
  background: linear-gradient(90deg, rgba(129, 178, 154, 0.35), rgba(242, 204, 143, 0.35));
}

.flow-step:nth-child(3)::after {
  background: linear-gradient(90deg, rgba(242, 204, 143, 0.35), rgba(129, 178, 154, 0.35));
}

.flow-step__title {
  margin: 0 0 4px;
  font-size: var(--text-sm-plus);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.flow-step__desc {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.45;
  max-width: 20ch;
}

/* Trust pills */
.landing__trust {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--stroke);
}

.trust-pill__icon {
  font-size: var(--text-sm-plus);
}

/* Landing sections (How it works, Easy to use, Security) */
.landing-section {
  margin-top: 56px;
  text-align: center;
}

.landing-section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  line-height: var(--lh-heading);
}

.landing-section__sub {
  margin: 10px auto 0;
  color: var(--muted);
  font-size: var(--text-base);
  max-width: 50ch;
  line-height: var(--lh-body);
}

/* Explainer cards (How it works) */
.explainer-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.explainer-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: left;
}

.explainer-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.explainer-card__icon--sky {
  background: var(--sky-soft);
  color: var(--sky);
}

.explainer-card__icon--coral {
  background: var(--coral-soft);
  color: var(--coral);
}

.explainer-card__icon--mint {
  background: var(--mint-soft);
  color: var(--mint);
}

.explainer-card__title {
  margin: 0 0 6px;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.explainer-card__text {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.5;
}

/* Feature list (Easy to use) */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}

.feature-item__check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  color: var(--mint);
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-item__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.feature-item__body strong {
  font-size: var(--text-sm-plus);
  font-weight: 700;
  color: var(--ink);
}

.feature-item__body span {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.5;
}

/* Security card */
.security-card {
  background: linear-gradient(135deg, rgba(224, 122, 95, 0.08), rgba(242, 204, 143, 0.12), rgba(129, 178, 154, 0.08));
  border: 1px solid #d4cfc7;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
}

.security-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(242, 204, 143, 0.24);
  color: var(--lavender);
  margin: 0 auto 16px;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
  text-align: left;
}

.security-point {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
}

.security-point strong {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink);
}

.security-point span {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.5;
}

/* Bottom CTA */
.landing__bottom-cta {
  margin-top: 48px;
  text-align: center;
}

/* ──────────────────────────────────────
   8. Wizard Card (shared wrapper for steps 2-5)
   ────────────────────────────────────── */
.wizard-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.wizard-card--center {
  text-align: center;
}

.wizard-card__header {
  margin-bottom: 28px;
}

.wizard-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  line-height: var(--lh-heading);
}

.wizard-card__sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: var(--lh-body);
}

/* Onboarding surfaces: keep the same warm card language as the landing page */
.step[data-step="oauth"] .wizard-card,
.step[data-step="telegram"] .wizard-card,
.step[data-step="telegram-send"] .wizard-card,
.step[data-step="lobby"] .wizard-card,
.step[data-step="ready"] .wizard-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.step[data-step="oauth"] .wizard-card::before,
.step[data-step="telegram"] .wizard-card::before,
.step[data-step="telegram-send"] .wizard-card::before,
.step[data-step="lobby"] .wizard-card::before,
.step[data-step="ready"] .wizard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--coral), var(--sunshine), var(--sky));
}

/* ──────────────────────────────────────
   9. Payment / Pricing
   ────────────────────────────────────── */
.pricing-card {
  background: var(--paper);
  border: 2px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pricing-card__badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: white;
  background: linear-gradient(120deg, var(--coral), var(--sky));
  margin-bottom: 16px;
}

.pricing-card__amount {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  margin-bottom: 4px;
}

.pricing-card__currency {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-top: 8px;
  color: var(--muted);
}

.pricing-card__number {
  font-family: var(--font-display);
  font-size: var(--text-display-2xl);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pricing-card__period {
  font-size: var(--text-title-xs);
  font-weight: 600;
  color: var(--muted);
  align-self: flex-end;
  margin-bottom: 8px;
}

.pricing-card__note {
  margin: 0 0 20px;
  font-size: var(--text-sm);
  color: var(--muted);
}

.pricing-card__fineprint {
  margin: 14px 0 0;
  font-size: var(--text-2xs);
  color: var(--muted);
}

.pricing-card__features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.pricing-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm-plus);
  color: var(--ink);
}

.pricing-card__features li::before {
  content: "\2713";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--mint-soft);
  color: var(--mint);
  flex-shrink: 0;
}

.checkout-checklist {
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-sm);
}

.checkout-checklist__title {
  margin: 0 0 10px;
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: var(--lh-heading);
}

.checkout-checklist__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-checklist__item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: var(--text-sm-plus);
}

.checkout-checklist__box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(26, 26, 26, 0.32);
  background: rgba(255, 255, 255, 0.9);
  color: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.checkout-checklist__box::before {
  content: "\2713";
  font-size: var(--text-2xs);
  font-weight: 800;
  line-height: 1;
}

.checkout-checklist__box:hover,
.checkout-checklist__box:focus-visible {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-soft);
  outline: none;
}

.checkout-checklist__item.is-checked .checkout-checklist__box {
  border-color: var(--mint);
  background: var(--mint-soft);
  color: var(--mint);
}

.checkout-checklist__link {
  color: var(--coral);
  text-decoration: none;
}

.checkout-checklist__link:hover,
.checkout-checklist__link:focus-visible {
  color: var(--sky);
}

.checkout-checklist__hint {
  margin: 10px 0 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}

[data-checkout-gated][hidden] {
  display: none !important;
}

/* Stripe embed wrapper (optional; only shown if configured) */
.pricing-embed__note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.checkout-embedded__mount {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 520px;
}

/* ──────────────────────────────────────
   10. API Key Flow
   ────────────────────────────────────── */
.api-key-flow {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.claude-question {
  border: 0;
  padding: 0;
  margin: 0;
}

.claude-question__legend {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.claude-panel[data-visible-when="yes"] .instruction + .instruction {
  margin-top: 16px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice-grid--tall .choice-card__ui {
  min-height: 320px;
  cursor: default;
}

.choice-card__ui--static {
  cursor: default;
}

.choice-card__ui--static:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.choice-card {
  display: block;
  position: relative;
}

.choice-card__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  inset: 0 auto auto 0;
}

.choice-card__ui {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px;
  min-height: 74px;
  border-radius: 18px;
  border: 1px solid rgba(26, 26, 26, 0.18);
  background: linear-gradient(180deg, rgba(250, 247, 242, 0.95), rgba(242, 204, 143, 0.12));
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.choice-card__title {
  font-size: var(--text-sm-plus);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.choice-card__desc {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.35;
}

.choice-card__input:focus-visible + .choice-card__ui {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px var(--sky-soft), 0 10px 24px rgba(0, 0, 0, 0.08);
}

.choice-card__input:checked + .choice-card__ui {
  border-color: rgba(129, 178, 154, 0.72);
  box-shadow: 0 0 0 4px var(--sky-soft), 0 10px 24px rgba(109, 158, 135, 0.2);
  background: linear-gradient(180deg, rgba(129, 178, 154, 0.16), rgba(255, 255, 255, 0.95));
}

.choice-card__ui:hover {
  transform: translateY(-1px);
  border-color: rgba(224, 122, 95, 0.42);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(224, 122, 95, 0.1));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.claude-panel {
  display: none;
}

.claude-gate[data-claude-max="yes"] .claude-panel[data-visible-when="yes"],
.claude-gate[data-claude-max="no"] .claude-panel[data-visible-when="no"] {
  display: block;
}

.callout {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  padding: 18px 18px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-sm);
}

.callout--sunshine {
  background: linear-gradient(180deg, rgba(255, 203, 71, 0.18), rgba(255, 255, 255, 0.72));
  border-color: rgba(255, 203, 71, 0.35);
}

.callout__title {
  font-family: var(--font-display);
  font-weight: 850;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  font-size: var(--text-md);
}

.callout__text {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.callout__fineprint {
  margin: 10px 0 0;
  font-size: var(--text-2xs);
  color: var(--muted);
}

.instruction {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step[data-step="oauth"] .instruction,
.step[data-step="telegram"] .instruction,
.step[data-step="telegram-send"] .instruction {
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px;
}

.wizard-card .instruction + .instruction {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--stroke);
}

.step[data-step="oauth"] .wizard-card .instruction + .instruction,
.step[data-step="telegram"] .wizard-card .instruction + .instruction,
.step[data-step="telegram-send"] .wizard-card .instruction + .instruction {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--stroke);
}

.instruction__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--text-sm-plus);
  font-weight: 800;
  background: var(--sky-soft);
  color: var(--sky);
  flex-shrink: 0;
}

.instruction__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.instruction__text {
  margin: 0;
  font-size: var(--text-base);
  color: var(--ink);
  line-height: var(--lh-body);
}

.instruction__hint {
  margin: -2px 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.45;
}

.step[data-step="telegram"] [data-action="telegram-copied-token"] {
  margin-top: 12px;
}

.instruction__text--pending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.step[data-step="telegram-send"] .instruction__text--pending {
  margin-top: 8px;
  justify-content: flex-start;
}

.instruction__pending-loader {
  --pending-loader-scale: 0.62;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin-left: 2px;
  flex-shrink: 0;
}

.instruction__pending-loader .loader-inner {
  display: inline-flex;
  transform: scale(var(--pending-loader-scale));
  transform-origin: center center;
}

.step[data-step="telegram-send"] .instruction__pending-loader {
  --pending-loader-scale: 0.92;
  min-height: 30px;
}

.step[data-step="telegram-send"] .instruction__pending-loader .loader-inner {
  transform-origin: left center;
}

.instruction__pending-loader .line-scale-pulse-out > span {
  background-color: var(--sky);
  width: 4px;
  height: 26px;
  margin: 0 1px;
  border-radius: 2px;
  display: inline-block;
  -webkit-animation: line-scale-pulse-out 0.9s -0.6s infinite cubic-bezier(0.85, 0.25, 0.37, 0.85);
  animation: line-scale-pulse-out 0.9s -0.6s infinite cubic-bezier(0.85, 0.25, 0.37, 0.85);
}

.instruction__pending-loader .line-scale-pulse-out > span:nth-child(1),
.instruction__pending-loader .line-scale-pulse-out > span:nth-child(5) {
  -webkit-animation-delay: -0.2s !important;
  animation-delay: -0.2s !important;
}

.instruction__pending-loader .line-scale-pulse-out > span:nth-child(2),
.instruction__pending-loader .line-scale-pulse-out > span:nth-child(4) {
  -webkit-animation-delay: -0.4s !important;
  animation-delay: -0.4s !important;
}

.claim-code {
  margin-top: 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
}

.claim-code[hidden] {
  display: none;
}

.claim-code__title {
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
}

.claim-code__code {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-title-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  user-select: all;
}

.claim-code__help {
  margin: 6px 0 0;
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.35;
}

.tg-instructions {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
}

.tg-instructions__list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  line-height: 1.45;
  font-size: var(--text-sm-plus);
}

/* Telegram screenshot */
.tg-shot {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tg-shot--plain {
  border: 1px solid var(--stroke);
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 10px;
}

.tg-shot__img {
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.tg-carousel {
  width: min(360px, 92vw);
  padding-bottom: 2rem;
}

.tg-carousel .splide__slide {
  display: flex;
  justify-content: center;
}

.tg-carousel .tg-shot__img {
  width: 100%;
  max-height: min(620px, 66vh);
  object-fit: contain;
  background: #000;
}

.tg-shot__note {
  width: 100%;
  min-height: min(620px, 66vh);
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--stroke);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--ink);
  font-size: var(--text-base);
  line-height: 1.45;
}

.tg-shot__note-text {
  margin: 0;
  padding-inline: 52px;
  font-weight: 700;
}

.tg-carousel .splide__arrows {
  pointer-events: none;
}

.tg-carousel .splide__arrow {
  pointer-events: auto;
  width: 38px;
  height: 38px;
  opacity: 1;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
}

.tg-carousel .splide__arrow--prev {
  left: -30px;
}

.tg-carousel .splide__arrow--next {
  right: -30px;
}

.tg-carousel .splide__arrow svg {
  fill: var(--ink);
}

.tg-carousel .splide__pagination {
  bottom: 0.2rem;
}

.tg-carousel .splide__pagination__page {
  width: 12px;
  height: 12px;
  margin: 0 6px;
  border-radius: 999px;
  opacity: 1;
  background: rgba(26, 26, 26, 0.22);
  transition: width 160ms ease, background-color 160ms ease;
}

.tg-carousel .splide__pagination__page.is-active {
  width: 22px;
  transform: none;
  background: var(--coral);
}

@media (max-width: 560px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────
   11. QR Code
   ────────────────────────────────────── */
.qr-container {
  margin: 8px auto 24px;
}

.qr-frame {
  --qr-padding: 12px;
  --qr-content-size: 228px;
  width: calc(var(--qr-content-size) + (var(--qr-padding) * 2));
  height: calc(var(--qr-content-size) + (var(--qr-padding) * 2));
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 3px solid var(--stroke);
  background: white;
  padding: var(--qr-padding);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.qr-frame__img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: contain;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.step[data-step="telegram"] .qr-frame,
.step[data-step="telegram-send"] .qr-frame {
  border: 2px solid var(--stroke);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  background: #fff;
  --qr-padding: 16px;
  --qr-content-size: 240px;
}

.step[data-step="telegram-send"] .qr-frame {
  --qr-padding: 8px;
}

.step[data-step="telegram"] .qr-frame--botfather {
  --qr-padding: 0;
  --qr-content-size: 300px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.step[data-step="telegram"] .qr-frame__img,
.step[data-step="telegram-send"] .qr-frame__img {
  border-radius: 10px;
}

.step[data-step="telegram"] .qr-frame--botfather .qr-frame__img {
  border-radius: 0;
}

.step[data-step="telegram-send"] .qr-frame--bare {
  --qr-padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.step[data-step="telegram-send"] .qr-frame--bare .qr-frame__img {
  border-radius: 0;
}

.step[data-step="telegram-send"] .qr-frame--bare .qr-frame__loading {
  border-radius: 0;
}

.qr-frame__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: white;
  border-radius: inherit;
  font-size: var(--text-sm);
  color: var(--muted);
}

.qr-frame__loading[hidden] {
  display: none;
}

.qr-help {
  margin-top: 4px;
  font-size: var(--text-sm-plus);
  color: var(--muted);
}

.qr-help p {
  margin: 0 0 12px;
}

.qr-help__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--text-xs);
}

/* Telegram open box (QR vs button) */
.tg-openbox {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  padding: 14px 14px;
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  gap: 12px;
  align-items: stretch;
}

.tg-openbox--plain {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}

.tg-openbox--single {
  grid-template-columns: 1fr;
}

.tg-openbox__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}

.tg-openbox__col--cta {
  justify-content: flex-start;
}

.tg-bot-cta {
  margin-top: 8px;
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Ready screen: show the QR without nested "boxes"; keep it in the same card as the text. */
.step[data-step="ready"] .tg-bot-cta {
  margin-top: 0;
  max-width: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.step[data-step="ready"] .tg-bot-cta__col {
  width: auto;
}

.step[data-step="ready"] .qr-frame {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  width: var(--qr-content-size);
  height: var(--qr-content-size);
}

.tg-bot-cta__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.tg-bot-cta__title {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--ink);
  text-align: center;
}


.tg-openbox__title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tg-openbox__sub {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.35;
}

.tg-openbox__divider {
  position: relative;
  display: grid;
  place-items: center;
}

.tg-openbox__divider::before {
  content: "";
  position: absolute;
  inset: 8px 50% 8px 50%;
  width: 1px;
  background: var(--stroke);
}

.tg-openbox__divider span {
  font-size: var(--text-2xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 8px;
}

.tg-openbox__fineprint {
  font-size: var(--text-2xs);
  color: var(--muted);
}

@media (max-width: 560px) {
  .tg-openbox {
    grid-template-columns: 1fr;
  }
  .tg-openbox__divider {
    height: 28px;
  }
  .tg-openbox__divider::before {
    inset: 50% 8px 50% 8px;
    width: auto;
    height: 1px;
  }
}

/* ──────────────────────────────────────
   12. Lobby
   ────────────────────────────────────── */
.lobby__loading,
.lobby__error {
  display: none;
}

.lobby[data-lobby-state="loading"] .lobby__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 22px 18px;
}

.lobby[data-lobby-state="error"] .lobby__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(224, 122, 95, 0.28);
  border-radius: 18px;
  background: rgba(224, 122, 95, 0.08);
  padding: 20px 18px;
}

.ready-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative; /* anchors the confetti burst */
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 20px 18px;
}

.ready-screen__pending,
.ready-screen__success,
.ready-screen__error {
  width: 100%;
  display: none;
}

.ready-screen[data-ready-state="pending"] .ready-screen__pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
}

.ready-screen__pending-text {
  margin: 0;
}

.ready-screen[data-ready-state="success"] .ready-screen__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ready-screen[data-ready-state="error"] .ready-screen__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.ready-screen .wizard-card__title {
  font-weight: 700;
}

.ready-screen .wizard-card__title strong {
  font-weight: 900;
}

.lobby__progress-bar {
  width: 100%;
  max-width: 320px;
  height: 8px;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.08);
  overflow: hidden;
  margin-top: 8px;
}

.lobby__progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--coral), var(--sky), var(--mint));
  background-size: 200% 100%;
  animation: shimmer 2s ease infinite;
  transition: width 600ms ease;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Success celebration */
.success-mascot {
  margin: -6px 0 4px;
}

.lobby__bot-name {
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: var(--text-title-sm);
  line-height: 1.1;
  text-align: center;
  color: var(--ink);
  margin-top: -6px;
}

.lobby__ready {
  margin-top: -6px;
}

.success-mascot__img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(129, 178, 154, 0.2));
}

/* ──────────────────────────────────────
   13. Shared Components
   ────────────────────────────────────── */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
  cursor: pointer;
  user-select: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, opacity 150ms ease;
  position: relative;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Anchor buttons can't be disabled; use aria-disabled for link-as-button UX. */
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.btn.is-loading {
  /* Keep layout stable; spinner is inline next to text. */
  cursor: not-allowed;
}

.btn.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 26, 26, 0.18);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  opacity: 0.9;
  flex: 0 0 auto;
  margin-right: 10px;
}

.btn--primary.is-loading::before {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

.btn--primary {
  color: white;
  background: var(--coral);
  box-shadow: 0 10px 30px rgba(224, 122, 95, 0.28);
}

.btn--primary:hover:not(:disabled) {
  background: #c96b52;
  box-shadow: 0 12px 34px rgba(224, 122, 95, 0.32);
  transform: translateY(-1px);
}

.btn--secondary {
  color: var(--coral);
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid rgba(224, 122, 95, 0.45);
  box-shadow: 0 8px 20px rgba(224, 122, 95, 0.12);
}

.btn--secondary:hover:not(:disabled) {
  background: #fff;
  border-color: var(--coral);
  color: #c96b52;
  box-shadow: 0 10px 24px rgba(224, 122, 95, 0.18);
}

.btn--oauth-open {
  color: #fff;
  background: var(--coral);
  border: 0;
  box-shadow: 0 10px 30px rgba(224, 122, 95, 0.28);
}

.btn--oauth-open:hover:not(:disabled) {
  color: #fff;
  background: #c96b52;
  box-shadow: 0 12px 34px rgba(224, 122, 95, 0.32);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--stroke);
  color: var(--ink);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.85);
}

.btn--sm {
  padding: 8px 14px;
  font-size: var(--text-xs);
}

.btn--jumbo {
  padding: 18px 40px;
  font-size: var(--text-md);
  margin-top: 32px;
}

.btn--full {
  width: 100%;
}

/* Form inputs */
.field__input {
  width: 100%;
  border-radius: 16px;
  border: 2px solid var(--stroke);
  background: var(--paper);
  padding: 14px 16px;
  font-size: var(--text-base);
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.field__input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px var(--sky-soft);
}

.field__textarea {
  resize: vertical;
  min-height: 80px;
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: var(--text-sm);
}

.field-hint {
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 12px;
  font-size: var(--text-xs);
  color: var(--muted);

  /* "Slide-down" hint. We avoid `[hidden]` so transitions can run. */
  max-height: 240px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 260ms ease,
    opacity 200ms ease,
    transform 200ms ease,
    margin-top 200ms ease,
    padding-top 200ms ease,
    padding-bottom 200ms ease,
    border-width 200ms ease;
}

.field-hint[aria-hidden="true"] {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  pointer-events: none;
}

.field-hint code {
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: var(--text-2xs);
}

.field-hint--error {
  border-color: rgba(224, 122, 95, 0.45);
  background: rgba(224, 122, 95, 0.1);
  color: var(--ink);
}

/* Make the input look "error" when submit-time validation fails. */
.field__input[aria-invalid="true"] {
  border-color: rgba(224, 122, 95, 0.72);
  box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.16);
}

/* Status messages */
.step-status {
  margin: 16px 0 0;
  font-size: var(--text-sm);
  font-weight: 500;
  min-height: 20px;
}

.step-status:empty {
  display: none;
}

.step-status.is-error {
  color: var(--coral);
}

.step-status.is-success {
  color: var(--mint);
}

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--stroke);
  border-top-color: var(--sky);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.spinner--lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

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

/* ──────────────────────────────────────
   14. Footer
   ────────────────────────────────────── */
.foot {
  padding: 0 20px;
}

.foot__inner {
  max-width: 920px;
  margin: 0 auto;
  border-top: 1px solid var(--stroke);
  padding: 20px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand--foot .brand__mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.brand--foot .brand__name {
  font-size: var(--text-sm-plus);
}

.foot__tag {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--muted);
}

/* ──────────────────────────────────────
   15. Responsive
   ────────────────────────────────────── */
@media (max-width: 640px) {
  .main {
    padding: 16px 16px 40px;
  }

  .jci-hero__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "visual"
      "subtitle"
      "cta";
    gap: 18px;
  }

  .jci-hero__title,
  .jci-hero__subtitle,
  .jci-hero__cta {
    max-width: none;
    text-align: center;
  }

  .jci-hero__cta {
    align-items: center;
  }

  .jci-hero__subtitle p {
    font-size: var(--text-base-plus);
  }

  .jci-contrast {
    margin-top: 32px;
    padding: 30px 18px;
    border-radius: 20px;
  }

  .jci-audience-grid,
  .jci-feature-grid {
    grid-template-columns: 1fr;
  }

  .wizard-card {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }

  .flow-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 0;
  }

  .flow-step:not(:last-child)::after {
    display: none;
  }

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

  .security-card {
    padding: 28px 20px;
  }

  .progress__label {
    display: none !important;
  }

  .progress__step + .progress__step::before {
    width: 16px;
  }

  .qr-frame {
    --qr-padding: 10px;
    --qr-content-size: 200px;
  }

  .step[data-step="telegram"] .qr-frame--botfather {
    --qr-padding: 0;
    --qr-content-size: 240px;
  }

  .instruction {
    gap: 12px;
  }

  .instruction__num {
    width: 30px;
    height: 30px;
    font-size: var(--text-xs);
  }
}

@media (max-width: 380px) {
  .jci-hero__heading {
    font-size: var(--text-hero-mobile);
  }

  .jci-contrast p {
    font-size: var(--text-title-sm-plus);
  }

  .btn--jumbo {
    padding: 16px 28px;
    font-size: var(--text-base);
  }
}

/* ──────────────────────────────────────
   16. Reduced Motion
   ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .step.is-active { animation: none; }
  .spinner { animation: spin 1.5s linear infinite; }
  .lobby__progress-fill { animation: none; }
}
