/* Общие токены для приложения и админки. Светлая тема по умолчанию; тёмная — по системе или <html data-theme="dark">.
   Меняйте цвета только здесь. Гамма — от знака «Глина», выбранного владельцем 01.12.2026: сине-фиолетовый + тёплый свет
   окна. Метка «Собственник» осталась бирюзовой, чтобы не сливаться с кнопками. Проверено dk contrast:
   белый на --primary #4A55E6 — 5,6:1 (кнопки, ссылки); --brand #5B66F0 на белом — 4,6:1;
   --accent-ink на белом — 5,9:1; текст --on-accent на --accent — 8,9:1; --muted на белом — 5,9:1, на --bg — 5,4:1;
   --primary-soft-ink на --primary-soft — 7,2:1; тёмная тема: --on-primary на --primary — 7,4:1, --primary на --surface — 6,7:1,
   --muted на --surface — 7,4:1. */

@font-face {
  font-family: 'Onest';
  src: url('fonts/onest-cyrillic-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  src: url('fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20B8, U+20BD, U+2122, U+2190-2199, U+2212, U+2215;
}

:root {
  /* сине-фиолетовая шкала знака «Глина» (dk palette #4a55e6) */
  --brand-50: #f1f6ff; --brand-100: #e0eaff; --brand-200: #c8d6ff; --brand-300: #a8bcff; --brand-400: #7f96ff;
  --brand-500: #6072ff; --brand-600: #4c58e9; --brand-700: #3b42c4; --brand-800: #2b2e9c; --brand-900: #1e1f78;
  --brand: #5B66F0;            /* графика, значки, крупные цифры: на белом 4,6:1 */
  --primary: #4A55E6;          /* кнопки и ссылки: белый текст 5,6:1 */
  --primary-hover: #3B42C4;
  --on-primary: #ffffff;
  --primary-soft: #E6E9FF;     /* фон выбранного/подсветки */
  --primary-soft-ink: #2E3FAE;

  /* тёплый акцент — свет в окне знака: метки «Цена снижена», точки на карте. Текст на нём — только --on-accent */
  --accent: #FFC845; --on-accent: #3D2A00; --accent-soft: #FFF4D6; --accent-ink: #8A5A00;

  /* «хорошо»: без комиссии, проверено, состоялось */
  --free: #1f7a4f; --free-soft: #dcf3e6; --free-ink: #12583a;

  /* нейтральные — холодные, с каплей сине-фиолетового */
  --bg: #F4F5FB;
  --surface: #ffffff;
  --surface-2: #ECEEF7;
  --surface-3: #E1E4F1;
  --line: #DEE1EE;
  --line-strong: #C6CAE0;
  --ink: #12142A;
  --ink-2: #2E3250;
  --muted: #5D6380;
  --faint: #9096B0;

  /* статусы */
  --ok: #1f7a4f; --ok-soft: #dcf3e6;
  --warn: #9a5a06; --warn-soft: #fff0cf;
  --danger: #c0262d; --danger-soft: #fde8e8;
  --info: #2459c9; --info-soft: #e3ecff;

  /* статусы объявления (цвет метки / её фон) */
  --st-draft: #5D6380;      --st-draft-bg: #ECEEF7;
  --st-moderation: #9a5a06; --st-moderation-bg: #fff0cf;
  --st-active: #12583a;     --st-active-bg: #dcf3e6;
  --st-closed: #2E3FAE;     --st-closed-bg: #E6E9FF;
  --st-archived: #5D6380;   --st-archived-bg: #E1E4F1;
  --st-rejected: #c0262d;   --st-rejected-bg: #fde8e8;

  /* кто размещает: Собственник / Агент / Застройщик (метка на карточке и странице) */
  --kind-owner: #0E5D52;     --kind-owner-bg: #e3f4f0;
  --kind-agent: #8a4b00;     --kind-agent-bg: #fff0d9;
  --kind-developer: #2747a8; --kind-developer-bg: #e5edff;

  /* оценка цены: ниже рынка / по рынку / выше рынка */
  --est-below: #12583a; --est-below-bg: #dcf3e6;
  --est-market: #2E3250; --est-market-bg: #ECEEF7;
  --est-above: #9a5a06; --est-above-bg: #fff0cf;

  /* форма */
  --r-xs: 6px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(18,20,42,.06), 0 1px 1px rgba(18,20,42,.04);
  --sh-2: 0 4px 16px rgba(18,20,42,.08), 0 1px 3px rgba(18,20,42,.06);
  --sh-3: 0 18px 50px rgba(18,20,42,.18), 0 4px 12px rgba(18,20,42,.08);
  --ring: 0 0 0 3px rgba(74,85,230,.38);
  --scrim: rgba(10, 12, 30, .5);

  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs: 15px; --fs-md: 17px; --fs-lg: 20px; --fs-xl: 26px; --fs-2xl: 34px; --fs-3xl: 46px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;

  --ease: cubic-bezier(.2,.8,.2,1);
  --t-fast: 120ms; --t: 200ms; --t-slow: 360ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #7F8BFF;
    --primary: #8F99FF; --primary-hover: #A5ADFF; --on-primary: #0B0D24;
    --primary-soft: #1E2350; --primary-soft-ink: #A5ADFF;
    --accent: #FFD36E; --on-accent: #3D2A00; --accent-soft: #3A2E10; --accent-ink: #FFD98A;
    --free: #5fc08f; --free-soft: #11372a; --free-ink: #93d3b6;
    --bg: #0E1020; --surface: #171A2B; --surface-2: #1E2236; --surface-3: #272B42;
    --line: #262A40; --line-strong: #343954;
    --ink: #ECEEF8; --ink-2: #D3D7EA; --muted: #A3A9C4; --faint: #6E7491;
    --ok: #5fc08f; --ok-soft: #11372a; --warn: #f0b44c; --warn-soft: #3a2a0c;
    --danger: #f2777b; --danger-soft: #3d1416; --info: #7aa7ff; --info-soft: #14244a;
    --st-draft: #A3A9C4; --st-draft-bg: #1E2236; --st-moderation: #f0b44c; --st-moderation-bg: #3a2a0c;
    --st-active: #93d3b6; --st-active-bg: #11372a; --st-closed: #A5ADFF; --st-closed-bg: #1E2350;
    --st-archived: #A3A9C4; --st-archived-bg: #272B42; --st-rejected: #f2777b; --st-rejected-bg: #3d1416;
    --kind-owner: #7FE0D2; --kind-owner-bg: #133A35; --kind-agent: #ffc574; --kind-agent-bg: #3a2a0c;
    --kind-developer: #a9c1ff; --kind-developer-bg: #18264a;
    --est-below: #93d3b6; --est-below-bg: #11372a; --est-market: #D3D7EA; --est-market-bg: #272B42;
    --est-above: #f0b44c; --est-above-bg: #3a2a0c;
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 6px 20px rgba(0,0,0,.45); --sh-3: 0 20px 60px rgba(0,0,0,.6);
    --ring: 0 0 0 3px rgba(143,153,255,.45);
    --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #7F8BFF;
  --primary: #8F99FF; --primary-hover: #A5ADFF; --on-primary: #0B0D24;
  --primary-soft: #1E2350; --primary-soft-ink: #A5ADFF;
  --accent: #FFD36E; --on-accent: #3D2A00; --accent-soft: #3A2E10; --accent-ink: #FFD98A;
  --free: #5fc08f; --free-soft: #11372a; --free-ink: #93d3b6;
  --bg: #0E1020; --surface: #171A2B; --surface-2: #1E2236; --surface-3: #272B42;
  --line: #262A40; --line-strong: #343954;
  --ink: #ECEEF8; --ink-2: #D3D7EA; --muted: #A3A9C4; --faint: #6E7491;
  --ok: #5fc08f; --ok-soft: #11372a; --warn: #f0b44c; --warn-soft: #3a2a0c;
  --danger: #f2777b; --danger-soft: #3d1416; --info: #7aa7ff; --info-soft: #14244a;
  --st-draft: #A3A9C4; --st-draft-bg: #1E2236; --st-moderation: #f0b44c; --st-moderation-bg: #3a2a0c;
  --st-active: #93d3b6; --st-active-bg: #11372a; --st-closed: #A5ADFF; --st-closed-bg: #1E2350;
  --st-archived: #A3A9C4; --st-archived-bg: #272B42; --st-rejected: #f2777b; --st-rejected-bg: #3d1416;
  --kind-owner: #7FE0D2; --kind-owner-bg: #133A35; --kind-agent: #ffc574; --kind-agent-bg: #3a2a0c;
  --kind-developer: #a9c1ff; --kind-developer-bg: #18264a;
  --est-below: #93d3b6; --est-below-bg: #11372a; --est-market: #D3D7EA; --est-market-bg: #272B42;
  --est-above: #f0b44c; --est-above-bg: #3a2a0c;
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 6px 20px rgba(0,0,0,.45); --sh-3: 0 20px 60px rgba(0,0,0,.6);
  --ring: 0 0 0 3px rgba(143,153,255,.45);
  --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ── база ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs)/1.45 var(--font); font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
.ic { display: inline-flex; flex: none; line-height: 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
::selection { background: var(--brand-200); color: #10201D; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
