/* ==========================================================================
   KODA — дизайн-система
   Бумага и чернила. Цвет только у статусов светофора.
   Светлая и тёмная темы, mobile-first.
   ========================================================================== */

/* --- Токены: светлая тема (по умолчанию) --- */
:root {
  --accent:            #111111;
  --accent-hover:      #2A2A2A;
  --accent-soft:       #F0F0F0;
  --accent-contrast:   #ffffff;

  --bg:                #FAFAFA;
  --surface:           #ffffff;
  --surface-2:         #F3F3F3;
  --surface-3:         #EBEBEB;
  --border:            #E6E6E6;
  --border-strong:     #C8C8C8;

  --text:              #111111;
  --text-muted:        #5A5A5A;
  --text-subtle:       #8A8A8A;

  --ok:                #18794E;
  --ok-bg:             #DDF3E7;
  --warn:              #8A5300;
  --warn-bg:           #FCEFD6;
  --danger:            #B4232C;
  --danger-bg:         #FDE5E6;
  --info:              #2C4BC4;
  --info-bg:           #E4E9FD;
  --neutral:           #5E5E6B;
  --neutral-bg:        #EDEDF2;

  --shadow-sm: 0 1px 2px rgba(18, 18, 26, .05), 0 1px 3px rgba(18, 18, 26, .04);
  --shadow-md: 0 2px 4px rgba(18, 18, 26, .04), 0 8px 20px rgba(18, 18, 26, .07);
  --shadow-lg: 0 4px 8px rgba(18, 18, 26, .05), 0 20px 48px rgba(18, 18, 26, .10);

  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius:    13px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --font: "Onest", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, Consolas, monospace;

  --header-h: 60px;
  --maxw: 1240px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* --- Токены: тёмная тема --- */
[data-theme="dark"] {
  --accent:            #F4F4F4;
  --accent-hover:      #FFFFFF;
  --accent-soft:       #1C1C1C;
  --accent-contrast:   #111111;

  --bg:                #0C0C0C;
  --surface:           #161616;
  --surface-2:         #1C1C1C;
  --surface-3:         #242424;
  --border:            #2A2A2A;
  --border-strong:     #3A3A3A;

  --text:              #F4F4F4;
  --text-muted:        #A3A3A3;
  --text-subtle:       #737373;

  --ok:                #5BD99A;
  --ok-bg:             #10291D;
  --warn:              #F2C066;
  --warn-bg:           #2E2210;
  --danger:            #FF8085;
  --danger-bg:         #32151A;
  --info:              #8CA4FF;
  --info-bg:           #171E3C;
  --neutral:           #A0A0AE;
  --neutral-bg:        #21212B;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .45);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
}

/* --- Сброс --- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 640; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection { background: var(--accent); color: var(--accent-contrast); }

/* --- Утилиты --- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }
.wrap--narrow { max-width: 720px; }
.wrap--form { max-width: 460px; }

.muted   { color: var(--text-muted); }
.subtle  { color: var(--text-subtle); }
.mono    { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }
.nowrap  { white-space: nowrap; }
.center  { text-align: center; }
.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;
}

.stack    { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.row      { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  font: inherit; font-size: .94rem; font-weight: 560;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .06s var(--ease), box-shadow .15s var(--ease);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.is-busy {
  pointer-events: none;
  opacity: .88;
}
.btn__spin {
  width: .95em;
  height: .95em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
  flex: none;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn--primary {
  color: var(--accent-contrast);
  background: var(--accent);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--danger { color: var(--danger); border-color: var(--border-strong); }
.btn--danger:hover { background: var(--danger-bg); }

.btn--lg { padding: 13px 26px; font-size: 1rem; border-radius: var(--radius); }
.btn--sm { padding: 6px 12px; font-size: .86rem; }
.btn--block { width: 100%; }

/* --- Карточки --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card--pad-lg { padding: 28px; }
.card--flush { padding: 0; overflow: hidden; }
.card--raised { box-shadow: var(--shadow-md); }

.card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card__title { font-size: .95rem; font-weight: 620; }

/* --- Бейджи статусов --- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  font-size: .78rem; font-weight: 560; line-height: 1.5;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: none;
}
.badge--ok      { color: var(--ok);      background: var(--ok-bg); }
.badge--warn    { color: var(--warn);    background: var(--warn-bg); }
.badge--danger  { color: var(--danger);  background: var(--danger-bg); }
.badge--info    { color: var(--info);    background: var(--info-bg); }
.badge--neutral { color: var(--neutral); background: var(--neutral-bg); }
.badge--plain::before { display: none; }

/* --- Формы --- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: .87rem; font-weight: 560; color: var(--text); }
.field__hint  { font-size: .82rem; color: var(--text-muted); line-height: 1.45; }
.field__error { font-size: .82rem; color: var(--danger); }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], input[type="file"],
select, textarea {
  width: 100%;
  padding: 10px 13px;
  font: inherit; font-size: .94rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: var(--danger);
}
input.is-invalid:focus, select.is-invalid:focus, textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent);
}
input::placeholder, textarea::placeholder { color: var(--text-subtle); }

select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%238E8E9A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%2371717F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input[type="file"] { padding: 9px 12px; cursor: pointer; }
input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 6px 12px;
  font: inherit; font-size: .86rem; font-weight: 560;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-xs);
  cursor: pointer;
}

/* --- Зона загрузки файла --- */
.dropzone {
  padding: 32px 20px;
  text-align: center;
  background: var(--surface-2);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone__icon { margin: 0 auto 12px; color: var(--accent); }

/* --- Таблицы --- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
table.data th {
  padding: 10px 14px;
  text-align: left;
  font-size: .78rem; font-weight: 600;
  color: var(--text-subtle);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .12s var(--ease); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .cell-name { min-width: 260px; max-width: 420px; }
table.data .cell-num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Статистика / светофор --- */
.stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s var(--ease), transform .12s var(--ease);
}
a.stat:hover { border-color: var(--border-strong); transform: translateY(-1px); text-decoration: none; }
.stat__label { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-muted); }
.stat__label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--neutral); flex: none; }
.stat__value { font-size: 1.7rem; font-weight: 660; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat__foot { font-size: .78rem; color: var(--text-subtle); }

.stat--ok      .stat__label::before { background: var(--ok); }
.stat--ok      .stat__value { color: var(--ok); }
.stat--warn    .stat__label::before { background: var(--warn); }
.stat--warn    .stat__value { color: var(--warn); }
.stat--danger  .stat__label::before { background: var(--danger); }
.stat--danger  .stat__value { color: var(--danger); }
.stat--info    .stat__label::before { background: var(--info); }
.stat--info    .stat__value { color: var(--info); }

/* --- Индикатор готовности --- */
.readiness { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.gauge { --pct: 0; position: relative; width: 108px; height: 108px; flex: none; }
.gauge__ring {
  width: 100%; height: 100%; border-radius: 50%;
  background:
    conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--surface-3) 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px));
}
.gauge__label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 1.45rem; font-weight: 680; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.gauge__label small { font-size: .62rem; font-weight: 520; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .07em; }

