:root {
  /* One focus ring, everywhere. */
  --ring-color: rgba(110, 162, 255, 0.9);
  --ring-width: 2px;
  --ring-offset: 3px;
  /* Motion. One curve for anything the user triggers: fast, then settling. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Ambient loops run out and back forever, so they stay symmetric. */
  --ease-loop: ease-in-out;
  /* Exits accelerate away instead of settling. */
  --ease-exit: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
  --page: #f2f5fa;
  --surface: #ffffff;
  --surface-subtle: #f7f9fc;
  --text: #111827;
  --muted: #667085;
  --border: #d8dee9;
  --border-strong: #c3cddd;
  --accent: #2563d9;
  --accent-hover: #1f54bd;
  --accent-soft: #eaf1ff;
  --danger: #c9363e;
  --success: #16835a;
  --shadow: 0 18px 48px rgba(22, 37, 65, 0.08);
  --enrollment-network-rgb: 54, 112, 207;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #080c14;
  --surface: #101620;
  --surface-subtle: #0c111a;
  --text: #f5f7fb;
  --muted: #9ba6b7;
  --border: #263142;
  --border-strong: #344258;
  --accent: #4a83e8;
  --accent-hover: #5d91ec;
  --accent-soft: #132441;
  --danger: #ff7d85;
  --success: #62c994;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  --enrollment-network-rgb: 91, 149, 238;
}

* {
  box-sizing: border-box;
}

.registration-honeypot {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  transition: background-color 240ms var(--ease), color 240ms var(--ease);
}

body.enrollment-page {
  position: relative;
  isolation: isolate;
}

.enrollment-network-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.98;
  transition: opacity 240ms var(--ease);
}

body.enrollment-page > .registration-header,
body.enrollment-page > main {
  position: relative;
  z-index: 1;
}

body.status-page {
  background: var(--page);
}

@media (max-width: 700px), (hover: none), (pointer: coarse) {
  .enrollment-network-canvas {
    opacity: 0.82;
  }
}

@media (prefers-reduced-motion: reduce) {
  .enrollment-network-canvas {
    opacity: 0.68;
    transition: none;
  }
}

