/* Layout: a dark trading-terminal world. One live chart is the hero, the
   sections below are quiet panels, and the app's accent blue is reserved for
   actions and exits. Deliberately single-theme (dark), so every color is set
   here explicitly. */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; 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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; 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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cyrillic: Bricolage has none, so Russian headings use Onest, a
   Cyrillic-first grotesque of the same weight; the others have their own. */
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/onest-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-style: normal; 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: "JetBrains Mono"; font-style: normal; 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;
}

:root {
  --ink: #0b0e13;
  --panel: #141922;
  --panel-2: #1b2230;
  --line: #262f3d;
  --fg: #e6ebf2;
  --muted: #8a94a6;
  --accent: #4c8dff;
  --accent-soft: rgba(76, 141, 255, .14);
  --long: #16b979;
  --short: #f6465d;
  --glow: #8ec5ff;

  --font-display: "Bricolage Grotesque", "Onest", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  --step-3: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  --step-4: clamp(2.6rem, 1.4rem + 5vw, 5.25rem);

  --radius: 14px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));

  color-scheme: dark;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* a jump to a section lands below the sticky top bar, not under it */
[id] { scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 76px); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--ink);
  isolation: isolate;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--accent); color: var(--ink); padding: .5rem .9rem; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- nav ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 40;
  height: env(safe-area-inset-top, 0px); background: var(--ink);
}
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: rgba(11, 14, 19, .74);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 1.5rem; padding-block: .85rem; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
/* The RiskSlayer mark beside the name; it tips a little on hover. */
.brand-mark { width: 32px; height: 32px; flex: none; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.nav-links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
@media (max-width: 760px) { .nav-links { display: none; } .nav-inner { gap: .9rem; } .nav-inner .lang { margin-left: auto; } }
/* the narrowest phones (320px): the swords alone; the link keeps its name */
@media (max-width: 360px) { .brand > span:last-child { display: none; } }

/* sign in: a plain link beside the button, kept on phones as the way into the app */
.nav-signin { text-decoration: none; color: var(--fg); font-weight: 600; font-size: .95rem; padding: .5rem .25rem; white-space: nowrap; }
.nav-signin:hover { color: var(--glow); }
@media (max-width: 760px) { .nav-signin { min-height: 44px; display: inline-flex; align-items: center; } }

/* language switch */
.lang { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.lang-btn {
  font: 600 .74rem/1 var(--font-mono); letter-spacing: .06em; color: var(--muted);
  background: transparent; border: 0; border-radius: 999px; padding: .42rem .62rem; cursor: pointer;
  transition: color .2s, background .2s;
}
.lang-btn:hover { color: var(--fg); }
.lang-btn[aria-pressed="true"] { background: var(--accent); color: #04112a; }
@media (max-width: 760px) {
  .lang { margin-left: auto; }
  .nav-inner .btn-small { margin-left: 0; }
}
@media (max-width: 520px) { .nav-inner .nav-cta { display: none; } }

/* ---------- buttons ---------- */
.btn {
  --b: var(--accent);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .85rem 1.4rem; border-radius: 999px; white-space: nowrap;
  background: var(--b); color: #04112a; font-weight: 700; text-decoration: none;
  border: 1px solid var(--b);
  box-shadow: 0 0 0 0 rgba(76, 141, 255, .0), 0 10px 30px -12px rgba(76, 141, 255, .7);
  transform: translate(var(--bx, 0px), var(--by, 0px));
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, background .2s;
  overflow: hidden; isolation: isolate;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s ease;
}
.btn:active { transform: translate(var(--bx, 0px), var(--by, 0px)) scale(.97); }
.btn:hover { transform: translate(var(--bx, 0px), calc(var(--by, 0px) - 2px)); box-shadow: 0 0 0 4px rgba(76, 141, 255, .18), 0 16px 40px -12px rgba(76, 141, 255, .8); }
.btn:hover::after { transform: translateX(120%); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--muted); box-shadow: none; }
.btn-small { padding: .5rem 1rem; font-size: .9rem; }
.btn-big { padding: 1.05rem 2rem; font-size: 1.1rem; }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto; height: 900px; pointer-events: none;
  background:
    radial-gradient(40% 40% at 72% 30%, rgba(76, 141, 255, .16), transparent 70%),
    radial-gradient(30% 35% at 20% 10%, rgba(22, 185, 121, .08), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
@property --gx { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@property --gy { syntax: "<percentage>"; inherits: false; initial-value: 40%; }
@keyframes gridLight {
  0% { --gx: 18%; --gy: 30%; }
  35% { --gx: 55%; --gy: 70%; }
  70% { --gx: 82%; --gy: 25%; }
  100% { --gx: 40%; --gy: 55%; }
}
/* ---------- page-wide grid ----------
   Fixed behind the whole page. The grid moves by transform (cheap), one
   cell per 40 s, so it loops seamlessly; the lit squares live inside the
   moving layer and stay on the lines. */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, #000 35%, rgba(0, 0, 0, .35) 100%);
  mask-image: radial-gradient(120% 90% at 50% 30%, #000 35%, rgba(0, 0, 0, .35) 100%);
}
.bg-shift {
  /* scroll and pointer parallax, set from app.js */
  position: absolute; inset: 0;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}
.bg-pan {
  position: absolute; inset: -112px;
  background-position: 0 var(--sy, 0px);
  background-image:
    linear-gradient(rgba(38, 47, 61, .55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 47, 61, .55) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: gridPan 16s linear infinite;
  will-change: transform;
}
@keyframes gridPan { to { transform: translate3d(56px, 56px, 0); } }
/* the same grid in blue, seen only through a slowly wandering spotlight */
.bg-light {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(76, 141, 255, .55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 141, 255, .55) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: 0 var(--sy, 0px);
  opacity: .25;
  -webkit-mask-image: radial-gradient(300px circle at var(--gx, 30%) var(--gy, 30%), #000, transparent 70%);
  mask-image: radial-gradient(300px circle at var(--gx, 30%) var(--gy, 30%), #000, transparent 70%);
  animation: gridLight 30s ease-in-out infinite alternate;
}
@property --gx { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@property --gy { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@keyframes gridLight {
  0% { --gx: 15%; --gy: 20%; }
  35% { --gx: 60%; --gy: 65%; }
  70% { --gx: 85%; --gy: 25%; }
  100% { --gx: 35%; --gy: 80%; }
}
.bg-cells { position: absolute; inset: 0; transform: translateY(var(--sy, 0px)); }
.bg-cell {
  position: absolute; width: 55px; height: 55px; margin: 1px 0 0 1px;
  background: rgba(76, 141, 255, .10);
  box-shadow: inset 0 0 0 1px rgba(76, 141, 255, .22);
  opacity: 0; animation: cell 4.5s ease-in-out forwards;
}
.bg-cell.g { background: rgba(22, 185, 121, .08); box-shadow: inset 0 0 0 1px rgba(22, 185, 121, .2); }
@keyframes cell { 25%, 55% { opacity: 1; } 100% { opacity: 0; } }

@keyframes drift { to { transform: translate3d(-4%, 3%, 0) scale(1.08); } }

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero-copy { display: grid; gap: 1.4rem; min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.section-head .eyebrow::before {
  content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent);
  transform-origin: left; transition: transform .7s cubic-bezier(.2, .7, .2, 1) .15s;
}
.js .section-head.reveal:not(.in) .eyebrow::before { transform: scaleX(0); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--long); box-shadow: 0 0 0 0 rgba(22, 185, 121, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(22, 185, 121, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 185, 121, 0); } }

h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -.04em; line-height: .98; }
.h1-line { display: block; }
.h1-accent {
  background: linear-gradient(92deg, var(--accent) 0%, var(--glow) 45%, var(--accent) 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: -200% 0; } }
.lede { font-size: var(--step-1); color: #c3c8d6; max-width: 34rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.cta-center { justify-content: center; }
.fine { font-size: .85rem; color: var(--muted); }

/* terminal card */
.terminal {
  margin: 0; min-width: 0;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset, 0 0 80px -30px rgba(76, 141, 255, .35);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.terminal:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.terminal-bar { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.terminal-title { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); letter-spacing: .06em; }
.badge {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .5rem; border-radius: 6px; white-space: nowrap;
}
.badge { color: var(--muted); border: 1px solid var(--line); }
.terminal-bar .badge { margin-left: auto; }
.chart-box { position: relative; height: 320px; }
#hero-chart { width: 100%; height: 100%; }
.feed {
  list-style: none; margin: 0; padding: 0 .9rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .76rem; color: var(--muted);
  display: grid; height: 2.4rem; align-content: center; overflow: hidden;
}
.feed li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: feedIn .4s ease both; }
.feed .t { color: #5d6479; margin-right: .5rem; }
.feed .fill { color: var(--long); }
.feed .tp { color: var(--accent); }
@keyframes feedIn { from { transform: translateY(6px); opacity: .2; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .terminal { transform: none; }
  .chart-box { height: 260px; }
}

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line); background: rgba(20, 25, 34, .7);
  overflow: hidden; padding-block: 1rem;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; list-style: none; margin: 0; padding: 0; }
.marquee li {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--muted);
  padding-inline: 1.6rem; white-space: nowrap; position: relative;
}
.marquee li::after { content: "◆"; position: absolute; right: -.35rem; color: var(--accent); font-size: .6rem; top: .45em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }
.section-alt { background: linear-gradient(180deg, rgba(20, 25, 34, .72) 0%, rgba(11, 14, 19, .2) 100%); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: .8rem; max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -.01em; }


/* bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  position: relative; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; display: grid; gap: .7rem; align-content: start; overflow: hidden;
}
.card p { color: var(--muted); }
.card-wide { grid-column: span 2; }
.card-full { grid-column: 1 / -1; }
.card-full .journal { grid-template-columns: repeat(3, 1fr); }
/* cursor spotlight: app.js sets --mx/--my */
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(76, 141, 255, .12), transparent 60%);
  transition: opacity .3s;
}
.spot:hover::before { opacity: 1; }
.spot:hover { border-color: #2c3550; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .card-wide { grid-column: span 2; }
.card-full { grid-column: 1 / -1; }
.card-full .journal { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; }
  .card-full .journal { grid-template-columns: 1fr; }
}

/* ladder illustration */
.ladder-viz { display: grid; gap: 7px; margin-top: .6rem; }
.lv { height: 2px; border-radius: 2px; transform-origin: left; animation: grow 3.6s ease-in-out infinite; }
.lv-tp { background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 13px); }
.lv-px { background: var(--fg); height: 2px; opacity: .8; }
.lv-in { background: var(--long); }
.lv:nth-child(1) { width: 62%; animation-delay: .6s; }
.lv:nth-child(2) { width: 70%; animation-delay: .4s; }
.lv:nth-child(3) { width: 78%; animation-delay: .2s; }
.lv:nth-child(4) { width: 100%; animation: none; }
.lv:nth-child(5) { width: 86%; animation-delay: 0s; }
.lv:nth-child(6) { width: 74%; animation-delay: .2s; }
.lv:nth-child(7) { width: 62%; animation-delay: .4s; }
.lv:nth-child(8) { width: 50%; animation-delay: .6s; }
@keyframes grow { 0%, 100% { transform: scaleX(.35); } 50% { transform: scaleX(1); } }


/* ---------- AI ---------- */
.ai-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.ai-copy { display: grid; gap: 1.2rem; min-width: 0; }
.ai-copy > p { color: #c3c8d6; max-width: 34rem; }
.ai-copy .section-head { margin-bottom: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 1.8rem; color: var(--muted); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 1rem; height: .55rem;
  border-left: 2px solid var(--long); border-bottom: 2px solid var(--long);
  transform: rotate(-45deg) translateY(-2px);
}
.chat {
  position: relative; min-width: 0; align-content: start; display: grid; gap: .9rem; padding: 1.4rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 70px -35px rgba(0, 0, 0, .9);
}
.msg { max-width: 92%; padding: .9rem 1.05rem; border-radius: 14px; display: grid; gap: .8rem; }
.msg-user { justify-self: end; background: var(--panel-2); border: 1px solid var(--line); border-bottom-right-radius: 4px; }
.msg-ai { background: linear-gradient(180deg, rgba(76, 141, 255, .08), transparent); border: 1px solid rgba(76, 141, 255, .25); border-bottom-left-radius: 4px; }
.type.typing::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.plan { font-family: var(--font-mono); font-size: .8rem; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
/* The middle column sizes to its header: a fixed share left "Исполнено" running into "Выходы". */
.plan-head, .plan-row { display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); gap: .6rem; padding: .45rem .7rem; }
.plan-head { color: var(--muted); background: var(--ink); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.plan-row { border-top: 1px solid var(--line); }
.plan-row span:first-child { color: var(--long); }
.plan-row span:last-child { color: var(--accent); }
.js .chat.in .plan-row { animation: rowIn .45s ease both; }
.js .chat.in .plan-row:nth-child(3) { animation-delay: .1s; }
.js .chat.in .plan-row:nth-child(4) { animation-delay: .2s; }
.js .chat.in .plan-row:nth-child(5) { animation-delay: .3s; }
@keyframes rowIn { from { transform: translateX(-8px); opacity: .25; } }
.plan-foot { display: flex; align-items: center; gap: .5rem; font-size: .92rem; }
.plan-actions { display: flex; gap: .5rem; }
.chip { font-size: .85rem; padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip-yes { background: var(--accent); border-color: var(--accent); color: #04112a; font-weight: 700; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(76, 141, 255, .5); } 50% { box-shadow: 0 0 0 6px rgba(76, 141, 255, 0); } }
.chat-note { font-family: var(--font-mono); font-size: .7rem; color: #5d6479; text-transform: uppercase; letter-spacing: .1em; text-align: right; }
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } }

.head-sub { color: #c3c8d6; font-size: var(--step-1); max-width: 44rem; }
.head-sub strong { color: var(--fg); }
.steps-mini { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; color: #c3c8d6; font-size: .92rem; }
.steps-mini li::marker { color: var(--accent); }

/* what the assistant can reach, grouped by how far it can go */
.tools { display: grid; gap: 1rem; min-width: 0; }
.tool-group { position: relative; padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: grid; gap: .7rem; }
.tool-label { display: flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-read { background: var(--long); box-shadow: 0 0 10px var(--long); }
.dot-draft { background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.dot-act { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tool-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tool-group li { font-size: .85rem; padding: .3rem .7rem; border-radius: 999px; background: var(--ink); border: 1px solid var(--line); color: #c3c8d6; transition: border-color .2s, color .2s; }
.tool-group li:hover { border-color: var(--muted); color: var(--fg); }
.tool-note { font-size: .85rem; color: var(--muted); }
.tools .ticks { margin-top: .4rem; }


/* learn */
.learn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.learn-copy { display: grid; gap: 1.2rem; min-width: 0; }
.learn-copy > p { color: #c3c8d6; font-size: var(--step-1); }
.learn-copy .section-head { margin-bottom: 0; }
.qs { display: grid; gap: .55rem; }
.q {
  font: inherit; font-size: .98rem; text-align: left; cursor: pointer;
  padding: .8rem 1rem; border-radius: 12px; color: #c3c8d6;
  background: var(--ink); border: 1px solid var(--line);
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.q::before { content: "→ "; color: var(--muted); transition: color .2s; }
.q:hover { color: var(--fg); transform: translateX(4px); }
.q[aria-selected="true"] { color: var(--fg); border-color: var(--accent); background: var(--accent-soft); }
.q[aria-selected="true"]::before { color: var(--accent); }
.answer-box {
  position: relative; min-width: 0; padding: 1.6rem; border-radius: 18px; display: grid; gap: .8rem;
  background: linear-gradient(180deg, rgba(76, 141, 255, .07), var(--panel) 40%);
  border: 1px solid rgba(76, 141, 255, .25);
  box-shadow: 0 30px 70px -35px rgba(0, 0, 0, .9);
}
.answer { display: grid; gap: .8rem; animation: feedIn .45s ease both; }
.answer p { color: #d3d7e2; }
.answer .answer-tag { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 900px) { .learn-grid { grid-template-columns: 1fr; } }

/* journal timeline in the features */
.journal { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .45rem; font-size: .9rem; }
.journal li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem;
  padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--ink);
  animation: jIn 6s ease-in-out infinite;
}
.journal li:nth-child(2) { animation-delay: .6s; }
.journal li:nth-child(3) { animation-delay: 1.2s; }
.j-dot { width: 8px; height: 8px; border-radius: 50%; }
.j-fill { background: var(--long); }
.j-arm { background: transparent; border: 2px solid var(--accent); }
.j-tp { background: var(--accent); }
.j-t { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }
@keyframes jIn { 0%, 100% { border-color: var(--line); } 15% { border-color: rgba(76, 141, 255, .55); } }

/* ---------- safety ---------- */
.safety { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.safe { background: var(--ink); padding: 1.8rem 1.6rem; display: grid; gap: .7rem; align-content: start; min-width: 0; transition: background .3s; }
.safe:hover { background: var(--panel); }
.safe svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .3rem; }
.safe p { color: var(--muted); }
.js .safe svg * { stroke-dasharray: 90; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(.4, 0, .2, 1) .25s; }
.js .safe:not(.in) svg * { stroke-dashoffset: 90; }
@media (max-width: 900px) { .safety { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .safety { grid-template-columns: 1fr; } }

/* best-practice tags above the security cards */
.practices { list-style: none; margin: 0 0 1.6rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.practices li {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .02em;
  padding: .42rem .8rem; border-radius: 999px; color: var(--fg);
  background: var(--accent-soft); border: 1px solid rgba(76, 141, 255, .35);
}
.practices li::before { content: "✓ "; color: var(--long); }

/* ---------- manifesto ---------- */
.manifesto { padding-block: clamp(4.5rem, 10vw, 8rem); position: relative; overflow: hidden; }
.manifesto::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(76, 141, 255, .14), transparent 70%);
}
.big { position: relative; font-family: var(--font-display); font-weight: 800; font-size: var(--step-4); line-height: 1.02; letter-spacing: -.035em; max-width: 16ch; text-wrap: balance; }
.hl { position: relative; white-space: nowrap; color: var(--accent); }
.hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .09em; border-radius: 4px;
  background: var(--accent); transform-origin: left; transform: scaleX(1); transition: transform 1.1s .3s cubic-bezier(.2, .7, .2, 1);
}
.js .manifesto .reveal:not(.in) .hl::after { transform: scaleX(0); }
/* On a phone the highlighted words may not fit on one line ("профессиональный
   бюджет" is ~500px), and the section's overflow: hidden would cut them off.
   Let them wrap, and draw the underline as a background cloned onto every
   line, since an absolute ::after on a wrapped inline spans the wrong box. */
@media (max-width: 600px) {
  .hl {
    white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone;
    background: linear-gradient(var(--accent), var(--accent)) no-repeat left 0 bottom .06em / 100% .09em;
    transition: background-size 1.1s .3s cubic-bezier(.2, .7, .2, 1);
  }
  .hl::after { display: none; }
  .js .manifesto .reveal:not(.in) .hl { background-size: 0 .09em; }
}
.manifesto-sub { position: relative; margin-top: 1.6rem; max-width: 38rem; color: var(--muted); font-size: var(--step-1); }

/* ---------- access ---------- */
.access { border-top: 1px solid var(--line); }
.access-inner { display: grid; gap: 1.2rem; justify-items: center; text-align: center; max-width: 44rem; }
.access-inner p { color: var(--muted); font-size: var(--step-1); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: start; }
.brand-sm { font-family: var(--font-display); font-weight: 800; }
.disclaimer { color: var(--muted); font-size: .85rem; max-width: 60ch; }
.copy { color: #5d6479; font-size: .85rem; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: .8rem; } }

/* ---------- reveal on scroll ----------
   Content is readable without JS and before any observer fires: the start
   state is only a small offset and a dim, never invisible. */
.js .reveal { transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .8s ease; }
.js .reveal:not(.in) { transform: translateY(18px); opacity: .35; }
.js .steps .reveal:nth-child(2), .js .bento .reveal:nth-child(2), .js .safety .reveal:nth-child(2) { transition-delay: .08s; }
.js .steps .reveal:nth-child(3), .js .bento .reveal:nth-child(3), .js .safety .reveal:nth-child(3) { transition-delay: .16s; }
.js .steps .reveal:nth-child(4), .js .bento .reveal:nth-child(4), .js .safety .reveal:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal:not(.in) { transform: none; opacity: 1; }
  .terminal { transform: none; }
}

/* Russian runs about a quarter longer than English. */
:root:lang(ru) h1, :root:lang(ru) .big { font-size: clamp(2.3rem, 1.3rem + 4.2vw, 4.4rem); }
/* "Профессиональным" alone is ~9.6 em-widths: cap the manifesto by the screen so it fits at 360px. */
:root:lang(ru) .big { font-size: min(clamp(2.3rem, 1.3rem + 4.2vw, 4.4rem), calc((100vw - 2.5rem) / 9.8)); }
:root:lang(ru) .marquee li { font-size: .98rem; }

/* ---------- hero control: one row ---------- */
.tune { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .7rem .9rem; border-top: 1px solid var(--line); }
.tune-label { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--glow); }
.seg { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); }
.seg button {
  font: 600 .8rem/1 var(--font-mono); color: var(--muted); background: transparent; border: 0;
  border-radius: 7px; padding: .45rem .8rem; cursor: pointer; transition: background .2s, color .2s;
}
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #04112a; }

/* ---------- scroll story ---------- */
.story-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.story-visual { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); min-width: 0; }
.story-stage {
  position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9);
}
.story-chart { position: absolute; inset: 8% 14% 26% 6%; width: 80%; height: 66%; overflow: visible; }
.sc-grid path { stroke: rgba(138, 148, 166, .1); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.sc-entry { stroke: var(--long); stroke-width: 1.5; stroke-dasharray: 6 6; opacity: .6; vector-effect: non-scaling-stroke; transition: opacity .5s; }
.sc-tp { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .6s; }
.sc-price {
  fill: none; stroke: var(--fg); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 100; stroke-dashoffset: 65; transition: stroke-dashoffset 1.2s cubic-bezier(.4, 0, .2, 1);
}
.sc-dot { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.3); transition: opacity .4s, transform .5s cubic-bezier(.2, .9, .3, 1.4); }
.sc-fill { fill: var(--long); filter: drop-shadow(0 0 6px var(--long)); }
.sc-hit { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.sc-tags { position: absolute; inset: 8% 4% 26% auto; width: 9%; }
.sc-tag {
  position: absolute; right: 0; transform: translateY(-50%); font-family: var(--font-mono); font-size: .66rem; font-weight: 700;
  padding: .12rem .35rem; border-radius: 4px; border: 1px solid var(--long); color: var(--long); background: var(--panel);
}
/* the tags sit at the same heights as the lines (viewBox 260 tall) */
.t-e1 { top: calc(150 / 260 * 100%); } .t-e2 { top: calc(185 / 260 * 100%); } .t-e3 { top: calc(220 / 260 * 100%); }
.t-tp { top: calc(100 / 260 * 100%); border-color: var(--accent); color: var(--accent); opacity: 0; transition: opacity .6s; }
.toasts { position: absolute; top: 5%; right: 4%; display: grid; gap: .5rem; width: min(62%, 300px); }
.toast {
  display: grid; gap: .15rem; padding: .6rem .8rem; border-radius: 12px; font-size: .8rem; color: var(--fg);
  background: rgba(27, 34, 48, .92); border: 1px solid var(--line); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .9);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-10px) scale(.97); transition: opacity .45s, transform .5s cubic-bezier(.2, .9, .3, 1.2);
}
.toast-app { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--glow); }
.story-journal { position: absolute; left: 4%; right: 4%; bottom: 4%; margin: 0; grid-template-columns: repeat(3, 1fr); font-size: .78rem; }
.story-journal li { opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .5s; animation: none; }

/* stages: what the picture shows at each step */
.story-stage[data-stage="1"] .sc-price { stroke-dashoffset: 42; }
.story-stage[data-stage="2"] .sc-price, .story-stage[data-stage="3"] .sc-price { stroke-dashoffset: 42; }
.story-stage[data-stage="4"] .sc-price, .story-stage[data-stage="5"] .sc-price { stroke-dashoffset: 0; }
.story-stage:not([data-stage="0"]) .sc-fill { opacity: 1; transform: scale(1); }
.story-stage:not([data-stage="0"]) .e1 { opacity: 1; stroke-dasharray: none; }
.story-stage:is([data-stage="2"], [data-stage="3"], [data-stage="4"], [data-stage="5"]) :is(.sc-tp, .t-tp) { opacity: 1; }
.story-stage:is([data-stage="3"], [data-stage="4"], [data-stage="5"]) .toast-1 { opacity: 1; transform: none; }
.story-stage:is([data-stage="4"], [data-stage="5"]) .toast-2 { opacity: 1; transform: none; }
.story-stage:is([data-stage="4"], [data-stage="5"]) .sc-hit { opacity: 1; transform: scale(1); }
.story-stage[data-stage="5"] .story-journal li { opacity: 1; transform: none; }
.story-stage[data-stage="5"] .story-journal li:nth-child(2) { transition-delay: .12s; }
.story-stage[data-stage="5"] .story-journal li:nth-child(3) { transition-delay: .24s; }

.story-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.story-step {
  min-height: 62vh; display: grid; align-content: center; gap: .6rem; padding-block: 2rem;
  opacity: .35; transition: opacity .5s;
}
.story-step:first-child { min-height: 40vh; align-content: start; }
.story-step:last-child { min-height: 50vh; }
.story-step.active { opacity: 1; }
.story-step h3 { font-size: var(--step-2); }
.story-step p { color: var(--muted); font-size: var(--step-1); max-width: 30rem; }
.story-step .step-n {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; color: var(--muted);
  background: var(--ink); border: 1px solid var(--line); transition: border-color .4s, color .4s, box-shadow .4s;
}
.story-step.active .step-n { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 24px -6px var(--accent); }
@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  /* the picture stays pinned under the nav while the steps scroll beneath it */
  .story-visual { top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 2; padding-block: .5rem; background: var(--ink); }
  .story-stage { aspect-ratio: 16 / 11; }
  .story-step, .story-step:first-child, .story-step:last-child { min-height: 52vh; align-content: center; }
  /* phones: one alert at a time, along the bottom, gone when the journal arrives */
  .toasts { top: auto; bottom: 4%; left: 4%; right: 4%; width: auto; }
  .toast { font-size: .74rem; padding: .45rem .65rem; grid-area: 1 / 1; }
  .story-stage:is([data-stage="4"], [data-stage="5"]) .toast-1,
  .story-stage[data-stage="5"] .toast-2 { opacity: 0; transform: translateY(8px); }
  .story-journal { font-size: .68rem; gap: .3rem; }
  .story-journal li { padding: .35rem .45rem; gap: .35rem; grid-template-columns: auto 1fr; }
  .story-journal .j-t { display: none; }
}
@media (prefers-reduced-motion: reduce) { .story-step { opacity: 1; } }

/* ---------- pointer light along the border ---------- */
.spot::after, .glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(142, 197, 255, .9), rgba(76, 141, 255, .35) 35%, transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.spot:hover::after, .glow:hover::after { opacity: 1; }

/* ---------- film grain ----------
   A static noise tile (an inline SVG, which the CSP's img-src data: allows)
   over everything, faint enough to read as texture rather than dirt. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 70; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .045; mix-blend-mode: overlay;
}

/* ---------- headings settle into their weight as they arrive ---------- */
h1, h2, .big { transition: font-weight 1.1s cubic-bezier(.2, .7, .2, 1), letter-spacing 1.1s cubic-bezier(.2, .7, .2, 1); }
.js h1.reveal, .js .big.reveal {
  transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .8s ease,
              font-weight 1.1s cubic-bezier(.2, .7, .2, 1), letter-spacing 1.1s cubic-bezier(.2, .7, .2, 1);
}
.js .reveal:not(.in) h2, .js h1.reveal:not(.in), .js .big.reveal:not(.in) { font-weight: 500; letter-spacing: 0; }

/* ---------- language switch: a soft cross-fade with a little lift ---------- */
::view-transition-old(root) { animation: vtOut .28s ease both; }
::view-transition-new(root) { animation: vtIn .38s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes vtOut { to { opacity: 0; filter: blur(3px); } }
@keyframes vtIn { from { opacity: 0; filter: blur(3px); transform: translateY(6px); } }

/* ================= phones first =================
   Everything below tunes the page for a ~390px touch screen: the chart in
   the first view, a shorter scroll, 44px tap targets, legible small text,
   and none of the effects that repaint the whole screen every frame. */
@media (max-width: 760px) {
  /* 1. hero: tighter, so the live chart starts inside the first screen */
  .hero { padding-block: 1.4rem 2.5rem; }
  .hero-copy { gap: 1rem; }
  .lede { font-size: 1rem; line-height: 1.55; }
  .hero-cta2 { display: none; }          /* the AI section is a scroll away */
  .cta-row .btn:not(.btn-small) { flex: 1 1 auto; }
  .chart-box { height: 230px; }

  /* 2. a shorter page */
  .section { padding-block: 3.25rem; }
  .manifesto { padding-block: 3.5rem; }
  .section-head { margin-bottom: 1.6rem; }
  .story-step, .story-step:first-child, .story-step:last-child { min-height: 38svh; padding-block: 1.2rem; }
  .story-step h3 { font-size: 1.25rem; }
  .story-step p { font-size: 1rem; }
  .story-stage { aspect-ratio: 16 / 10; }
  .card, .safe { padding: 1.25rem; }
  .tool-group { padding: 1rem; }
  .chat, .answer-box { padding: 1.1rem; }
  .footer { padding-block: 2rem calc(2rem + 76px); }   /* room for the action bar */

  /* 3. tap targets of at least 44px */
  .lang-btn { min-width: 44px; min-height: 40px; padding: 0 .7rem; font-size: .8rem; }
  .seg button { min-width: 44px; min-height: 40px; font-size: .9rem; }
  .q { min-height: 48px; }

  /* 4. no text under 13px */
  .feed, .tune-label, .practices li, .chip, .plan, .tool-label, .chat-note, .answer-tag, .eyebrow, .badge, .terminal-title { font-size: max(13px, .8rem); }
  .plan-head { font-size: 12px; }

  /* 5. effects that cost a full-screen repaint every frame stay off:
        the wandering light and the blended grain. The grid still drifts
        (a transform, cheap) and the squares still light up. */
  .bg-light { display: none; }
  body::after { mix-blend-mode: normal; opacity: .025; }
  .hero-glow { animation: none; }
  .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(11, 14, 19, .94); }
}

/* 6. the bottom action bar (phones only), with the home indicator's inset */
.mbar { display: none; }
@media (max-width: 760px) {
  .mbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: .7rem max(16px, env(safe-area-inset-right, 0px)) calc(.7rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: linear-gradient(180deg, rgba(11, 14, 19, 0), rgba(11, 14, 19, .92) 35%);
    transform: translateY(110%); transition: transform .35s cubic-bezier(.2, .7, .2, 1);
  }
  .mbar .btn { width: 100%; }
  .mbar.show { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .mbar { transition: none; } }
