/* ============================================================
   NormaCAD AI — shared theme + base UI
   ============================================================ */

/* ---------- Inter (self-hosted) ----------
   Шрифт лежит рядом с сайтом, а не тянется с fonts.googleapis.com: продукт
   работает офлайн (локальная модель, закрытый контур), да и собственная CSP
   'style-src self' внешнюю таблицу стилей всё равно блокировала — Inter
   фактически никогда не применялся.
   Вариативный woff2: одна ось веса 100..900 вместо четырёх начертаний.
   unicode-range оставлен от Google — браузер качает только нужный поднабор
   (для русского интерфейса это cyrillic + latin, ~65 КБ). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ---------- Theme variables ----------
   Селекторы тем привязаны к :root намеренно. Кнопки переключателя темы несут
   собственный атрибут data-theme="light|dark" (им theme.js понимает, какую тему
   включает кнопка). Без :root голый [data-theme="light"] матчил саму кнопку и
   переопределял внутри неё все токены — в тёмной теме она становилась белой. */
:root,
:root[data-theme="dark"] {
  --bg:           #0B1220;
  --bg-alt:       #0F1726;
  --surface:      #131C2D;
  --surface-2:    #1A2438;
  --surface-3:    #1E2A40;
  --border:       #222C42;
  --border-soft:  #1B2438;
  --divider:      #2A3550;

  --text:         #FFFFFF;
  --text-2:       #9AA6BC;
  --text-3:       #6B7891;

  --accent:       #F97316;
  --accent-deep:  #EA580C;
  --accent-soft:  rgba(249, 115, 22, 0.18);
  --link:         #3B82F6;
  --danger:       #EF4444;
  --danger-soft:  rgba(239, 68, 68, 0.18);
  --success:      #10B981;
  --warning:      #F59E0B;

  --shadow-card:  0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-cta:   0 10px 28px rgba(249, 115, 22, 0.35);
  --shadow-pop:   0 12px 36px rgba(0, 0, 0, 0.45);

  --canvas:       #F4F4F2;   /* paper colour for drawing preview, stays light */
}

:root[data-theme="light"] {
  --bg:           #F4F6FB;
  --bg-alt:       #FFFFFF;
  --surface:      #FFFFFF;
  --surface-2:    #F6F8FC;
  --surface-3:    #EEF1F7;
  --border:       #E4E8F0;
  --border-soft:  #EEF1F7;
  --divider:      #E4E8F0;

  --text:         #0F172A;
  --text-2:       #4B5563;
  --text-3:       #94A3B8;

  --accent:       #F97316;
  --accent-deep:  #EA580C;
  --accent-soft:  rgba(249, 115, 22, 0.12);
  --link:         #2563EB;
  --danger:       #DC2626;
  --danger-soft:  rgba(220, 38, 38, 0.12);
  --success:      #059669;
  --warning:      #D97706;

  --shadow-card:  0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-cta:   0 8px 24px rgba(249, 115, 22, 0.28);
  --shadow-pop:   0 12px 36px rgba(15, 23, 42, 0.12);

  --canvas:       #FFFFFF;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color 200ms ease, color 200ms ease;
  min-height: 100vh;
}

/* ============================================================
   Page transitions & motion
   ============================================================ */
