

:root {
  --background: #f5f6f8;
  --foreground: #161b22;
  --bg: #f5f6f8;
  --elevated: #ffffff;
  --panel: #eceef2;
  --line: rgba(22, 27, 34, 0.1);
  --text: #161b22;
  --muted: #5c6573;
  --accent: #0f766e;
  --accent-fg: #f7fffd;
  --accent-dim: #99f6e4;
  --danger: #e11d48;
  --warn: #d97706;
  --ok: #059669;
  --card: #ffffff;
  --header: rgba(245, 246, 248, 0.88);
  --input: #ffffff;
  --overlay: rgba(22, 27, 34, 0.05);
  --grid-base: #f5f6f8;
  --grid-glow-a: rgba(15, 118, 110, 0.08);
  --grid-glow-b: rgba(59, 90, 160, 0.06);
  --grid-line: rgba(22, 27, 34, 0.05);
  --glass: rgba(255, 255, 255, 0.78);
  --surface: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] {
  --background: #07090d;
  --foreground: #e8edf5;
  --bg: #07090d;
  --elevated: #0c1017;
  --panel: #10151e;
  --line: rgba(232, 237, 245, 0.09);
  --text: #e8edf5;
  --muted: #8b95a8;
  --accent: #7ee0d2;
  --accent-fg: #06201c;
  --accent-dim: #1f6f66;
  --danger: #fb7185;
  --warn: #f5c16c;
  --ok: #34d399;
  --card: rgba(255, 255, 255, 0.03);
  --header: rgba(7, 9, 13, 0.8);
  --input: rgba(0, 0, 0, 0.3);
  --overlay: rgba(255, 255, 255, 0.05);
  --grid-base: #07090d;
  --grid-glow-a: rgba(126, 224, 210, 0.09);
  --grid-glow-b: rgba(96, 140, 220, 0.08);
  --grid-line: rgba(255, 255, 255, 0.03);
  --glass: rgba(12, 16, 24, 0.7);
  --surface: rgba(16, 21, 30, 0.86);
}



* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

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

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-manrope), ui-sans-serif, system-ui, sans-serif;
}

::selection {
  background: color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--text);
}

.bg-grid {
  background-color: var(--grid-base);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--grid-glow-a), transparent 55%),
    radial-gradient(ellipse 40% 30% at 90% 10%, var(--grid-glow-b), transparent 50%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
}

.scanlines {
  position: relative;
}

.scanlines::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.08) 3px
  );
  opacity: 0.35;
  border-radius: inherit;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--color-line);
}

.surface {
  background: var(--surface);
  border: 1px solid var(--color-line);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-up {
  animation: fade-up 0.7s ease both;
}

.animate-fade-in {
  animation: fade-in 0.5s ease both;
}

.animate-slide-in {
  animation: slide-in 0.35s ease both;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.pulse-dot {
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes packet-flow {
  from {
    offset-distance: 0%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  to {
    offset-distance: 100%;
    opacity: 0;
  }
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
  caret-color: var(--text);
}

.terminal-scroll::-webkit-scrollbar {
  width: 6px;
}

.terminal-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

.hero-illu {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 420 / 460;
}

.hero-illu-bloom {
  position: absolute;
  inset: 8% 6% 18%;
  border-radius: 40px;
  background: radial-gradient(circle at 50% 30%, rgba(126, 224, 210, 0.22), transparent 62%);
  filter: blur(18px);
  animation: hero-glow 5.6s ease-in-out infinite;
}

.hero-illu-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-illu-p {
  opacity: 0.35;
}

.hero-illu-p-a { animation: hero-float 7s ease-in-out infinite; }
.hero-illu-p-b { animation: hero-float 8.4s ease-in-out infinite reverse; }
.hero-illu-p-c { animation: hero-float 6.2s ease-in-out infinite 0.4s; }
.hero-illu-p-d { animation: hero-float 9s ease-in-out infinite 1.1s; }
.hero-illu-p-e { animation: hero-float 7.8s ease-in-out infinite 0.8s; }
.hero-illu-p-f { animation: hero-float 6.8s ease-in-out infinite reverse 0.2s; }
.hero-illu-p-g { animation: hero-float 8s ease-in-out infinite 1.6s; }
.hero-illu-p-h { animation: hero-float 7.2s ease-in-out infinite reverse 0.6s; }

.hero-illu-device {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  padding: 12px 18px 0;
}

.hero-illu-bezel {
  width: 100%;
  flex: 1;
  border-radius: 22px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(232, 237, 245, 0.08), rgba(232, 237, 245, 0.02)),
    #0b1018;
  border: 1px solid rgba(126, 224, 210, 0.18);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 24px 60px rgba(0, 0, 0, 0.38),
    0 0 48px rgba(126, 224, 210, 0.08);
}

.hero-illu-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 10px;
  color: #8b95a8;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-illu-dots {
  display: flex;
  gap: 5px;
}

.hero-illu-dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(232, 237, 245, 0.16);
}

.hero-illu-dots i:first-child {
  background: #fb7185;
  opacity: 0.7;
}

.hero-illu-chrome-label {
  flex: 1;
}

.hero-illu-live {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7ee0d2;
}

.hero-illu-live i,
.hero-illu-blink {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #7ee0d2;
  box-shadow: 0 0 10px rgba(126, 224, 210, 0.8);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

.hero-illu-screen {
  position: relative;
  overflow: hidden;
  height: calc(100% - 28px);
  border-radius: 14px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(126, 224, 210, 0.1), transparent 55%),
    linear-gradient(180deg, #0a1218 0%, #07090d 100%);
  border: 1px solid rgba(126, 224, 210, 0.12);
}

.hero-illu-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(126, 224, 210, 0.14),
    transparent
  );
  animation: hero-scan 4.8s linear infinite;
  z-index: 3;
  pointer-events: none;
}

