/* ============================================================
   ЛИДЕР — дизайн-система legal-tech платформы
   Токены: #F8F8F6 фон, индиго-акцент, приглушённый зелёный, Inter
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #F8F8F6;
  --bg-soft: #F1F1ED;
  --bg-card: #FFFFFF;
  --ink: #16181D;
  --ink-2: #3F4450;
  --muted: #6C7280;
  --faint: #9AA0AC;
  --line: #E7E7E2;
  --line-strong: #D9D9D3;
  --indigo: #3B3EDE;
  --indigo-dark: #23269E;
  --indigo-soft: #ECECFB;
  --indigo-softer: #F4F4FD;
  --green: #1F7A4D;
  --green-dark: #15603B;
  --green-soft: #E7F3EC;
  --amber: #9A6B0F;
  --amber-soft: #FBF3E0;
  --red: #B3261E;
  --red-soft: #FBEAE9;
  --shadow-card: 0 1px 2px rgba(22,24,29,.04), 0 8px 24px rgba(22,24,29,.05);
  --shadow-pop: 0 2px 6px rgba(22,24,29,.06), 0 16px 40px rgba(22,24,29,.10);
  --r-card: 18px;
  --r-el: 14px;
  --r-btn: 12px;
  --ease: cubic-bezier(.2,.6,.2,1);
  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--indigo); color: #fff; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 32px; }

/* ---------- Типографика ---------- */
.h1 { font-size: 58px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.h2 { font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; }
.h3 { font-size: 26px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; }
.h4 { font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.sub { font-size: 18px; color: var(--muted); line-height: 1.6; }
.small { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.measure { max-width: 700px; }
.tx-green { color: var(--green); }
.tx-indigo { color: var(--indigo); }
.tx-muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,248,246,.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 36px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--indigo);
  display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800;
}
.main-nav { display: flex; gap: 6px; margin-right: auto; }
.main-nav a {
  padding: 8px 14px; border-radius: 10px; font-size: 15px; font-weight: 500;
  color: var(--ink-2); transition: background .15s var(--ease), color .15s var(--ease);
}
.main-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.main-nav a.active { color: var(--indigo); background: var(--indigo-softer); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.link-btn { font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 8px 10px; border-radius: 10px; transition: background .15s; }
.link-btn:hover { background: var(--bg-soft); color: var(--ink); }
.header-search {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; display: none; place-items: center; color: var(--ink-2);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: var(--r-btn); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  padding: 0 22px; height: 48px;
  transition: transform .12s var(--ease), background .15s, box-shadow .15s, border-color .15s;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--indigo); color: #fff; box-shadow: 0 1px 2px rgba(35,38,158,.25), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-primary:hover { background: var(--indigo-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink); box-shadow: 0 1px 2px rgba(22,24,29,.05); }
.btn-secondary:hover { border-color: var(--faint); background: #FCFCFB; }
.btn-ghost { background: transparent; color: var(--indigo); }
.btn-ghost:hover { background: var(--indigo-softer); }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn-sm { height: 38px; padding: 0 15px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { color: transparent; position: relative; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after { border-color: rgba(22,24,29,.2); border-top-color: var(--ink-2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Badge / Chip / Status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0;
  padding: 4px 11px; border-radius: 999px;
}
.badge-green { background: var(--green-soft); color: var(--green-dark); }
.badge-indigo { background: var(--indigo-soft); color: var(--indigo-dark); }
.badge-gray { background: var(--bg-soft); color: var(--muted); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-outline { border: 1px solid var(--line-strong); color: var(--ink-2); background: #fff; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 14px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; transition: all .15s var(--ease); min-height: 40px;
}
.chip:hover { border-color: var(--indigo); color: var(--indigo); }
.chip.active { background: var(--indigo); border-color: var(--indigo); color: #fff; box-shadow: 0 2px 8px rgba(59,62,222,.25); }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Формы ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 14px; font-weight: 600; color: var(--ink); }
.label .opt { color: var(--faint); font-weight: 500; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-el);
  background: #fff; font-size: 15.5px; color: var(--ink);
  padding: 13px 16px; transition: border-color .15s, box-shadow .15s;
  min-height: 50px;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--faint); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(59,62,222,.13);
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.select {
  appearance: none;
  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.5L6 6.5L11 1.5' stroke='%236C7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px;
}
.field-error .input, .field-error .textarea { border-color: var(--red); box-shadow: 0 0 0 3px rgba(179,38,30,.1); }
.field-msg-error { font-size: 13px; color: var(--red); display: flex; gap: 6px; align-items: center; }
.field-msg-ok { font-size: 13px; color: var(--green); display: flex; gap: 6px; align-items: center; }
.hint { font-size: 13px; color: var(--muted); }

/* radio / checkbox */
.choice {
  display: flex; align-items: flex-start; gap: 13px;
  border: 1px solid var(--line-strong); border-radius: var(--r-el); background: #fff;
  padding: 16px 18px; cursor: pointer; transition: all .15s var(--ease);
}
.choice:hover { border-color: var(--indigo); }
.choice.selected { border-color: var(--indigo); background: var(--indigo-softer); box-shadow: 0 0 0 1px var(--indigo); }
.choice input { position: absolute; opacity: 0; }
.radio-dot, .check-box {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line-strong); margin-top: 2px; position: relative; transition: all .15s;
  background: #fff;
}
.check-box { border-radius: 6px; }
.choice.selected .radio-dot, .choice.selected .check-box { border-color: var(--indigo); background: var(--indigo); }
.choice.selected .radio-dot::after {
  content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #fff;
}
.choice.selected .check-box::after {
  content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 6px; height: 10px;
  border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg);
}
.choice-title { font-weight: 600; font-size: 15px; }
.choice-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Search ---------- */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 16px;
  padding: 8px 8px 8px 20px; box-shadow: var(--shadow-card);
  transition: box-shadow .15s, border-color .15s;
}
.search-bar:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(59,62,222,.1), var(--shadow-card); }
.search-bar svg { color: var(--faint); flex: none; }
.search-bar input { flex: 1; border: none; outline: none; font-size: 16.5px; background: transparent; color: var(--ink); min-width: 0; }
.search-bar input::placeholder { color: var(--faint); }
.search-bar .btn { height: 46px; flex: none; }
.search-hero { padding: 10px 10px 10px 22px; border-radius: 20px; box-shadow: var(--shadow-pop); }
.search-hero input { font-size: 18px; }
.search-hero .btn { height: 52px; border-radius: 13px; }

/* ---------- Карточки ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow-card);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s;
}
.card-hover:hover { box-shadow: var(--shadow-pop); transform: translateY(-3px); border-color: var(--line-strong); }
.card-pad { padding: 26px; }

.icon-tile {
  width: 46px; height: 46px; border-radius: 13px; background: var(--indigo-softer);
  color: var(--indigo); display: grid; place-items: center; flex: none;
}
.icon-tile.green { background: var(--green-soft); color: var(--green); }

/* ---------- Секции ---------- */
.section { padding: 88px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 44px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  letter-spacing: .02em; color: var(--indigo); background: var(--indigo-softer);
  border: 1px solid var(--indigo-soft); padding: 5px 13px; border-radius: 999px; margin-bottom: 18px;
}
.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 15px; color: var(--indigo); white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Disclaimer / Alert ---------- */
.disclaimer {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--r-el); padding: 14px 18px; font-size: 13.5px; color: var(--muted);
}
.disclaimer svg { flex: none; margin-top: 1px; color: var(--faint); }
.alert { display: flex; gap: 12px; border-radius: var(--r-el); padding: 16px 18px; font-size: 14.5px; line-height: 1.5; }
.alert svg { flex: none; margin-top: 2px; }
.alert-green { background: var(--green-soft); color: var(--green-dark); }
.alert-amber { background: var(--amber-soft); color: var(--amber); }
.alert-red { background: var(--red-soft); color: var(--red); }
.alert b { font-weight: 700; }

/* ---------- Toast ---------- */
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; border-radius: 14px;
  padding: 14px 20px; font-size: 14.5px; box-shadow: var(--shadow-pop); max-width: 420px;
}
.toast .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--green); display: grid; place-items: center; flex: none; }