/* Cross-document View Transitions (Chromium 126+). Safari/Firefox ignore. */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 320ms;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* First-paint fade + lift for first content view */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
body > main,
body > .auth {
  animation: pageEnter 360ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  body > main,
  body > .auth { animation: none; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
img { display: block; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
}
.logo__mark {
  width: 32px; height: 32px; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.logo__mark::before {
  content: ""; position: absolute; inset: 4px;
  border: 1.5px solid var(--text-2); border-radius: 50%;
  opacity: 0.7;
}
.logo__n {
  font-weight: 700; font-size: 22px; color: var(--text);
  position: relative; z-index: 2;
}
.logo__bar {
  position: absolute; left: 16px; top: 5px; width: 3px; height: 18px;
  background: var(--accent); border-radius: 2px; z-index: 1;
}
.logo__title {
  font-weight: 700; font-size: 16px; color: var(--text);
  display: inline-flex; gap: 4px;
}
.logo__title em { font-style: normal; color: var(--accent); }
.logo--large .logo__mark { width: 56px; height: 56px; }
.logo--large .logo__mark::before { inset: 6px; border-width: 1.8px; }
.logo--large .logo__n { font-size: 36px; }
.logo--large .logo__bar { left: 28px; top: 8px; width: 5px; height: 30px; }
.logo--large .logo__title { font-size: 28px; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
}
.theme-toggle__label {
  color: var(--text-2); font-size: 13px;
}
.theme-toggle__btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: all 150ms ease;
}
.theme-toggle__btn:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle__btn.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.theme-toggle__btn svg { width: 18px; height: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; transition: all 150ms ease;
}
.btn--primary {
  background: var(--accent); color: #FFFFFF;
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover { background: var(--accent-deep); }
.btn--secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { color: var(--accent); }
.btn--danger { background: var(--danger); color: #FFFFFF; }
.btn--danger:hover { filter: brightness(1.05); }
.btn--block { width: 100%; }
.btn--lg { padding: 14px 24px; font-size: 15px; border-radius: 12px; }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.field__input,
.field__select {
  height: 46px; padding: 0 16px; border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text); font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  width: 100%;
}
:root[data-theme="light"] .field__input,
:root[data-theme="light"] .field__select { background: var(--surface-2); }
.field__input::placeholder { color: var(--text-3); }
.field__input:focus,
.field__select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field__input--password { padding-right: 44px; }
.field--password { position: relative; }
.field__eye {
  position: absolute; right: 12px; bottom: 11px;
  color: var(--text-3); width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
}
.field__eye:hover { color: var(--text); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Switch ---------- */
.switch {
  position: relative; display: inline-block; width: 44px; height: 24px;
}
.switch input { display: none; }
.switch__track {
  position: absolute; inset: 0; border-radius: 12px;
  background: var(--surface-3); transition: background 150ms ease;
}
.switch__thumb {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #FFFFFF; transition: transform 150ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track + .switch__thumb,
.switch input:checked ~ .switch__thumb { transform: translateX(20px); }

/* ---------- Checkbox ---------- */
.checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox input { display: none; }
.checkbox__box {
  width: 18px; height: 18px; border: 1.4px solid var(--border);
  background: var(--surface); border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
}
.checkbox__box svg { width: 12px; height: 12px; color: #FFFFFF; opacity: 0; }
.checkbox input:checked + .checkbox__box {
  background: var(--accent); border-color: var(--accent);
}
.checkbox input:checked + .checkbox__box svg { opacity: 1; }
.checkbox__label { font-size: 13px; color: var(--text-2); }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 22px;
  box-shadow: var(--shadow-card);
}
.card__title { font-size: 16px; font-weight: 600; margin: 0 0 18px; color: var(--text); }
.card__sub { color: var(--text-2); font-size: 13px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; color: var(--accent);
}
.avatar--sm { width: 28px; height: 28px; font-size: 10px; }
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
}
.badge--success { background: rgba(16, 185, 129, 0.15); color: var(--success); }

/* ---------- Utility: split layout for auth pages ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth__brand {
  background: var(--bg-alt);
  position: relative;
  padding: 56px 64px; display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
}
.auth__brand-grid {
  flex: 1; margin-top: 28px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface-2);
  display: flex; flex-direction: column; padding: 24px;
  position: relative; overflow: hidden;
}
.auth__form {
  padding: 56px 96px; display: flex; flex-direction: column;
  justify-content: center; gap: 24px;
}
.auth__form-inner { width: 100%; max-width: 528px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.auth__top {
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  position: absolute; top: 28px; right: 28px;
}
.auth__heading h1 { font-size: 32px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.auth__heading p { font-size: 14px; color: var(--text-2); margin: 0; }
.auth__bottom { text-align: center; color: var(--text-2); font-size: 14px; }
.auth__bottom a { font-weight: 600; }
.auth__divider {
  display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px;
}
.auth__divider::before, .auth__divider::after {
  content: ""; flex: 1; height: 1px; background: var(--divider);
}

.oauth-btn {
  display: flex; align-items: center; gap: 16px; width: 100%; height: 48px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 0 20px;
  color: var(--text); font-size: 15px; font-weight: 500;
  transition: all 150ms ease;
}
.oauth-btn:hover { border-color: var(--accent); color: var(--accent); }
.oauth-btn__icon {
  width: 24px; height: 24px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.oauth-btn__icon svg { width: 100%; height: 100%; display: block; }
/* Modifier classes kept as visual hooks; brand colour comes from inline SVG */
.oauth-btn__icon--y,
.oauth-btn__icon--g,
.oauth-btn__icon--vk { /* no-op */ }

/* ---------- Feature grid (auth) ---------- */
.feature-row {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 12px; margin-top: 18px;
}
.feature {
  text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.feature__icon {
  width: 28px; height: 28px; color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.feature__t1 { font-size: 11px; font-weight: 500; color: var(--text); }
.feature__t2 { font-size: 11px; color: var(--text-2); }

/* Illustration drawing in auth page */
.auth-illustration {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(transparent 0, transparent 21px, var(--border) 22px),
    linear-gradient(90deg, transparent 0, transparent 21px, var(--border) 22px);
  background-size: 22px 22px;
  background-color: var(--surface-2);
  opacity: 0.95;
  border-radius: 12px;
  position: relative;
  min-height: 280px;
}
.auth-illustration svg { width: 90%; height: 90%; max-width: 500px; }

/* ---------- Settings tabs ---------- */
.tabs {
  display: flex; gap: 28px; border-bottom: 1px solid var(--border);
}
.tab {
  position: relative; padding: 12px 4px; font-size: 14px; font-weight: 500;
  color: var(--text-2); cursor: pointer; transition: color 150ms ease;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--accent); font-weight: 600;
}
.tab.is-active::after {
  content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px;
  background: var(--accent); border-radius: 2px 2px 0 0;
}

/* ---------- Settings grid ---------- */
.settings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  align-items: start;
}
.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; gap: 16px;
}
.list-row + .list-row { border-top: 1px solid var(--border-soft); }
.list-row__main { display: flex; flex-direction: column; gap: 3px; }
.list-row__title { font-size: 13px; font-weight: 500; color: var(--text); }
.list-row__sub { font-size: 11px; color: var(--text-3); }

.boxed-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; gap: 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.boxed-row + .boxed-row { margin-top: 10px; }
.flex { display: flex; }
.flex--col { flex-direction: column; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }

/* ---------- Responsive (light) ---------- */
@media (max-width: 1100px) {
  .auth { grid-template-columns: 1fr; }
  .auth__brand { display: none; }
  .auth__form { padding: 56px 32px; }
  .settings-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MARKETING SITE — header, hero, sections, footer
   ============================================================ */

/* ---------- Site header (public pages) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
:root[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.85);
}
.site-header__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-nav {
  display: flex; align-items: center; gap: 28px;
}
.site-nav__link {
  font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: color 150ms ease; text-decoration: none;
}
.site-nav__link:hover { color: var(--text); text-decoration: none; }
.site-nav__link.is-active { color: var(--accent); font-weight: 600; }

.site-header__actions {
  display: inline-flex; align-items: center; gap: 12px;
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative; overflow: hidden;
  padding: 96px 32px 80px;
  background:
    radial-gradient(800px 400px at 80% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(600px 320px at 10% 100%, rgba(59, 130, 246, 0.10), transparent 60%);
}
.hero-section__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.hero-eyebrow__dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
}
.hero-title {
  font-size: 56px; line-height: 1.05; font-weight: 700;
  margin: 0 0 20px; color: var(--text);
  letter-spacing: -0.02em;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), #FB923C);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  font-size: 17px; line-height: 1.6; color: var(--text-2);
  margin: 0 0 32px; max-width: 560px;
}
.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px;
}
.hero-meta {
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
  color: var(--text-3); font-size: 13px;
}
.hero-meta__item { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta__item svg { color: var(--success); }

/* Hero visual (drawing mockup) */
.hero-visual {
  position: relative;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 18px;
  overflow: hidden;
}
.hero-visual__bar {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.hero-visual__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.hero-visual__title { margin-left: 8px; font-size: 12px; color: var(--text-3); }
.hero-visual__canvas {
  background: var(--canvas);
  border-radius: 10px; min-height: 360px;
  background-image:
    linear-gradient(transparent 0, transparent 23px, rgba(120,130,150,0.18) 24px),
    linear-gradient(90deg, transparent 0, transparent 23px, rgba(120,130,150,0.18) 24px);
  background-size: 24px 24px;
  position: relative; overflow: hidden;
}
.hero-visual__canvas svg {
  width: 100%; height: 100%; min-height: 360px;
}
.hero-visual__badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-card);
}
.hero-visual__badge .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}
.hero-visual__badge span { font-size: 12px; font-weight: 600; color: var(--text); }

/* ---------- Generic section ---------- */
.section { padding: 80px 32px; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__inner { max-width: 1280px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section-title {
  font-size: 38px; font-weight: 700; color: var(--text); margin: 0 0 14px;
  line-height: 1.15; letter-spacing: -0.01em;
}
.section-lead {
  font-size: 16px; color: var(--text-2); line-height: 1.6;
  max-width: 640px; margin: 0 auto;
}

/* ---------- Feature cards grid ---------- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 200ms ease, border-color 200ms ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature-card__icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.feature-card__icon--blue { background: rgba(59,130,246,0.16); color: var(--link); }
.feature-card__icon--green { background: rgba(16,185,129,0.16); color: var(--success); }
.feature-card__icon--purple { background: rgba(139, 92, 246, 0.16); color: #8B5CF6; }
.feature-card__icon svg { width: 24px; height: 24px; }
.feature-card__title { font-size: 18px; font-weight: 600; color: var(--text); margin: 0; }
.feature-card__text { font-size: 14px; color: var(--text-2); line-height: 1.6; margin: 0; }

/* ---------- How it works (steps) ---------- */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  position: relative;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
}
.step__num {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.step__title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.step__text { font-size: 13px; color: var(--text-2); line-height: 1.55; margin: 0; }

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding: 36px; border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.stat-cell { text-align: center; }
.stat-cell__num {
  font-size: 40px; font-weight: 700; color: var(--accent);
  line-height: 1; margin-bottom: 6px;
}
.stat-cell__lbl { font-size: 13px; color: var(--text-2); }

/* ---------- CTA panel ---------- */
.cta-panel {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-radius: 20px; padding: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  color: #FFFFFF;
  box-shadow: var(--shadow-cta);
}
.cta-panel__title { margin: 0 0 8px; font-size: 28px; font-weight: 700; }
.cta-panel__text { margin: 0; opacity: 0.92; font-size: 15px; line-height: 1.55; max-width: 540px; }
.cta-panel .btn { white-space: nowrap; }
.cta-panel .btn--secondary {
  background: #FFFFFF; color: var(--accent); border-color: transparent;
}
.cta-panel .btn--secondary:hover { color: var(--accent-deep); }

/* ---------- Footer (public) ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 56px 32px 32px;
}
.site-footer__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 56px;
}
.site-footer__brand p {
  font-size: 13px; color: var(--text-3); line-height: 1.6;
  margin: 12px 0 0; max-width: 320px;
}
.site-footer__col h4 {
  font-size: 12px; font-weight: 700; color: var(--text-3);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 14px;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__col li { margin-bottom: 10px; }
.site-footer__col a {
  font-size: 13px; color: var(--text-2); text-decoration: none;
}
.site-footer__col a:hover { color: var(--accent); }
.site-footer__bottom {
  max-width: 1280px; margin: 36px auto 0;
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-3); font-size: 12px;
}
.msg { display: flex; gap: 12px; max-width: 80%; }
.msg--bot { align-self: flex-start; }
.msg--user { align-self: flex-end; flex-direction: row-reverse; }
.msg__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.msg--bot .msg__avatar { background: var(--accent-soft); color: var(--accent); }
.msg--user .msg__avatar { background: var(--surface-3); color: var(--text); }
.msg__bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px 14px; border-radius: 12px;
  font-size: 14px; line-height: 1.55; color: var(--text);
}
.msg--user .msg__bubble { background: var(--accent); color: #fff; border-color: transparent; }
.msg__bubble ul { margin: 8px 0 0; padding-left: 18px; }
.msg__bubble li { font-size: 13px; margin-bottom: 4px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px; padding: 28px 16px;
  text-align: center; cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone__icon {
  width: 48px; height: 48px; margin: 0 auto 12px;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.dropzone__title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.dropzone__hint { font-size: 12px; color: var(--text-3); margin: 0; }

/* ---------- Contacts page ---------- */
.contacts-layout {
  max-width: 1180px; margin: 0 auto;
  padding: 80px 32px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px;
  align-items: start;
}
.contact-info__item {
  display: flex; gap: 14px; padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.contact-info__item:last-child { border-bottom: 0; }
.contact-info__icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-info__lbl { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.contact-info__val { font-size: 15px; font-weight: 500; color: var(--text); }
.contact-info__val a { color: var(--text); text-decoration: none; }
.contact-info__val a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Social cards (standalone section) ---------- */
.socials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1180px;
  margin: 40px auto 0;
}
.social-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text); text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  will-change: transform;
}
.social-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
}
.social-card__icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.social-card__icon svg { width: 100%; height: 100%; display: block; }
.social-card__body { display: flex; flex-direction: column; line-height: 1.2; gap: 2px; min-width: 0; }
.social-card__title { font-size: 15px; font-weight: 600; color: var(--text); }
.social-card__sub { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .socials-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 8px; }
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 880px; margin: 0 auto; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 22px;
  cursor: pointer; transition: border-color 150ms ease;
}
.faq-item:hover { border-color: var(--accent); }
.faq-item summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 22px; color: var(--accent); margin-left: 16px;
  transition: transform 200ms ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 12px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* ============================================================
   MINIMALIST APP SHELL — ChatGPT / Kimi-inspired
   ============================================================ */

/* Lucide-style icon helper */
.ico {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.ico--sm { width: 16px; height: 16px; }
.ico--lg { width: 24px; height: 24px; }
.ico--xl { width: 32px; height: 32px; }

/* Shell layout */
.shell {
  display: grid; grid-template-columns: 260px 1fr;
  min-height: 100vh; background: var(--bg);
}

/* Sidebar (Kimi/ChatGPT-style) */
.shell__side {
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 14px 10px; gap: 2px;
  height: 100vh; position: sticky; top: 0;
  overflow-y: auto;
}
.shell__side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px 14px;
}
.shell__side-head .logo__title { font-size: 15px; }
.side-collapse {
  width: 32px; height: 32px; border-radius: 8px;
  background: transparent; color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.side-collapse:hover { background: var(--surface-2); color: var(--text); }

.side-new {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 12px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 500;
  transition: border-color 150ms ease, background 150ms ease;
  width: 100%; cursor: pointer;
  text-decoration: none;
}
.side-new:hover { border-color: var(--accent); }
.side-new__l { display: inline-flex; align-items: center; gap: 10px; }
.side-new__kbd {
  display: inline-flex; gap: 4px; color: var(--text-3); font-size: 11px;
}
.side-new__kbd kbd {
  font-family: inherit;
  padding: 2px 6px; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 10px; line-height: 1;
}

.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 14px;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
  cursor: pointer;
}
.side-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-link.is-active { background: var(--surface-2); color: var(--text); font-weight: 500; }
.side-link .ico { color: var(--text-3); }
.side-link:hover .ico, .side-link.is-active .ico { color: var(--text); }

.side-section {
  margin-top: 18px; padding: 0 12px 6px;
  font-size: 11px; font-weight: 600; color: var(--text-3);
  letter-spacing: 0.04em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
}
.side-section .ic-add {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3); cursor: pointer;
}
.side-section .ic-add:hover { background: var(--surface-2); color: var(--text); }

