body[data-page="grok-recharge"] {
  --grok-ink: #10131a;
  --grok-ink-soft: #252a34;
  --grok-blue: #356df3;
  --grok-blue-soft: #edf3ff;
  --grok-line: rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(circle at 9% 15%, rgba(255, 218, 226, 0.44), transparent 30%),
    radial-gradient(circle at 88% 9%, rgba(190, 218, 255, 0.68), transparent 31%),
    linear-gradient(135deg, #fbfbfd 0%, #f5f7fb 48%, #f7f9fc 100%);
  color: #10131a;
}

body[data-page="grok-recharge"]::before,
body[data-page="grok-recharge"]::after {
  opacity: 0.18;
  filter: blur(94px);
  animation-duration: 22s;
}

.grok-system {
  max-width: 900px;
}

.grok-header {
  margin-bottom: 22px;
}

.grok-header .page-header-content {
  display: flex;
  max-width: 780px;
  flex-direction: column;
  align-items: center;
}

.grok-header .product-switcher {
  order: 0;
  margin-bottom: 18px;
}

.grok-header .page-title {
  order: 1;
  margin: 0;
  color: #090b10;
  font-size: clamp(34px, 5vw, 43px);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.grok-header .page-overline {
  order: 2;
  margin-top: 6px;
  color: #6f7b8f;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: none;
}

.grok-trust-strip {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  max-width: calc(100vw - 42px);
  margin-top: 12px;
  padding: 6px 13px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 9px 22px rgba(15, 23, 42, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #657188;
  font-size: 11.8px;
  line-height: 1.2;
}

.grok-trust-strip > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.grok-trust-strip svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.grok-trust-strip > i {
  width: 3px;
  height: 3px;
  flex: 0 0 3px;
  border-radius: 50%;
  background: #aab4c3;
}

.grok-card {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 24px 56px rgba(15, 23, 42, 0.09),
    0 4px 12px rgba(15, 23, 42, 0.035),
    inset 0 1px 0 #ffffff;
}

.grok-card .embedded-progress {
  padding: 30px 30px 26px;
}

.grok-card .marker-circle {
  width: 36px;
  height: 36px;
  border-color: rgba(148, 163, 184, 0.34);
  background: #ffffff;
  color: #8792a5;
}

.grok-card .connector-line {
  left: calc(50% + 18px);
  width: calc(100% - 36px);
}

.grok-card .timeline-item.active .marker-circle {
  border-color: transparent;
  background: linear-gradient(145deg, #242832, #090b10);
  box-shadow: 0 9px 20px rgba(15, 23, 42, 0.18);
  animation: none;
}

.grok-card .timeline-item.active .connector-line {
  background: linear-gradient(90deg, #356df3 0 48%, #dfe5ee 72% 100%);
  animation: none;
}

.grok-card .timeline-item.completed .marker-circle {
  border-color: rgba(53, 109, 243, 0.42);
  background: #ffffff;
  color: transparent;
}

.grok-card .timeline-item.completed .marker-circle::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 1.8px solid #356df3;
  border-bottom: 1.8px solid #356df3;
  transform: translateY(-1px) rotate(-45deg);
}

.grok-card .timeline-item.completed .connector-line {
  background: #356df3;
}

.grok-card .timeline-item.active .label-text,
.grok-card .timeline-item.completed .label-text {
  color: #151922;
  font-weight: 700;
}

.grok-card .step-content {
  padding: 20px 24px 22px;
}

.grok-card .feedback-banner {
  margin-bottom: 20px;
  border-radius: 12px;
}

.grok-card .feedback-banner.warning {
  border-color: rgba(53, 109, 243, 0.16);
  background: linear-gradient(135deg, #fbfcff, #f4f7fe);
  box-shadow: inset 0 1px 0 #ffffff;
}

.grok-card .feedback-banner.warning .feedback-label::before {
  --live-dot-rgb: 53, 109, 243;
  background: #356df3;
  box-shadow: 0 0 0 4px rgba(53, 109, 243, 0.08);
  animation: none;
}

.grok-card .feedback-banner.warning .masked-code {
  background: #eaf1ff;
  color: #356df3;
}

.grok-card .feedback-banner.success {
  border-color: rgba(22, 163, 74, 0.18);
  background: linear-gradient(135deg, #f7fcf9, #f1faf6);
}

.grok-card .feedback-banner.error {
  border-color: rgba(220, 38, 38, 0.16);
  background: #fff8f8;
}

.grok-mono-input {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: -0.01em;
}

.grok-mono-input:focus {
  border-color: rgba(53, 109, 243, 0.62);
  box-shadow: 0 0 0 3px rgba(53, 109, 243, 0.09);
}

.grok-primary-button {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: linear-gradient(145deg, #252a34, #090b10);
  box-shadow:
    0 13px 26px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);
  font-weight: 720;
}

.grok-card #verifyButton:not(:disabled):not(.validating) {
  animation: none;
}

.grok-primary-button::after {
  content: none;
}

.grok-primary-button:hover {
  background: linear-gradient(145deg, #2d333e, #10131a);
  box-shadow:
    0 16px 30px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.grok-primary-button:disabled {
  border-color: transparent;
  background: #c9d0dc;
  box-shadow: none;
}

.grok-card .official-site-cta {
  color: #526ff3;
}

.grok-card .trust-note {
  color: #6d788b;
}

.grok-entitlement {
  margin-bottom: 20px;
}

.grok-entitlement__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid rgba(22, 163, 74, 0.17);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(247, 252, 249, 0.98), rgba(243, 250, 246, 0.94));
}

.grok-entitlement__check {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25a55b;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.grok-entitlement__head > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.grok-entitlement__head strong {
  color: #15803d;
  font-size: 15px;
}

.grok-entitlement__head small {
  color: #64748b;
  font-size: 12.5px;
}

.grok-plan-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 11px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #171a22;
  font-size: 11.5px;
  font-weight: 740;
}

.grok-entitlement__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
  border: 1px solid rgba(148, 163, 184, 0.23);
  border-radius: 9px;
  background: #fafbfc;
}

.grok-entitlement__facts > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 11px 16px;
}

.grok-entitlement__facts > div + div {
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.grok-entitlement__facts span {
  color: #738095;
  font-size: 11.5px;
  font-weight: 650;
}

.grok-entitlement__facts strong {
  color: #1a1f29;
  font-size: 13px;
  font-weight: 720;
}

.grok-account-field {
  margin-bottom: 18px;
}

.grok-account-help {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.grok-account-help .helper-text {
  margin-right: auto;
}

.grok-text-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  margin: 9px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #356df3;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
}

.grok-text-button:hover {
  color: #1d4ed8;
}

.grok-processing-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
  padding: 14px 15px;
  border: 1px solid rgba(53, 109, 243, 0.15);
  border-radius: 9px;
  background: #f7f9fe;
}

.grok-processing-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: #356df3;
  box-shadow: 0 0 0 5px rgba(53, 109, 243, 0.08);
}

.grok-processing-note > div {
  display: grid;
  gap: 3px;
}

.grok-processing-note strong {
  color: #1d2735;
  font-size: 13px;
}

.grok-processing-note span {
  color: #68768b;
  font-size: 12.5px;
  line-height: 1.55;
}

.grok-card .processing-card {
  border-radius: 10px;
  background: linear-gradient(135deg, #f8faff, #f2f6fd);
  border-color: rgba(53, 109, 243, 0.16);
}

.grok-card .processing-card::after {
  content: none;
}

.grok-card .processing-card .status-icon {
  border: 1px solid rgba(53, 109, 243, 0.14);
  background: #ffffff;
  color: #356df3;
}

.grok-card .success-card-state {
  border-color: rgba(22, 163, 74, 0.18);
  background: linear-gradient(135deg, #f2fbf5, #f7fcf9);
}

.grok-card .success-card-state .status-icon {
  border-color: rgba(22, 163, 74, 0.16);
  color: #16a34a;
}

.grok-card .status-card.error-state {
  border-color: rgba(220, 38, 38, 0.16);
  background: #fff8f8;
}

.grok-card .status-card.error-state .status-icon {
  border-color: rgba(220, 38, 38, 0.14);
  color: #dc2626;
}

.grok-receipt {
  border-color: rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.grok-step3-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.grok-step3-actions .helper-dock-link {
  width: 100%;
}

.grok-reset-button,
.grok-guide-button {
  font-family: inherit;
  cursor: pointer;
}

.grok-guide-button {
  color: #356df3;
  border-color: rgba(53, 109, 243, 0.16);
  background: rgba(255, 255, 255, 0.84);
}

.grok-guide-button:hover {
  color: #1d4ed8;
  background: #ffffff;
}

.grok-dialog {
  width: min(92vw, 520px);
  max-height: min(88vh, 720px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22);
}

.grok-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.grok-dialog__surface {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 22px;
}

.grok-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.grok-dialog__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #356df3;
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grok-dialog__eyebrow--warning {
  color: #b45309;
}

.grok-dialog__head h2 {
  margin: 0;
  color: #10131a;
  font-size: 20px;
  line-height: 1.3;
}

.grok-dialog__close {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 50%;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.grok-guide-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.grok-guide-steps li {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.21);
  border-radius: 9px;
  background: #fbfcfd;
}

.grok-guide-steps b {
  display: inline-flex;
  width: 27px;
  height: 27px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #10131a;
  color: #ffffff;
  font-size: 12px;
}

.grok-guide-steps span {
  padding-top: 2px;
  color: #4b586c;
  font-size: 13px;
  line-height: 1.6;
}

.grok-guide-safety {
  margin: -2px 0 0;
  padding: 11px 12px;
  border-left: 3px solid #22a35a;
  border-radius: 5px;
  background: #f3faf6;
  color: #376249;
  font-size: 12.5px;
  line-height: 1.55;
}

.grok-dialog__copy {
  margin: 0;
  color: #596579;
  font-size: 13.5px;
  line-height: 1.7;
}

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

.grok-dialog__actions > * {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 720;
  text-align: center;
  text-decoration: none;
}

.grok-dialog__secondary {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #ffffff;
  color: #334155;
}

.grok-dialog__primary {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, #252a34, #090b10);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.grok-dialog__primary:disabled {
  border-color: transparent;
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}

.grok-dialog__primary--warning {
  background: #9a3412;
}

.grok-confirm-summary {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 9px;
}

.grok-confirm-summary > * {
  min-width: 0;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.grok-confirm-summary > :nth-last-child(-n + 2) {
  border-bottom: 0;
}

.grok-confirm-summary span {
  background: #f8fafc;
  color: #738095;
  font-size: 12px;
  font-weight: 650;
}

.grok-confirm-summary strong {
  color: #172033;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.grok-confirm-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(53, 109, 243, 0.16);
  border-radius: 8px;
  background: #f6f9ff;
  color: #475569;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.55;
}

.grok-confirm-check input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #10131a;
}

.grok-confirm-check--warning {
  border-color: rgba(180, 83, 9, 0.18);
  background: #fffbeb;
  color: #7c4a15;
}

@media (max-width: 720px) {
  .grok-system {
    padding-top: 14px;
  }

  .grok-header .page-header-content {
    padding-top: 50px;
  }

  .grok-header .page-title {
    font-size: 31px;
  }

  .grok-card {
    border-radius: 16px;
  }

  .grok-card .embedded-progress {
    padding: 22px 14px 19px;
  }

  .grok-card .step-content {
    padding: 18px 16px 19px;
  }

  .grok-card .label-text {
    max-width: 92px;
    font-size: 11.5px;
  }

  .grok-trust-strip {
    gap: 8px;
    padding-inline: 10px;
  }

  .grok-trust-strip > span {
    gap: 4px;
    font-size: 10.8px;
  }

  .grok-entitlement__head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .grok-plan-pill {
    grid-column: 2;
    justify-self: flex-start;
  }
}

@media (max-width: 520px) {
  .grok-header .page-title {
    font-size: 29px;
    letter-spacing: -0.03em;
  }

  .grok-trust-strip {
    width: min(100%, 360px);
    flex-wrap: wrap;
    border-radius: 12px;
  }

  .grok-trust-strip > i {
    display: none;
  }

  .grok-trust-strip > span {
    flex: 1 1 30%;
    justify-content: center;
  }

  .grok-entitlement__facts {
    grid-template-columns: 1fr;
  }

  .grok-entitlement__facts > div + div {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    border-left: 0;
  }

  .grok-account-help {
    display: block;
  }

  .grok-text-button {
    margin-top: 6px;
  }

  .grok-step3-actions,
  .grok-dialog__actions {
    grid-template-columns: 1fr;
  }

  .grok-dialog__surface {
    padding: 18px;
  }

  .grok-confirm-summary {
    grid-template-columns: 1fr;
  }

  .grok-confirm-summary > * {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .grok-confirm-summary > :last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="grok-recharge"]::before,
  body[data-page="grok-recharge"]::after,
  .grok-card *,
  .grok-dialog * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
