:root {
  --bg: #fffaf4;
  --bg-strong: #efe2d5;
  --surface: rgba(255, 255, 255, 0.56);
  --surface-strong: rgba(255, 255, 255, 0.82);
  --surface-soft: rgba(255, 255, 255, 0.66);
  --text: #09090b;
  --muted: rgba(9, 9, 11, 0.68);
  --muted-strong: rgba(9, 9, 11, 0.82);
  --border: rgba(9, 9, 11, 0.1);
  --border-strong: rgba(9, 9, 11, 0.18);
  --accent: #09090b;
  --accent-hover: #27272a;
  --accent-text: #ffffff;
  --focus: 0 0 0 3px rgba(9, 9, 11, 0.08);
  --shadow-soft: 0 18px 48px rgba(98, 64, 32, 0.08);
  --max: 1440px;
  --safe: clamp(24px, 5vw, 72px);
  --safe-hero: clamp(32px, 6vw, 84px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  background:
    radial-gradient(circle at 16% 14%, rgba(251, 146, 60, 0.22), transparent 0 24%),
    radial-gradient(circle at 82% 10%, rgba(239, 68, 68, 0.08), transparent 0 22%),
    linear-gradient(125deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 28%),
    linear-gradient(180deg, #fffaf4 0%, #f4eadf 62%, var(--bg-strong) 100%);
  color: var(--text);
  line-height: 1.45;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap {
  min-height: 100%;
}

.card {
  width: min(100%, var(--max));
  min-height: 100vh;
  margin: 0 auto;
  background: transparent;
  overflow: hidden;
}

.card.compact {
  width: min(calc(100% - 48px), 960px);
  min-height: auto;
  margin: 48px auto;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(9, 9, 11, 0.06), var(--shadow-soft);
}

.heroArt {
  position: relative;
  min-height: 220px;
  border-bottom: 1px solid rgba(9, 9, 11, 0.06);
  background:
    radial-gradient(circle at 18% 26%, rgba(251, 146, 60, 0.24), transparent 0 24%),
    radial-gradient(circle at 79% 18%, rgba(239, 68, 68, 0.1), transparent 0 20%),
    linear-gradient(125deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0) 32%),
    linear-gradient(180deg, rgba(255, 250, 244, 0.95) 0%, rgba(244, 234, 223, 0.88) 62%, rgba(239, 226, 213, 0.8) 100%);
}

.heroArt::before,
.heroArt::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.heroArt::before {
  inset: 0;
  background:
    linear-gradient(rgba(9, 9, 11, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 9, 11, 0.05) 1px, transparent 1px);
  background-size: clamp(96px, 9vw, 132px) clamp(96px, 9vw, 132px);
  opacity: 0.32;
}

.heroArt::after {
  right: max(-8vw, -96px);
  bottom: -120px;
  width: min(32vw, 420px);
  aspect-ratio: 1;
  border: 1px solid rgba(9, 9, 11, 0.08);
  border-radius: 999px;
}

.heroBadge {
  position: absolute;
  left: var(--safe-hero);
  bottom: 34px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(9, 9, 11, 0.08);
  backdrop-filter: blur(10px);
  color: var(--muted-strong);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heroBadge strong {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: none;
}

.sparkDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.header {
  padding: 56px var(--safe-hero) 40px;
  border-bottom: 1px solid rgba(9, 9, 11, 0.06);
}

.titleRow {
  display: block;
}

h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(3.4rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.subtitle {
  margin: 22px 0 0;
  max-width: 38rem;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
  padding: 0;
}

.tab,
.btn,
.chip,
.planCard,
input[type="text"],
input[type="number"],
select,
.sliderWrap,
.errors,
.badge,
.heroBadge {
  border-radius: 0;
}

.tab {
  border: 1px solid rgba(9, 9, 11, 0.1);
  background: rgba(255, 255, 255, 0.46);
  color: var(--muted-strong);
  min-height: 56px;
  padding: 16px 22px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.8);
}

.tab:focus-visible,
.btn:focus-visible,
.chip:focus-visible,
.planCard:focus-visible,
input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  box-shadow: var(--focus);
}

.tab.active,
.tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.content {
  padding: 48px var(--safe-hero) 80px;
  display: grid;
  gap: 28px;
}

@media (min-width: 1080px) {
  .content {
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 30px;
    align-items: start;
  }
}

.panel {
  padding: 32px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(9, 9, 11, 0.06), var(--shadow-soft);
}

.panelPlain {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.field {
  display: grid;
  gap: 10px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .row2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 64px;
  border: 1px solid rgba(9, 9, 11, 0.12);
  background: var(--surface-strong);
  color: var(--text);
  padding: 18px 18px;
  font-size: 1.5rem;
  line-height: 1.2;
  outline: none;
}

input::placeholder {
  color: rgba(9, 9, 11, 0.32);
  font-size: 17px;
  line-height: 1.6;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(9, 9, 11, 0.65) 50%),
    linear-gradient(135deg, rgba(9, 9, 11, 0.65) 50%, transparent 50%);
  background-position:
    calc(100% - 24px) calc(50% - 4px),
    calc(100% - 18px) calc(50% - 4px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 48px;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.hint {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.hintError {
  color: rgba(185, 28, 28, 0.94);
  font-weight: 700;
}

.tokensRow {
  display: grid;
  gap: 16px;
}

.sliderWrap {
  padding: 18px 20px 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(9, 9, 11, 0.08);
}

input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #09090b;
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  border: 1px solid rgba(9, 9, 11, 0.1);
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
  min-height: 48px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.84);
}

.actions {
  display: grid;
  gap: 16px;
}

.btn {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  padding: 18px 22px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

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

.btn.inline {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 24px;
  padding-right: 24px;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(9, 9, 11, 0.12);
  color: var(--text);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(9, 9, 11, 0.18);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:disabled:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.errors {
  display: none;
  padding: 18px 20px;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.18);
  color: var(--text);
}

.errors.show {
  display: block;
}

.errorsTitle {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(185, 28, 28, 0.94);
}

.errorsList {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted-strong);
  font-size: 16px;
  line-height: 1.6;
}

.asideTitle {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.steps {
  margin: 18px 0 0;
  padding-left: 22px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.7;
}

.steps li + li {
  margin-top: 10px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.badge {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted-strong);
}

.badge strong {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.small {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.ctaRow {
  display: flex;
  justify-content: flex-start;
  margin-top: 18px;
}

.tabPanel[hidden] {
  display: none;
}

.measureHidden {
  position: absolute !important;
  left: -9999px !important;
  top: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.plansGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 720px) {
  .plansGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.planCard {
  width: 100%;
  min-height: 108px;
  border: 1px solid rgba(9, 9, 11, 0.1);
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.planCard:hover {
  background: rgba(255, 255, 255, 0.84);
}

.planCard.selected {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(9, 9, 11, 0.24);
}

.planCard:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.planTitle {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.planPrice {
  margin-top: 10px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}

@media (max-width: 839px) {
  body {
    font-size: 17px;
  }

  .card.compact {
    width: min(calc(100% - 24px), 960px);
    margin: 24px auto;
  }

  .heroArt {
    min-height: 180px;
  }

  .heroBadge {
    left: var(--safe);
    bottom: 24px;
    gap: 12px;
    padding: 12px 16px;
  }

  .header {
    padding: 40px var(--safe) 28px;
  }

  .content {
    padding: 32px var(--safe) 48px;
  }

  .panel {
    padding: 24px;
  }

  h1 {
    max-width: none;
  }

  .subtitle {
    margin-top: 18px;
  }

  input[type="text"],
  input[type="number"],
  select,
  .btn {
    min-height: 58px;
    font-size: 1.1rem;
  }

  .tab {
    width: 100%;
    justify-content: center;
  }
}