.shell__side-foot {
  margin-top: auto;
  padding: 8px 4px 0;
  border-top: 1px solid var(--border);
}
.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: 10px;
  text-decoration: none; color: var(--text);
  transition: background 120ms ease;
  cursor: pointer;
}
.side-user:hover { background: var(--surface-2); text-decoration: none; }
.side-user__name { font-size: 13px; font-weight: 500; line-height: 1.2; }
.side-user__plan { font-size: 11px; color: var(--text-3); line-height: 1.2; margin-top: 1px; }
.side-user__more { margin-left: auto; color: var(--text-3); }

/* Main panel */
.shell__main {
  display: flex; flex-direction: column;
  min-height: 100vh; min-width: 0;
}
.shell__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid transparent;
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
}
.shell__top-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--text);
}
.shell__top-actions { display: inline-flex; align-items: center; gap: 6px; }
.shell__top-btn {
  height: 36px; padding: 0 14px; border-radius: 10px;
  background: transparent; color: var(--text-2);
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; cursor: pointer; text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}
.shell__top-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.shell__top-btn--primary {
  background: var(--text); color: var(--bg);
}
.shell__top-btn--primary:hover { background: var(--text); color: var(--bg); opacity: 0.9; }

/* Empty greeting (center of chat) */
.greeting {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; gap: 24px;
}
.greeting__title {
  font-size: 30px; font-weight: 600; color: var(--text);
  margin: 0; letter-spacing: -0.01em; text-align: center;
}
.greeting__sub {
  margin: 0; color: var(--text-3); font-size: 14px;
  max-width: 540px; text-align: center; line-height: 1.5;
}