a,
button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.registration-header {
  width: min(1180px, calc(100% - 64px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.registration-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}

.registration-brand strong {
  font-size: 22px;
  font-weight: 800;
}

.registration-brand span {
  font-size: 14px;
  color: var(--muted);
}

.registration-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.registration-back:hover {
  color: var(--text);
}

.status-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.status-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.status-language-switch a {
  min-width: 34px;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}

.status-language-switch a:hover {
  color: var(--text);
}

.status-language-switch a.is-active {
  background: var(--accent);
  color: #fff;
}

.registration-back svg,
.registration-security svg,
.registration-submit svg,
.success-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.registration-layout {
  width: min(760px, calc(100% - 64px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 46px 0 72px;
  display: grid;
  gap: 24px;
  align-content: start;
}

.registration-summary {
  padding: 0 4px;
}

.registration-progress {
  width: min(240px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.registration-progress span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.registration-progress i {
  position: relative;
  flex: 1;
  height: 1px;
  overflow: hidden;
  background: var(--border-strong);
}

.registration-progress i b {
  position: absolute;
  inset: 0 50% 0 0;
  background: var(--accent);
}

.registration-summary h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1.05;
  font-weight: 760;
}

.registration-intro {
  max-width: 690px;
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.selected-plan {
  position: relative;
  padding: 17px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(22, 37, 65, 0.05);
}

.selected-plan-copy > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.selected-plan h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.selected-plan p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.selected-plan p.selected-plan-format {
  color: var(--text);
  font-weight: 650;
}

.selected-plan-action {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.selected-plan-action strong {
  color: var(--text);
  font-size: 17px;
}

.selected-plan a {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.registration-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.registration-security svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.registration-form-panel {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.registration-form-panel form {
  display: grid;
  gap: 18px;
}

.registration-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 17px 16px;
}

.registration-telegram-field { grid-column: 1 / -1; }

.registration-course-language {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  border: 0;
}

.registration-course-language-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.registration-course-language legend {
  padding: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.registration-course-language-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: right;
}

.registration-language-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.registration-language-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.registration-language-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.registration-language-option span {
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 680;
  text-align: center;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.registration-language-option:hover span {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border-strong));
  background: var(--surface);
}

.registration-language-option input:checked + span {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 68%, var(--border));
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.registration-language-option input:focus-visible + span {
  outline: var(--ring-width) solid var(--ring-color);
  outline-offset: var(--ring-offset);
}

.registration-course-language.has-error .registration-language-option span {
  border-color: var(--danger);
}

.selected-plan p.selected-plan-language {
  width: fit-content;
  margin-top: 8px;
  padding: 4px 7px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-subtle);
  font-size: 10px;
  line-height: 1.3;
}

.selected-plan-language strong {
  color: var(--text);
  font-weight: 700;
}

.registration-form-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--border);
}

.registration-form-heading-plain {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
}

.registration-draft-status {
  display: block;
  max-width: 190px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}
.registration-draft-status.is-visible { opacity: 1; }

@media (max-width: 720px) {
  .registration-form-heading-plain { grid-template-columns: minmax(0, 1fr); }
  .registration-draft-status { max-width: none; text-align: left; }
}

.registration-form-heading > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.registration-form-heading h2,
.registration-form-heading p {
  margin: 0;
}

.registration-form-heading h2 {
  font-size: 18px;
  line-height: 1.25;
}

.registration-form-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.registration-completion-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.registration-optional {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.registration-optional summary {
  min-height: 48px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
  list-style: none;
}

.registration-optional summary::-webkit-details-marker {
  display: none;
}

.registration-optional summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.registration-optional summary svg {
  width: 17px;
  height: 17px;
  margin-left: auto;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms var(--ease);
}

.registration-optional[open] summary svg {
  transform: rotate(180deg);
}

.registration-message-field {
  min-width: 0;
}

.registration-optional-grid {
  padding: 2px 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 16px;
}

@media (max-width: 720px) {
  .registration-optional-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.registration-field {
  display: grid;
  gap: 8px;
}

.registration-field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 680;
}

.registration-field label small {
  margin-left: 5px;
  color: var(--muted);
  font-weight: 500;
}

.registration-field input,
.registration-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  outline: 0;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms var(--ease);
}

.registration-field.is-valid input,
.registration-field.is-valid textarea,
.telegram-input-wrap[data-state="success"] input {
  border-color: #2f9469;
  box-shadow: 0 0 0 1px color-mix(in srgb, #2f9469 22%, transparent);
}

.registration-field.is-invalid input,
.registration-field.is-invalid textarea,
.registration-field.has-error input,
.registration-field.has-error textarea,
.telegram-input-wrap[data-state="error"] input {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 20%, transparent);
}

.telegram-input-wrap {
  position: relative;
}

.telegram-input-wrap input {
  padding-right: 46px;
}

.telegram-check-mark {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 18px;
  height: 18px;
  display: none;
  border-radius: 50%;
  transform: translateY(-50%);
}

.telegram-input-wrap[data-state="checking"] .telegram-check-mark {
  display: block;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: telegram-check-spin 700ms linear infinite;
}

.telegram-input-wrap[data-state="success"] .telegram-check-mark {
  display: block;
  border: 1px solid color-mix(in srgb, #22875d 45%, var(--border));
  background: color-mix(in srgb, #22875d 12%, var(--surface));
}

.telegram-input-wrap[data-state="success"] .telegram-check-mark::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5px;
  height: 8px;
  border: solid #22875d;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.telegram-check-status {
  min-height: 17px;
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.telegram-check-status[data-state="success"] {
  color: #22875d;
}

.telegram-check-status[data-state="error"] {
  color: var(--danger);
}

.registration-telegram-help {
  margin-top: -3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

@keyframes telegram-check-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.registration-field textarea {
  min-height: 88px;
  resize: vertical;
}

.registration-field input::placeholder,
.registration-field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.registration-field input:focus,
.registration-field textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.registration-field.is-valid input:focus,
.registration-field.is-valid textarea:focus,
.telegram-input-wrap[data-state="success"] input:focus {
  border-color: #2f9469;
  box-shadow: 0 0 0 3px color-mix(in srgb, #2f9469 16%, transparent);
}

.registration-field.is-invalid input:focus,
.registration-field.is-invalid textarea:focus,
.registration-field.has-error input:focus,
.registration-field.has-error textarea:focus,
.telegram-input-wrap[data-state="error"] input:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent);
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

.form-error-summary {
  padding: 11px 13px;
  border-left: 3px solid var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}

.form-non-field-errors {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, #dc2626 34%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, #dc2626 7%, transparent);
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.45;
}

html[data-theme="dark"] .form-non-field-errors {
  color: #fca5a5;
}

.registration-finalize {
  padding: 15px 16px;
  display: grid;
  gap: 13px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.registration-captcha {
  display: grid;
  gap: 7px;
  margin: 0;
}

.registration-captcha > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.registration-captcha .cf-turnstile {
  min-height: 65px;
  max-width: 100%;
  overflow: visible;
}

.registration-captcha .cf-turnstile:empty {
  display: none;
}

.registration-captcha iframe {
  display: block;
  min-height: 65px;
  max-width: 100%;
  border: 0;
  outline: 0;
}

.registration-consent {
  display: grid;
  grid-template-columns: 19px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.55;
}

.registration-checkbox {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.consent-error {
  margin-top: -6px;
  margin-left: 29px;
}

.registration-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 2px;
  padding: 13px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
}

.registration-submit:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.registration-submit:hover svg {
  transform: translateX(3px);
}

.registration-submit:active {
  transform: translateY(1px);
}

.registration-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.registration-submit svg {
  transition: transform 180ms var(--ease);
}

:focus-visible {
  outline: var(--ring-width) solid var(--ring-color);
  outline-offset: var(--ring-offset);
}

.registration-success-page {
  background: var(--page);
}

.success-layout {
  width: min(560px, calc(100% - 40px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 72px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.success-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.success-mark svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.success-layout h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.08;
}

.success-layout > p {
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.success-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.success-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: status-pulse 1.1s var(--ease-loop) infinite alternate;
}

.success-button {
  max-width: 360px;
}

.success-layout small {
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
}

@keyframes status-pulse {
  to { opacity: 0.35; }
}

.flow-steps {
  width: 100%;
  margin: 8px 0 26px;
  display: grid;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.flow-step {
  min-height: 76px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.flow-step:last-child {
  border-bottom: 0;
}

.flow-step > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.flow-step.is-complete > span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.flow-step.is-rejected > span {
  border-color: var(--danger);
  color: var(--danger);
}

.flow-step div {
  display: grid;
  gap: 4px;
}

.flow-step strong {
  font-size: 14px;
}

.flow-step small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.success-actions {
  width: 100%;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.status-actions {
  width: min(360px, 100%);
  margin: 24px auto 0;
}

.telegram-request-form {
  width: 100%;
  display: grid;
  justify-items: center;
}

.telegram-code-layout {
  width: min(1040px, calc(100% - 64px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 68px 0 76px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 76px;
  align-items: center;
}

.telegram-code-eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telegram-code-intro h1 {
  margin: 14px 0 18px;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.04;
}

.telegram-code-intro > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.68;
}

.telegram-account {
  margin-top: 30px;
  padding-top: 20px;
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--border);
}

.telegram-account span {
  color: var(--muted);
  font-size: 12px;
}

.telegram-account strong {
  color: var(--text);
  font-size: 16px;
}

.telegram-code-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.telegram-code-steps {
  position: relative;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.telegram-code-step {
  position: relative;
  min-height: 132px;
  padding: 18px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: min-content 1fr;
  gap: 5px 12px;
  align-content: start;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.telegram-code-step-number {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.telegram-code-step-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.telegram-code-step-copy strong {
  font-size: 14px;
  line-height: 1.35;
}

.telegram-code-step-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.telegram-code-step .telegram-bot-button {
  grid-column: 1 / -1;
  align-self: end;
  min-height: 42px;
  margin-top: 11px;
  padding: 9px 12px;
}

.telegram-bot-button {
  min-height: 52px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.telegram-bot-button:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
}

.telegram-bot-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.telegram-code-state {
  min-height: 40px;
  margin: 16px 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 12px;
}

.telegram-code-state > span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.telegram-code-state.is-sent {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--accent);
}

.telegram-code-state.is-sent > span {
  background: var(--accent);
}

.telegram-code-form {
  display: grid;
  gap: 9px;
}

.telegram-code-form label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.telegram-code-input {
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 12px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  background: color-mix(in srgb, var(--surface-subtle) 84%, var(--surface));
  color: var(--text);
  font-size: 25px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: .32em;
  text-align: center;
  text-indent: .32em;
  font-variant-numeric: tabular-nums;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 72%, transparent),
    0 1px 2px color-mix(in srgb, var(--text) 4%, transparent);
  cursor: text;
  transition:
    border-color 160ms var(--ease),
    background-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.telegram-code-input::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  opacity: 1;
}

.telegram-code-input:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--border-strong));
}

.telegram-code-input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent),
    0 7px 20px color-mix(in srgb, var(--accent) 8%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 76%, transparent);
}

.telegram-code-help,
.telegram-code-error {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.telegram-code-help {
  color: var(--muted);
}

.telegram-code-error {
  color: var(--danger);
  font-weight: 650;
}

.secondary-button {
  min-height: 48px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.secondary-button:hover {
  border-color: var(--accent);
  background: var(--surface-subtle);
}

.payment-layout {
  width: min(940px, calc(100% - 64px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 44px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.payment-explainer h1,
.status-heading h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.06;
}

.payment-explainer > p,
.status-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.payment-explainer {
  max-width: 720px;
}

.payment-demo-notice {
  width: min(100%, 650px);
  margin-top: 22px;
  padding: 14px 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  border: 1px solid color-mix(in srgb, #d79a13 34%, var(--border));
  border-left: 3px solid #d79a13;
  border-radius: 6px;
  background: color-mix(in srgb, #f3b727 7%, var(--surface));
  color: var(--text);
}

.payment-approval-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, #2f9469 38%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, #2f9469 9%, var(--surface));
  color: color-mix(in srgb, #2f9469 82%, var(--text));
  font-size: 12px;
  line-height: 1.45;
}
.payment-approval-banner svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.payment-plan-included {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
  background: var(--surface-subtle);
}
.payment-plan-included span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}
.payment-plan-included p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.payment-after-note {
  margin: 10px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.payment-demo-notice strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.payment-demo-notice span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.payment-eyebrow,
.status-heading > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-security {
  margin-top: 30px;
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.payment-security svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
}

.click-mock {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.click-mock-head {
  min-height: 82px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.click-wordmark {
  color: #1769e0;
  font-size: 29px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.click-mock-head span {
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.payment-summary {
  margin: 0;
  padding: 8px 26px;
}

.payment-summary > div {
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

.payment-summary dt {
  color: var(--muted);
  font-size: 13px;
}

.payment-summary dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.payment-summary .payment-total dd {
  color: var(--accent);
  font-size: 20px;
}

.click-mock form {
  padding: 18px 26px 26px;
}

.click-mock {
  border-radius: 8px;
}

.click-mock-head {
  min-height: 66px;
  padding: 16px 24px;
}

.click-brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.click-wordmark {
  color: #0877dc;
  font-size: 27px;
}

.click-brand-lockup small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.click-mock-head span {
  padding: 6px 9px;
  border-color: color-mix(in srgb, #d79a13 34%, var(--border));
  border-radius: 4px;
  background: color-mix(in srgb, #f3b727 8%, var(--surface));
  color: color-mix(in srgb, #9a6500 78%, var(--text));
  letter-spacing: .04em;
}

.click-merchant-row {
  min-height: 78px;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.click-merchant-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.click-merchant-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.click-merchant-row small,
.click-payment-method small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.click-merchant-row strong,
.click-payment-method strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.click-order-reference {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.click-checkout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.click-checkout-section {
  min-width: 0;
  padding: 22px 24px 12px;
}

.click-checkout-section + .click-checkout-section {
  border-left: 1px solid var(--border);
}

.click-checkout-section h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.click-checkout-section .payment-summary {
  padding: 0;
}

.click-checkout-section .payment-summary > div {
  padding: 11px 0;
  display: grid;
  grid-template-columns: minmax(92px, .62fr) minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
}

.click-checkout-section .payment-summary > div:last-child {
  border-bottom: 0;
}

.click-checkout-section .payment-summary dt,
.click-checkout-section .payment-summary dd {
  font-size: 12px;
  line-height: 1.45;
}

.click-checkout-section .payment-summary dd {
  overflow-wrap: anywhere;
}

.click-payment-method {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.click-payment-method > div {
  display: grid;
  gap: 4px;
}

.click-payment-method-check {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #168a4b;
  color: #fff;
}

.click-payment-method-check svg,
.payment-success-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.payment-total {
  padding: 22px 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface-subtle);
}

.payment-total > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.payment-total > strong {
  color: var(--text);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.payment-total small {
  color: var(--muted);
  font-size: 11px;
}

.click-mock form {
  padding: 20px 24px 22px;
}

.payment-submit {
  position: relative;
}

.payment-submit-spinner {
  width: 17px;
  height: 17px;
  display: none;
  border: 2px solid rgba(255, 255, 255, .46);
  border-top-color: #fff;
  border-radius: 50%;
  animation: payment-spinner 700ms linear infinite;
}

.payment-submit.is-processing .payment-submit-spinner {
  display: block;
}

.payment-submit.is-processing > svg {
  display: none;
}

.payment-security {
  margin: 14px auto 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.payment-security svg {
  width: 15px;
  height: 15px;
}

.payment-success-notice {
  margin-bottom: 22px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, #168a4b 38%, var(--border));
  border-radius: 7px;
  background: color-mix(in srgb, #168a4b 7%, var(--surface));
}

.payment-success-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #168a4b;
  color: #fff;
}

.payment-success-notice div {
  display: grid;
  gap: 3px;
}

.payment-success-notice strong {
  font-size: 14px;
}

.payment-success-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

@keyframes payment-spinner {
  to { transform: rotate(360deg); }
}

.status-layout {
  width: min(900px, calc(100% - 64px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 64px 0 80px;
}

.status-heading {
  margin-bottom: 32px;
}

.status-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-primary {
  padding: 28px 30px;
  display: grid;
  gap: 7px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.status-primary small,
.status-details dt {
  color: var(--muted);
  font-size: 12px;
}

.status-primary strong {
  color: var(--accent);
  font-size: 28px;
}

.status-primary.status-successful strong {
  color: var(--success);
}

.status-primary.status-rejected strong {
  color: var(--danger);
}

.status-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-details > div {
  min-height: 108px;
  padding: 22px 28px;
  display: grid;
  align-content: start;
  gap: 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.status-details > div:nth-child(2n) {
  border-right: 0;
}

.status-details > .status-detail-payment {
  grid-column: 1 / -1;
  min-height: 96px;
  border-right: 0;
  border-bottom: 0;
  background: color-mix(in srgb, var(--surface-subtle) 62%, var(--surface));
}

.status-details-has-decision > .status-detail-payment {
  border-bottom: 1px solid var(--border);
}

.status-details > .status-detail-decision {
  border-bottom: 0;
}

.status-details > .status-detail-decision:nth-last-child(2) {
  border-right: 1px solid var(--border);
}

.status-details > .status-detail-decision:last-child {
  border-right: 0;
}

.status-details dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.55;
}

.flow-error-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));
  border-radius: 50%;
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
  font-size: 25px;
  font-weight: 800;
}

/* Shared enrollment flow */
.enrollment-layout {
  width: min(760px, calc(100% - 64px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 46px 0 72px;
  display: grid;
  gap: 24px;
  align-content: start;
}

.enrollment-stage-enter {
  will-change: opacity, transform, filter;
  animation: enrollment-stage-in-forward 460ms var(--ease) both;
}

html[data-enrollment-entry-direction="back"] .enrollment-stage-enter {
  animation-name: enrollment-stage-in-back;
}

html.enrollment-is-leaving[data-enrollment-direction="forward"] .enrollment-stage-enter {
  animation: enrollment-stage-out-forward 280ms var(--ease-exit) both;
  pointer-events: none;
}

html.enrollment-is-leaving[data-enrollment-direction="back"] .enrollment-stage-enter {
  animation: enrollment-stage-out-back 280ms var(--ease-exit) both;
  pointer-events: none;
}

.enrollment-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  margin: 0 4px 8px;
}

.enrollment-progress-track {
  position: absolute;
  z-index: 0;
  top: 14px;
  left: calc(12.5% + 16px);
  right: calc(12.5% + 16px);
  height: 8px;
  padding: 1px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border-strong) 62%, transparent);
  background: color-mix(in srgb, var(--page) 76%, var(--border) 24%);
  box-shadow:
    inset 0 1px 2px color-mix(in srgb, var(--text) 9%, transparent),
    0 1px 0 color-mix(in srgb, #fff 72%, transparent);
  animation: enrollment-track-in 420ms var(--ease) both;
}

.enrollment-progress-fill {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: color-mix(in srgb, var(--accent) 90%, #7db4ff 10%);
  box-shadow:
    0 0 8px color-mix(in srgb, var(--accent) 38%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 45%, transparent);
  transform-origin: left;
}

.enrollment-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
  transform: translateX(-130%);
  animation: enrollment-progress-sheen 1500ms var(--ease-exit) 420ms both;
}

.enrollment-progress-step-2 .enrollment-progress-fill {
  animation: enrollment-progress-third 560ms var(--ease) 80ms both;
}

.enrollment-progress-step-3 .enrollment-progress-fill {
  animation: enrollment-progress-two-thirds 600ms var(--ease) 80ms both;
}

.enrollment-progress-step-4 .enrollment-progress-fill {
  animation: enrollment-progress-full 640ms var(--ease) 80ms both;
}

.enrollment-progress-item {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.enrollment-progress-item > span:last-child {
  opacity: .72;
  transition: opacity 220ms var(--ease);
}

.enrollment-progress-dot {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--page);
  color: var(--muted);
  font-size: 13px;
  box-shadow:
    0 0 0 5px var(--page),
    0 2px 7px color-mix(in srgb, var(--text) 8%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 72%, transparent);
  transition: border-color 220ms var(--ease), background-color 220ms var(--ease), color 220ms var(--ease), box-shadow 220ms var(--ease), transform 220ms var(--ease);
}

.enrollment-progress-dot b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: inherit;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.enrollment-progress-dot svg {
  width: 16px;
  height: 16px;
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.enrollment-progress-item.is-active {
  color: var(--text);
}

.enrollment-progress-item.is-active > span:last-child {
  opacity: 1;
}

.enrollment-progress-item.is-active .enrollment-progress-dot {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow:
    0 0 0 5px var(--page),
    0 0 0 8px color-mix(in srgb, var(--accent) 10%, transparent),
    0 5px 14px color-mix(in srgb, var(--accent) 16%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 76%, transparent);
  animation: enrollment-dot-arrive 520ms var(--ease) 180ms both;
}

.enrollment-progress-item.is-complete .enrollment-progress-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow:
    0 0 0 5px var(--page),
    0 4px 12px color-mix(in srgb, var(--accent) 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .32);
}

.enrollment-progress-item.is-complete .enrollment-progress-dot b {
  display: none;
}

.enrollment-progress-item.is-complete .enrollment-progress-dot svg {
  display: block;
  animation: enrollment-check-in 260ms var(--ease) 340ms both;
}

.enrollment-progress-item.is-transition-complete .enrollment-progress-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow:
    0 0 0 5px var(--page),
    0 5px 16px color-mix(in srgb, var(--accent) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .34);
  transform: scale(.94);
}

.enrollment-progress-item.is-transition-complete .enrollment-progress-dot b {
  opacity: 0;
  transform: scale(.65);
  transition: opacity 120ms var(--ease), transform 160ms var(--ease);
}

.enrollment-progress-item.is-transition-complete .enrollment-progress-dot svg {
  display: block;
  animation: enrollment-check-in 220ms var(--ease) 70ms both;
}

.enrollment-progress-item.is-transition-target {
  color: var(--text);
  opacity: 1;
}

.enrollment-progress-item.is-transition-target .enrollment-progress-dot {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  transform: scale(1.06);
  box-shadow:
    0 0 0 5px var(--page),
    0 0 0 9px color-mix(in srgb, var(--accent) 12%, transparent),
    0 6px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

.enrollment-progress-item.is-transition-back .enrollment-progress-dot {
  transform: scale(.94);
  opacity: .72;
}

html[data-theme="dark"] .enrollment-progress-track {
  border-color: #314159;
  background: #151e2c;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, .46),
    0 1px 0 rgba(255, 255, 255, .035);
}

html[data-theme="dark"] .enrollment-progress-fill {
  background: #4f8df7;
  box-shadow:
    0 0 10px rgba(79, 141, 247, .34),
    inset 0 1px 0 rgba(255, 255, 255, .2);
}

html[data-theme="dark"] .enrollment-progress-fill::after {
  background: linear-gradient(90deg, transparent, rgba(209, 228, 255, .5), transparent);
}

html[data-theme="dark"] .enrollment-progress-item {
  color: #8d9aaf;
  opacity: 1;
}

html[data-theme="dark"] .enrollment-progress-dot {
  border-color: #35445a;
  background: #0d1420;
  color: #93a1b5;
  box-shadow:
    0 0 0 5px var(--page),
    0 3px 10px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .045);
}

html[data-theme="dark"] .enrollment-progress-item.is-active {
  color: #f1f5fb;
}

html[data-theme="dark"] .enrollment-progress-item.is-active .enrollment-progress-dot,
html[data-theme="dark"] .enrollment-progress-item.is-transition-target .enrollment-progress-dot {
  border-color: #5793fa;
  background: #122747;
  color: #78aaff;
  box-shadow:
    0 0 0 5px var(--page),
    0 0 0 8px rgba(79, 141, 247, .13),
    0 6px 18px rgba(41, 105, 218, .2),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .enrollment-progress-item.is-complete .enrollment-progress-dot,
html[data-theme="dark"] .enrollment-progress-item.is-transition-complete .enrollment-progress-dot {
  border-color: #5793fa;
  background: #3f7ee8;
  color: #ffffff;
  box-shadow:
    0 0 0 5px var(--page),
    0 5px 15px rgba(36, 101, 214, .24),
    inset 0 1px 0 rgba(255, 255, 255, .2);
}

html[data-theme="dark"] .registration-finalize {
  background: #0b111b;
  box-shadow: inset 0 0 0 1px rgba(53, 68, 90, .22);
}

html[data-theme="dark"] .registration-checkbox {
  color-scheme: dark;
}

html.enrollment-is-leaving[data-enrollment-direction="forward"] .enrollment-progress-step-1 .enrollment-progress-fill {
  animation: enrollment-progress-exit-third 280ms var(--ease) both;
}

html.enrollment-is-leaving[data-enrollment-direction="forward"] .enrollment-progress-step-2 .enrollment-progress-fill {
  animation: enrollment-progress-exit-two-thirds 280ms var(--ease) both;
}

html.enrollment-is-leaving[data-enrollment-direction="forward"] .enrollment-progress-step-3 .enrollment-progress-fill {
  animation: enrollment-progress-exit-full 280ms var(--ease) both;
}

.enrollment-heading {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 0 4px;
}

.status-page-heading {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.enrollment-heading-plain {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.enrollment-heading-plain h1 {
  margin-top: 0;
}

.status-page-heading h1 {
  margin-top: 0;
}

.enrollment-heading-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.enrollment-heading-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.enrollment-heading-mark.telegram-mark svg {
  width: 23px;
  height: 23px;
}

.enrollment-heading h1,
.enrollment-heading p {
  margin: 0;
}

.enrollment-heading h1 {
  margin-top: 4px;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.08;
}

.enrollment-heading p {
  max-width: 660px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.enrollment-eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.enrollment-selected-plan,
.telegram-account-plan {
  box-shadow: 0 10px 30px rgba(22, 37, 65, .05);
}

.enrollment-panel {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.enrollment-next-step {
  margin-top: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.enrollment-next-step > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.enrollment-next-step.is-current > span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.enrollment-next-step div {
  display: grid;
  gap: 3px;
}

.enrollment-next-step strong {
  font-size: 13px;
}

.enrollment-next-step small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.enrollment-panel .success-actions {
  margin-top: 18px;
}

.enrollment-panel .success-button,
.enrollment-panel .telegram-request-form,
.enrollment-panel .secondary-button {
  width: 100%;
  max-width: none;
}

.enrollment-security {
  max-width: 620px;
  justify-self: center;
  text-align: center;
}

.enrollment-layout .telegram-code-card {
  padding: 30px;
}

.enrollment-layout .telegram-code-steps {
  margin: 0 0 18px;
}

.enrollment-layout .telegram-bot-button {
  border-radius: 8px;
}

.enrollment-layout .telegram-code-form {
  margin-top: 18px;
}

.enrollment-layout .status-card {
  padding: 0;
}

.enrollment-layout .status-actions {
  width: auto;
  margin: 0;
  padding: 20px 28px 26px;
}

.enrollment-layout.payment-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.enrollment-layout.payment-layout .enrollment-progress {
  grid-column: 1 / -1;
}

@keyframes enrollment-progress-third {
  from { width: 0; }
  to { width: 33.333%; }
}

@keyframes enrollment-progress-two-thirds {
  from { width: 33.333%; }
  to { width: 66.666%; }
}

@keyframes enrollment-progress-full {
  from { width: 66.666%; }
  to { width: 100%; }
}

@keyframes enrollment-track-in {
  from { opacity: 0; transform: scaleX(.92); }
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes enrollment-progress-sheen {
  0% { transform: translateX(-130%); opacity: 0; }
  18% { opacity: .9; }
  100% { transform: translateX(390%); opacity: 0; }
}

@keyframes enrollment-dot-arrive {
  0% { transform: scale(.86); }
  58% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes enrollment-check-in {
  from { opacity: 0; transform: scale(.55) rotate(-12deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes enrollment-progress-exit-third {
  from { width: 0; }
  to { width: 33.333%; }
}

@keyframes enrollment-progress-exit-two-thirds {
  from { width: 33.333%; }
  to { width: 66.666%; }
}

@keyframes enrollment-progress-exit-full {
  from { width: 66.666%; }
  to { width: 100%; }
}

@keyframes enrollment-stage-in-forward {
  from { opacity: 0; filter: blur(2px); transform: translate3d(16px, 5px, 0); }
  to { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0); }
}

@keyframes enrollment-stage-in-back {
  from { opacity: 0; filter: blur(2px); transform: translate3d(-16px, 5px, 0); }
  to { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0); }
}

@keyframes enrollment-stage-out-forward {
  to { opacity: 0; filter: blur(1.5px); transform: translate3d(-13px, -2px, 0); }
}

@keyframes enrollment-stage-out-back {
  to { opacity: 0; filter: blur(1.5px); transform: translate3d(13px, -2px, 0); }
}

@media (max-width: 820px) {
  body {
    background: var(--page);
  }

  .registration-header {
    width: calc(100% - 36px);
    min-height: 72px;
  }

  .registration-layout {
    width: min(660px, calc(100% - 36px));
    min-height: auto;
    padding: 32px 0 52px;
    gap: 22px;
  }

  .registration-summary {
    padding-top: 0;
  }

  .registration-progress {
    margin-bottom: 22px;
  }

  .registration-summary h1 {
    font-size: 36px;
  }

  .registration-intro {
    margin: 15px 0 24px;
    font-size: 15px;
  }

  .registration-form-panel {
    padding: 26px;
  }

  .enrollment-layout {
    width: min(660px, calc(100% - 36px));
    min-height: auto;
    padding: 32px 0 52px;
    gap: 22px;
  }

  .payment-layout {
    width: min(600px, calc(100% - 36px));
    min-height: auto;
    padding: 42px 0 56px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .telegram-code-layout {
    width: min(600px, calc(100% - 36px));
    min-height: auto;
    padding: 42px 0 56px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .status-layout {
    width: min(660px, calc(100% - 36px));
    min-height: auto;
    padding: 42px 0 58px;
  }
}

@media (max-width: 520px) {
  .telegram-code-input {
    min-height: 58px;
    padding: 10px 16px;
    font-size: 22px;
    letter-spacing: .25em;
    text-indent: .25em;
  }

  .telegram-code-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .telegram-code-step {
    min-height: 0;
  }

  .registration-header {
    width: calc(100% - 28px);
  }

  .registration-brand strong {
    font-size: 18px;
  }

  .registration-brand span {
    font-size: 12px;
  }

  .registration-back {
    max-width: 56%;
    justify-content: flex-end;
    text-align: right;
    font-size: 12px;
  }

  .status-header-actions {
    gap: 10px;
  }

  .status-language-switch a {
    min-width: 29px;
    padding: 6px;
    font-size: 10px;
  }

  .status-page .registration-back {
    display: none;
  }

  .registration-layout {
    width: calc(100% - 28px);
    padding: 24px 0 38px;
    gap: 16px;
  }

  .registration-progress {
    margin-bottom: 24px;
  }

  .enrollment-layout {
    width: calc(100% - 28px);
    min-height: auto;
    padding: 24px 0 38px;
    gap: 16px;
  }

  .enrollment-progress {
    margin-inline: 0;
  }

  .enrollment-progress-item {
    gap: 6px;
    font-size: 9px;
  }

  .enrollment-progress-track {
    top: 12px;
    left: calc(12.5% + 14px);
    right: calc(12.5% + 14px);
    height: 7px;
  }

  .enrollment-progress-dot {
    width: 31px;
    height: 31px;
    font-size: 12px;
  }

  .enrollment-heading {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 0;
  }

  .status-page-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .enrollment-heading-mark {
    width: 40px;
    height: 40px;
  }

  .enrollment-heading-mark svg {
    width: 20px;
    height: 20px;
  }

  .enrollment-heading h1 {
    font-size: 28px;
  }

  .enrollment-heading p {
    margin-top: 8px;
    font-size: 13px;
  }

  .enrollment-panel,
  .enrollment-layout .telegram-code-card {
    padding: 18px;
  }

  .enrollment-layout .telegram-code-steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .enrollment-next-step {
    padding: 14px;
  }

  .enrollment-layout .status-details {
    grid-template-columns: 1fr;
  }

  .registration-summary h1 {
    font-size: 29px;
  }

  .registration-intro {
    margin-bottom: 18px;
    font-size: 14px;
  }

  .selected-plan {
    padding: 15px 16px;
    align-items: flex-start;
  }

  .selected-plan h2 {
    font-size: 16px;
  }

  .selected-plan-action strong {
    font-size: 15px;
  }

  .registration-form-panel {
    padding: 18px;
  }

  .registration-form-panel form {
    gap: 15px;
  }

  .registration-fields-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .registration-course-language-heading {
    display: grid;
    gap: 3px;
  }

  .registration-course-language-heading p {
    text-align: left;
  }

  .registration-form-heading {
    grid-template-columns: 31px minmax(0, 1fr);
    padding-bottom: 16px;
  }

  .registration-form-heading-plain {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .registration-form-heading > span {
    width: 31px;
    height: 31px;
  }

  .registration-form-heading h2 {
    font-size: 16px;
  }

  .registration-finalize {
    padding: 14px;
  }

  .registration-field input,
  .registration-field textarea {
    font-size: 16px;
  }

  .registration-submit {
    min-height: 52px;
    font-size: 14px;
  }

  .registration-security {
    align-items: flex-start;
    text-align: left;
  }

  .success-layout {
    width: calc(100% - 28px);
    min-height: calc(100vh - 72px);
    padding: 40px 0;
  }

  .flow-step {
    padding: 14px;
  }

  .payment-layout,
  .status-layout,
  .telegram-code-layout {
    width: calc(100% - 28px);
  }

  .telegram-code-layout {
    padding: 34px 0 44px;
    gap: 24px;
  }

  .telegram-code-intro h1 {
    font-size: 32px;
  }

  .telegram-code-intro > p {
    font-size: 14px;
  }

  .telegram-account {
    margin-top: 22px;
  }

  .telegram-code-card {
    padding: 20px;
  }

  .payment-explainer h1,
  .status-heading h1 {
    font-size: 31px;
  }

  .click-mock-head,
  .payment-summary,
  .click-mock form {
    padding-left: 20px;
    padding-right: 20px;
  }

  .payment-summary > div {
    display: grid;
    gap: 6px;
  }

  .payment-summary dd {
    text-align: left;
  }

  .payment-demo-notice {
    display: grid;
    gap: 4px;
  }

  .click-merchant-row {
    padding-inline: 18px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .click-order-reference {
    grid-column: 2;
  }

  .click-checkout-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .click-checkout-section {
    padding: 18px 18px 9px;
  }

  .click-checkout-section + .click-checkout-section {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .click-payment-method,
  .payment-total {
    padding-inline: 18px;
  }

  .payment-total {
    align-items: center;
  }

  .payment-total > strong {
    font-size: 23px;
  }

  .click-mock form {
    padding-inline: 18px;
  }

  .status-details {
    grid-template-columns: 1fr;
  }

  .status-details > div,
  .status-details > div:nth-child(2n),
  .status-details > div:nth-last-child(-n + 2) {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .status-details > div:last-child {
    border-bottom: 0;
  }
}

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

/* Final phone guardrails for the enrollment flow. The iconless heading must
   retain the full content width after the generic mobile grid rules run. */
@media (max-width: 520px) {
  .telegram-code-page .enrollment-heading.enrollment-heading-plain {
    display: block;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .telegram-code-page .enrollment-heading.enrollment-heading-plain > div,
  .telegram-code-page .enrollment-heading.enrollment-heading-plain h1,
  .telegram-code-page .enrollment-heading.enrollment-heading-plain p {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .telegram-code-page .enrollment-heading.enrollment-heading-plain h1 {
    font-size: clamp(28px, 9vw, 36px);
    line-height: 1.08;
    overflow-wrap: normal;
    word-break: normal;
  }

  .telegram-code-page .enrollment-heading.enrollment-heading-plain p {
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: break-word;
  }
}

/* Final phone layout: use content-box margins instead of viewport-width
   calculations so vertical scrollbars can never push cards off-screen. */
@media (max-width: 520px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
  }

  .registration-header {
    width: auto;
    min-height: 68px;
    margin-inline: 16px;
  }

  .registration-layout,
  .enrollment-layout,
  .payment-layout,
  .telegram-code-layout,
  .status-layout,
  .success-layout {
    width: auto;
    max-width: none;
    margin-inline: 16px;
  }

  .registration-layout,
  .enrollment-layout {
    padding: 22px 0 40px;
  }

  .registration-summary,
  .registration-form-panel,
  .enrollment-heading,
  .enrollment-panel,
  .selected-plan,
  .telegram-code-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .enrollment-progress {
    width: 100%;
    margin: 0 0 22px;
  }

  .enrollment-progress-track {
    left: calc(12.5% + 13px);
    right: calc(12.5% + 13px);
    height: 6px;
  }

  .enrollment-progress-dot {
    width: 30px;
    height: 30px;
    box-shadow:
      0 0 0 4px var(--page),
      0 2px 7px color-mix(in srgb, var(--text) 8%, transparent),
      inset 0 1px 0 color-mix(in srgb, #fff 66%, transparent);
  }

  .enrollment-progress-item.is-active .enrollment-progress-dot {
    box-shadow:
      0 0 0 4px var(--page),
      0 0 0 7px color-mix(in srgb, var(--accent) 9%, transparent),
      0 4px 12px color-mix(in srgb, var(--accent) 15%, transparent),
      inset 0 1px 0 color-mix(in srgb, #fff 70%, transparent);
  }

  .registration-summary {
    padding: 0;
  }

  .registration-summary h1 {
    font-size: clamp(28px, 8.4vw, 34px);
    line-height: 1.08;
  }

  .registration-intro {
    margin: 10px 0 16px;
    font-size: 13px;
    line-height: 1.5;
  }

  .selected-plan {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 15px;
    border-radius: 12px;
  }

  .selected-plan-copy,
  .selected-plan-action {
    min-width: 0;
  }

  .selected-plan h2 {
    font-size: 15px;
    overflow-wrap: break-word;
  }

  .selected-plan-action strong {
    font-size: 14px;
    white-space: nowrap;
  }

  .registration-form-panel,
  .enrollment-panel,
  .enrollment-layout .telegram-code-card {
    padding: 17px 15px;
    border-radius: 14px;
  }

  .registration-form-heading {
    padding-bottom: 15px;
  }

  .registration-fields-grid {
    gap: 13px;
  }

  .registration-finalize {
    min-width: 0;
    padding: 13px 12px;
    overflow: visible;
  }

  .registration-consent {
    align-items: flex-start;
    line-height: 1.45;
  }

  .registration-captcha,
  .registration-captcha > div,
  .registration-captcha iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .registration-submit {
    width: 100%;
  }

  .registration-security {
    padding-inline: 4px;
    font-size: 10.5px;
  }

  .telegram-code-page .enrollment-heading.enrollment-heading-plain h1 {
    font-size: clamp(29px, 9vw, 35px);
  }

  .telegram-code-steps {
    gap: 10px;
  }

  .telegram-code-step {
    padding: 14px 12px;
    border-radius: 11px;
  }

  .telegram-code-step-number {
    width: 30px;
    height: 30px;
  }

  .telegram-code-step-copy strong {
    font-size: 13px;
  }

  .telegram-code-step-copy small {
    font-size: 10.5px;
    line-height: 1.4;
  }

  .telegram-code-input {
    min-height: 54px;
    font-size: 21px;
  }
}

@media (max-width: 340px) {
  .registration-captcha {
    height: 56px;
    overflow: visible;
  }

  .registration-captcha .cf-turnstile {
    width: 128% !important;
    max-width: none !important;
    transform: scale(.78);
    transform-origin: left top;
  }
}
