/* Шрифты: Unbounded (заголовки), Manrope (текст), JetBrains Mono (метки). Все свои, без внешних запросов. */
@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url('/fonts/unbounded-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url('/fonts/unbounded-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url('/fonts/manrope-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 100 800; font-display: swap; src: url('/fonts/jetbrains-mono-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 100 800; font-display: swap; src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }

:root {
  --bg: #eef0f4;
  --card: #ffffff;
  --ink: #0b0b0b;
  --muted: #4d525e;
  --yellow: #ffd83d;
  --on-yellow: #0b0b0b;
  --blue: #2b3bff;
  --on-blue: #ffffff;
  --danger: #c4161c;
  --ok: #0d7a3a;
  --soft: #e1e4ea;

  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;
  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-full: 9999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --border: 2px solid var(--ink);
  --font-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
:root[data-theme="dark"] {
  --bg: #181818;
  --card: #1f1f1f;
  --ink: #f4f4f4;
  --muted: #a9a9a9;
  --blue: #8f9aff;
  --on-blue: #0b0b0b;
  --soft: #272727;
  --danger: #ff8a8a;
  --ok: #6fdc8f;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 24px;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
em, i, cite { font-style: normal; }
[hidden] { display: none !important; }
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; text-wrap: balance; letter-spacing: -0.02em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: var(--r-md); }
::selection { background: var(--yellow); color: var(--on-yellow); }

.skip { position: absolute; left: var(--s-200); top: var(--s-200); z-index: 300; background: var(--yellow); color: var(--on-yellow); border: var(--border); padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); font-weight: 700; transform: translateY(-200%); }
.skip:focus { transform: none; }
.container { width: min(1240px, 100% - 2 * var(--s-300)); margin-inline: auto; }

/* Метки */
.mono { font-family: var(--font-mono); font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.mono b { color: var(--ink); font-weight: 600; }

/* Маркер, как в референсе */
.hl { display: inline-block; background: var(--yellow); color: var(--on-yellow); padding: 0 0.14em; border-radius: var(--r-md); }
.hl.sweep { background: linear-gradient(var(--yellow), var(--yellow)) no-repeat left / 0% 100%; animation: sweep 900ms var(--ease) 1.8s forwards; }
@keyframes sweep { to { background-size: 100% 100%; } }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100); min-height: 40px;
  border: var(--border); border-radius: var(--r-lg); background: var(--card); color: var(--ink);
  font-size: 16px; line-height: 24px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 0 0 0 var(--ink);
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease), background-color 300ms var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 0 var(--ink); }
.btn:active { transform: translate(0, 0) scale(0.98); box-shadow: 0 0 0 0 var(--ink); }
.btn-primary { background: var(--blue); color: var(--on-blue); padding-inline: var(--s-200); }
.btn-yellow { background: var(--yellow); color: var(--on-yellow); padding-inline: var(--s-200); }
.btn-ghost { background: transparent; }
.btn-sm { font-size: 14px; line-height: 20px; min-height: 32px; padding: var(--s-50) var(--s-100); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn .ic { display: inline-flex; transition: transform 500ms var(--ease); }
.btn:hover .ic-go { transform: translateX(4px); }

/* Верхняя панель */
.top { border-bottom: var(--border); background: var(--bg); position: sticky; top: 0; z-index: 60; }
.top .row { display: flex; align-items: center; gap: var(--s-300); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-100); font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 28px; letter-spacing: -0.03em; }
.brand-mark { position: relative; width: 24px; height: 24px; flex: none; }
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; width: 18px; height: 18px; border: var(--border); border-radius: var(--r-md); }
.brand-mark::before { left: 0; top: 0; background: var(--yellow); }
.brand-mark::after { right: 0; bottom: 0; background: var(--blue); }
.top nav.links { display: flex; gap: var(--s-300); margin-left: var(--s-300); }
.top nav.links a { font-weight: 600; padding: var(--s-75) 0; border-bottom: 3px solid transparent; transition: border-color 300ms var(--ease); }
.top nav.links a:hover { border-color: var(--yellow); }
.top nav.links a[aria-current="page"] { border-color: var(--blue); }
.top .spacer { flex: 1; }
.top .actions { display: flex; align-items: center; gap: var(--s-75); }
.theme-btn { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.nav-toggle { display: none; width: 40px; height: 40px; border: var(--border); border-radius: var(--r-lg); background: var(--card); position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); transition: transform 500ms var(--ease); }
.nav-toggle span:nth-child(1) { top: 14px; } .nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: 0; z-index: 55; background: var(--bg); display: flex; flex-direction: column; justify-content: center; gap: var(--s-200); padding: var(--s-900) var(--s-300) var(--s-400); opacity: 0; pointer-events: none; transition: opacity 500ms var(--ease); }
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a.m-link { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 36px; letter-spacing: -0.02em; opacity: 0; transform: translateY(24px); transition: transform 500ms var(--ease), opacity 500ms var(--ease); }
.mobile-menu.open a.m-link { opacity: 1; transform: none; }
.mobile-menu.open a.m-link:nth-child(1) { transition-delay: 60ms; } .mobile-menu.open a.m-link:nth-child(2) { transition-delay: 120ms; }
.mobile-menu.open a.m-link:nth-child(3) { transition-delay: 180ms; } .mobile-menu.open a.m-link:nth-child(4) { transition-delay: 240ms; } .mobile-menu.open a.m-link:nth-child(5) { transition-delay: 300ms; }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Заставка: жёлтый занавес */
#splash { position: fixed; inset: 0; z-index: 400; background: var(--yellow); color: var(--on-yellow); display: grid; place-items: center; transition: transform 1000ms var(--ease); }
#splash.hide { transform: translateY(-100%); pointer-events: none; }
.splash-inner { padding: var(--s-300); text-align: center; width: min(1100px, 100%); }
.splash-big { font-family: var(--font-display); font-weight: 700; font-size: 128px; line-height: 1; letter-spacing: -0.04em; display: flex; justify-content: center; overflow: hidden; padding-bottom: var(--s-75); }
.splash-big .l { display: inline-block; transform: translateY(110%); animation: lift 900ms var(--ease) forwards; }
@keyframes lift { to { transform: none; } }
.splash-meta { display: flex; justify-content: space-between; gap: var(--s-200); margin-top: var(--s-300); border-top: 2px solid #0b0b0b; padding-top: var(--s-100); font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: #0b0b0b; }
.splash-bar { height: 8px; background: #0b0b0b; margin-top: var(--s-200); transform-origin: left; transform: scaleX(0); animation: fill 2400ms var(--ease) 300ms forwards; border-radius: var(--r-full); }
@keyframes fill { to { transform: scaleX(1); } }
.splash-skip { position: absolute; right: var(--s-300); bottom: var(--s-300); }
#splash .btn { background: transparent; color: #0b0b0b; border-color: #0b0b0b; }

/* Герой */
.hero { padding: var(--s-700) 0 var(--s-600); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--s-600); align-items: center; }
.hero h1 { font-size: 60px; line-height: 1; margin: var(--s-300) 0; max-width: 680px; }
.hero .lead { font-size: 18px; line-height: 28px; color: var(--muted); max-width: 680px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-100); margin-top: var(--s-400); }
.hero-proof { display: flex; flex-wrap: wrap; gap: var(--s-400); margin-top: var(--s-500); padding-top: var(--s-300); border-top: var(--border); max-width: 680px; }
.stat b { display: block; font-family: var(--font-display); font-size: 30px; line-height: 36px; font-weight: 700; }