/* Pill input (Kimi/ChatGPT-style) */
.composer {
  width: 100%; max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-card);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.composer:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-card);
}
.composer__field {
  width: 100%; min-height: 28px; max-height: 200px;
  background: transparent; border: 0; outline: 0;
  color: var(--text); font-size: 15px; line-height: 1.5;
  resize: none; font-family: inherit;
}
.composer__field::placeholder { color: var(--text-3); }
.composer__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.composer__chips { display: inline-flex; gap: 6px; align-items: center; }
.composer__chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 12px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.composer__chip:hover { border-color: var(--accent); color: var(--text); }
.composer__send {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease;
}
.composer__send:hover { opacity: 0.9; transform: scale(1.04); }
.composer__send[disabled] {
  background: var(--surface-3); color: var(--text-3); cursor: default;
  transform: none; opacity: 1;
}

/* Conversation thread (when chat has messages) */
.thread {
  flex: 1; padding: 24px 24px 12px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
  max-width: 820px; width: 100%;
  margin: 0 auto;
}
.thread .msg__bubble { background: transparent; border: 0; padding: 0; }
.thread .msg--user .msg__bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px 16px; border-radius: 18px;
  color: var(--text);
}
.thread .msg--bot { max-width: 100%; }
.thread .msg__avatar {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
}

