/* ==========================================================================
   Subux — components
   Без внешних библиотек: ни Bootstrap, ни Font Awesome, ни jQuery.
   Классы плоские (BEM-подобные), всё поведение — на CSS + ui.js.
   ========================================================================== */

/* ---------- 1. Reset ---------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  min-height: 100dvh;
  background: var(--bg-1);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58vw 42vw at 82% -10%, rgba(55, 200, 255, 0.10), transparent 70%),
    radial-gradient(46vw 34vw at 6% 2%, rgba(47, 227, 165, 0.10), transparent 72%),
    radial-gradient(80vw 56vw at 50% 112%, rgba(91, 157, 255, 0.06), transparent 70%);
}

img, svg, video, canvas { display: block; max-width: 100%; }
svg { fill: none; }

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

::selection { background: rgba(47, 227, 165, 0.28); color: #fff; }

/* скроллбар */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border: 3px solid transparent;
  border-radius: 99px;
  background-clip: content-box;
}

/* ---------- 2. Типографика --------------------------------------------- */
h1, h2, h3, h4, h5 {
  color: var(--text-1);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}
h1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); font-weight: 800; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

strong { color: var(--text-1); font-weight: 600; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.pos { color: var(--success); }
.neg { color: var(--danger); }
.grad-text {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nowrap { white-space: nowrap; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- 3. Каркас --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.section { padding-block: clamp(56px, 8vw, 104px); position: relative; z-index: 1; }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }

.section__head { max-width: 660px; margin-bottom: clamp(28px, 4vw, 48px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__title { margin-top: 14px; }
.section__sub { margin-top: 14px; font-size: var(--fs-md); color: var(--text-2); }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: 1 / -1; }

.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.row .input { flex: 1; min-width: 0; }

.divider { height: 1px; background: var(--line-1); border: 0; }

/* ---------- 4. Кнопки --------------------------------------------------- */
.btn {
  --btn-h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding-inline: 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--text-1);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease),
              background var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease),
              filter var(--dur-2) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--grad-accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover { filter: brightness(1.07); box-shadow: 0 18px 46px -14px var(--accent-glow); }

.btn--ghost {
  background: var(--surface-1);
  border-color: var(--line-2);
  color: var(--text-1);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line-2); }

.btn--soft {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}
.btn--soft:hover { background: rgba(47, 227, 165, 0.18); }

.btn--quiet { background: transparent; color: var(--text-2); }
.btn--quiet:hover { color: var(--text-1); background: var(--surface-1); }

.btn--sm { --btn-h: 36px; padding-inline: 14px; font-size: var(--fs-sm); border-radius: var(--r-xs); }
.btn--lg { --btn-h: 54px; padding-inline: 26px; font-size: var(--fs-md); border-radius: var(--r-md); }
.btn--block { width: 100%; }
.btn--icon { width: 40px; height: 40px; padding: 0; border-radius: var(--r-sm); }

.btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; flex: none; }

.link {
  color: var(--text-1);
  border-bottom: 1px solid var(--line-2);
  transition: border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.link:hover { color: var(--accent); border-color: var(--accent-line); }

/* ---------- 5. Бейджики и пилюли ---------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding-inline: 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; }
.badge--success { background: var(--success-soft); color: var(--success); border-color: rgba(47, 227, 165, 0.22); }
.badge--info { background: var(--info-soft); color: var(--info); border-color: rgba(91, 157, 255, 0.22); }
.badge--warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(255, 194, 75, 0.22); }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 95, 122, 0.22); }
.badge--accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 227, 165, 0.16);
  flex: none;
}
.dot--live { animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(47, 227, 165, 0.16); }
  50% { box-shadow: 0 0 0 7px rgba(47, 227, 165, 0.04); }
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding-inline: 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-1);
  background: var(--surface-1);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  transition: border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.pill:hover { border-color: var(--line-2); color: var(--text-1); }
.pill span { color: var(--text-3); font-weight: 500; }

/* ---------- 6. Карточки ------------------------------------------------- */
.card {
  position: relative;
  background: var(--grad-card);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: var(--blur);
  transition: border-color var(--dur-2) var(--ease),
              transform var(--dur-2) var(--ease),
              box-shadow var(--dur-2) var(--ease);
}
.card--pad { padding: clamp(18px, 2.2vw, 26px); }
.card--hover:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-pop);
}
.card--accent { border-color: var(--accent-line); }
.card--accent::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grad-accent-soft);
  opacity: 0.55;
  pointer-events: none;
}
.card--accent > * { position: relative; z-index: 1; }

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.card__title { font-size: var(--fs-md); font-weight: 650; color: var(--text-1); }
.card__hint { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-3); }