/* ---------- Avatar ---------- */
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--indigo-soft); color: var(--indigo-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 16px; letter-spacing: .01em;
}
.avatar-lg { width: 76px; height: 76px; font-size: 24px; border-radius: 24px; }
.avatar-sm { width: 40px; height: 40px; font-size: 13px; }
.av-green { background: var(--green-soft); color: var(--green-dark); }
.av-amber { background: var(--amber-soft); color: var(--amber); }

/* ---------- Breadcrumbs / Tabs / Progress ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--indigo); }
.crumbs .sep { color: var(--line-strong); }
.crumbs .here { color: var(--ink); font-weight: 500; }

.tabs { display: flex; gap: 4px; background: var(--bg-soft); padding: 5px; border-radius: 13px; width: fit-content; }
.tabs button {
  border: none; background: transparent; border-radius: 9px; padding: 9px 18px;
  font-size: 14.5px; font-weight: 500; color: var(--muted); transition: all .15s var(--ease);
}
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(22,24,29,.1); font-weight: 600; }

.progress-track { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--indigo); border-radius: 999px; transition: width .4s var(--ease); }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 96px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 40px; padding: 64px 0 48px;
}
.footer-brand p { font-size: 14px; color: var(--muted); margin-top: 14px; max-width: 280px; line-height: 1.6; }
.footer-col h4 { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin-bottom: 18px; }
.footer-col a { display: block; font-size: 14.5px; color: var(--ink-2); padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--indigo); }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 24px 0 32px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--muted);
}

/* ---------- Служебная плашка «экран прототипа» ---------- */
.screen-note {
  position: fixed; left: 20px; bottom: 20px; z-index: 200;
  display: flex; align-items: center; gap: 9px;
  background: var(--ink); color: rgba(255,255,255,.92);
  font-size: 12px; font-weight: 500; letter-spacing: .01em;
  padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-pop);
}
.screen-note .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(31,122,77,.3); }