/* Bottom dock (when thread present) */
.dock {
  padding: 14px 24px 22px;
  display: flex; justify-content: center;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.dock .composer { box-shadow: 0 -8px 24px rgba(0,0,0,.06), var(--shadow-card); }

/* App grid (in-app dashboard) */
.app-board {
  padding: 32px 24px 48px;
  max-width: 1100px; margin: 0 auto; width: 100%;
}
.app-board__head { margin-bottom: 28px; }
.app-board__t { font-size: 26px; font-weight: 600; margin: 0 0 6px; }
.app-board__s { font-size: 14px; color: var(--text-3); margin: 0; }

.tile-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 36px;
}
.tile {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.tile__icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.tile__t { font-size: 15px; font-weight: 600; }
.tile__s { font-size: 12px; color: var(--text-3); line-height: 1.5; }

.list-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.list-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.list-card__head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.list-card__head a { font-size: 12px; color: var(--text-3); text-decoration: none; }
.list-card__head a:hover { color: var(--accent); }
.list-card__ic {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-2); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.list-card__meta { font-size: 12px; color: var(--text-3); flex-shrink: 0; }

/* ---------- Drawing check page ---------- */
.check-wrap {
  max-width: 1280px; margin: 0 auto; width: 100%;
  padding: 24px;
}
.check-upload {
  max-width: 760px; margin: 24px auto 48px;
}
.check-upload .dropzone {
  padding: 48px 20px;
  border-radius: 16px;
}
.check-upload .dropzone__icon {
  width: 56px; height: 56px;
}
.check-upload .dropzone__title { font-size: 16px; }

.check-board {
  display: grid; grid-template-columns: 1fr 380px; gap: 18px;
}
.check-canvas {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.check-canvas__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.check-canvas__title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.check-canvas__file {
  font-family: ui-monospace, monospace; font-size: 12px;
  color: var(--text-3);
  padding: 4px 8px; background: var(--surface-2); border-radius: 6px;
}
.check-canvas__body {
  flex: 1; padding: 18px;
  background: var(--canvas);
  min-height: 480px; position: relative;
  background-image:
    linear-gradient(transparent 0, transparent 23px, rgba(120,130,150,0.18) 24px),
    linear-gradient(90deg, transparent 0, transparent 23px, rgba(120,130,150,0.18) 24px);
  background-size: 24px 24px;
}
.check-canvas__body svg { width: 100%; height: 100%; min-height: 460px; }
.check-canvas__tools {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-top: 1px solid var(--border);
  background: var(--surface);
}
.check-canvas__tools button {
  width: 32px; height: 32px; border-radius: 6px;
  background: transparent; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.check-canvas__tools button:hover { background: var(--surface-2); color: var(--text); }

.check-report {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.check-report__head {
  padding: 18px; border-bottom: 1px solid var(--border);
}
.check-report__score {
  display: flex; align-items: center; gap: 14px;
}
.score-ring {
  width: 64px; height: 64px; border-radius: 50%;
  position: relative; flex-shrink: 0;
  background: conic-gradient(var(--success) 0 92%, var(--surface-3) 92% 100%);
  display: inline-flex; align-items: center; justify-content: center;
}
.score-ring::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface);
}
.score-ring span {
  position: relative; z-index: 1; font-size: 16px; font-weight: 700; color: var(--success);
}
.score-ring--mid { background: conic-gradient(var(--accent) 0 78%, var(--surface-3) 78% 100%); }
.score-ring--mid span { color: var(--accent); }
.score-ring--low { background: conic-gradient(var(--danger) 0 50%, var(--surface-3) 50% 100%); }
.score-ring--low span { color: var(--danger); }

.violations-list { flex: 1; overflow-y: auto; padding: 8px 12px; }
.violation-item {
  display: flex; gap: 12px; padding: 14px 12px;
  border-radius: 10px; cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  border: 1px solid transparent;
}
.violation-item:hover { background: var(--surface-2); border-color: var(--border); }
.violation-item.is-active { background: var(--surface-2); border-color: var(--accent); }
.violation-item__num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--danger); color: #fff;
  font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.violation-item__num--warn { background: var(--accent); }
.violation-item__main { flex: 1; min-width: 0; }
.violation-item__t {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 2px;
}
.violation-item__s { font-size: 11px; color: var(--text-3); }
.violation-item__action {
  font-size: 11px; color: var(--link); margin-top: 6px;
  display: inline-flex; align-items: center; gap: 4px;
}

/* Варианты решения нарушения. Их несколько и они взаимоисключающие —
   отсюда явная подпись «выберите один», иначе список читается как шаги. */
.violation-item__fixes {
  margin-top: 10px; padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}
.violation-item__fixes-cap {
  font-size: 10px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.violation-item__fixes-list {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 6px;
}
.violation-item__fix {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 12px; line-height: 1.5; color: var(--text-2);
}
.violation-item__fix-n {
  flex-shrink: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 5px; background: var(--accent-soft); color: var(--accent);
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
}

.check-report__foot {
  padding: 14px 18px; border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}

/* Responsive shell */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .shell__side { display: none; }
  .tile-grid { grid-template-columns: 1fr; }
}

/* ---------- Modal dialog ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal__title { margin: 0; font-size: 17px; font-weight: 600; color: var(--text); }
.modal__close {
  width: 32px; height: 32px; border-radius: 8px;
  background: transparent; color: var(--text-3); border: none;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal__close:hover { background: var(--surface-2); color: var(--text); }
.modal__body { padding: 24px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.modal__foot {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}
.empty-state__icon {
  width: 72px; height: 72px; border-radius: 18px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-section__inner { grid-template-columns: 1fr; }
  .hero-title { font-size: 40px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .contacts-layout { grid-template-columns: 1fr; gap: 40px; padding: 56px 24px; }
  .cta-panel { flex-direction: column; align-items: flex-start; padding: 36px; }
}
@media (max-width: 640px) {
  .site-header__inner { padding: 12px 18px; gap: 12px; }
  .site-nav { gap: 14px; }
  .site-nav__link { font-size: 13px; }
  .hero-section { padding: 56px 18px; }
  .hero-title { font-size: 32px; }
  .section { padding: 56px 18px; }
  .section-title { font-size: 26px; }
  .features-grid, .steps, .stats-strip { grid-template-columns: 1fr; }
}

/* ============================================================
   История проверок и статистика (history.html, home.html, profile.html)
   Только новые классы — существующие не переопределяются.
   ============================================================ */

/* ---------- Метка источника отчёта ---------- */
.src-badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--surface-2); color: var(--text-3); white-space: nowrap;
}
.src-badge--ai   { background: rgba(59, 130, 246, 0.15); color: var(--link); }
.src-badge--stub { background: var(--accent-soft); color: var(--accent); }

/* ---------- Дополнения к списку нарушений ---------- */
.violations-list__cap {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 12px 6px;
}
.violation-item__d {
  margin-top: 6px; font-size: 12px; color: var(--text-3); line-height: 1.5;
}