/* ---------- 7. Шапка сайта ---------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.site-header.is-scrolled {
  background: rgba(8, 12, 18, 0.72);
  border-bottom-color: var(--line-1);
  backdrop-filter: var(--blur);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--grad-accent);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px -10px var(--accent-glow);
}
.brand__mark svg { width: 19px; height: 19px; stroke: var(--accent-ink); stroke-width: 2.4; }
.brand__name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.brand__name span { color: var(--accent); }

.nav { margin-right: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding-inline: 12px;
  border-radius: var(--r-xs);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.nav__link:hover { color: var(--text-1); background: var(--surface-1); }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 18px;
  height: 1.6px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-1) var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* мобильное меню */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 auto;
  z-index: var(--z-header);
  padding: 12px var(--gutter) 24px;
  background: rgba(8, 12, 18, 0.96);
  border-bottom: 1px solid var(--line-1);
  backdrop-filter: var(--blur);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility var(--dur-2);
}
.mobile-menu.is-open { opacity: 1; transform: none; visibility: visible; }
.mobile-menu a:not(.btn) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-1);
  border-bottom: 1px solid var(--line-1);
}
.mobile-menu a:not(.btn):last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 12px; }
.mobile-menu .btn:first-of-type { margin-top: 18px; }

/* ---------- 8. Hero ----------------------------------------------------- */
.hero { padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 88px); position: relative; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding-inline: 12px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-1);
  background: var(--surface-1);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.hero__title { margin-top: 20px; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__lead {
  margin-top: 20px;
  max-width: 46ch;
  font-size: var(--fs-md);
  color: var(--text-2);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__note { margin-top: 14px; font-size: var(--fs-sm); color: var(--text-3); }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 26px;
  border-top: 1px solid var(--line-1);
}
.stat__value {
  font-size: clamp(1.25rem, 1rem + 0.7vw, 1.6rem);
  font-weight: 700;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat__label { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-3); }

/* витрина-превью кабинета */
.preview {
  position: relative;
  padding: 18px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(22, 30, 41, 0.9), rgba(11, 15, 22, 0.94));
  box-shadow: var(--shadow-pop);
  backdrop-filter: var(--blur);
}
.preview::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(47, 227, 165, 0.5), transparent 38%, transparent 62%, rgba(55, 200, 255, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.preview__bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.preview__bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.preview__bar span:first-child { background: rgba(255, 95, 122, 0.6); }
.preview__bar span:nth-child(2) { background: rgba(255, 194, 75, 0.6); }
.preview__bar span:nth-child(3) { background: rgba(47, 227, 165, 0.6); }
.preview__bar em {
  margin-left: auto;
  font-style: normal;
  font-size: var(--fs-xs);
  color: var(--text-3);
  font-family: var(--font-mono);
}

.preview__balance {
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--grad-accent-soft);
  border: 1px solid var(--accent-line);
}
.preview__balance small { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.preview__sum {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.preview__delta { font-size: var(--fs-sm); color: var(--success); font-weight: 600; }

.preview__rows { display: grid; gap: 8px; margin-top: 14px; }
.pv-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-1);
  border: 1px solid var(--line-1);
}
.pv-row__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--accent);
  flex: none;
}
.pv-row__icon svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; }
.pv-row__title { font-size: var(--fs-sm); font-weight: 550; color: var(--text-1); }
.pv-row__meta { font-size: var(--fs-xs); color: var(--text-3); }
.pv-row__pay { margin-left: auto; font-size: var(--fs-sm); font-weight: 650; color: var(--success); font-variant-numeric: tabular-nums; }

