:root {
  --bg: #0e1116;
  --bg-elevated: #10151d;
  --surface: #151a22;
  --surface-soft: #1a212c;
  --surface-strong: #1f2733;
  --line: #253041;
  --line-strong: #314055;
  --text: #f4f7fb;
  --muted: #9aa7b8;
  --muted-strong: #c2cfdd;
  --accent: #4c8dff;
  --accent-hover: #6ea3ff;
  --accent-soft: rgba(76, 141, 255, 0.14);
  --cyan: #67d6ff;
  --success: #2ccb72;
  --warning: #f5b942;
  --error: #ff5d5d;
  --shadow-soft: 0 20px 48px rgba(0, 0, 0, 0.26);
  --shadow-glow: 0 0 0 1px rgba(103, 214, 255, 0.08), 0 18px 48px rgba(76, 141, 255, 0.14);
  --radius-card: 20px;
  --radius-field: 14px;
  --radius-button: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-height: 100vh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: var(--app-height);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(76, 141, 255, 0.16), transparent 28%),
    radial-gradient(circle at top left, rgba(103, 214, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #0e1116 0%, #0f141b 48%, #111722 100%);
  font-family: "Inter", "Segoe UI Variable", "SF Pro Text", "Helvetica Neue", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 92%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

code {
  display: inline-flex;
  max-width: 100%;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.87rem;
  word-break: break-all;
}

.page-shell {
  min-height: var(--app-height);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  gap: 0.95rem;
  padding: calc(0.9rem + var(--safe-top)) 1rem 0.95rem;
  background: rgba(14, 17, 22, 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.header-main,
.header-actions,
.top-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.header-main {
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  width: 56px;
  height: 56px;
  padding: 3px;
  flex: 0 0 auto;
  object-fit: contain;
  overflow: visible;
}

.brand-copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.brand-title {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.15;
}

.header-meta,
.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.header-chip,
.status-pill,
.pill,
.panel-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.38rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 600;
}

.header-chip-success,
.status-pill-success {
  background: rgba(44, 203, 114, 0.12);
  color: #8ef0b4;
  border-color: rgba(44, 203, 114, 0.24);
}

.status-pill-accent {
  background: rgba(76, 141, 255, 0.16);
  color: #bcd3ff;
  border-color: rgba(76, 141, 255, 0.28);
}

.top-nav {
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.page-content {
  width: min(100% - 1rem, 1180px);
  margin: 0 auto;
  padding: 1rem 0 calc(6.6rem + var(--safe-bottom));
}

.site-footer {
  width: min(100% - 1rem, 1180px);
  margin: 0 auto;
  padding: 0 0 calc(6.2rem + var(--safe-bottom));
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.1rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

.hero,
.section-block,
.page-intro,
.narrow {
  margin-bottom: 1rem;
}

.hero {
  display: grid;
  gap: 1rem;
}

.hero-copy-block,
.hero-panel,
.card,
.miniapp-status,
.miniapp-banner,
.flash,
.notice {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(21, 26, 34, 0.92), rgba(16, 21, 29, 0.95));
  box-shadow: var(--shadow-soft);
}

.hero-copy-block,
.hero-panel,
.card {
  padding: 1rem;
}

.hero-copy-block {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(103, 214, 255, 0.12), transparent 26%),
    radial-gradient(circle at bottom left, rgba(76, 141, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(21, 26, 34, 0.98), rgba(16, 21, 29, 0.98));
}

.hero-copy-block::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(76, 141, 255, 0.2), transparent 68%);
  pointer-events: none;
}

.hero h1,
.page-intro h1,
.narrow h1,
.section-heading h2 {
  margin: 0.32rem 0 0.8rem;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(2.1rem, 7vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.section-heading h2 {
  font-size: clamp(1.55rem, 5vw, 2.55rem);
  line-height: 1.04;
}

.hero-copy,
.page-intro p,
.card p,
.helper-text,
.text-link,
.clean-list,
.step-list,
.project-links span,
.price-caption,
.pricing-note {
  color: var(--muted);
}

.hero-copy {
  max-width: 50rem;
  font-size: clamp(1.02rem, 2.7vw, 1.18rem);
  line-height: 1.72;
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.hero-inline-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-inline-points span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 500;
}

.button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.9rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  background: linear-gradient(180deg, var(--accent), #3a79ea);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  box-shadow: 0 10px 24px rgba(76, 141, 255, 0.28);
}

.button:hover,
.button:focus-visible,
.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(180deg, var(--accent-hover), #518fff);
}

.button-small {
  min-height: 40px;
  padding: 0.62rem 0.88rem;
  font-size: 0.9rem;
}

.button-secondary {
  background: linear-gradient(180deg, rgba(103, 214, 255, 0.22), rgba(76, 141, 255, 0.18));
  border-color: rgba(103, 214, 255, 0.2);
  box-shadow: none;
}

.button-ghost,
.link-button {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.button-muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  box-shadow: none;
  cursor: default;
}

.button-danger {
  background: linear-gradient(180deg, #ff7e7e, var(--error));
  box-shadow: 0 10px 24px rgba(255, 93, 93, 0.24);
}

.miniapp-status,
.flash,
.notice {
  width: min(100% - 1rem, 1180px);
  margin: 0 auto 1rem;
  padding: 0.9rem 1rem;
}

.miniapp-status,
.flash-info,
.notice {
  background: linear-gradient(180deg, rgba(76, 141, 255, 0.13), rgba(76, 141, 255, 0.08));
}

.flash-success {
  background: linear-gradient(180deg, rgba(44, 203, 114, 0.16), rgba(44, 203, 114, 0.08));
}

.flash-error {
  background: linear-gradient(180deg, rgba(255, 93, 93, 0.18), rgba(255, 93, 93, 0.08));
}

.prelaunch-notice {
  margin-top: 1rem;
}

.project-card {
  display: grid;
  gap: 1rem;
}

.project-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-badge-grid,
.section-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-badge {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.project-badge strong,
.feature-card h3,
.faq-card h3,
.pricing-card h2,
.card h2,
.card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
}

.project-badge span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.project-links {
  display: grid;
  gap: 0.75rem;
}

.project-links div {
  display: grid;
  gap: 0.35rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-grid-4 {
  grid-template-columns: 1fr;
}

.feature-card,
.faq-card,
.pricing-card,
.status-card {
  display: grid;
  gap: 0.85rem;
}

.feature-card {
  background:
    linear-gradient(180deg, rgba(21, 26, 34, 0.95), rgba(17, 23, 30, 0.98));
}

.feature-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(103, 214, 255, 0.08);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 700;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.price {
  margin: 0;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.price-caption {
  margin: 0.35rem 0 0;
  font-size: 0.94rem;
}

.stack-form,
.stack-field,
.search-form {
  display: grid;
  gap: 0.8rem;
}

.auth-card {
  display: grid;
  gap: 1rem;
}

.auth-card-strong {
  background:
    radial-gradient(circle at top right, rgba(76, 141, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(21, 26, 34, 0.98), rgba(16, 21, 29, 0.98));
}

.auth-lead {
  margin: -0.15rem 0 0;
  line-height: 1.6;
}

.auth-provider-list {
  display: grid;
  gap: 0.75rem;
}

.auth-provider-list-compact {
  grid-template-columns: 1fr;
}

.auth-provider-button {
  width: 100%;
}

.auth-form {
  gap: 0.95rem;
}

.button-google {
  background: linear-gradient(180deg, #f6f8fb, #dfe7f5);
  color: #111722;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.button-google:hover,
.button-google:focus-visible {
  background: linear-gradient(180deg, #ffffff, #e7eef9);
  color: #111722;
}

.provider-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(17, 23, 34, 0.08);
  font-weight: 800;
}

.auth-divider {
  position: relative;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 0.75rem;
  background: linear-gradient(180deg, rgba(21, 26, 34, 0.92), rgba(16, 21, 29, 0.95));
}

.legal-checks {
  display: grid;
  gap: 0.75rem;
}

.legal-checkbox {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.legal-checkbox input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 0.1rem 0 0;
  accent-color: var(--accent);
}

.legal-checkbox span {
  color: var(--muted-strong);
  line-height: 1.5;
}

.auth-footnote {
  margin-top: -0.1rem;
}

.legal-card {
  gap: 1rem;
}

.legal-copy {
  display: grid;
  gap: 0.9rem;
}

.legal-copy h2 {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}

.legal-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

label span {
  display: block;
  margin-bottom: 0.38rem;
  color: var(--muted-strong);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 0.88rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-field);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(103, 214, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(76, 141, 255, 0.12);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.inline-form {
  display: inline-flex;
  align-items: center;
}

.data-list {
  display: grid;
  gap: 0.8rem;
}

.data-list div {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-list dt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.data-list dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

.text-link {
  color: #bcd3ff;
}

.clean-list,
.step-list {
  margin: 0;
  padding-left: 1.1rem;
}

.clean-list li,
.step-list li {
  margin-bottom: 0.65rem;
  line-height: 1.6;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.82rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-input {
  width: 96px;
  min-height: 40px;
  padding: 0.6rem 0.7rem;
}

.qr-preview {
  display: block;
  width: min(240px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: #f4f7fb;
}

.compact {
  margin-bottom: 0.8rem;
}

.narrow {
  width: min(100%, 680px);
  margin-left: auto;
  margin-right: auto;
}

.wide-on-mobile {
  width: min(100%, 820px);
}

.status-card-success {
  box-shadow: 0 20px 48px rgba(44, 203, 114, 0.12);
}

.status-card-error {
  box-shadow: 0 20px 48px rgba(255, 93, 93, 0.1);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.65rem 0.75rem calc(0.7rem + var(--safe-bottom));
  background: rgba(10, 13, 18, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 0.4rem;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.bottom-nav a.is-active {
  background: rgba(76, 141, 255, 0.14);
  color: var(--text);
}

.is-telegram-webapp {
  background: var(--tg-bg, linear-gradient(180deg, #0e1116 0%, #111722 100%));
  color: var(--tg-text, var(--text));
}

.is-telegram-webapp .button {
  background: var(--tg-button, linear-gradient(180deg, var(--accent), #3a79ea));
}

.platform-ios .site-header {
  padding-top: calc(1rem + var(--safe-top));
}

.platform-ios .bottom-nav,
.platform-android .bottom-nav {
  padding-bottom: calc(0.8rem + var(--safe-bottom));
}

@media (max-width: 820px) {
  .header-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    gap: 0.72rem;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
    padding: 2px;
  }

  .brand-title {
    font-size: 1.08rem;
  }

  .brand-subtitle {
    font-size: 0.84rem;
  }

  .header-meta,
  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-actions .button,
  .button-row .button,
  .stack-form .button,
  .stack-field .button,
  .search-form .button {
    width: 100%;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .table td {
    display: grid;
    grid-template-columns: minmax(96px, 112px) 1fr;
    gap: 0.75rem;
    border-bottom: 0;
    padding: 0.45rem 0;
  }

  .table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
}

@media (min-width: 821px) {
  .site-header {
    grid-template-columns: minmax(320px, 1.4fr) 1fr auto;
    align-items: center;
  }

  .top-nav {
    justify-content: center;
  }

  .page-content {
    padding-top: 1.35rem;
    padding-bottom: 3rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.95fr);
    align-items: stretch;
  }

  .section-grid-2,
  .dashboard-grid,
  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-list div {
    grid-template-columns: minmax(130px, 170px) 1fr;
    align-items: center;
  }

  .bottom-nav {
    display: none;
  }

  .site-footer {
    padding-bottom: 2rem;
  }
}

@media (min-width: 1080px) {
  .section-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .section-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