/* ---------- Плитки статистики ---------- */
.stat-grid {
  display: grid; gap: 14px; margin-bottom: 22px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.stat__k {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.stat__n {
  font-size: 26px; font-weight: 700; line-height: 1.15; margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.stat__n--accent  { color: var(--accent); }
.stat__n--danger  { color: var(--danger); }
.stat__n--success { color: var(--success); }
.stat__s { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ---------- График активности ---------- */
.chart { display: flex; flex-direction: column; gap: 10px; }
.chart__bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: 120px; padding-top: 6px;
}
.chart__col {
  flex: 1; min-width: 3px; display: flex; flex-direction: column;
  justify-content: flex-end; height: 100%;
}
.chart__bar {
  display: block; width: 100%; border-radius: 3px 3px 0 0; min-height: 2px;
  background: var(--surface-3);
  transition: background 120ms ease;
}
.chart__bar--has { background: var(--accent); }
.chart__col:hover .chart__bar { background: var(--accent-deep); }
.chart__axis {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-3);
  border-top: 1px solid var(--border-soft); padding-top: 6px;
}

/* ---------- Топ ГОСТов ---------- */
.rank-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  align-items: center; padding: 10px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.rank-row:last-child { border-bottom: 0; }
.rank-row__t { font-size: 13px; font-weight: 500; }
.rank-row__n { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rank-row__track {
  grid-column: 1 / -1; height: 4px; border-radius: 2px;
  background: var(--surface-2); overflow: hidden;
}
.rank-row__fill { display: block; height: 100%; background: var(--accent); border-radius: 2px; }

/* ---------- Панель фильтров истории ---------- */
.hist-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.hist-toolbar__search { flex: 1; min-width: 220px; }
.hist-toolbar .field__input, .hist-toolbar .field__select { margin: 0; }

/* ---------- Строка истории ---------- */
.hist-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--border-soft);
  cursor: pointer; transition: background 120ms ease;
}
.hist-row:last-child { border-bottom: 0; }
.hist-row:hover { background: var(--surface-2); }
.hist-row__main { display: block; flex: 1; min-width: 0; }
.hist-row__t {
  display: block; font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hist-row__s {
  font-size: 12px; color: var(--text-3); margin-top: 3px;
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center;
}
.hist-row__side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hist-row__del {
  background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px;
  color: var(--text-3); line-height: 0;
}
.hist-row__del:hover { color: var(--danger); background: var(--danger-soft); }

/* ---------- Балл в строке списка ---------- */
.score-chip {
  min-width: 52px; text-align: center; padding: 5px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--text-2);
}
.score-chip--high { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.score-chip--mid  { background: var(--accent-soft);       color: var(--accent); }
.score-chip--low  { background: var(--danger-soft);       color: var(--danger); }

/* ---------- Пагинация ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border-soft);
}
.pager__info { font-size: 12px; color: var(--text-3); }
.pager__btns { display: flex; gap: 8px; }

/* ---------- Белый список (admin.html) ---------- */
/* Форма добавления: тип · значение · примечание · кнопка в одну строку */
.allow-form {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px; align-items: end;
}
.allow-form .field { margin: 0; }
.allow-form .btn { height: 46px; }
.allow-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--border-soft);
}
.allow-row:last-child { border-bottom: 0; }
.allow-row__type { flex-shrink: 0; margin-top: 3px; }
.allow-row__main { flex: 1; min-width: 0; }
.allow-row__value {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px; font-weight: 500; color: var(--text);
  overflow-wrap: anywhere;
}
.allow-row__note { font-size: 13px; color: var(--text-2); margin-top: 3px; overflow-wrap: anywhere; }
.allow-row__meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.allow-row__edit { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.allow-row__edit .field__input { flex: 1 1 220px; height: 38px; }
.allow-row__edit .btn { height: 38px; padding: 0 14px; }
.allow-row__actions { display: flex; gap: 4px; flex-shrink: 0; }
.allow-row__actions .btn { padding: 8px 10px; font-size: 13px; }

@media (max-width: 900px) {
  .allow-form { grid-template-columns: 1fr; }
  .allow-form .btn { width: 100%; }
  .allow-row { flex-wrap: wrap; padding: 14px 16px; }
  .allow-row__actions { width: 100%; justify-content: flex-end; }
}

/* ---------- Модалка отчёта ---------- */
.report-modal { max-width: 760px; width: 100%; }
.report-modal .modal__body { max-height: 62vh; overflow-y: auto; }
.report-modal__head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); margin-bottom: 14px;
}
.report-modal__sum {
  white-space: pre-wrap; font-size: 13px; color: var(--text-2); line-height: 1.6;
  margin: 0 0 16px;
}

/* ---------- Сессии ---------- */
.session-row__ic { color: var(--text-2); }
.session-row__meta {
  font-size: 12px; color: var(--text-3); margin-top: 3px;
  display: flex; flex-wrap: wrap; gap: 4px 10px;
}

/* График и топ ГОСТов: на узком экране столбец под столбцом */
.analytics-row {
  display: grid; gap: 16px; margin-bottom: 22px;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

@media (max-width: 900px) {
  .analytics-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .hist-row { flex-wrap: wrap; }
  .hist-row__side { width: 100%; justify-content: space-between; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hist-toolbar { flex-direction: column; align-items: stretch; }
  .hist-toolbar__search { min-width: 0; }
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ
   Реализация макета «NormaCAD Mobile» (390x844).
   Только новые классы + правки внутри @media — существующие
   десктопные правила не переопределяются вне медиазапросов.
   ============================================================ */

/* ---------- Мобильная шапка и меню (рисует mobile.js) ---------- */
.mtopbar,
.mdrawer { display: none; }

.mtopbar {
  position: sticky; top: 0; z-index: 60;
  align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.mtopbar__logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
  min-width: 0;
}
.mtopbar__logo:hover { text-decoration: none; color: var(--text); }
.mtopbar__logo em { font-style: normal; color: var(--accent); }
.mtopbar__title {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mtopbar__actions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Гамбургер, встроенный в лендинговую шапку, на десктопе не нужен */
.site-header__actions .mburger { display: none; }

/* Кнопка-гамбургер: 44x44 — минимальная зона касания по HIG/Material */
.mburger {
  width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid var(--divider); background: transparent;
  border-radius: 12px; cursor: pointer;
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  padding: 0;
}
.mburger span {
  display: block; width: 16px; height: 1.5px;
  background: var(--text); border-radius: 1px;
  transition: transform 180ms ease, opacity 140ms ease;
}
.mburger.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.mburger.is-open span:nth-child(2) { opacity: 0; }
.mburger.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Кнопка «назад» на внутренних экранах */
.mback {
  width: 40px; height: 40px; flex-shrink: 0;
  border: 0; background: transparent; color: var(--text-2);
  border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: -8px;
}
.mback:hover { background: var(--surface-2); color: var(--text); }

/* Выдвижное меню */
.mdrawer {
  position: fixed; inset: 0; z-index: 120;
}
.mdrawer.is-open { display: block; }
.mdrawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 7, 12, 0.6);
  opacity: 0; transition: opacity 180ms ease;
}
.mdrawer.is-open .mdrawer__backdrop { opacity: 1; }
.mdrawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(86vw, 320px);
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-pop);
}
.mdrawer.is-open .mdrawer__panel { transform: translateX(0); }
.mdrawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
}
.mdrawer__close {
  width: 40px; height: 40px; border: 0; background: transparent;
  color: var(--text-2); border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
}
.mdrawer__close:hover { background: var(--surface-2); color: var(--text); }
.mdrawer__nav { display: flex; flex-direction: column; padding: 6px 0; }
.mdrawer__link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; min-height: 48px;
  font-size: 15px; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border-soft);
}
.mdrawer__link:hover,
.mdrawer__link:active { background: var(--surface-2); text-decoration: none; color: var(--text); }
.mdrawer__link.is-active { color: var(--accent); font-weight: 600; }
.mdrawer__link .ico { color: var(--text-3); flex-shrink: 0; }
.mdrawer__link.is-active .ico { color: var(--accent); }
.mdrawer__foot {
  margin-top: auto; padding: 14px 20px 20px;
  border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 12px;
}
.mdrawer__user {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text);
}
.mdrawer__user:hover { text-decoration: none; color: var(--text); }
.mdrawer__user-name { font-size: 14px; font-weight: 500; line-height: 1.25; }
.mdrawer__user-sub { font-size: 12px; color: var(--text-3); line-height: 1.25; }