/* ---------- 9. Секции лендинга ------------------------------------------ */
.bento { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { padding: 26px 24px; }
.step__num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-weight: 700;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.step__title { margin-top: 18px; font-size: var(--fs-md); }
.step__text { margin-top: 8px; font-size: var(--fs-base); color: var(--text-2); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 24px; }
.feature__icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-1);
  color: var(--accent);
  margin-bottom: 16px;
}
.feature__icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; }
.feature__title { font-size: var(--fs-base); font-weight: 650; color: var(--text-1); }
.feature__text { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-3); }

.list-check { display: grid; gap: 10px; }
.list-check li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--fs-base);
  color: var(--text-2);
}
.list-check svg {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: none;
  stroke: var(--accent);
  stroke-width: 2.2;
}

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; margin-inline: auto; }
.faq__item {
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-1);
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.faq__item[open] { border-color: var(--line-2); background: var(--surface-2); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-1);
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.8px solid var(--text-3);
  border-bottom: 1.8px solid var(--text-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
  flex: none;
}
.faq__item[open] .faq__q::after { transform: rotate(225deg) translateY(-2px); border-color: var(--accent); }
.faq__a { padding: 0 20px 20px; margin-top: -4px; color: var(--text-2); font-size: var(--fs-base); }

/* CTA-полоса */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vw, 60px);
  border-radius: var(--r-xl);
  border: 1px solid var(--accent-line);
  background:
    radial-gradient(60% 120% at 12% 0%, rgba(47, 227, 165, 0.22), transparent 62%),
    radial-gradient(50% 120% at 92% 100%, rgba(55, 200, 255, 0.18), transparent 60%),
    var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta h2 { max-width: 22ch; }
.cta p { margin-top: 10px; color: var(--text-2); max-width: 46ch; }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 10. Подвал -------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-1);
  background: linear-gradient(180deg, rgba(8, 12, 18, 0), rgba(8, 12, 18, 0.7));
  padding-top: clamp(40px, 5vw, 64px);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 40px;
}
.footer__col p { margin-top: 14px; font-size: var(--fs-sm); color: var(--text-3); max-width: 32ch; }
.footer__title {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.footer__list { display: grid; gap: 10px; }
.footer__list a { font-size: var(--fs-sm); color: var(--text-2); transition: color var(--dur-2) var(--ease); }
.footer__list a:hover { color: var(--accent); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line-1);
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__legal a:hover { color: var(--text-1); }

/* ---------- 11. Формы --------------------------------------------------- */
.field { display: grid; gap: 7px; }
.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 550;
  color: var(--text-2);
}
.field__label span { color: var(--text-3); font-weight: 400; }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text-1);
  font-size: var(--fs-base);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(255, 255, 255, 0.2); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: rgba(255, 255, 255, 0.05);
}
.input[aria-invalid="true"] { border-color: rgba(255, 95, 122, 0.55); box-shadow: 0 0 0 4px var(--danger-soft); }
.textarea { min-height: 110px; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
}

.help { font-size: var(--fs-xs); color: var(--text-3); }
.field__error { font-size: var(--fs-xs); color: var(--danger); display: none; }
.input[aria-invalid="true"] ~ .field__error { display: block; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form { display: grid; gap: 18px; }

.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
.checkbox input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.checkbox input:checked { background: var(--grad-accent); border-color: transparent; }
.checkbox input:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(-45deg) translateY(-1px);
}
.checkbox a { color: var(--text-1); border-bottom: 1px solid var(--line-2); }

/* табы / сегменты */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--line-1); }
.tab {
  flex: 1;
  height: 38px;
  border-radius: var(--r-xs);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-3);
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.tab:hover { color: var(--text-1); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--text-1); }

/* ---------- 12. Каркас кабинета ----------------------------------------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* подсказка, что меню прокручивается */
.sidebar-fade {
  position: fixed;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  height: 56px;
  z-index: 45;
  pointer-events: none;
  background: linear-gradient(to top, rgba(9, 13, 19, 0.96), rgba(9, 13, 19, 0));
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
}
.sidebar-fade.is-visible { opacity: 1; }
@media (max-width: 960px) {
  .sidebar-fade { display: none; }
}

