:root {
  color-scheme: dark;
  --bg: #0a1422;
  --bg-deep: #07111e;
  --panel: #111f34;
  --panel-2: #162842;
  --line: #22406a;
  --line-soft: rgba(72, 122, 190, 0.24);
  --ink: #e9f2ff;
  --muted: #8fa2bd;
  --accent: #4b94f4;
  --accent-2: #2862d2;
  --accent-soft: rgba(75, 148, 244, 0.14);
  --warn: #f4b45f;
  --danger: #ff716f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 20%, rgba(50, 105, 204, 0.22), transparent 34%),
    radial-gradient(circle at 22% 14%, rgba(60, 145, 255, 0.14), transparent 28%),
    var(--bg-deep);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(50, 91, 140, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50, 91, 140, 0.22) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, rgba(0, 0, 0, 0.72), transparent 96%);
}

.shell {
  min-height: 100vh;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 92px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 18, 31, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #61a9ff, #2356c8);
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(44, 112, 221, 0.42);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 750;
  white-space: nowrap;
}

.nav-link.active,
.nav-link:hover {
  border-color: var(--line);
  background: #1b2d49;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.service-note {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(22, 40, 66, 0.74);
  color: var(--muted);
  font-weight: 750;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #61a9ff;
  box-shadow: 0 0 0 6px rgba(75, 148, 244, 0.14);
}

.main {
  width: min(1810px, calc(100% - 72px));
  margin: 0 auto;
  padding: 42px 0 60px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(520px, 0.85fr) minmax(360px, 0.72fr);
  gap: clamp(28px, 4vw, 64px);
  min-height: 290px;
  margin-bottom: 30px;
  padding: clamp(26px, 3.6vw, 46px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 76% 45%, rgba(50, 113, 221, 0.34), transparent 32%),
    linear-gradient(135deg, #121f33, #162a48);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 760px;
  padding-top: 4px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 14px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(75, 148, 244, 0.18);
  color: #5ea0ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 700px;
  margin-bottom: 14px;
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.promo-cta {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 64px;
  align-items: center;
  gap: 18px;
  width: min(720px, 100%);
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid rgba(120, 184, 255, 0.62);
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 24%, rgba(98, 173, 255, 0.34), transparent 34%),
    linear-gradient(135deg, rgba(75, 148, 244, 0.3), rgba(17, 31, 52, 0.8)),
    rgba(13, 26, 44, 0.82);
  box-shadow:
    0 24px 58px rgba(31, 86, 183, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.promo-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-70%);
  pointer-events: none;
}

.promo-cta strong,
.promo-cta span {
  display: block;
}

.promo-copy {
  position: relative;
  z-index: 1;
}

.promo-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  margin-bottom: 8px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #9dccff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.promo-cta strong {
  margin-bottom: 4px;
  font-size: 20px;
  line-height: 1.25;
}

.promo-cta span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.promo-spark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7fbff, #82bdff);
  color: #255ad0;
  font-size: 30px;
  font-weight: 950;
  transform: rotate(-8deg);
  box-shadow: 0 18px 34px rgba(53, 135, 255, 0.28);
}

.promo-actions {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.primary-link,
.secondary-link,
.store-button,
.telegram-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 850;
}

.primary-link {
  background: linear-gradient(135deg, #5aa6ff, #255ad0);
  box-shadow: 0 20px 45px rgba(37, 90, 208, 0.36);
}

.secondary-link {
  border: 1px solid var(--line);
  background: rgba(17, 31, 52, 0.8);
}

.store-button {
  min-width: 230px;
  background: linear-gradient(135deg, #72b8ff, #2862d2);
  box-shadow: 0 18px 38px rgba(40, 98, 210, 0.34);
}

.telegram-button {
  min-width: 140px;
  border: 1px solid rgba(114, 184, 255, 0.42);
  background: rgba(10, 20, 34, 0.62);
}

.hero-art {
  position: relative;
  align-self: center;
  min-height: 360px;
}

.ghosts-image {
  position: absolute;
  top: 50%;
  right: 2%;
  width: min(100%, 620px);
  height: auto;
  object-fit: contain;
  object-position: center;
  transform: translateY(-50%);
  filter: drop-shadow(0 28px 48px rgba(75, 148, 244, 0.24));
}

.pager {
  position: absolute;
  right: 70px;
  bottom: 12px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(143, 162, 189, 0.3);
}

.pager.active + .pager {
  right: 92px;
}

.pager.active + .pager + .pager {
  right: 48px;
}

.pager.active {
  width: 34px;
  background: var(--accent);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin-bottom: 6px;
  font-size: 36px;
}

.section-head p,
.panel p,
.panel-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.view {
  display: none;
  gap: 20px;
}

.view.active {
  display: grid;
}

#view-product.active {
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17, 31, 52, 0.9);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-header h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.picker-panel {
  padding: clamp(22px, 3vw, 36px);
}

.picker-header {
  margin-bottom: 24px;
}

.picker-header h2 {
  margin: 12px 0 8px;
  font-size: clamp(30px, 4vw, 44px);
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: clamp(18px, 3vw, 34px);
}

.subscription-card {
  display: grid;
  gap: 18px;
  color: var(--ink);
  text-decoration: none;
}

.subscription-card:hover .subscription-art {
  transform: translateY(-3px);
  border-color: rgba(114, 184, 255, 0.7);
  box-shadow: 0 26px 58px rgba(37, 90, 208, 0.28);
}

.subscription-art {
  display: grid;
  place-items: center;
  min-height: clamp(190px, 22vw, 300px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 36px;
  background: #edf3fb;
  transition: 180ms ease;
}

.subscription-card strong,
.subscription-card small {
  display: block;
  padding-left: 2px;
}

.subscription-card strong {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1;
}

.subscription-card small {
  margin-top: -10px;
  color: var(--muted);
  font-size: 20px;
}

.brand-logo {
  display: block;
  width: clamp(82px, 8vw, 122px);
  height: clamp(82px, 8vw, 122px);
  background: #111827;
  mask: var(--logo) center / contain no-repeat;
  -webkit-mask: var(--logo) center / contain no-repeat;
}

.logo-chatgpt {
  --logo: url("/assets/openai-logo.svg");
}

.logo-claude {
  --logo: url("/assets/claude-logo.svg");
  background: #d97757;
}

.back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 38px;
  margin-bottom: 16px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #b9cff0;
  text-decoration: none;
  font-weight: 800;
}

.product-page-head {
  margin-bottom: 18px;
}

.product-page-head h2 {
  margin: 12px 0 6px;
  font-size: 32px;
}

.inline-instruction {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(75, 148, 244, 0.34);
  border-radius: 18px;
  background: rgba(9, 20, 34, 0.42);
}

.inline-instruction h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.inline-instruction ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: #d8e6fb;
  line-height: 1.45;
}