body.is-drawer-open { overflow: hidden; }

/* ---------- Список стадий проверки (используется и на десктопе) ---------- */
.stage-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); overflow: hidden;
}
.stage-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px; color: var(--text-3);
  transition: color 150ms ease;
}
.stage-row:last-child { border-bottom: 0; }
.stage-row__label { flex: 1; min-width: 0; }
.stage-row__mark {
  width: 20px; height: 20px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; line-height: 1;
  color: var(--text-3);
}
.stage-row.is-done { color: var(--text-2); }
.stage-row.is-done .stage-row__mark { color: var(--success); }
.stage-row.is-running { color: var(--text); font-weight: 500; }
.stage-row.is-running .stage-row__mark { color: var(--accent); }
/* Точка-индикатор текущей стадии */
.stage-row.is-running .stage-row__mark::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  animation: stage-pulse 1.2s ease-in-out infinite;
}
@keyframes stage-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .stage-row.is-running .stage-row__mark::after { animation: none; }
}

/* Чипы поддерживаемых форматов */
.fmt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fmt-chip {
  font-family: ui-monospace, Consolas, "SF Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 3px;
  color: var(--text-3); background: var(--surface-2);
  border: 1px solid var(--border); white-space: nowrap;
}

/* Превью чертежа в строке истории */
.hist-row__thumb {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2) center / cover no-repeat;
  object-fit: cover;
}

/* ============================================================
   ≤ 900px — телефон и узкий планшет
   ============================================================ */