/* ---------- Анимации ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .5s var(--ease) both; }
.rise-1 { animation-delay: .05s; } .rise-2 { animation-delay: .12s; } .rise-3 { animation-delay: .19s; }
.rise-4 { animation-delay: .26s; } .rise-5 { animation-delay: .33s; }
@keyframes pulse-soft { 0%,100% { box-shadow: 0 0 0 0 rgba(31,122,77,.25);} 50% { box-shadow: 0 0 0 8px rgba(31,122,77,0);} }
.pulse-ok { animation: pulse-soft 2s var(--ease) infinite; }

/* ---------- Мобильная адаптация ---------- */
@media (max-width: 1024px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .main-nav { display: none; }
  .header-search { display: grid; }
  .h1 { font-size: 40px; }
  .h2 { font-size: 31px; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; padding: 48px 0 40px; }
}
@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 18px; }
  .h1 { font-size: 32px; letter-spacing: -0.02em; }
  .h2 { font-size: 26px; }
  .h3 { font-size: 21px; }
  .sub { font-size: 16px; }
  .section { padding: 48px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 28px; }
  .header-actions .link-btn { display: none; }
  .header-actions .btn { display: none; }
  .btn-lg { height: 52px; }
  .choice-grid { grid-template-columns: 1fr; }
  .site-footer { margin-top: 72px; padding-bottom: 84px; }
  .search-hero input { font-size: 16px; }
}

/* ============================================================
   ЛИДЕР — компоненты дизайн-системы
   ============================================================ */