/* Макет окна в герое */
.stage { position: relative; }
.window { background: var(--card); border: var(--border); border-radius: var(--r-2xl); box-shadow: 8px 8px 0 0 var(--ink); overflow: hidden; }
.window .bar { display: flex; align-items: center; gap: var(--s-75); padding: var(--s-75) var(--s-100); border-bottom: var(--border); }
.window .bar i { width: 12px; height: 12px; border: var(--border); border-radius: var(--r-full); background: var(--card); }
.window .bar i:first-child { background: var(--yellow); }
.window .bar .mono { margin-left: auto; }
.canvas-area { position: relative; aspect-ratio: 5 / 4; background-color: var(--soft); background-image: radial-gradient(var(--muted) 1px, transparent 1px); background-size: 16px 16px; }
.canvas-area > * { position: absolute; }
.frame { left: 12%; top: 14%; width: 56%; height: 68%; background: var(--card); border: var(--border); border-radius: var(--r-xl); animation: seq 10s var(--ease) infinite; transform-origin: top left; }
.dot { width: 14%; aspect-ratio: 1; border: var(--border); border-radius: var(--r-full); animation: seq 10s var(--ease) infinite; }
.dot.d1 { left: 18%; top: 62%; background: var(--yellow); animation-delay: 0.8s; }
.dot.d2 { left: 34%; top: 62%; background: var(--blue); animation-delay: 1.2s; }
.dot.d3 { left: 50%; top: 62%; background: var(--card); animation-delay: 1.6s; }
.line { height: 8px; background: var(--ink); border-radius: var(--r-full); animation: seq 10s var(--ease) infinite; }
.line.t1 { left: 18%; top: 28%; width: 36%; animation-delay: 2s; }
.line.t2 { left: 18%; top: 37%; width: 24%; height: 6px; opacity: 0.5; animation-delay: 2.3s; }
.mark { width: 28px; height: 28px; background: var(--yellow); color: var(--on-yellow); border: var(--border); border-radius: var(--r-full); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700; animation: pop 10s var(--ease) infinite; }
.mark.m1 { left: 8%; top: 8%; animation-delay: 0.4s; } .mark.m2 { left: 64%; top: 52%; animation-delay: 1.4s; }
.mark.m3 { left: 52%; top: 20%; animation-delay: 2.2s; }
.cursor { left: 0; top: 0; width: 28px; height: 28px; color: var(--ink); animation: roam 10s var(--ease) infinite; filter: drop-shadow(2px 2px 0 var(--yellow)); }
@keyframes seq { 0% { opacity: 0; transform: scale(0.8); } 6%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: scale(0.96); } }
@keyframes pop { 0% { opacity: 0; transform: scale(0); } 5% { opacity: 1; transform: scale(1.25); } 8%, 88% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes roam { 0% { transform: translate(40px, 30px); } 14% { transform: translate(120px, 190px); } 24% { transform: translate(210px, 190px); } 36% { transform: translate(150px, 70px); } 60% { transform: translate(260px, 120px); } 100% { transform: translate(40px, 30px); } }
.cube-wrap { position: absolute; right: -16px; bottom: -32px; width: 112px; height: 112px; perspective: 500px; }
.cube { position: relative; width: 72px; height: 72px; margin: 20px; transform-style: preserve-3d; animation: tumble 14s linear infinite; }
.cube b { position: absolute; inset: 0; border: 2px solid #0b0b0b; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--on-yellow); background: var(--yellow); }
.cube b:nth-child(1) { transform: translateZ(36px); } .cube b:nth-child(2) { transform: rotateY(90deg) translateZ(36px); background: var(--blue); color: var(--on-blue); }
.cube b:nth-child(3) { transform: rotateY(180deg) translateZ(36px); } .cube b:nth-child(4) { transform: rotateY(-90deg) translateZ(36px); background: var(--card); color: var(--ink); }
.cube b:nth-child(5) { transform: rotateX(90deg) translateZ(36px); background: var(--card); color: var(--ink); } .cube b:nth-child(6) { transform: rotateX(-90deg) translateZ(36px); background: var(--blue); color: var(--on-blue); }
@keyframes tumble { to { transform: rotateX(360deg) rotateY(720deg); } }
.sticker { position: absolute; left: -24px; top: -24px; background: var(--yellow); color: var(--on-yellow); border: var(--border); border-radius: var(--r-lg); padding: var(--s-50) var(--s-100); font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; transform: rotate(-6deg); animation: wobble 5s var(--ease) infinite; }
@keyframes wobble { 50% { transform: rotate(4deg) translateY(-4px); } }

/* Бегущая строка */
.marquee { background: var(--yellow); color: var(--on-yellow); border-block: var(--border); overflow: hidden; }
.marquee .track { display: flex; width: max-content; animation: slide 36s linear infinite; }
.marquee span { padding: var(--s-200) var(--s-300); font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 32px; letter-spacing: -0.02em; white-space: nowrap; }
.marquee span::after { content: '✺'; margin-left: var(--s-600); }
@keyframes slide { to { transform: translateX(-50%); } }

/* Секции */
section.block { padding: var(--s-900) 0; }
.eyebrow { margin-bottom: var(--s-100); }
h2.title { font-size: 48px; line-height: 1; max-width: 680px; }
.sub { font-size: 18px; line-height: 28px; color: var(--muted); max-width: 680px; margin-top: var(--s-200); }

.tagline { padding: var(--s-900) 0; border-block: var(--border); background: var(--card); }
.tagline p { font-family: var(--font-display); font-weight: 700; font-size: 48px; line-height: 1; letter-spacing: -0.03em; max-width: 1000px; }
.tagline .w { color: color-mix(in srgb, var(--ink) 25%, transparent); transition: color 500ms var(--ease); }
.tagline .w.on { color: var(--ink); }

.grid { display: grid; gap: var(--s-200); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: var(--border); border-radius: var(--r-xl); padding: var(--s-300); transition: transform 300ms var(--ease), box-shadow 300ms var(--ease); }
a.card:hover, .card.lift:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 0 var(--ink); }
.card h3 { font-size: 20px; line-height: 28px; margin-bottom: var(--s-75); }
.card p { color: var(--muted); }
.dashed { border: 2px dashed var(--ink); border-radius: var(--r-xl); padding: var(--s-200); background: transparent; }
.dashed .mono { display: block; margin-bottom: var(--s-75); }

.howbox { border: var(--border); border-radius: var(--r-2xl); background: var(--card); padding: var(--s-300); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-300); }
.howbox .n { font-family: var(--font-display); font-weight: 700; font-size: 36px; line-height: 40px; color: var(--blue); }
.howbox h3 { font-size: 16px; line-height: 24px; margin: var(--s-50) 0 var(--s-75); letter-spacing: -0.01em; }
.howbox p { color: var(--muted); font-size: 14px; line-height: 20px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-600); align-items: center; }
.mock { background: var(--card); border: var(--border); border-radius: var(--r-2xl); padding: var(--s-300); box-shadow: 8px 8px 0 0 var(--ink); }
.mock-row { display: grid; gap: var(--s-75); padding: var(--s-200) 0; border-top: 2px dashed var(--ink); }
.mock-row:first-child { border-top: 0; padding-top: 0; } .mock-row:last-child { padding-bottom: 0; }
.row-head { display: flex; justify-content: space-between; gap: var(--s-200); font-weight: 700; }
.row-head span:last-child { color: var(--muted); font-weight: 600; font-family: var(--font-mono); font-size: 14px; }
.meter { height: 16px; border: var(--border); border-radius: var(--r-full); overflow: hidden; background: var(--card); }
.meter > i { display: block; height: 100%; width: 0; background: var(--yellow); border-right: var(--border); transition: width 900ms var(--ease); }
.meter > i[style*="width:0%"] { border-right: 0; }

