:root {
  --green: #16A34A;
  --green-dark: #087A36;
  --green-deep: #05602A;
  --green-soft: #DCFCE7;
  --green-ultra-soft: #F0FDF4;
  --background: #F5FAF7;
  --white: #FFFFFF;
  --text: #17231C;
  --muted: #69766E;
  --line: rgba(23, 35, 28, 0.08);
  --shadow: 0 12px 32px rgba(5, 96, 42, 0.08);
  --radius: 28px;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(90% 48% at 86% -8%, rgba(34, 197, 94, 0.18), transparent 52%),
    radial-gradient(70% 42% at -8% 18%, rgba(5, 96, 42, 0.08), transparent 46%),
    var(--background);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: auto -40px 18% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.08);
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--green-dark);
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page {
  position: relative;
  z-index: 1;
  width: min(448px, 100%);
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 16px calc(28px + var(--safe-bottom));
  overflow-x: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(23, 35, 28, 0.04);
  backdrop-filter: blur(10px);
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.brand-mark svg {
  display: block;
  width: 42px;
  height: 42px;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--green-dark);
}

.brand-tag {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.hero {
  margin-top: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.title {
  width: 100%;
  max-width: 100%;
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
  animation: rise 0.45s ease both;
}

.lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 36ch;
  animation: rise 0.45s ease 0.05s both;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(220, 252, 231, 0.9);
}

.card-kicker {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

.calc {
  margin-top: 18px;
  padding: 18px 16px 16px;
  min-height: 572px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: rise 0.45s ease 0.1s both;
}

.field + .field {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.amount,
.term-value {
  margin-top: 6px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

.amount {
  font-size: clamp(26px, 8.2vw, 36px);
}

.term-value {
  font-size: clamp(24px, 7vw, 32px);
}

.slider-wrap {
  margin-top: 8px;
  padding: 8px 0;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 44px;
  background: transparent;
  cursor: pointer;
  touch-action: pan-x;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--green) var(--progress, 9%),
    var(--green-soft) var(--progress, 9%)
  );
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 34px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--green);
  box-shadow: 0 6px 14px rgba(5, 96, 42, 0.22);
}

input[type="range"]::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: var(--green-soft);
}

input[type="range"]::-moz-range-progress {
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

input[type="range"]::-moz-range-thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--green);
  box-shadow: 0 6px 14px rgba(5, 96, 42, 0.22);
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: clamp(11px, 3.2vw, 12px);
  font-weight: 600;
}

.slider-scale span:last-child {
  text-align: right;
  white-space: nowrap;
}

.terms-info {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--green-ultra-soft);
  border: 1px solid var(--green-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terms-info-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--green-deep);
}

.terms-info-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(180deg, #22C55E 0%, var(--green) 100%);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(8, 122, 54, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
}

.btn-check {
  margin-top: 14px;
}

.btn-ghost {
  background: var(--green-ultra-soft);
  color: var(--text);
  border: 1px solid var(--green-soft);
  margin-top: 18px;
  font-size: 15px;
}

.btn-telegram {
  margin-top: 10px;
}

.btn:disabled {
  opacity: 0.65;
  pointer-events: none;
}

.state-view {
  text-align: center;
  padding: 22px 4px;
  animation: rise 0.4s ease both;
}

.state-title {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 800;
}

.state-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.loader {
  width: 52px;
  height: 52px;
  margin: 8px auto 0;
  border-radius: 50%;
  border: 4px solid var(--green-soft);
  border-top-color: var(--green);
  animation: spin 0.75s linear infinite;
}

.app-code {
  margin-top: 8px;
  font-size: clamp(40px, 12vw, 52px);
  font-weight: 800;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--green-deep);
}

.section-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}

.process {
  margin-top: 20px;
  animation: rise 0.45s ease 0.16s both;
}

.process-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.process-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(220, 252, 231, 0.9);
}

.process-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.process-title {
  font-size: 13px;
  font-weight: 800;
}

.process-text {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 600;
}

.benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
  animation: rise 0.45s ease 0.2s both;
}

.benefit {
  background: var(--white);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 118px;
  box-shadow: 0 8px 20px rgba(23, 35, 28, 0.04);
  border: 1px solid rgba(220, 252, 231, 0.8);
}

.benefit-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--green-ultra-soft);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.benefit-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.benefit-text {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 600;
}

.footer {
  margin-top: 22px;
  padding: 16px 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.footer p + p {
  margin-top: 8px;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-weight: 700;
}

.legal-page .brand {
  margin-bottom: 18px;
}

.legal-page .title {
  max-width: none;
  font-size: clamp(22px, 6vw, 26px);
}

.legal-content {
  margin-top: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(220, 252, 231, 0.9);
  padding: 20px 18px;
}

.legal-content h2 {
  font-size: 16px;
  margin: 16px 0 8px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.legal-content p + p {
  margin-top: 10px;
}

.legal-content ul {
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  min-height: 44px;
  font-weight: 700;
  color: var(--text);
}

.back-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 8px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 359px) {
  .btn {
    font-size: 15px;
  }

  .benefits {
    grid-template-columns: 1fr;
  }

  .benefit {
    min-height: 0;
    flex-direction: row;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