.sidebar {
  position: sticky;
  top: 0;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  border-right: 1px solid var(--line-1);
  background: rgba(9, 13, 19, 0.6);
  backdrop-filter: var(--blur);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sidebar__brand { padding-inline: 8px; }
.side-nav { display: grid; gap: 2px; flex: 0 0 auto; }
.side-nav__title {
  padding: 16px 10px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-4);
}
.side-nav__link {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding-inline: 10px;
  border-radius: var(--r-sm);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-2);
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.side-nav__link svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; flex: none; opacity: 0.85; }
.side-nav__link:hover { background: var(--surface-1); color: var(--text-1); }
.side-nav__link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.side-nav__link .badge { margin-left: auto; height: 20px; padding-inline: 7px; font-size: 0.6875rem; }
.sidebar__foot { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-1); display: grid; gap: 10px; }

.side-card {
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-1);
  background: var(--grad-accent-soft);
}
.side-card__title { font-size: var(--fs-sm); font-weight: 650; color: var(--text-1); }
.side-card__text { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-2); }
.side-card .progress { margin-top: 10px; }

.app__main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--line-1);
  background: rgba(8, 12, 18, 0.72);
  backdrop-filter: var(--blur);
}
.topbar__title { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.02em; color: var(--text-1); }
.topbar__sub { font-size: var(--fs-sm); color: var(--text-3); margin-top: 1px; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding-inline: 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--accent-line);
  background: var(--grad-accent-soft);
  font-weight: 650;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.balance-chip small { font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }

.page { padding: clamp(18px, 3vw, 32px); display: grid; gap: 16px; align-content: start; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page__title { font-size: var(--fs-xl); }
.page__sub { margin-top: 4px; color: var(--text-3); font-size: var(--fs-base); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 18px; }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi__label { font-size: var(--fs-sm); color: var(--text-3); }
.kpi__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-2);
  flex: none;
}
.kpi__icon svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; }
.kpi__icon--accent { background: var(--accent-soft); color: var(--accent); }
.kpi__icon--info { background: var(--info-soft); color: var(--info); }
.kpi__icon--warn { background: var(--warn-soft); color: var(--warn); }
.kpi__value {
  margin-top: 14px;
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.kpi__value small { font-size: var(--fs-sm); font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.kpi__foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: var(--fs-xs); color: var(--text-3); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-xs); background: var(--surface-1); border: 1px solid var(--line-1); }
.segmented__btn {
  height: 30px;
  padding-inline: 12px;
  border-radius: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-3);
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.segmented__btn:hover { color: var(--text-1); }
.segmented__btn.is-active { background: var(--surface-3); color: var(--text-1); }

.chart { position: relative; }
.chart__canvas { width: 100%; height: 220px; overflow: visible; }
.chart--sm .chart__canvas { height: 132px; }
.chart__tip {
  position: absolute;
  padding: 6px 9px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-2);
  background: rgba(10, 15, 22, 0.94);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-1);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -130%);
  transition: opacity var(--dur-1) var(--ease);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chart__tip.is-visible { opacity: 1; }
.chart__legend { display: flex; gap: 18px; margin-top: 12px; font-size: var(--fs-xs); color: var(--text-3); flex-wrap: wrap; }
.chart__legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }

.spark__grid { stroke: var(--line-1); stroke-width: 1; }
.spark__line { stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.spark__area { fill: url(#sparkFill); }
.spark__dot { fill: var(--bg-1); stroke: var(--accent); stroke-width: 2.2; }

/* рекламные слоты 200x300 в кабинете */
.banner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
}
.banner-row img {
  border-radius: var(--r-sm);
  width: 200px;
  height: 300px;
  object-fit: contain;
  background: var(--surface-1);
}

/* вкладки разделов заработка (внутри старая разметка section_earnings) */
.sx-earn-tabs > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 !important;
}
.sx-earn-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-1);
  background: var(--surface-1);
  color: var(--text-2) !important;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.sx-earn-tabs a:hover { color: var(--text-1) !important; border-color: var(--line-2); }
