:root {
  --bg: #0a0a0a;
  --card-bg: #1c1c1e;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border: rgba(55, 65, 81, 0.5);
  --accent-from: #3b82f6;
  --accent-to: #9333ea;
  --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --card-hover-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html,
body {
  min-height: 100%;
}

html {
  background-color: var(--bg);
  color-scheme: dark;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 70% 50% at 50% -8%, rgba(59, 130, 246, 0.16), transparent 58%),
    radial-gradient(ellipse 40% 30% at 92% 88%, rgba(147, 51, 234, 0.14), transparent 55%),
    var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.stage {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2.75rem;
  padding: 4.5rem 1.25rem 3.5rem;
}

.brand {
  text-align: center;
  max-width: 28rem;
}

.mark-wrap {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.15rem;
}

.mark {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 0.7rem;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.lede {
  margin-top: 0.9rem;
  color: var(--text-secondary);
  font-size: 1.02rem;
  font-weight: 500;
}

.choices {
  width: min(440px, 100%);
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.choices svg {
  max-width: 24px;
  max-height: 24px;
}

.choices .tile-icon.telegram svg {
  max-width: 100%;
  max-height: 100%;
}

.tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  text-align: left;
  width: 100%;
  min-width: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(96, 165, 250, 0.35);
}

.tile:focus-visible,
.help-item:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}

.tile-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tile-icon.blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.tile-icon.purple { background: linear-gradient(135deg, #9333ea, #ec4899); }
.tile-icon.telegram {
  background: #2AABEE;
  padding: 0;
}
.tile-icon.telegram svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}
.tile-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.tile-icon.orange { background: linear-gradient(135deg, #f97316, #ef4444); }

.tile-icon svg,
.tile-arrow svg,
.help-ico svg {
  display: block;
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  flex: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
  flex: 1;
}

.tile-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tile-note {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.tile-arrow {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  opacity: 0.45;
  color: var(--text-secondary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.tile:hover .tile-arrow,
.tile:focus-visible .tile-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
  color: #60a5fa;
}

.secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  position: relative;
}

.tile-compact {
  min-height: 108px;
  padding: 1rem 0.95rem;
}

.tile-compact .tile-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
}

.tile-compact .tile-icon svg {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
}

.tile-compact .tile-title {
  font-size: 0.95rem;
}

.tile-compact .tile-note {
  font-size: 0.74rem;
}

.help {
  position: relative;
}

.help.is-open .help-toggle {
  border-color: rgba(96, 165, 250, 0.45);
}

@media (min-width: 521px) {
  .choices:has(.help.is-open) {
    padding-bottom: 13.5rem;
  }
}

.help-toggle {
  width: 100%;
}

.chevron {
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--text-secondary);
  border-bottom: 1.6px solid var(--text-secondary);
  transform: rotate(45deg);
  opacity: 0.7;
  transition: transform 0.25s ease;
}

.help.is-open .chevron {
  transform: translateY(3px) rotate(225deg);
}

.help-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: calc(200% + 0.85rem);
  z-index: 5;
  padding: 0.4rem;
  border-radius: 16px;
  background: #161618;
  border: 1px solid var(--border);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  transform-origin: top right;
  animation: unfold 0.28s ease;
}

.help-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 0.8rem;
  border-radius: 12px;
}

.help-item:hover,
.help-item:focus-visible {
  background: rgba(59, 130, 246, 0.12);
}

.help-item strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
}

.help-item small {
  display: block;
  margin-top: 0.12rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.help-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
  color: #60a5fa;
}

.help-ico.telegram {
  background: #2AABEE;
}

.help-ico.telegram svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.help-ico svg {
  width: 17px;
  height: 17px;
}

.foot {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--text-muted);
}

@keyframes unfold {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 980px) {
  .stage {
    width: min(980px, calc(100% - 4rem));
    margin-inline: auto;
    grid-template-columns: 1fr 440px;
    align-items: center;
    justify-items: stretch;
    gap: 4.5rem 3.5rem;
  }

  .brand {
    text-align: left;
    max-width: none;
  }

  .mark-wrap {
    margin-left: 0;
  }

  .foot {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .stage {
    padding-top: 3.2rem;
    align-content: start;
    gap: 2.1rem;
  }

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

  .help-menu {
    position: relative;
    top: 0.55rem;
    width: 100%;
    left: 0;
    right: 0;
  }

  .tile-compact {
    min-height: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