.ds-page { padding: 48px 0 96px; }
.ds-hero { padding: 72px 0 48px; border-bottom: 1px solid var(--line); background: #fff; margin-bottom: 24px; }
.ds-block { margin-top: 56px; }
.ds-block > h2 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.ds-block > h2::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ds-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ds-state { display: flex; flex-direction: column; gap: 10px; }
.ds-state > span { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.ds-state .stage { min-height: 52px; display: flex; align-items: center; }
.ds-state .stage.center { justify-content: center; }
.demo-box { min-height: 120px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-el); background: repeating-conic-gradient(var(--bg-soft) 0% 25%, #fff 0% 50%) 50%/22px 22px; border: 1px dashed var(--line-strong); padding: 20px; }
.demo-light { background: #fff; border: 1px solid var(--line); padding: 24px; border-radius: var(--r-card); }
.ds-note { font-size: 13.5px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; max-width: 720px; line-height: 1.55; }

/* свотчи цвета */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.swatch { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.swatch .c { height: 74px; }
.swatch .m { padding: 10px 13px; font-size: 12.5px; line-height: 1.45; }
.swatch .m b { display: block; font-size: 13px; }
.swatch .m span { color: var(--muted); font-family: ui-monospace, monospace; font-size: 11.5px; }

.type-spec { display: flex; flex-direction: column; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.type-spec:last-child { border-bottom: none; }
.type-spec .meta { font-size: 12.5px; color: var(--faint); font-family: ui-monospace, monospace; }

/* дополнительные состояния для демо */
.input:disabled { background: var(--bg-soft); border-color: var(--line); color: var(--faint); cursor: not-allowed; }
.chip.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-success { background: var(--green-soft); color: var(--green-dark); border-color: rgba(31,122,77,.25); }

/* Мобильные элементы: нижняя навигация + sticky CTA */
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav ul { display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 500; color: var(--faint); padding: 6px 0; border-radius: 10px;
  min-height: 44px; justify-content: center;
}
.bottom-nav a.active { color: var(--indigo); }

.sticky-cta { display: none; }

@media (max-width: 640px) {
  .bottom-nav { display: block; }
  .sticky-cta { display: block; position: fixed; left: 14px; right: 14px; bottom: 78px; z-index: 140; }
  .sticky-cta .btn { width: 100%; box-shadow: var(--shadow-pop); }
  .hide-mobile { display: none !important; }
  body { padding-bottom: 70px; }
}
@media (min-width: 641px) {
  .only-mobile { display: none !important; }
}

/* Общие лэйаут-паттерны страниц */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.center { text-align: center; }
.page-head { padding: 64px 0 40px; }
.page-head .h1 { margin-bottom: 14px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.flex { display: flex; } .aic { align-items: center; } .jcb { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.fz-14 { font-size: 14px; } .fz-15 { font-size: 15px; }
.fw-6 { font-weight: 600; } .fw-7 { font-weight: 700; }

/* --- Hero главной --- */
.hero { padding: 84px 0 64px; position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(720px 380px at 82% 8%, rgba(59,62,222,.075), transparent 62%),
    radial-gradient(560px 320px at 8% 90%, rgba(31,122,77,.06), transparent 60%);
}
.hero-in { position: relative; }
.hero .h1 { max-width: 760px; }
.hero .sub { max-width: 640px; margin-top: 20px; font-size: 19px; }
.hero-search { max-width: 780px; margin-top: 40px; }
.hero-chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-chips .lbl { font-size: 13.5px; color: var(--muted); margin-right: 4px; }
.trust-row { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.trust-item { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.trust-item svg { color: var(--green); flex: none; }

/* --- Карточки сценариев 01-03 --- */
.scenario-num { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--faint); }
.scenario-card { padding: 30px; display: flex; flex-direction: column; gap: 14px; min-height: 250px; }
.scenario-card .btn { margin-top: auto; align-self: flex-start; }

/* --- Каталог ситуаций --- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.cat-card .h4 { font-size: 16.5px; }
.cat-card p { font-size: 13.5px; color: var(--muted); line-height: 1.5; flex: 1; }
.cat-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 12px; }
.cat-meta a { color: var(--indigo); font-weight: 600; }

/* --- Карточки юристов --- */
.lawyer-card { padding: 24px; display: flex; gap: 18px; }
.lawyer-info { flex: 1; min-width: 0; }
.lawyer-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lawyer-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.lawyer-spec { font-size: 14px; color: var(--indigo); font-weight: 500; margin-top: 2px; }
.lawyer-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.lawyer-meta span { display: inline-flex; align-items: center; gap: 6px; }
.lawyer-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.price-big { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.price-big small { font-size: 12.5px; color: var(--muted); font-weight: 500; display: block; letter-spacing: 0; }
.rating { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; }
.rating svg { color: #E8A33D; }

/* --- Профиль юриста --- */
.profile-hero { display: flex; gap: 28px; align-items: flex-start; }
.profile-main { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.profile-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.slot-day { border: 1px solid var(--line); border-radius: var(--r-el); overflow: hidden; background: #fff; }
.slot-day-head { padding: 12px 16px; font-size: 13.5px; font-weight: 600; background: var(--bg-soft); display: flex; justify-content: space-between; }
.slot-times { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.slot { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--ink-2); min-height: 38px; transition: all .15s; }
.slot:hover { border-color: var(--indigo); color: var(--indigo); }
.slot.disabled { opacity: .35; text-decoration: line-through; pointer-events: none; }

/* --- Визард / шаги --- */
.wizard-steps { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wstep { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; color: var(--faint); }
.wstep .n {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; background: var(--bg-soft); color: var(--muted);
}
.wstep.done .n { background: var(--green-soft); color: var(--green-dark); }
.wstep.done { color: var(--green-dark); }
.wstep.current .n { background: var(--indigo); color: #fff; }
.wstep.current { color: var(--ink); font-weight: 600; }
.wstep-sep { width: 26px; height: 1.5px; background: var(--line-strong); }
.wizard-layout { display: grid; grid-template-columns: minmax(0,1fr) 400px; gap: 36px; align-items: start; }
.doc-preview {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-card); overflow: hidden; position: sticky; top: 96px;
}
.doc-preview-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.doc-preview-body { padding: 34px 38px; }
.doc-line { height: 11px; border-radius: 5px; background: var(--bg-soft); margin-bottom: 13px; }
.doc-line.hl { background: var(--indigo-soft); }
.doc-line.w90 { width: 90%; } .doc-line.w75 { width: 75%; } .doc-line.w60 { width: 60%; } .doc-line.w40 { width: 40%; }
.doc-title-line { height: 19px; width: 55%; border-radius: 6px; background: var(--ink); opacity: .85; margin-bottom: 26px; }

/* --- Чат --- */
.chat-layout { display: grid; grid-template-columns: 1fr 320px; gap: 0; min-height: calc(100vh - 68px); }
.chat-main { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.chat-head { padding: 14px 28px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; gap: 14px; }
.chat-body { flex: 1; padding: 28px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; background: var(--bg); }
.msg { max-width: 72%; display: flex; flex-direction: column; gap: 5px; }
.msg .bubble { padding: 13px 18px; border-radius: 18px; font-size: 15px; line-height: 1.55; }
.msg-them { align-self: flex-start; }
.msg-them .bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg-me { align-self: flex-end; align-items: flex-end; }
.msg-me .bubble { background: var(--indigo); color: #fff; border-bottom-right-radius: 6px; }
.msg .time { font-size: 11.5px; color: var(--faint); padding: 0 6px; }
.chat-input { padding: 16px 28px; border-top: 1px solid var(--line); background: #fff; display: flex; gap: 12px; }
.chat-input .input { border-radius: 999px; }
.chat-side { padding: 24px; display: flex; flex-direction: column; gap: 20px; background: #fff; }
.typing { display: inline-flex; gap: 4px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; border-bottom-left-radius: 6px; align-self: flex-start; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .3; } 40% { opacity: 1; } }

/* --- Dashboard --- */
.dash-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; padding: 40px 0 80px; align-items: start; }
.side-nav { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 11px 15px; border-radius: 11px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: all .15s; }
.side-nav a:hover { background: var(--bg-soft); }
.side-nav a.active { background: var(--indigo-softer); color: var(--indigo); font-weight: 600; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* --- Pricing --- */
.price-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price-card { padding: 32px; display: flex; flex-direction: column; gap: 8px; }
.price-card.featured { border: 1.5px solid var(--indigo); box-shadow: 0 8px 32px rgba(59,62,222,.12); position: relative; }
.price-card .cost { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; margin: 10px 0 2px; }
.price-card .cost small { font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.price-feats { margin: 18px 0 24px; display: flex; flex-direction: column; gap: 11px; }
.price-feats li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); align-items: flex-start; }
.price-feats svg { color: var(--green); flex: none; margin-top: 3px; }

/* --- FAQ --- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 780px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-el); overflow: hidden; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 22px; border: none; background: none; font-size: 16px; font-weight: 600; color: var(--ink); text-align: left; font-family: inherit; }
.faq-q svg { flex: none; transition: transform .25s var(--ease); color: var(--muted); }
.faq-item.open .faq-q svg { transform: rotate(45deg); color: var(--indigo); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 22px 20px; font-size: 15px; color: var(--muted); line-height: 1.65; max-width: 700px; }

/* --- Success screens --- */
.success-wrap { max-width: 560px; margin: 0 auto; padding: 80px 24px 100px; text-align: center; }
.success-ico {
  width: 84px; height: 84px; border-radius: 50%; background: var(--green);
  display: grid; place-items: center; margin: 0 auto 28px; color: #fff;
  box-shadow: 0 12px 32px rgba(31,122,77,.3);
}
.success-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 32px; text-align: left; }
.success-meta .card { padding: 16px 20px; }
.success-meta .k { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.success-meta .v { font-weight: 600; font-size: 15.5px; }

/* --- Login --- */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-left { display: flex; flex-direction: column; justify-content: center; padding: 64px 8%; }
.auth-right { background: var(--indigo); color: #fff; padding: 64px 8%; display: flex; flex-direction: column; justify-content: center; gap: 24px; position: relative; overflow: hidden; }
.auth-right::after { content: ''; position: absolute; width: 480px; height: 480px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.14); right: -160px; bottom: -160px; }
.auth-right::before { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.1); right: -60px; bottom: -60px; }
.auth-quote { font-size: 22px; line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; max-width: 420px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: rgba(255,255,255,.85); max-width: 420px; }
.auth-point svg { flex: none; margin-top: 2px; color: #9FE8C3; }

/* --- Документ-карточки --- */
.doc-card { padding: 24px; display: flex; flex-direction: column; gap: 11px; }
.doc-card .h4 { font-size: 16.5px; }
.doc-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; flex: 1; }
.doc-tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* --- Поиск результаты --- */
.result-tabs-count { font-size: 13px; color: var(--faint); font-weight: 500; }
.result-item { padding: 24px 26px; }
.result-item .kind { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.result-item h3 a:hover { color: var(--indigo); }
.next-steps { counter-reset: st; }
.next-steps li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.next-steps li:last-child { border-bottom: none; }
.next-steps .n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--indigo-softer); color: var(--indigo); display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* --- Статья --- */
.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 48px; align-items: start; padding: 48px 0 80px; }
.article-body { max-width: 720px; }
.article-body h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 40px 0 16px; }
.article-body h3 { font-size: 19px; font-weight: 600; margin: 28px 0 12px; }
.article-body p { margin-bottom: 16px; color: var(--ink-2); line-height: 1.7; }
.article-body ul { margin: 0 0 16px; padding-left: 4px; }
.article-body ul li { padding-left: 22px; position: relative; margin-bottom: 8px; color: var(--ink-2); line-height: 1.6; }
.article-body ul li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); }
.article-toc { position: sticky; top: 96px; }
.toc-box { padding: 22px; }
.toc-box a { display: block; padding: 6px 0; font-size: 14px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px; transition: all .15s; }
.toc-box a:hover, .toc-box a.here { color: var(--indigo); border-color: var(--indigo); }
.article-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 20px 0; }
.article-table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); padding: 10px 14px; border-bottom: 1.5px solid var(--line-strong); }
.article-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }

/* --- Календарь записи --- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: 11.5px; font-weight: 600; color: var(--faint); text-align: center; padding: 6px 0; text-transform: uppercase; letter-spacing: .04em; }
.cal-day {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; border: 1px solid transparent;
}
.cal-day:hover { background: var(--bg-soft); }
.cal-day.sel { background: var(--indigo); color: #fff; font-weight: 700; }
.cal-day.off { color: var(--line-strong); pointer-events: none; }
.cal-day.free { position: relative; }
.cal-day.free::after { content: ''; position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.cal-day.sel.free::after { background: #fff; }

@media (max-width: 1024px) {
  .cat-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .profile-main { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .wizard-layout { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-main { border-right: none; }
  .chat-side { display: none; }
  .dash-layout { grid-template-columns: 1fr; gap: 24px; }
  .side-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { display: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-right { display: none; }
  .stat-cards, .price-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cat-grid, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .hero .sub { font-size: 16px; }
  .page-head { padding: 36px 0 28px; }
  .lawyer-card { flex-direction: column; }
  .success-meta { grid-template-columns: 1fr; }
  .doc-preview-body { padding: 24px; }
  .chat-head, .chat-body, .chat-input { padding-left: 16px; padding-right: 16px; }
}