.sx-earn-tabs a.content_bar_buttom1_act {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent) !important;
}
.sx-earn-tabs a font,
.sx-earn-tabs a span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-1);
}

/* список серфинга */
.surf-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-1);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.surf-item:hover { border-color: var(--line-2); background: var(--surface-2); }
.surf-item__type { display: grid; gap: 6px; justify-items: start; }
.surf-item__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-base);
  font-weight: 650;
  color: var(--text-1);
}
.surf-item__title img { flex: none; border-radius: 4px; }
.surf-item__desc { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-3); }
.surf-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.surf-item__price { color: var(--success); font-weight: 650; }
.surf-item__sep { color: var(--text-4); }
.surf-item__actions { display: flex; align-items: center; gap: 8px; }

.banner-wide { display: grid; place-items: center; }
.banner-wide img { max-width: 100%; height: auto; border-radius: var(--r-sm); }

@media (max-width: 720px) {
  .surf-item { grid-template-columns: minmax(0, 1fr); }
  .surf-item__actions { justify-content: flex-end; }
}

/* карточки YouTube */
.yt-item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-1);
}
.yt-item__thumb { position: relative; display: block; border-radius: var(--r-sm); overflow: hidden; }
.yt-item__thumb img { display: block; width: 100%; height: auto; }
.yt-item__time {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.yt-item__title { font-size: var(--fs-base); font-weight: 650; color: var(--text-1); }
.yt-item__desc { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-3); }
@media (max-width: 720px) {
  .yt-item { grid-template-columns: minmax(0, 1fr); }
  .yt-item__actions { justify-self: end; }
}

/* ВКонтакте */
.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-chip {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-1);
  background: var(--surface-1);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.sx-chip:hover { color: var(--text-1); border-color: var(--line-2); }
.sx-chip.is-active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.vk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.vk-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-1);
}
.vk-card__top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vk-card__avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface-2); }
.vk-card__title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vk-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* пагинация */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pager__info { font-size: var(--fs-sm); color: var(--text-3); }

/* список заданий */
.task-list { display: grid; gap: 8px; }
.task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-1);
  background: var(--surface-1);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.task:hover { border-color: var(--line-2); background: var(--surface-2); }
.task__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--accent);
  flex: none;
}
.task__icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; }
.task__body { min-width: 0; flex: 1; }
.task__title { font-size: var(--fs-base); font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task__meta { display: flex; align-items: center; gap: 10px; margin-top: 3px; font-size: var(--fs-xs); color: var(--text-3); flex-wrap: wrap; }
.task__pay { font-size: var(--fs-base); font-weight: 700; color: var(--success); font-variant-numeric: tabular-nums; white-space: nowrap; }
.task__action { flex: none; }

/* прогресс */
.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress__bar { height: 100%; border-radius: inherit; background: var(--grad-accent); transition: width var(--dur-3) var(--ease-out); }
.progress--sm { height: 5px; }
.progress__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: var(--fs-sm); }

/* таблица операций */
.table-wrap { overflow-x: auto; }
.table { font-size: var(--fs-sm); }
.table th {
  text-align: left;
  padding: 10px 12px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--line-1);
  white-space: nowrap;
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line-1); color: var(--text-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-1) var(--ease); }
.table tbody tr:hover { background: var(--surface-1); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td:first-child, .table th:first-child { padding-left: 0; }
.table td:last-child, .table th:last-child { padding-right: 0; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad-accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: var(--fs-sm);
  flex: none;
  overflow: hidden;
}
.avatar--sm { width: 28px; height: 28px; font-size: var(--fs-xs); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-sm); }
.user-chip__name { font-size: var(--fs-sm); font-weight: 600; color: var(--text-1); line-height: 1.2; }
.user-chip__role { font-size: var(--fs-xs); color: var(--text-3); }