.inline-instruction li,
.modal-panel li {
  padding-left: 4px;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.instruction-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 132px;
  padding: 0 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #72b8ff, #2862d2);
  color: white;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(40, 98, 210, 0.26);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(9, 20, 34, 0.42);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.step span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(143, 162, 189, 0.14);
  color: var(--muted);
  font-size: 12px;
}

.step.active {
  border-color: rgba(75, 148, 244, 0.66);
  background: var(--accent-soft);
  color: var(--ink);
}

.step.active span {
  background: var(--accent);
  color: white;
}

.form-grid,
.stack-form {
  display: grid;
  gap: 16px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: #d8e6fb;
  font-size: 14px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0d1a2c;
  color: var(--ink);
  outline: none;
  padding: 14px 16px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #607592;
}

input:focus,
textarea:focus {
  border-color: rgba(89, 164, 255, 0.88);
  box-shadow: 0 0 0 4px rgba(75, 148, 244, 0.14);
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mode-button,
.ghost-button,
.primary-button {
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 850;
}

.mode-button {
  border: 1px solid var(--line);
  background: #0d1a2c;
  color: var(--muted);
}

.mode-button.active {
  border-color: rgba(75, 148, 244, 0.76);
  background: #1b3151;
  color: var(--ink);
}

.instruction-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.instruction-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(75, 148, 244, 0.34);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(75, 148, 244, 0.13), rgba(9, 20, 34, 0.58)),
    rgba(13, 26, 44, 0.72);
}

.instruction-card strong,
.instruction-card small {
  display: block;
}

.instruction-card strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 17px;
}

.instruction-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.instruction-button {
  width: 100%;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(75, 148, 244, 0.18);
  color: #86bfff;
  font-size: 12px;
  font-weight: 900;
}

.primary-button {
  padding: 0 20px;
  background: linear-gradient(135deg, #5aa6ff, #255ad0);
  color: white;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.ghost-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(17, 31, 52, 0.82);
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hidden {
  display: none;
}

.task-panel {
  align-self: start;
}

.empty-state,
.result-box,
.table-wrap {
  min-height: 64px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(9, 20, 34, 0.42);
  color: var(--muted);
}

.status-card {
  display: grid;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(75, 148, 244, 0.16);
  color: #79b4ff;
  font-size: 12px;
  font-weight: 900;
}

.badge.warn {
  background: rgba(244, 180, 95, 0.14);
  color: var(--warn);
}

.badge.danger {
  background: rgba(255, 113, 111, 0.14);
  color: var(--danger);
}

.kv {
  display: grid;
  gap: 8px;
}

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(143, 162, 189, 0.14);
}

.kv strong {
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 14px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid rgba(143, 162, 189, 0.16);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

a {
  color: #86bfff;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #111f34;
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 12, 22, 0.72);
  backdrop-filter: blur(12px);
}

.modal-backdrop.hidden {
  display: none;
}

.modal-panel {
  position: relative;
  width: min(620px, 100%);
  padding: 28px;
  border: 1px solid rgba(91, 162, 255, 0.46);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 12%, rgba(75, 148, 244, 0.18), transparent 34%),
    #101f34;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 26, 44, 0.84);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.modal-panel h2 {
  margin: 12px 44px 16px 0;
  font-size: 30px;
}

.modal-panel ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
  color: #d8e6fb;
  line-height: 1.55;
}

.modal-panel li::marker {
  color: #86bfff;
  font-weight: 900;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

@media (max-width: 1120px) {
  .top-nav {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

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

  .hero-art {
    min-height: 260px;
  }

  .ghosts-image {
    left: 50%;
    right: auto;
    width: min(720px, 100%);
    transform: translate(-50%, -50%);
  }

  #view-product.active {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main {
    width: min(100% - 28px, 1810px);
    padding-top: 22px;
  }

  .top-nav {
    gap: 14px;
    min-height: 76px;
    padding: 14px;
  }

  .brand small,
  .service-note {
    display: none;
  }

  .nav-link {
    min-height: 44px;
    padding: 0 14px;
  }

  .hero {
    min-height: 0;
    padding: 24px;
    border-radius: 24px;
  }

  h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 17px;
  }

  .promo-cta,
  .promo-actions {
    grid-template-columns: 1fr;
  }

  .promo-spark {
    display: none;
  }

  .promo-actions,
  .store-button,
  .telegram-button {
    width: 100%;
  }

  .hero-art {
    display: none;
  }

  .section-head,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .steps,
  .mode-row,
  .instruction-cards,
  .subscription-grid,
  .inline-instruction,
  .inline-form {
    grid-template-columns: 1fr;
  }
}