@media (max-width: 900px) {

  /* -- Каркас приложения: сайдбар уезжает в drawer -- */
  .mtopbar { display: flex; }
  .shell { grid-template-columns: 1fr; }
  .shell__side { display: none; }
  .shell__main { min-height: auto; }

  /* Десктопная строка заголовка дублирует мобильную шапку */
  .shell__top { display: none; }

  /* -- Отступы контента -- */
  .check-wrap { padding: 16px; }

  /* -- Формы: 16px не даёт iOS зумить страницу при фокусе -- */
  .field__input,
  .field__select,
  textarea { font-size: 16px; }
  .btn { min-height: 44px; }
  .btn--lg { min-height: 50px; font-size: 15px; }

  /* -- Лендинг -- */
  .site-header { position: sticky; top: 0; z-index: 60; }
  .site-header__inner { padding: 12px 16px; gap: 10px; }
  .site-nav { display: none; }
  /* Логотип и гамбургер остаются в строке, ссылки-кнопки уезжают в меню */
  .site-header__actions { gap: 8px; }
  .site-header__actions .mburger { display: inline-flex; }
  .site-header__actions .btn { display: none; }
  .hero-section { padding: 32px 18px 40px; }
  .hero-title { font-size: 28px; line-height: 1.2; }
  .hero-lead { font-size: 14px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .section { padding: 40px 18px; }
  .section-title { font-size: 22px; }
  .cta-panel { padding: 24px 20px; gap: 16px; }
  .cta-panel .btn { width: 100%; justify-content: center; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 28px; padding: 36px 18px; }

  /* -- Вход и регистрация -- */
  .auth { grid-template-columns: 1fr; min-height: 100dvh; }
  .auth__brand { display: none; }
  .auth__form { padding: 20px 18px 32px; }
  .auth__form-inner { max-width: none; gap: 18px; }
  .auth__heading h1 { font-size: 24px; }
  .auth-illustration { display: none; }
  .field-row { grid-template-columns: 1fr; }

  /* -- Проверка чертежа -- */
  .dropzone {
    padding: 32px 18px;
    border-radius: 14px;
    min-height: 180px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
  }
  .dropzone__title { font-size: 16px; }
  .dropzone__hint { font-size: 13px; }
  .check-upload__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .check-upload__actions .btn { width: 100%; justify-content: center; }

  /* Отчёт: чертёж и список нарушений столбиком, отчёт выше картинки —
     на телефоне сначала нужен вывод, а не разглядывание чертежа */
  .check-board { display: flex; flex-direction: column; gap: 16px; }
  .check-canvas { order: 2; }
  .check-report { order: 1; width: auto; }
  .check-canvas__body { max-height: 52vh; }
  .check-canvas__tools { flex-wrap: wrap; }
  .check-report__head { flex-wrap: wrap; gap: 12px; }
  .check-report__foot { flex-direction: column; }
  .check-report__foot .btn { width: 100%; justify-content: center; }
  .violations-list { max-height: none; }
  .violation-item { padding: 14px 16px; }

  /* -- История -- */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat__n { font-size: 22px; }
  .hist-row { padding: 12px 14px; gap: 12px; }
  .hist-row__t { font-size: 14px; }
  .pager { flex-direction: column; align-items: stretch; gap: 10px; }
  .pager__btns { justify-content: space-between; }

  /* -- Профиль и настройки -- */
  .settings-grid { grid-template-columns: 1fr; }
  /* !important здесь вынужденно: на profile/settings/history отступ карточек
     задан инлайновым style="padding:32px", и обычное правило его не перебивает.
     На 390 px это съедало бы четверть ширины экрана. */
  .card { padding: 18px 16px !important; border-radius: 14px; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; }
  .composer { border-radius: 14px; }
  .composer__field { font-size: 16px; }
  .composer__chips { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .composer__chips::-webkit-scrollbar { display: none; }
  .msg { max-width: 92%; }

  /* -- Модалки во весь экран -- */
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal,
  .report-modal {
    max-width: none; width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 92dvh; display: flex; flex-direction: column;
  }
  .modal__body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .report-modal .modal__body { max-height: none; }
  .modal__foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   ≤ 480px — телефон в портрете
   ============================================================ */
@media (max-width: 480px) {
  .hero-title { font-size: 25px; }
  .section-title { font-size: 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hist-row__side { gap: 8px; }
  .check-canvas__body { max-height: 44vh; }
  .dropzone { padding: 26px 14px; min-height: 160px; }
  .fmt-chip { font-size: 10px; padding: 4px 7px; }
}

/* Мобильные элементы не должны появляться на десктопе даже при печати */
@media (min-width: 901px) {
  .mtopbar, .mdrawer, .mback { display: none !important; }
}
@media print {
  .mtopbar, .mdrawer { display: none !important; }
}

/* ---------- Плашка версии (настройки) ---------- */
/* Номер версии — моноширинным и крупно: его называют в переписке с
   поддержкой и в отчётах об ошибках, читаться должен с одного взгляда. */
.version-plate {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.version-plate__main { display: flex; align-items: baseline; gap: 10px; }
.version-plate__num {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.version-plate__name { font-size: 14px; font-weight: 600; color: var(--text); }
.version-plate__val {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px; color: var(--text-2); white-space: nowrap;
}

/* ---------- Знак 2.0: рамка листа с основной надписью ---------- */
/* Разметка знака теперь инлайновый SVG внутри .logo__mark. Старые правила
   выше не удалены (классы проекта не удаляем) — здесь они гасятся:
   кольцо-псевдоэлемент больше не рисуется, а чернила знака берутся из
   currentColor, поэтому знак сам следует теме. Оранжевой остаётся только
   графа «Н. контр.» — она зашита в сам SVG. */
.logo__mark::before { content: none; }
.logo__mark { color: var(--text); }
.logo__mark svg { display: block; width: 100%; height: 100%; }

/* ---------- Выбор модели на странице проверки ---------- */
/* Стоит под дропзоной: пользователь сначала выбирает файл, потом при желании
   меняет ядро. Подпись справа объясняет выбранный вариант — список моделей
   приходит с бэкенда вместе с описаниями. */
.model-picker {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; margin-top: 18px;
}
.model-picker__label { font-size: 13px; color: var(--text-2); }
.model-picker__select {
  /* width: auto — иначе .field__select растягивается на всю ширину блока
     и селектор с одним вариантом выглядит как поле ввода */
  height: 36px; width: auto; min-width: 190px; flex: 0 0 auto;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px;
}
.model-picker__hint { font-size: 12px; color: var(--text-3); }
@media (max-width: 560px) {
  .model-picker { flex-direction: column; gap: 6px; }
  .model-picker__hint { text-align: center; }
}

/* ---------- Авторы в подвале ---------- */
/* Отдельной строкой под копирайтом: на узком экране .site-footer__bottom
   и так переносится, а три имени в одну строку с копирайтом не читаются. */
.site-footer__authors {
  display: block; margin-top: 4px;
  font-size: 12px; color: var(--text-3);
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ, ЭТАП 2 (задача #12)
   Блоки, которые раскладывались инлайновыми сетками, получили классы —
   иначе их нельзя сложить в столбец медиазапросом. Десктопные значения
   повторяют прежние инлайновые, на широком экране ничего не меняется.
   ============================================================ */

/* ---------- Блоки «текст + макет» на странице возможностей ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: center;
}
/* Макет слева, текст справа. Порядок задан здесь, а не в разметке: на
   телефоне текст должен идти первым, каким бы ни был десктопный порядок. */
.split--visual-first .split__visual { order: -1; }

/* ---------- Заголовок страницы возможностей ---------- */
.hero-title--center { font-size: 44px; max-width: 880px; margin: 0 auto 18px; }

/* ---------- Две карточки раздела «Комплект документации» ---------- */
.docset-grid {
  max-width: 960px; margin: 36px auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}

/* ---------- Плитки «Аккаунт» на главной: та же сетка, что у быстрых действий ---------- */
.tile-grid--account { margin-bottom: 0; }

/* ---------- Условия и политика ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 32px 64px; }
.legal h1 { margin: 0 0 6px; font-size: 32px; font-weight: 700; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split--visual-first .split__visual { order: 0; }
  .hero-title--center { font-size: 28px; line-height: 1.2; }
  .docset-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 24px; }
  .legal { padding: 24px 18px 48px; }
  /* «Конфиденциальности» одним словом при 32px шире экрана телефона */
  .legal h1 { font-size: 26px; overflow-wrap: anywhere; }

  /* Подвал: копирайт, авторы и ссылки — столбиком, а не в две узкие колонки */
  .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Плашка «Найдено: N нарушений» на макете закрывала заголовок окна —
     опускаем её к нижнему краю листа */
  .hero-visual__badge { top: auto; bottom: 30px; right: 30px; }

  /* Вход и регистрация. Переключатель темы переезжает в мобильную шапку
     (mobile.js), строка «Тема» над формой остаётся пустой — прячем её.
     Шапка прижата к верху экрана, форма центрируется в оставшемся месте. */
  body.has-mtopbar .auth__top { display: none; }
  .auth__form { justify-content: flex-start; padding-top: 0; }
  .auth__form > .mtopbar { margin: 0 -18px 16px; }
  .auth__form-inner { margin: auto 0; }

  /* Профиль: заголовок карточки и кнопка рядом с ним — переносом, а не наездом */
  .wrap-row { flex-wrap: wrap; gap: 12px; }

  /* Отчёт: имя файла и метаданные — в две строки, если не помещаются */
  .check-canvas__head { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  /* Строки «подпись + кнопка» (опасная зона профиля, безопасность в настройках):
     кнопка уходит под текст на всю ширину — так в неё проще попасть пальцем */
  .boxed-row { flex-wrap: wrap; }
  .boxed-row > .btn { flex: 1 1 100%; }
}