.faq { max-width: 800px; display: grid; gap: var(--s-100); margin-top: var(--s-400); }
.faq details { background: var(--card); border: var(--border); border-radius: var(--r-xl); padding: var(--s-200) var(--s-300); transition: box-shadow 300ms var(--ease), transform 300ms var(--ease); }
.faq details[open] { box-shadow: 4px 4px 0 0 var(--ink); transform: translate(-2px, -2px); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: var(--s-200); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-mono); font-size: 20px; transition: transform 500ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: var(--s-100); color: var(--muted); }

.cta-final { background: var(--yellow); color: var(--on-yellow); border: var(--border); border-radius: var(--r-2xl); box-shadow: 8px 8px 0 0 var(--ink); padding: var(--s-800) var(--s-400); text-align: center; }
.cta-final h2 { margin-inline: auto; }
.cta-final .sub { margin-inline: auto; color: #2a2a2a; }
.cta-final .hero-cta { justify-content: center; }
.cta-final .btn { box-shadow: none; }
.cta-final .btn:hover { box-shadow: 4px 4px 0 0 #0b0b0b; }
.cta-final .btn-primary { background: #0b0b0b; color: #fff; border-color: #0b0b0b; }
.cta-final .btn-ghost { color: #0b0b0b; border-color: #0b0b0b; }
.note { font-size: 14px; line-height: 20px; margin-top: var(--s-200); }

footer.site { border-top: var(--border); padding: var(--s-600) 0; color: var(--muted); font-size: 14px; line-height: 20px; }
footer.site .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-200); }
footer.site nav { display: flex; gap: var(--s-300); }
footer.site a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* Вход */
.auth-wrap { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--yellow); color: var(--on-yellow); border-right: var(--border); display: flex; flex-direction: column; justify-content: space-between; padding: var(--s-500); position: relative; overflow: hidden; }
.auth-side h2 { font-size: 48px; line-height: 1; max-width: 520px; }
.auth-side .brand-mark::before, .auth-side .brand-mark::after { border-color: #0b0b0b; }
.auth-side .mono { color: #2a2a2a; }
.auth-side .cube-wrap { right: 48px; bottom: 96px; width: 160px; height: 160px; }
.auth-side .cube { width: 96px; height: 96px; margin: 32px; }
.auth-side .cube b:nth-child(1) { transform: translateZ(48px); } .auth-side .cube b:nth-child(2) { transform: rotateY(90deg) translateZ(48px); }
.auth-side .cube b:nth-child(3) { transform: rotateY(180deg) translateZ(48px); } .auth-side .cube b:nth-child(4) { transform: rotateY(-90deg) translateZ(48px); }
.auth-side .cube b:nth-child(5) { transform: rotateX(90deg) translateZ(48px); } .auth-side .cube b:nth-child(6) { transform: rotateX(-90deg) translateZ(48px); }
.auth-main { display: grid; place-items: center; padding: var(--s-400) var(--s-300); }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 30px; line-height: 36px; margin-bottom: var(--s-75); }
.auth-card .sub { margin: 0 0 var(--s-300); font-size: 16px; line-height: 24px; }
.tabs { display: flex; gap: var(--s-300); border-bottom: 2px solid var(--soft); margin-bottom: var(--s-300); }
.tabs button { background: none; border: 0; padding: var(--s-100) 0; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color 300ms var(--ease), border-color 300ms var(--ease); }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--blue); }
form.form { display: grid; gap: var(--s-200); }
.field { display: grid; gap: var(--s-75); }
.field label { font-family: var(--font-mono); font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .lead-ic { position: absolute; left: var(--s-100); display: flex; color: var(--muted); pointer-events: none; }
.input { width: 100%; background: var(--card); border: var(--border); border-radius: var(--r-lg); padding: var(--s-100) var(--s-100) var(--s-100) var(--s-600); min-height: 48px; outline: none; transition: box-shadow 300ms var(--ease), transform 300ms var(--ease); }
.input:focus { box-shadow: 4px 4px 0 0 var(--blue); transform: translate(-2px, -2px); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input::placeholder { color: var(--muted); opacity: 0.7; }
.eye { position: absolute; right: var(--s-75); background: transparent; border: 0; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); border-radius: var(--r-md); }
.eye:hover { color: var(--ink); }
.err { color: var(--danger); font-size: 14px; line-height: 20px; min-height: 20px; font-weight: 600; }
.ok { color: var(--ok); font-size: 14px; line-height: 20px; font-weight: 600; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 14px; line-height: 20px; padding: 0; text-decoration: underline; text-underline-offset: 4px; }
.link-btn:hover { color: var(--ink); }
.form-foot { display: flex; justify-content: space-between; gap: var(--s-200); }
.small { font-size: 14px; line-height: 20px; color: var(--muted); }

/* Кабинет */
.page { padding: var(--s-500) 0 var(--s-800); }
.page-head { margin-bottom: var(--s-400); padding-bottom: var(--s-300); border-bottom: var(--border); }
.page-head h1 { font-size: 48px; line-height: 1; margin-bottom: var(--s-100); }
.page-head p.lead { color: var(--muted); max-width: 680px; }
.course-card { display: flex; flex-direction: column; gap: var(--s-200); }
.course-card h3 { margin-bottom: var(--s-75); }
.course-card .foot { margin-top: auto; display: grid; gap: var(--s-75); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.tag { font-family: var(--font-mono); font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: 0.06em; padding: var(--s-25) var(--s-75); border: 2px solid var(--ink); border-radius: var(--r-md); background: var(--card); }
.tag.y { background: var(--yellow); color: var(--on-yellow); }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-75); margin-bottom: var(--s-200); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-200); margin-bottom: var(--s-300); }
.kpi { background: var(--card); border: var(--border); border-radius: var(--r-xl); padding: var(--s-300); }
.kpi:nth-child(1) { background: var(--yellow); color: var(--on-yellow); } .kpi:nth-child(1) .mono { color: #2a2a2a; }
.kpi b { display: block; font-family: var(--font-display); font-size: 36px; line-height: 40px; font-weight: 700; margin-bottom: var(--s-50); }
.empty { border: 2px dashed var(--ink); border-radius: var(--r-xl); padding: var(--s-600); text-align: center; }
.empty h3 { font-size: 20px; line-height: 28px; margin-bottom: var(--s-75); }
.empty p { color: var(--muted); }
.skeleton { background: var(--soft); border: var(--border); border-radius: var(--r-xl); height: 180px; animation: pulse 1400ms var(--ease) infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

.lesson-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s-400); align-items: start; }
.lesson-nav { position: sticky; top: 80px; display: grid; gap: var(--s-100); max-height: calc(100svh - 96px); overflow: auto; padding: var(--s-50) var(--s-50) var(--s-75) 0; }
.lesson-item { display: grid; gap: var(--s-50); background: var(--card); border: var(--border); border-radius: var(--r-xl); padding: var(--s-100) var(--s-200); transition: transform 300ms var(--ease), box-shadow 300ms var(--ease); }
.lesson-item:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 0 var(--ink); }
.lesson-item.current { box-shadow: 4px 4px 0 0 var(--ink); }
.lesson-item.done .mono b::before { content: '✓ '; color: var(--blue); }
.lesson-item .t { font-weight: 700; line-height: 20px; font-size: 14px; }
.lesson-item .meter { height: 8px; }
.lesson-item.done .meter > i { width: 100% !important; }
.lesson-head h1 { font-size: 36px; line-height: 40px; margin: var(--s-100) 0 var(--s-200); }
.lesson-body { background: var(--card); border: var(--border); border-radius: var(--r-xl); padding: var(--s-400); margin: var(--s-300) 0; }
.lesson-body iframe, .lesson-body video { width: 100%; border: var(--border); border-radius: var(--r-lg); background: var(--soft); }
.lesson-body iframe { min-height: 640px; } .lesson-body video { aspect-ratio: 16 / 9; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: var(--s-100); justify-content: space-between; align-items: center; }
.lesson-actions .group { display: flex; gap: var(--s-100); flex-wrap: wrap; }
.prose { max-width: 720px; }
.prose > * + * { margin-top: var(--s-200); }
.prose > h1:first-child { display: none; }
.prose h2 { font-size: 24px; line-height: 32px; margin-top: var(--s-400); } .prose h3 { font-size: 20px; line-height: 28px; margin-top: var(--s-300); }
.prose ul, .prose ol { padding-left: var(--s-300); display: grid; gap: var(--s-75); }
.prose li::marker { color: var(--blue); font-weight: 700; }
.prose a { text-decoration: underline; text-underline-offset: 4px; color: var(--blue); font-weight: 600; }
.prose img { border: var(--border); border-radius: var(--r-xl); }
.prose code { font-family: var(--font-mono); background: var(--soft); border: 1px solid var(--ink); padding: 0 var(--s-50); border-radius: var(--r-md); font-size: 14px; }
.prose pre { background: var(--soft); border: var(--border); border-radius: var(--r-xl); padding: var(--s-200); overflow: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote { border: 2px dashed var(--ink); border-radius: var(--r-xl); padding: var(--s-200); }
.prose table { border-collapse: collapse; width: 100%; } .prose th, .prose td { border: 2px solid var(--ink); padding: var(--s-75) var(--s-100); text-align: left; }
.prose strong { background: var(--yellow); color: var(--on-yellow); padding: 0 var(--s-50); border-radius: var(--r-md); }

.toast { position: fixed; bottom: var(--s-300); left: 50%; transform: translate(-50%, 24px); opacity: 0; background: var(--ink); color: var(--bg); border-radius: var(--r-lg); padding: var(--s-100) var(--s-200); font-weight: 700; transition: transform 500ms var(--ease), opacity 500ms var(--ease); z-index: 90; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.legal { max-width: 720px; padding: var(--s-900) 0 var(--s-700); }
.legal h1 { font-size: 36px; line-height: 40px; margin: var(--s-200) 0; } .legal h2 { font-size: 24px; line-height: 32px; margin: var(--s-400) 0 var(--s-100); }
.legal p { color: var(--muted); margin-bottom: var(--s-100); }
.page404 { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--s-300); }
.page404 b { display: block; font-family: var(--font-display); font-size: 128px; line-height: 1; letter-spacing: -0.04em; }
.page404 p { color: var(--muted); margin: var(--s-200) 0 var(--s-300); }
.page404 .cube-wrap { position: relative; margin: 0 auto var(--s-300); right: auto; bottom: auto; }

@media (max-width: 1024px) {
  .hero-grid, .split, .lesson-layout { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .howbox { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-nav { position: static; max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); order: 2; }
  .stage { max-width: 560px; margin-inline: auto; width: 100%; }
}
@media (max-width: 768px) {
  .top nav.links, .top .actions .hide-m { display: none; }
  .nav-toggle { display: block; }
  .hero { padding-top: var(--s-500); }
  .hero h1 { font-size: 36px; line-height: 40px; }
  h2.title, .tagline p, .page-head h1 { font-size: 30px; line-height: 36px; }
  .splash-big { font-size: 64px; }
  section.block, .tagline { padding: var(--s-700) 0; }
  .grid-3, .grid-2, .grid-4, .howbox, .lesson-nav { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .lesson-body { padding: var(--s-200); }
  .cta-final { padding: var(--s-600) var(--s-200); }
  .marquee span { font-size: 18px; line-height: 24px; }
  .page404 b { font-size: 96px; }
  .cube-wrap { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 300ms linear; }
  .marquee .track, .cube, .cursor, .sticker { animation: none; }
  .frame, .dot, .line, .mark { animation: none; opacity: 1; }
  .hl.sweep { animation: none; background-size: 100% 100%; }
  .splash-big .l, .splash-bar { animation-duration: 1ms; animation-delay: 0s; }
  .btn:hover, a.card:hover, .card.lift:hover, .lesson-item:hover { transform: none; }
}

/* Уроки, собранные из HTML курса: цели, шаги, проверка, вопросы */
.prose .goals { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-200); }
.prose .goals .dashed { font-weight: 600; }
.prose .steps { list-style: none; padding: 0; counter-reset: st; gap: var(--s-100); max-width: none; }
.prose .steps li { counter-increment: st; position: relative; display: grid; gap: var(--s-75); background: var(--card); border: var(--border); border-radius: var(--r-xl); padding: var(--s-200) var(--s-200) var(--s-200) var(--s-700); }
.prose .steps li::before { content: counter(st); position: absolute; left: var(--s-200); top: var(--s-200); width: 32px; height: 32px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--blue); border: var(--border); border-radius: var(--r-full); background: var(--bg); }
.prose .where { justify-self: start; background: var(--yellow); color: var(--on-yellow); border: 2px solid var(--ink); border-radius: var(--r-md); padding: var(--s-25) var(--s-75); font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.prose .expect { color: var(--muted); font-size: 14px; line-height: 20px; }
.prose .expect::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.prose kbd { font-family: var(--font-mono); font-size: 13px; border: 2px solid var(--ink); border-bottom-width: 4px; border-radius: var(--r-md); padding: 0 var(--s-50); background: var(--card); }
.prose .checks { display: grid; gap: var(--s-75); max-width: none; }
.prose .chk { display: flex; gap: var(--s-100); align-items: flex-start; background: var(--card); border: var(--border); border-radius: var(--r-xl); padding: var(--s-100) var(--s-200); cursor: pointer; transition: transform 300ms var(--ease), box-shadow 300ms var(--ease); }
.prose .chk:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 0 var(--ink); }
.prose .chk input { appearance: none; flex: none; width: 24px; height: 24px; margin-top: 0; border: var(--border); border-radius: var(--r-md); background: var(--card); display: grid; place-items: center; cursor: pointer; }
.prose .chk input:checked { background: var(--blue); }
.prose .chk input:checked::after { content: '✓'; color: var(--on-blue); font-weight: 800; font-size: 14px; }
.prose .chk input:checked + span { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.prose .qas { display: grid; gap: var(--s-75); max-width: none; }
.prose details.qa { background: var(--card); border: var(--border); border-radius: var(--r-xl); padding: var(--s-100) var(--s-200); }
.prose details.qa summary { cursor: pointer; font-weight: 700; }
.prose details.qa p { margin-top: var(--s-75); color: var(--muted); }
.prose p.mono { color: var(--muted); }
@media (max-width: 768px) { .prose .goals { grid-template-columns: 1fr; } .prose .steps li { padding: var(--s-200); } .prose .steps li::before { position: static; } }

/* Картинки «как должно получиться», схемы, практика, шпаргалка */
.lesson-nav { overscroll-behavior: contain; }
.prose figure.vis-fig { max-width: 720px; display: grid; gap: var(--s-75); }
.prose figure.vis-fig .vis, .prose > .vis { border: var(--border); border-radius: var(--r-xl); padding: var(--s-200); overflow: hidden; }
.prose figure.vis-fig .vis { box-shadow: 6px 6px 0 0 var(--ink); }
.prose > .vis { max-width: none; }
.prose .vis img, .prose .vis svg { border: 0; border-radius: 0; max-width: 100%; }
.prose ol.maplegend { list-style: none; padding: 0; margin: var(--s-200) 0 0; display: grid; gap: var(--s-75); }
.prose ol.maplegend li { display: flex; gap: var(--s-100); align-items: flex-start; font-size: 14px; line-height: 20px; }
.prose ol.maplegend b { flex: none; width: 24px; height: 24px; display: grid; place-items: center; background: var(--yellow); color: var(--on-yellow); border: 2px solid var(--ink); border-radius: var(--r-full); font-family: var(--font-mono); font-size: 12px; }
.prose .terms { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-100); max-width: none; }
.prose .tw { overflow-x: auto; }
.prose .tw table { min-width: 560px; }
.prose .tw th { background: var(--yellow); color: var(--on-yellow); }
@media (max-width: 768px) { .prose .terms { grid-template-columns: 1fr; } }
