:root {
  --bg: #080809;
  --bg-elev: #101012;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --line-hover: rgba(255, 255, 255, 0.18);
  --card: rgba(255, 255, 255, 0.028);
  --card-hover: rgba(255, 255, 255, 0.045);
  --hl: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --dot: rgba(255, 255, 255, 0.08);
  --active: #34d399;
  --pending: #f5a524;
  --idle: #52525b;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.9s;
  --dur-long: 1.4s;
  --font: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --max: 1120px;
  --header: 62px;
  --gap: 12px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; background: transparent; border: 0; }
:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.45); outline-offset: 3px; }
::selection { background: rgba(255, 255, 255, 0.14); color: var(--fg); }
section[id] { scroll-margin-top: calc(var(--header) + 16px); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.revealed {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-long) var(--ease-fluid), transform var(--dur-long) var(--ease-fluid);
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--hl);
  transition: transform var(--dur) var(--ease-fluid), border-color var(--dur) var(--ease-fluid), background-color var(--dur) var(--ease-fluid);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.07), transparent 62%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-fluid);
  pointer-events: none;
}
.bento-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-hover);
  background: var(--card-hover);
}
.bento-card:hover::before { opacity: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 8, 9, 0.78);
  backdrop-filter: blur(16px);
}
.header-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: var(--header);
  display: flex;
  align-items: center;
  gap: var(--gap);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.04em;
  flex: none;
}
.brand img { width: 26px; height: 26px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }

.nav-link, .btn, .menu-btn, .seg button, .calc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: color var(--dur) var(--ease-fluid), background-color var(--dur) var(--ease-fluid), border-color var(--dur) var(--ease-fluid), transform var(--dur) var(--ease-fluid);
}
.nav-link { color: var(--muted); }
.nav-link:hover { color: var(--fg); background: rgba(255, 255, 255, 0.06); }
.btn {
  color: #09090b;
  background: #f4f4f5;
  border-color: #f4f4f5;
}
.btn:hover { background: #ffffff; }
.btn:active, .menu-btn:active { transform: scale(0.97); }
.btn-ghost {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover { border-color: var(--line-hover); background: rgba(255, 255, 255, 0.07); }
.in-menu { display: none; }
.menu-btn {
  display: none;
  width: 40px;
  padding: 0;
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.seg button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.seg button[aria-pressed="true"] { color: #09090b; background: #f4f4f5; }

.hero {
  position: relative;
  padding: 96px 0 12px;
  isolation: isolate;
}
.hero-glow {
  position: absolute;
  z-index: -1;
  top: -80px;
  left: 8%;
  width: min(720px, 90vw);
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 42%, transparent 70%);
  pointer-events: none;
}
.tg-teaser {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 14px 5px 6px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.tg-teaser:hover { color: var(--fg); border-color: var(--line-hover); }
.tg-teaser .tg-ico {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.tg-teaser b { font-weight: 500; color: var(--fg); }
h1 {
  position: relative;
  margin: 0;
  max-width: 14em;
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--fg);
  text-wrap: balance;
}
h1 .dim { color: #71717a; }
.lede {
  position: relative;
  max-width: 46ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
}
.hero-row, .facts { position: relative; }
.hero-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-size: 13px;
}
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

section { padding: 72px 0 4px; }
.section-head { margin-bottom: 22px; }
h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--fg);
  text-wrap: balance;
}
.section-note { margin: 8px 0 0; color: var(--muted); font-size: 14px; max-width: 62ch; }
.rate-badge, .tech, .price, .tb-price, .tb-tech, .badge, .term-title, .tb-count {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rate-badge {
  display: inline-flex;
  margin-left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: var(--fg);
  vertical-align: middle;
  white-space: nowrap;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.step { padding: 22px; display: flex; flex-direction: column; }
.step-num {
  width: 28px;
  height: 28px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.step h3, .bento-card h3, .panel h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -0.04em; }
.step p, .bento-card > p, .panel p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.step a { margin-top: auto; padding-top: 16px; font-size: 13px; font-weight: 500; }
.step a:hover { text-decoration: underline; text-underline-offset: 3px; }

.calc-widget {
  display: grid;
  grid-template-columns: 5fr 6fr;
}
.calc-widget:hover { transform: none; }
.calc-left, .calc-right { padding: 28px; }
.calc-left {
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.calc-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.calc-rate {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.calc-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg);
}
.calc-field:focus-within { border-color: rgba(255, 255, 255, 0.28); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05); }
.calc-field input {
  flex: 1;
  min-width: 0;
  height: 62px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  outline: none;
}
.calc-field input::-webkit-outer-spin-button,
.calc-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.currency { color: var(--faint); font-size: 16px; }
.slider-row { padding: 10px 0; }
.slider-row input {
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.slider-row input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #f4f4f5 var(--fill, 0%), rgba(255, 255, 255, 0.12) var(--fill, 0%));
}
.slider-row input::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 999px;
  border: 0;
  background: #f4f4f5;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06);
}
.slider-row input::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.slider-row input::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #f4f4f5;
}
.slider-row input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f5;
}
.calc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border-color: var(--line);
  color: var(--muted);
  font-size: 13px;
}
.calc-chip:hover { color: var(--fg); border-color: var(--line-hover); }
.calc-chip.active { color: #09090b; background: #f4f4f5; border-color: #f4f4f5; }
.calc-tokens { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.calc-tokens-value {
  font-family: var(--mono);
  font-size: clamp(44px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.calc-tokens-label { color: var(--muted); font-size: 15px; }
.calc-equiv { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.calc-equiv-title { margin: 0 0 14px; color: var(--faint); font-size: 13px; }
.calc-equiv-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.eq-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 14px; }
.eq-count { font-family: var(--mono); color: var(--muted); font-size: 13px; white-space: nowrap; }
.eq-bar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.eq-bar i {
  display: block;
  height: 100%;
  width: var(--bar, 0%);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.4);
  transition: width var(--dur-long) var(--ease-fluid);
}
.calc-bonus {
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 13px;
  transition: color var(--dur) var(--ease-fluid);
}
.calc-bonus.on { color: var(--fg); }
.bar-bigbase { width: 32%; }
.bar-photo { width: 18%; }
.bar-telegram { width: 26%; }
.bar-phone { width: 100%; }
.bar-infinity { width: 64%; }
.calc-fine { margin: 18px 0 0; color: var(--faint); font-size: 12.5px; }

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.bento-card { padding: 22px; display: flex; flex-direction: column; }
.b-lg { grid-column: span 2; }
.b-md { grid-column: span 2; }
.b-toolbox { grid-column: span 4; padding: 0; }
.b-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.price {
  min-height: 24px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  font-size: 11px;
  white-space: nowrap;
}
.tech { margin: 4px 0 8px; color: var(--faint); font-size: 11px; }
.tech.inline { margin: 0 0 0 8px; }
.b-foot { margin-top: auto; padding-top: 18px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.term {
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c0c0e;
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.lights { display: inline-flex; gap: 5px; }
.lights i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3f3f46;
}
.lights i:nth-child(1) { background: #f43f5e; }
.lights i:nth-child(2) { background: #f5a524; }
.lights i:nth-child(3) { background: #34d399; }
.term-title { color: var(--faint); font-size: 10px; }
.term-line {
  margin: 0;
  padding: 14px 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg);
}
.prompt { color: var(--faint); margin-right: 8px; }
.caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  background: var(--fg);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.match-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0c0c0e;
  font-size: 11px;
}
.badge-k { color: var(--faint); }
.badge-v { color: var(--fg); }

.toolbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.toolbox-head h3 { margin: 0; font-size: 15px; letter-spacing: -0.04em; }
.tb-count { color: var(--faint); font-size: 11px; }
.toolbox-list { list-style: none; margin: 0; padding: 6px 10px 10px; }
.toolbox-list li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
}
.toolbox-list li:hover { background: rgba(255, 255, 255, 0.04); }
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--idle);
  justify-self: center;
}
.status-dot.active {
  background: var(--active);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
  animation: pulse 2.4s var(--ease-out) infinite;
}
.status-dot.pending { background: var(--pending); }
@keyframes pulse {
  50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}
.tb-name { font-size: 13.5px; font-weight: 500; }
.tb-tech { display: block; margin-top: 2px; color: var(--faint); font-size: 10px; font-weight: 400; }
.tb-desc { color: var(--faint); font-size: 12.5px; }
.tb-price { color: var(--muted); font-size: 11px; white-space: nowrap; }

.grid-clarity {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.panel { padding: 22px; }
.panel .icon { margin-bottom: 16px; }

.site-footer { border-top: 1px solid var(--line-soft); margin-top: 88px; }
.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--muted); min-height: 40px; display: inline-flex; align-items: center; font-size: 14px; }
.foot-links a:hover { color: var(--fg); }
.foot-meta { margin: 0; color: var(--faint); font-size: 14px; }
.noscript-note {
  margin: 24px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px 14px 14px;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav-link { justify-content: flex-start; min-height: 44px; }
  .header-tools .btn { display: none; }
  .nav > .in-menu { display: inline-flex; margin-top: 4px; }
  .steps, .grid-clarity { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .b-lg, .b-md, .b-toolbox { grid-column: span 2; }
  .calc-widget { grid-template-columns: 1fr; }
  .calc-left { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .toolbox-list li { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .tb-desc { display: none; }
}
@media (max-width: 720px) {
  .header-tools .seg { display: none; }
  .nav.open .seg.in-menu {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 8px;
  }
}
@media (max-width: 640px) {
  .wrap, .header-inner, .footer-inner { width: min(var(--max), calc(100% - 28px)); }
  .hero { padding-top: 56px; }
  h1 { font-size: clamp(32px, 10vw, 44px); }
  .calc-tokens-value { font-size: clamp(36px, 12vw, 48px); }
  .slider-row { padding: 14px 0; }
  .slider-row input { height: 44px; }
  .bento, .grid-clarity { grid-template-columns: 1fr; }
  .b-lg, .b-md, .b-toolbox { grid-column: span 1; }
  .rate-badge { display: flex; width: fit-content; margin: 10px 0 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .seg button { padding: 0 7px; }
  .toolbox-list li { grid-template-columns: 14px minmax(0, 1fr); }
  .tb-price { grid-column: 2; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .caret { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { backdrop-filter: none; background: var(--bg); }
  body { background-attachment: scroll; }
}
@supports (padding: max(0px)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