.hero-illu-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, transparent 45%, rgba(0, 0, 0, 0.28) 100%);
  pointer-events: none;
  z-index: 2;
}

.hero-illu-hud {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-illu-status {
  position: relative;
  height: 18px;
  margin: 16px 18px 0;
  font-family: var(--font-jetbrains), ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: #7ee0d2;
  text-transform: uppercase;
}

.hero-illu-status span {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  animation: hero-status 12s ease-in-out infinite both;
}

.hero-illu-status span:nth-child(1) { animation-delay: 0s; }
.hero-illu-status span:nth-child(2) { animation-delay: 3s; }
.hero-illu-status span:nth-child(3) { animation-delay: 6s; }
.hero-illu-status span:nth-child(4) { animation-delay: 9s; color: #34d399; }

.hero-illu-profile {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 16px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(126, 224, 210, 0.05);
  border: 1px solid rgba(126, 224, 210, 0.12);
}

.hero-illu-avatar {
  width: 42px;
  height: 42px;
}

.hero-illu-ring {
  fill: none;
  stroke-dasharray: 40 100;
  transform-origin: 24px 24px;
  animation: hero-spin 6.5s linear infinite;
}

.hero-illu-handle {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #e8edf5;
}

.hero-illu-meta {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b95a8;
}

.hero-illu-lock {
  margin-left: auto;
  width: 18px;
  height: 18px;
  opacity: 0.85;
  animation: hero-lock 3.4s ease-in-out infinite;
}

.hero-illu-bar {
  display: flex;
  gap: 6px;
  margin: 14px 18px 0;
}

.hero-illu-bar span {
  height: 3px;
  flex: 1;
  border-radius: 99px;
  background: rgba(126, 224, 210, 0.12);
  overflow: hidden;
}

.hero-illu-bar span::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: #7ee0d2;
  box-shadow: 0 0 10px rgba(126, 224, 210, 0.7);
  animation: hero-bar 3.2s ease-in-out infinite;
}

.hero-illu-bar span:nth-child(2)::after { animation-delay: 0.4s; width: 62%; }
.hero-illu-bar span:nth-child(3)::after { animation-delay: 0.9s; width: 28%; }

.hero-illu-term {
  position: relative;
  z-index: 1;
  height: 118px;
  margin: 14px 16px 0;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}

.hero-illu-term-track {
  animation: hero-code 14s linear infinite;
}

.hero-illu-term li {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-family: var(--font-jetbrains), ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(232, 237, 245, 0.62);
}

.hero-illu-term li span {
  color: #7ee0d2;
}

.hero-illu-footer {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b95a8;
}

.hero-illu-pct {
  margin-left: auto;
  color: #7ee0d2;
  font-family: var(--font-jetbrains), ui-monospace, monospace;
}

.hero-illu-neck {
  width: 54px;
  height: 18px;
  background: linear-gradient(90deg, #121821, #1b2430, #121821);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.hero-illu-base {
  width: 168px;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(126, 224, 210, 0.28), transparent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

@keyframes hero-glow {
  0%,
  100% { opacity: 0.5; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes hero-scan {
  0% { top: -30%; opacity: 0; }
  12% { opacity: 0.85; }
  88% { opacity: 0.55; }
  100% { top: 110%; opacity: 0; }
}

@keyframes hero-float {
  0%,
  100% { transform: translate(0, 0); opacity: 0.25; }
  50% { transform: translate(8px, -16px); opacity: 0.85; }
}

@keyframes hero-status {
  0%,
  22% { opacity: 1; }
  28%,
  100% { opacity: 0; }
}

@keyframes hero-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hero-lock {
  0%,
  100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes hero-bar {
  0%,
  100% { transform: translateX(-20%); opacity: 0.55; }
  50% { transform: translateX(80%); opacity: 1; }
}

@keyframes hero-code {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.mp-shell {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-top: max(0.35rem, env(safe-area-inset-top));
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}

.mp-viz {
  isolation: isolate;
}

.mp-glow {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 224, 210, 0.22), transparent 70%);
  filter: blur(10px);
  animation: mp-glow 4.2s ease-in-out infinite;
  pointer-events: none;
}

.mp-spin,
.mp-pulse-ring,
.mp-orbit {
  transform-box: fill-box;
  transform-origin: center;
}

.mp-spin {
  animation: mp-spin 8s linear infinite;
}

.mp-orbit {
  transform-box: view-box;
  transform-origin: 80px 80px;
  animation: mp-spin 11s linear infinite reverse;
}

.mp-pulse-ring {
  animation: mp-pulse 2.6s ease-out infinite;
}

.mp-scanline {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 24%;
  border-radius: 50%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(126, 224, 210, 0.2),
    transparent
  );
  animation: mp-scan 3.4s linear infinite;
  pointer-events: none;
  z-index: 2;
}

.mp-tech {
  position: absolute;
  font-family: var(--font-jetbrains), ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(139, 149, 168, 0.72);
  pointer-events: none;
}

.mp-tech-n { top: 4px; left: 50%; transform: translateX(-50%); }
.mp-tech-e { right: 8px; top: 50%; transform: translateY(-50%); }
.mp-tech-s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.mp-tech-w { left: 8px; top: 50%; transform: translateY(-50%); }

.mp-reveal {
  animation: fade-up 0.45s ease both;
}

.mp-term {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 100%);
}

.mp-term-line {
  overflow-wrap: anywhere;
  word-break: break-word;
  animation: fade-in 0.35s ease both;
}

.mp-dot-live {
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes mp-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes mp-scan {
  0% { top: -20%; opacity: 0; }
  12% { opacity: 0.85; }
  88% { opacity: 0.45; }
  100% { top: 92%; opacity: 0; }
}

@keyframes mp-pulse {
  0% { transform: scale(0.96); opacity: 0.55; }
  70% { transform: scale(1.08); opacity: 0; }
  100% { transform: scale(1.08); opacity: 0; }
}

@keyframes mp-glow {
  0%,
  100% { opacity: 0.45; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-illu-bloom,
  .hero-illu-p,
  .hero-illu-scan,
  .hero-illu-status span,
  .hero-illu-ring,
  .hero-illu-lock,
  .hero-illu-bar span::after,
  .hero-illu-term-track,
  .hero-illu-live i,
  .hero-illu-blink,
  .mp-glow,
  .mp-spin,
  .mp-orbit,
  .mp-pulse-ring,
  .mp-scanline,
  .mp-dot-live,
  .mp-reveal,
  .mp-term-line {
    animation: none !important;
  }

  .hero-illu-status span:first-child {
    opacity: 1;
  }

  .hero-illu-bloom {
    opacity: 0.7;
  }

  .mp-glow {
    opacity: 0.6;
    transform: none;
  }

  .mp-scanline,
  .mp-orbit {
    display: none;
  }
}

/* static-mobile-fit */
html {
  overflow-x: clip;
}
body {
  max-width: 100%;
  overflow-x: clip;
}
img, video, canvas {
  max-width: 100%;
}
main, header, footer, .bg-grid {
  max-width: 100%;
}
main {
  overflow-x: clip;
}
main p, main li, main h1, main h2, main h3 {
  overflow-wrap: anywhere;
}

@media (max-width: 40rem) {
  header > div {
    gap: 0.5rem;
    padding-inline: 0.75rem;
  }
  header .ml-auto {
    gap: 0.375rem;
    flex-shrink: 0;
  }
  header [data-static-replace="telegram"] span {
    display: none;
  }
  header [data-static-replace="telegram"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  header a.group {
    min-width: 0;
    flex: 0 1 auto;
  }
  header a.group span.font-semibold,
  header a.group .text-\[15px\] {
    display: block;
    max-width: min(42vw, 8.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 22.5rem) {
  header button[aria-label="Меню"],
  header button[aria-label*="тем"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 63.99rem) {
  article header.min-w-0 {
    display: flex;
    flex-direction: column;
  }
  article header.min-w-0 > h1 {
    order: 1;
  }
  article header.min-w-0 > .mt-8 {
    order: 2;
    margin-top: 1.25rem;
  }
  article header.min-w-0 > .mt-6 {
    order: 3;
    margin-top: 1.5rem;
  }
}