.bar { height: 7px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.bar__fill { height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s var(--ease); }
.bar__fill--ok { background: var(--ok); }

/* --- Оповещения --- */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px;
  font-size: .9rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
.alert__icon { flex: none; margin-top: 1px; }
.alert--success { color: var(--ok);     background: var(--ok-bg);     border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.alert--warning { color: var(--warn);   background: var(--warn-bg);   border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.alert--error   { color: var(--danger); background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert--info    { color: var(--info);   background: var(--info-bg);   border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.alert strong { font-weight: 620; }

/* --- Пустое состояние --- */
.empty { padding: 56px 24px; text-align: center; }
.empty__icon {
  width: 52px; height: 52px; margin: 0 auto 16px;
  display: grid; place-items: center;
  color: var(--text-subtle);
  background: var(--surface-2);
  border-radius: var(--radius);
}
.empty h3 { margin-bottom: 6px; }
.empty p { max-width: 420px; margin-inline: auto; color: var(--text-muted); }

/* ==========================================================================
   Шапка и навигация
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.brand__name { font-size: 1.06rem; font-weight: 680; letter-spacing: -.025em; }
.brand__tag { display: none; font-size: .78rem; color: var(--text-subtle); padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border); }

.nav { display: none; gap: 2px; margin-left: 8px; }
.nav__link {
  padding: 7px 12px;
  font-size: .9rem; font-weight: 520;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  transition: color .12s var(--ease), background .12s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav__link.is-active { color: var(--text); background: var(--surface-3); font-weight: 580; }

.header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

@media (max-width: 639px) {
  .header-cta { display: none; }
}

.icon-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  font-size: .76rem; font-weight: 640; letter-spacing: .02em;
  color: var(--accent-contrast);
  background: var(--accent);
  border-radius: 50%;
}

/* Мобильное меню */
.mobile-nav { display: none; padding: 8px 0 14px; border-top: 1px solid var(--border); }
.mobile-nav.is-open { display: block; }
.mobile-nav__link {
  display: block; padding: 11px 12px;
  font-size: .95rem; font-weight: 520; color: var(--text-muted);
  border-radius: var(--radius-xs);
}
.mobile-nav__link:hover, .mobile-nav__link.is-active { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* --- Основная область --- */
.main { padding: 24px 0 64px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); margin-bottom: 4px; }
.page-head p { color: var(--text-muted); margin: 0; }

.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 16px;
}
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1 1 320px; }
.toolbar input[type="search"] { flex: 1 1 200px; min-width: 0; }
.toolbar select { flex: 0 1 190px; }

/* --- Пагинация --- */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 18px 0; flex-wrap: wrap; }
.pagination__info { font-size: .86rem; color: var(--text-muted); padding-inline: 8px; }

/* --- Список "требует внимания" --- */
.attn-list { display: flex; flex-direction: column; }
.attn {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.attn:last-child { border-bottom: none; }
.attn:hover { background: var(--surface-2); text-decoration: none; }
.attn__body { min-width: 0; flex: 1; }
.attn__name { font-weight: 520; font-size: .92rem; }
.attn__meta { font-size: .8rem; color: var(--text-subtle); }
.attn__chev { color: var(--text-subtle); flex: none; }

/* --- Пары ключ-значение --- */
.kv { display: grid; grid-template-columns: 1fr; gap: 0; }
.kv__row {
  display: grid; grid-template-columns: 1fr; gap: 2px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.kv__row:last-child { border-bottom: none; }
.kv__key { font-size: .82rem; color: var(--text-muted); }
.kv__val { font-size: .94rem; word-break: break-word; }

/* --- Кандидаты сопоставления --- */
.candidate {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.candidate:last-child { border-bottom: none; }
.candidate__score {
  flex: none; display: grid; place-items: center;
  min-width: 48px; padding: 5px 8px;
  font-size: .84rem; font-weight: 640;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-xs);
}
.candidate__body { flex: 1; min-width: 0; }
.candidate__actions { flex: none; }

/* ==========================================================================
   Лендинг
   ========================================================================== */
.hero {
  display: grid;
  gap: 36px;
  padding: 40px 0 32px;
  align-items: start;
}
.hero__audience {
  margin: 0 0 12px;
  font-size: .92rem;
  color: var(--text-subtle);
}
.hero h1 {
  max-width: 14em;
  margin-bottom: 16px;
  letter-spacing: -.035em;
  font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.7rem);
}
.hero__lead { max-width: 48ch; font-size: 1.05rem; color: var(--text-muted); margin-bottom: 12px; }
.hero__manifest {
  margin: 0 0 14px;
  max-width: 42ch;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.45;
}
.hero__gloss {
  margin: 0 0 22px;
  max-width: 48ch;
  font-size: .92rem;
  color: var(--text-subtle);
}
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero__note { font-size: .84rem; color: var(--text-subtle); margin-top: 14px; }
.hero-visual { margin: 0; }
.hero-sheet__caption {
  margin-top: 12px;
  font-size: .82rem;
  color: var(--text-subtle);
}

.hero-sheet {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-sheet__bar {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  font-size: .78rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.hero-sheet__table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.hero-sheet__table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.hero-sheet__table tr:last-child td { border-bottom: none; }
.hero-sheet__table td:nth-child(2) { color: var(--text-subtle); white-space: nowrap; }
.hero-sheet__table td:last-child { text-align: right; white-space: normal; }
.hero-sheet__table .badge {
  display: inline-block;
  max-width: 12.5rem;
  font-size: .7rem;
  line-height: 1.25;
  white-space: normal;
  text-align: left;
}

.section { padding: 44px 0; }
.section__head { max-width: 60ch; margin-bottom: 28px; }
.section__head h2 { margin-bottom: 10px; }
.section__head p { color: var(--text-muted); margin: 0; }

.feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.feature { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.feature__icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; margin-bottom: 14px;
  color: var(--accent); background: var(--accent-soft);
  border-radius: var(--radius-sm);
}
.feature h3 { font-size: 1rem; margin-bottom: 6px; }
.feature p { font-size: .9rem; color: var(--text-muted); margin: 0; }

.steps { counter-reset: step; display: grid; gap: 2px; }
.step {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step__num {
  counter-increment: step; flex: none;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  font-size: .84rem; font-weight: 640;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 50%;
}
.step__num::before { content: counter(step); }
.step h3 { font-size: .98rem; margin-bottom: 3px; }
.step p { font-size: .9rem; color: var(--text-muted); margin: 0; }

.price-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.price-card {
  max-width: none;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}
.price-card--featured {
  border-color: var(--text);
  box-shadow: var(--shadow-md);
}
.price-card__badge {
  margin: 0 0 8px;
  font-size: .82rem;
  color: var(--text-subtle);
}
.price-card__title {
  font-size: 1.15rem;
  font-weight: 640;
  margin: 0 0 10px;
}
.price-card .btn { margin-top: auto; }
.price-card__amount { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.price-card__num { font-size: 1.85rem; font-weight: 700; letter-spacing: -.035em; white-space: nowrap; }
.price-card__per { color: var(--text-muted); font-size: .95rem; }
.price-card__payhint {
  margin: 10px 0 0;
  font-size: .82rem;
  color: var(--text-subtle);
  text-align: center;
}
.price-list { list-style: none; margin: 22px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.price-list svg { flex: none; margin-top: 3px; color: var(--ok); }

@media (min-width: 900px) {
  .price-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
}

.footer { padding: 32px 0; border-top: 1px solid var(--border); color: var(--text-subtle); font-size: .86rem; }
.footer__inner { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: center; }

/* --- Страница входа --- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth__card { width: 100%; max-width: 400px; }
.auth__brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth__brand img { width: 46px; height: 46px; border-radius: 13px; }
.auth__demo {
  margin-top: 18px; padding: 13px 15px;
  font-size: .85rem; line-height: 1.5;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}
.auth__demo code { font-family: var(--font-mono); font-size: .86em; color: var(--text); }

/* --- Сопоставление колонок --- */
.map-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ==========================================================================
   Адаптивность
   ========================================================================== */
@media (min-width: 560px) {
  .kv__row { grid-template-columns: 190px 1fr; gap: 16px; align-items: baseline; }
}

@media (min-width: 768px) {
  body { font-size: 15.5px; }
  .wrap { padding-inline: 24px; }
  .main { padding: 32px 0 80px; }
  .hero { padding: 64px 0 48px; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
  .section { padding: 64px 0; }
  .brand__tag { display: inline; }
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .burger { display: none !important; }
  .mobile-nav { display: none !important; }
}

@media (max-width: 899px) {
  .dashboard-split { grid-template-columns: 1fr !important; }
}

/* Таблица позиций на мобильных превращается в карточки */
@media (max-width: 719px) {
  table.data.responsive thead { display: none; }
  table.data.responsive, table.data.responsive tbody,
  table.data.responsive tr, table.data.responsive td { display: block; width: 100%; }
  table.data.responsive tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }
  table.data.responsive td {
    padding: 3px 0;
    border: none;
    display: flex; justify-content: space-between; gap: 14px;
    font-size: .89rem;
  }
  table.data.responsive td::before {
    content: attr(data-label);
    flex: none;
    font-size: .78rem; font-weight: 560;
    color: var(--text-subtle);
  }
  table.data.responsive td.cell-name {
    max-width: none;
    padding-bottom: 8px;
    font-weight: 560;
    display: block;
  }
  table.data.responsive td.cell-name::before { display: none; }
}

.dashboard-split { display: grid; gap: 16px; grid-template-columns: 1.6fr 1fr; align-items: start; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 559px) {
  .hero-sheet__table td:nth-child(2) { display: none; }
}

/* ==========================================================================
   Лендинг: боль, скрины, FAQ, форма
   ========================================================================== */
.page-landing .main { padding-top: 8px; }

.deadline {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 10px;
  font-size: .8rem;
  font-weight: 560;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
}

.pain-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pain {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pain h3 { font-size: 1rem; margin-bottom: 8px; }
.pain p { margin: 0; font-size: .92rem; color: var(--text-muted); }

.shots { display: grid; gap: 28px; }
.shot { margin: 0; }
.shot__frame {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.shot__chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  font-size: .75rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.shot__chrome span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong);
}
.shot img { width: 100%; height: auto; display: block; background: var(--surface-2); }
.shot figcaption { margin-top: 10px; font-size: .9rem; color: var(--text-muted); }

.faq { max-width: 720px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 560;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 0 0 16px; color: var(--text-muted); max-width: 62ch; }

.contact-form { max-width: 720px; }
.contact-form__grid { display: grid; gap: 14px; }
.contact-form__full { grid-column: 1 / -1; }
.hp {
  position: absolute;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.guide { max-width: 720px; }
.guide .eyebrow { font-size: .82rem; color: var(--text-subtle); margin-bottom: 8px; }
.guide-steps { list-style: none; margin: 0; padding: 0; counter-reset: gstep; }
.guide-step {
  counter-increment: gstep;
  padding: 22px 0 22px 48px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.guide-step::before {
  content: counter(gstep);
  position: absolute; left: 0; top: 22px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: .84rem; font-weight: 640;
  background: var(--accent-soft);
  border-radius: 50%;
}
.guide-step h2 { font-size: 1.05rem; margin-bottom: 8px; }
.guide-step p { margin: 0; color: var(--text-muted); }

.crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: .82rem; color: var(--text-subtle); margin-bottom: 18px;
}
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--text); }

.article { max-width: 720px; }
.article__lead {
  font-size: 1.12rem; line-height: 1.5;
  color: var(--text); margin: 0 0 28px;
}
.article h2 { font-size: 1.12rem; margin: 28px 0 10px; }
.article p { color: var(--text-muted); margin: 0 0 14px; }
.article ul { margin: 0 0 16px; padding-left: 1.2em; color: var(--text-muted); }
.article li { margin-bottom: 6px; }
.article-cta {
  margin: 36px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--border);
}
.article-cta h2 { margin-top: 0; }
.article-related { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); }
.article-related h2 { font-size: 1rem; margin: 0 0 8px; }
.article-related a {
  display: block; padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}
.article-related a:hover { color: var(--accent); }

.teaser-list { display: flex; flex-direction: column; }
.teaser {
  display: block; padding: 22px 0;
  border-bottom: 1px solid var(--border);
  color: inherit; text-decoration: none;
}
.teaser:hover { text-decoration: none; }
.teaser h2 { font-size: 1.12rem; margin: 0 0 6px; }
.teaser p { margin: 0; color: var(--text-muted); font-size: .94rem; }

.onboard-card { margin-bottom: 16px; }
.onboard-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.onboard-list li {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
.onboard-list li:last-child { border-bottom: none; }
.onboard-list li span:last-child { color: var(--text-subtle); font-size: .84rem; }
.onboard-list li.is-done a { text-decoration: line-through; color: var(--text-muted); }

.footer__links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__links a { color: var(--text-subtle); }
.footer__links a:hover { color: var(--text); }

/* --- Регистрация / вход --- */
.page-auth .main { padding: 0; }
.page-auth .main > .wrap { max-width: none; padding: 0; width: 100%; }
.page-auth .main > .wrap > .stack-sm { padding: 16px 20px 0; }

.auth-split { display: grid; min-height: 100dvh; }
.auth-split__story {
  display: none;
  padding: 40px 48px;
  background: var(--text);
  color: var(--bg);
}
.auth-split__story .brand { color: inherit; margin-bottom: 48px; }
.auth-split__story h1 { max-width: 16ch; color: inherit; margin-bottom: 16px; }
.auth-split__story p { max-width: 36ch; opacity: .78; }
.auth-split__points { margin: 28px 0 0; padding: 0; list-style: none; }
.auth-split__points li {
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent);
  opacity: .86;
  font-size: .95rem;
}
.auth-split__form { display: grid; place-items: center; padding: 36px 20px; }
.auth-panel { width: 100%; max-width: 420px; }
.auth-panel h2 { margin-bottom: 6px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: var(--text-subtle);
  font-size: .82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

[data-theme="dark"] .auth-split__story {
  background: var(--surface);
  color: var(--text);
  border-right: 1px solid var(--border);
}

/* --- Тур обучения --- */
.tour {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in srgb, var(--text) 28%, transparent);
  display: grid; place-items: end center;
  padding: 20px;
}
.tour__card {
  width: min(420px, 100%);
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-bottom: 12px;
}
.tour__step { font-size: .78rem; color: var(--text-subtle); margin-bottom: 6px; }
.tour__card h2 { font-size: 1.1rem; margin-bottom: 8px; }
.tour__card p { color: var(--text-muted); font-size: .92rem; }
.tour__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.tour__actions form { margin-right: auto; }

@media (min-width: 640px) {
  .contact-form__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .auth-split { grid-template-columns: 1fr 1fr; }
  .auth-split__story { display: flex; flex-direction: column; justify-content: center; }
  .shots { grid-template-columns: 1fr 1fr; }
  .shots .shot:first-child { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  .dashboard-split { grid-template-columns: 1fr !important; }
}

.lookup-form { max-width: 640px; }
.lookup-form .field__label { display: block; margin-bottom: 8px; }
.lookup-form .field__error { display: block; margin-top: 8px; }
.lookup-form__row { display: flex; gap: 10px; flex-wrap: wrap; }
.lookup-form__input {
  flex: 1 1 220px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
}
.lookup-form__note { margin-top: 10px; }
.lookup-truth {
  margin: 10px 0 0;
  max-width: 52ch;
  font-size: .92rem;
  color: var(--text);
}
.lookup-hit__ntin {
  font-size: 1.8rem;
  font-weight: 680;
  letter-spacing: .04em;
  margin: 0 0 10px;
}

.support-links { display: flex; flex-wrap: wrap; gap: 10px; }

.support-dock { position: fixed; right: 16px; bottom: 16px; z-index: 70; }
.support-dock__fab {
  font: inherit;
  font-weight: 560;
  padding: 12px 18px;
  color: var(--accent-contrast);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.support-dock__panel {
  position: absolute;
  right: 0;
  bottom: 52px;
  width: min(260px, calc(100vw - 32px));
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.support-dock__title { font-weight: 620; margin: 0 0 4px; }
.support-dock__panel a { color: var(--text); }
.support-dock__panel[hidden] { display: none; }

.page-auth .support-dock { display: none; }