/* мобильная навигация кабинета */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sheet);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-1);
  background: rgba(8, 12, 18, 0.92);
  backdrop-filter: var(--blur);
}
.bottom-nav ul { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.bottom-nav a {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: var(--r-xs);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-3);
}
.bottom-nav svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; }
.bottom-nav a.is-active { color: var(--accent); background: var(--accent-soft); }

/* ---------- 13. Авторизация -------------------------------------------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); min-height: 100dvh; position: relative; z-index: 1; }
.auth__aside {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 32px;
  border-right: 1px solid var(--line-1);
  background:
    radial-gradient(70% 60% at 10% 0%, rgba(47, 227, 165, 0.16), transparent 60%),
    radial-gradient(60% 60% at 90% 100%, rgba(55, 200, 255, 0.14), transparent 60%),
    var(--bg-1);
}
.auth__aside-body { margin-block: auto; }
.auth__aside h2 { max-width: 20ch; }
.auth__aside p { margin-top: 14px; max-width: 40ch; color: var(--text-2); }
.auth__points { display: grid; gap: 12px; margin-top: 28px; }
.auth__point { display: flex; gap: 12px; align-items: center; font-size: var(--fs-base); color: var(--text-2); }
.auth__point svg { width: 20px; height: 20px; stroke: var(--accent); stroke-width: 2; flex: none; }
.auth__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 48px);
}
.auth__brand { display: none; }
.auth__card { width: 100%; max-width: 420px; }
.auth__title { font-size: var(--fs-xl); }
.auth__sub { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-3); }
.auth__footer { margin-top: 20px; text-align: center; font-size: var(--fs-sm); color: var(--text-3); }
.auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block: 4px;
  font-size: var(--fs-xs);
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}
.auth__divider::before, .auth__divider::after { content: ""; height: 1px; background: var(--line-1); flex: 1; }

/* ---------- 14. Тост ---------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--accent-line);
  background: rgba(12, 20, 26, 0.95);
  box-shadow: var(--shadow-pop);
  backdrop-filter: var(--blur);
  font-size: var(--fs-sm);
  font-weight: 550;
  color: var(--text-1);
  transform: translate(-50%, 16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility var(--dur-2);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); visibility: visible; }
.toast svg { width: 18px; height: 18px; stroke: var(--accent); stroke-width: 2.2; }

/* ---------- 15. Утилиты ------------------------------------------------- */
/* плашка-объявление */
.site-notice {
  position: relative;
  z-index: 120;
  background: rgba(255, 194, 75, 0.12);
  border-bottom: 1px solid rgba(255, 194, 75, 0.3);
}
.site-notice__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 10px;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--warn);
}
.site-notice__inner svg { width: 16px; height: 16px; flex: none; stroke: currentColor; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.skip-link:focus { left: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; text-align: center; }
.empty__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-3);
  margin-bottom: 4px;
}
.empty__title { font-weight: 600; color: var(--text-1); }
.empty__text { font-size: var(--fs-sm); color: var(--text-3); max-width: 34ch; }

/* появление при скролле */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 16. Адаптив ------------------------------------------------- */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { max-width: 560px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split--even { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .burger { display: inline-flex; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .bottom-nav { display: block; }
  .app__main { padding-bottom: 72px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__aside { display: none; }
  .auth__brand { display: inline-flex; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: minmax(0, 1fr); }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .hero__stats > :last-child { grid-column: 1 / -1; }
  .card__head { flex-direction: column; gap: 10px; }
  .task { flex-wrap: wrap; }
  .task__action { width: 100%; }
  .task__action .btn { width: 100%; }
  .page__head { align-items: flex-start; flex-direction: column; }
  .cta { flex-direction: column; align-items: flex-start; }
  .cta__actions { width: 100%; }
  .cta__actions .btn { flex: 1; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .topbar { min-height: 64px; }
  .balance-chip small { display: none; }
  .chart__canvas { height: 180px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .header-actions .btn--ghost { display: none; }
  .hero__cta .btn { width: 100%; }
  .header-actions .btn--primary { padding-inline: 14px; }
}

@media (max-width: 359px) {
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 17. Доступность / печать ----------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  body::before, .site-header, .bottom-nav, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  .card { border-color: #ddd; box-shadow: none; background: #fff; }
}
