@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/sourceserif-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Source Serif'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/sourceserif-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #0f1828;
  --ink-2: #172338;
  --ink-3: #22314b;
  --navy: #1d3b6e;
  --navy-2: #284d8c;
  --brass: #c19a5b;
  --brass-2: #d6b77a;
  --paper: #f5f3ee;
  --paper-2: #ece8df;
  --panel: #ffffff;
  --text: #18202e;
  --text-2: #3a4354;
  --muted: #6b7384;
  --line: #e4e0d6;
  --line-2: #d6d0c3;
  --green: #2f7a57;
  --green-bg: #e7f3ec;
  --red: #b0413e;
  --red-bg: #f8e9e7;
  --amber: #a36a1c;
  --amber-bg: #f7efdf;
  --blue-bg: #e9eef7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 24, 40, 0.04), 0 4px 18px rgba(15, 24, 40, 0.05);
  --shadow-lg: 0 20px 50px rgba(15, 24, 40, 0.18);
  --serif: 'Source Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 0.6em; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
::selection { background: #e8d7b4; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.ok { color: var(--green); }
.err { color: var(--red); }
.warn { color: var(--amber); }
.grow { flex: 1; }

.i { width: 20px; height: 20px; flex: none; }
.i-sm { width: 16px; height: 16px; }
.i-xs { width: 12px; height: 12px; }
.i-lg { width: 28px; height: 28px; }

/* ───────── кнопки ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--navy); color: var(--navy); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn-ghost { background: transparent; }
.btn-link { border-color: transparent; background: transparent; color: var(--navy); padding-inline: 8px; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { color: #fff; background: #983431; border-color: #983431; }
.btn-danger-text { color: var(--red); }
.btn-danger-text:hover { color: var(--red); border-color: var(--red); }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 13px; }
.btn-xs { min-height: 28px; padding: 3px 9px; font-size: 12.5px; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.is-busy { position: relative; }
.btn.is-saved { color: var(--green); border-color: #b9dbc8; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: inherit; font-size: 22px; line-height: 1; }
.icon-btn:hover { background: rgba(127, 127, 127, 0.12); }

/* ───────── пилюли и теги ───────── */
.tag, .pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; background: var(--paper-2); color: var(--text-2); white-space: nowrap; }
.tag { border-radius: 6px; text-transform: none; letter-spacing: 0.01em; }
.tag-vs { background: #2a1f0b; color: var(--brass-2); }
.tag-cass { background: var(--navy); color: #fff; }
.tag-appeal { background: var(--blue-bg); color: var(--navy); }
.tag-first { background: var(--paper-2); color: var(--text-2); }
.pill-same { background: var(--green-bg); color: var(--green); }
.pill-opp { background: var(--red-bg); color: var(--red); }
.pill-warn { background: var(--amber-bg); color: var(--amber); }
.pill-run { background: var(--blue-bg); color: var(--navy); }
.pill-soft { background: #f1ede4; color: #6c5a3a; }
.pill-strong { background: var(--ink); color: #fff; }
.rel { font-size: 12px; color: var(--muted); }
.rel-3 { color: var(--green); font-weight: 600; }
.rel-2 { color: var(--navy); }
.rel-0 { color: #a2a6ae; }
.ref { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: var(--brass-2); font-size: 12px; font-weight: 700; font-family: var(--mono); text-decoration: none !important; }
.ref-inline { margin: 0 2px; vertical-align: 1px; height: 20px; min-width: 26px; font-size: 11px; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--line-2); background: var(--panel); border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--text-2); text-decoration: none; transition: all 0.15s; text-align: left; }
.chip:hover { border-color: var(--navy); color: var(--navy); text-decoration: none; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-sm { padding: 3px 9px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ───────── формы ───────── */
input[type='text'], input[type='email'], input[type='password'], input[type='search'], input[type='date'], input[type='number'], select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29, 59, 110, 0.12); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7384' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field-hint { font-size: 12.5px; color: var(--muted); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; margin: 6px 0; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--navy); }
.check-strong { font-weight: 600; margin-bottom: 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 14px; margin-bottom: 12px; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-wrap { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin: 10px 0; }
.alert-err { background: var(--red-bg); color: var(--red); }
.alert-ok { background: var(--green-bg); color: var(--green); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--amber-bg); color: #6f4a14; font-size: 13.5px; margin: 6px 0 12px; }
.notice .i { margin-top: 2px; }
.form-msg { min-height: 1.4em; font-size: 14px; margin: 10px 0 0; }
.form-msg.err { color: var(--red); }
.form-msg.ok { color: var(--green); }

/* ───────── логотип ───────── */
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none !important; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--brass-2); font-family: var(--serif); font-size: 22px; line-height: 1; }
.logo-text { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: 0.01em; }

/* ═════════ ЛЕНДИНГ ═════════ */
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.landing { background: var(--paper); }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(245, 243, 238, 0.88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(214, 208, 195, 0.6); }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.site-nav { display: flex; gap: 26px; margin-left: auto; font-size: 14px; font-weight: 600; }
.site-nav a { color: var(--text-2); }
.eyebrow { font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--brass); margin: 0 0 14px; }
.display { font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 5.4vw, 66px); line-height: 1.06; letter-spacing: -0.015em; color: var(--ink); }
.display em { font-style: italic; color: var(--navy); }
.h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.14; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 34px; max-width: 760px; }
.lead { font-size: 18.5px; line-height: 1.6; color: var(--text-2); max-width: 590px; margin: 24px 0 30px; }
.lead-sm { font-size: 16.5px; line-height: 1.65; color: var(--text-2); }
.hero { padding: 70px 0 80px; overflow-x: clip; background: radial-gradient(1100px 500px at 85% 10%, rgba(193, 154, 91, 0.12), transparent 60%), radial-gradient(800px 500px at 0% 100%, rgba(29, 59, 110, 0.07), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn { min-height: 50px; padding: 12px 24px; font-size: 15px; }
.hero-points { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 11px; font-size: 14.5px; color: var(--text-2); }
.hero-points li { display: flex; gap: 10px; align-items: center; }
.hero-points .i { color: var(--brass); }
.hero-visual { position: relative; min-height: 440px; }
.paper { position: relative; z-index: 2; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow-lg); transform: rotate(-0.6deg); }
.paper-back { position: absolute; inset: 26px -16px -18px 30px; z-index: 1; background: var(--ink); border-radius: 18px; transform: rotate(3deg); box-shadow: var(--shadow-lg); }
.paper-top { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 14px; }
.paper-title { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--ink); margin-bottom: 18px; }
.paper-label, .conclusion-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--brass); margin-bottom: 6px; }
.paper-text { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.paper-quote { font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--text-2); border-left: 3px solid var(--brass); padding: 4px 0 4px 14px; margin: 14px 0; }
.paper-quote .ok { display: block; font-family: var(--sans); font-style: normal; font-size: 12px; font-weight: 600; margin-top: 4px; }
.paper-row { display: flex; flex-wrap: wrap; gap: 6px; }
.paper-src { display: flex; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--navy); font-weight: 600; }
.strip { background: var(--ink); color: #dfe4ee; }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 36px 0; }
.strip b { display: block; font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--brass-2); line-height: 1.1; margin-bottom: 6px; }
.strip span { font-size: 14px; color: #aab3c5; line-height: 1.45; display: block; }
.section { padding: 96px 0; }
.section-alt { background: #efece5; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .i { color: var(--navy); margin-bottom: 18px; }
.card h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.card p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; margin: 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { position: relative; padding: 28px 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.steps span { font-family: var(--serif); font-size: 15px; color: var(--brass); font-weight: 700; }
.steps h3 { font-family: var(--serif); font-size: 21px; margin: 10px 0 8px; color: var(--ink); }
.steps p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.trust-grid, .eng-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 16px; padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; color: var(--text-2); }
.checklist .i { color: var(--brass); margin-top: 2px; }
.checklist b { color: var(--ink); }
.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.topic { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.topic h3 { font-family: var(--serif); font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.topic p { font-size: 13.5px; color: var(--muted); margin: 0; }
.domains { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.domains li { display: flex; gap: 14px; align-items: flex-start; }
.domains .i { color: var(--navy); margin-top: 2px; }
.domains b { display: block; color: var(--ink); }
.domains span { font-size: 14px; color: var(--muted); }
.mail-mock { background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.mail-head { display: flex; gap: 12px; align-items: center; padding: 18px 22px; background: var(--ink); color: #fff; }
.mail-head .i { color: var(--brass-2); }
.mail-head b { display: block; font-family: var(--serif); font-size: 17px; }
.mail-head span { font-size: 12.5px; color: #aab3c5; }
.mail-item { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.mail-item:last-child { border: 0; }
.mail-item b { display: block; margin: 8px 0 6px; color: var(--navy); font-size: 15px; }
.mail-item p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.final { padding: 0 0 96px; }
.final-box { text-align: center; background: var(--ink); color: #dfe4ee; border-radius: 22px; padding: 64px 30px; background-image: radial-gradient(600px 260px at 50% 0%, rgba(193, 154, 91, 0.22), transparent 70%); }
.final-box .h2 { color: #fff; margin: 0 auto 14px; }
.final-box p { max-width: 520px; margin: 0 auto 26px; color: #aab3c5; }
.final-box .btn { min-height: 50px; padding: 12px 28px; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 34px; }
.footer-row { display: flex; gap: 30px; align-items: center; justify-content: space-between; font-size: 13px; }
.footer-row .muted { max-width: 640px; text-align: right; }

/* ═════════ ВХОД ═════════ */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: #dfe4ee; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; background-image: radial-gradient(700px 400px at 100% 100%, rgba(193, 154, 91, 0.2), transparent 70%); }
.auth-side .logo-mark { background: #fff1; }
.auth-side blockquote { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; margin: 0; color: #fff; max-width: 520px; }
.auth-side .muted { color: #8f9ab0; font-size: 13.5px; }
.auth-box { display: flex; flex-direction: column; justify-content: center; padding: 48px; max-width: 460px; width: 100%; margin: 0 auto; }
.auth-box h1 { font-family: var(--serif); font-size: 36px; color: var(--ink); margin-bottom: 6px; }
.auth-box .muted { margin-bottom: 28px; }
.auth-box label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 16px; color: var(--text-2); }
.auth-box .btn { min-height: 48px; margin-top: 6px; }
.auth-alt { margin-top: 20px; font-size: 14px; }
.simple { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.simple-box { max-width: 480px; text-align: center; }
.simple-box h1 { font-family: var(--serif); font-size: 30px; margin: 24px 0 10px; }

/* ═════════ ПРИЛОЖЕНИЕ ═════════ */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.app-loading { padding: 40px; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--ink); color: #c9d0dc; padding: 20px 14px 14px; overflow-y: auto; }
.sidebar .logo { padding: 4px 10px 22px; color: #fff; }
.sidebar .logo-mark { background: #ffffff12; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.13em; color: #6f7b92; font-weight: 700; padding: 16px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #c9d0dc; font-size: 14px; font-weight: 600; text-decoration: none !important; transition: background 0.15s, color 0.15s; }
.nav-link .i { color: #7f8aa1; width: 18px; height: 18px; }
.nav-link:hover { background: #ffffff0d; color: #fff; }
.nav-link.active { background: #ffffff14; color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
.nav-link.active .i { color: var(--brass-2); }
.side-user { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 6px 4px; border-top: 1px solid #ffffff14; margin-top: 12px; }
.side-user-link { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; text-decoration: none !important; }
.side-user-link b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.side-user-link small { display: block; font-size: 12px; color: #8f9ab0; }
.avatar { display: inline-flex; width: 34px; height: 34px; flex: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--brass); color: var(--ink); font-weight: 800; }
.content { min-width: 0; }
.topbar { display: none; }
.main { padding: 34px 40px 80px; max-width: 1240px; outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.page-head p { margin: 6px 0 0; max-width: 760px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions select { width: auto; }
.crumbs { margin-bottom: 14px; font-size: 14px; }
.section-title { font-family: var(--serif); font-size: 21px; margin: 28px 0 12px; color: var(--ink); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.panel-head input { max-width: 260px; min-height: 36px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; align-items: start; }
.two-col > .panel { margin-bottom: 0; }
.two-col + .two-col, .two-col + .panel, .panel + .two-col { margin-top: 18px; }
.form-panel { padding: 26px 28px; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 20px 4px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--navy); animation: spin 0.8s linear infinite; flex: none; }
.spin-lg { width: 30px; height: 30px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-mark { font-family: var(--serif); font-size: 40px; color: var(--line-2); line-height: 1; }
.empty h3 { font-family: var(--serif); color: var(--text); font-size: 19px; margin: 10px 0 6px; }
.empty .btn { margin-top: 10px; }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.quick-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); transition: transform 0.15s, border-color 0.15s; }
.quick-card:hover { transform: translateY(-2px); border-color: var(--navy); }
.quick-card .i { color: var(--navy); margin-bottom: 8px; }
.quick-card b { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.quick-card span { font-size: 13.5px; color: var(--muted); }

.list { display: flex; flex-direction: column; }
.row-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; }
.row-link:last-child { border-bottom: 0; }
.row-link:hover .row-title { color: var(--navy); }
.row-kicker { font-size: 12px; color: var(--muted); font-weight: 600; }
.row-title { font-weight: 600; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: transparent; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--ink); border-bottom-color: var(--brass); }
.tab-count { font-size: 12px; background: var(--paper-2); padding: 0 7px; border-radius: 999px; color: var(--text-2); }

/* поиск */
.search-form { padding: 22px 24px 16px; }
.search-main { display: flex; gap: 10px; margin-bottom: 14px; }
.search-main input { min-height: 50px; font-size: 16px; }
.search-main .btn { min-height: 50px; padding: 0 22px; }
.search-filters { display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.9fr 0.9fr; gap: 0 12px; }
.search-extra { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.suggest:not(:empty) { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.suggest-head { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.suggest-norms { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; align-items: center; }
.norm-inline { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.results-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 4px; margin: 6px 2px 14px; font-size: 14px; }
.results-links { margin-left: auto; display: inline-flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; }
.link-ext { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pager { display: flex; justify-content: center; gap: 10px; margin: 18px 0; }
.hints h3 { font-family: var(--serif); font-size: 18px; margin-bottom: 12px; }
.hints p { margin-top: 14px; }

/* акты */
.acts { display: flex; flex-direction: column; gap: 12px; }
.act { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; transition: border-color 0.15s, box-shadow 0.3s; scroll-margin-top: 20px; }
.act:hover { border-color: var(--line-2); }
.act.flash { box-shadow: 0 0 0 3px var(--brass-2); }
.act-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.act-title { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.35; }
.act-title a { color: var(--ink); }
.act-court { font-size: 13.5px; margin: 3px 0 8px; }
.act-dispute { font-size: 14px; color: var(--text-2); margin: 6px 0; }
.act-reason { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; background: #f8f5ee; border-radius: 8px; padding: 8px 12px; margin: 8px 0; color: #5b4a2c; }
.act-reason .i { color: var(--brass); margin-top: 2px; }
.act-snippet { font-size: 14px; color: var(--text-2); line-height: 1.6; margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.act-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.act-with-card .act { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.card-details { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: #fbfaf7; padding: 0 20px; }
.card-details summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14px; color: var(--navy); }
.card-details[open] { padding-bottom: 16px; }
.act-fb .act { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.act-fb-row { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: #fbfaf7; }
.act-head h1 { font-size: 26px; line-height: 1.3; max-width: 820px; }
.act-text { white-space: pre-wrap; font-family: var(--serif); font-size: 16px; line-height: 1.7; color: var(--text); max-height: 70vh; overflow: auto; padding-right: 10px; }
.act-text mark { background: #f2dfaf; padding: 0 1px; border-radius: 2px; }

.card-view .kv { margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 18px; margin: 0; font-size: 14.5px; }
.kv dt { color: var(--muted); font-weight: 600; font-size: 13px; padding-top: 2px; }
.kv dd { margin: 0; }
.kv ul { margin: 0; padding-left: 18px; }
.conclusion { background: #f8f5ee; border-left: 3px solid var(--brass); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 12px 0; }
.conclusion p { margin: 0; font-size: 15.5px; line-height: 1.6; }
.outcome { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.quote { font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.6; margin: 14px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--line-2); color: var(--text-2); }
.quote span { display: block; font-family: var(--sans); font-style: normal; font-size: 12px; font-weight: 600; margin-top: 6px; }
.norms ul, .issue-norms { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.norm { font-size: 14px; }
.norm-links { display: inline-flex; gap: 10px; margin-left: 10px; font-size: 12.5px; }
.fb { display: inline-flex; gap: 2px; }
.fb-wrap { display: inline-flex; align-items: center; gap: 8px; }
.fb-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 7px; color: var(--muted); cursor: pointer; }
.fb-btn:hover { color: var(--navy); border-color: var(--navy); }
.fb-btn.active:first-child { background: var(--green-bg); color: var(--green); border-color: #b9dbc8; }
.fb-btn.active:last-child { background: var(--red-bg); color: var(--red); border-color: #e8c3bf; }

/* прогресс и записка */
.progress-panel { padding: 28px; }
.progress-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.progress-head b { font-size: 16.5px; }
.progress-steps { margin: 0; padding-left: 22px; display: grid; gap: 7px; font-size: 14.5px; color: var(--text-2); }
.progress-steps li.done { color: var(--muted); }
.progress-steps li.done::marker { color: var(--green); }
.progress-steps li.current { font-weight: 600; color: var(--ink); }
.situation-input p { font-size: 15px; white-space: pre-wrap; }
.memo { padding: 30px 34px; }
.memo-summary { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.memo-summary > p:first-of-type { font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--ink); }
.memo-issue { padding: 20px 0; border-bottom: 1px solid var(--line); }
.memo-issue h3 { display: flex; gap: 12px; align-items: baseline; font-family: var(--serif); font-size: 19px; color: var(--ink); margin-bottom: 10px; line-height: 1.35; }
.issue-n { flex: none; display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: var(--paper-2); font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--text-2); }
.memo-issue > p { font-size: 15px; line-height: 1.65; }
.issue-acts { display: grid; gap: 6px; margin: 12px 0; }
.issue-act { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 8px 12px; border-radius: 8px; background: #faf9f6; }
.issue-act .role { flex: none; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; min-width: 80px; padding-top: 2px; }
.role-for .role { color: var(--green); }
.role-against .role { color: var(--red); }
.role-neutral .role { color: var(--muted); }
.memo-block { padding: 20px 0 6px; }
.memo-block h3 { font-family: var(--serif); font-size: 18px; color: var(--ink); margin-bottom: 10px; }
.memo-block ul { margin: 0; padding-left: 20px; display: grid; gap: 7px; font-size: 14.5px; }
.memo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 34px; }
.memo-grid > .panel { margin: 0; }
.risks h3 { color: var(--red); }
.recs h3 { color: var(--green); }
.higher { list-style: none; padding: 0 !important; }
.higher li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.higher p { margin: 6px 0 0; }
.muted-block { color: var(--muted); }
.queries summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.queries[open] summary { margin-bottom: 12px; }
.feedback-panel { display: grid; gap: 12px; }
.fb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-row > b { margin-right: 6px; font-size: 14.5px; }
.fb-comment { align-items: flex-start; }
.fb-comment textarea { flex: 1; min-width: 240px; }

/* проверка документа */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius); text-align: center; cursor: pointer; transition: all 0.15s; margin-bottom: 12px; background: #fbfaf7; }
.drop .i { color: var(--navy); }
.drop:hover, .drop.over { border-color: var(--navy); background: var(--blue-bg); }
.review-stats { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 120px; padding: 14px 16px; border-radius: 10px; display: flex; flex-direction: column; }
.stat b { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.stat span { font-size: 13px; }
.stat-high { background: var(--red-bg); color: var(--red); }
.stat-med { background: var(--amber-bg); color: var(--amber); }
.stat-low { background: var(--blue-bg); color: var(--navy); }
.issues { display: grid; gap: 12px; }
.issue { border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 10px; padding: 14px 18px; }
.issue.sev-high { border-left-color: var(--red); }
.issue.sev-medium { border-left-color: var(--amber); }
.issue.sev-low { border-left-color: var(--navy); }
.issue-top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.sev { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.sev.sev-high { color: var(--red); }
.sev.sev-medium { color: var(--amber); }
.sev.sev-low { color: var(--navy); }
.clause { font-size: 13px; color: var(--muted); font-style: italic; }
.issue-problem { font-size: 15px; font-weight: 500; }
.issue-norm { margin: 6px 0; }
.issue-fix { background: var(--green-bg); color: #24553e; padding: 10px 12px; border-radius: 8px; font-size: 14px; margin: 8px 0; white-space: pre-wrap; }
.issue-links { margin-top: 6px; }

/* темы */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; }
.topic-grid .panel { margin: 0; }
.topic-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.topic-head h2 { margin: 0; }
.topic-short { font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; background: var(--ink); color: var(--brass-2); padding: 3px 8px; border-radius: 6px; text-transform: uppercase; }
.issue-list { list-style: none; padding: 0; margin: 14px 0; }
.issue-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.issue-actions { display: flex; gap: 4px; flex: none; }
.contract-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
.contract-grid .panel { margin: 0; }
.contract-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contract-list b { display: block; margin-bottom: 6px; }

/* законы и статьи */
.filters { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters-right { display: flex; gap: 8px; }
.filters-right select { width: auto; min-height: 38px; }
.law-wrap { display: flex; gap: 14px; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.law-wrap:last-child { border: 0; }
.law-row { min-width: 0; }
.list > .law-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.law-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.law-title { font-weight: 600; font-size: 14.5px; color: var(--ink); line-height: 1.45; }
.law-summary { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.law-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.article:last-child { border: 0; }
.article-title { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.35; margin-bottom: 4px; }
.article p { font-size: 14.5px; color: var(--text-2); margin: 8px 0 0; }
.article-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; }

/* подборки */
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.coll-card { display: flex; flex-direction: column; color: var(--text); text-decoration: none !important; margin: 0; transition: border-color 0.15s, transform 0.15s; }
.coll-card:hover { border-color: var(--navy); transform: translateY(-2px); }
.coll-card h3 { font-family: var(--serif); font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.coll-meta { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.note-input { margin-top: 10px; font-size: 14px; background: #fbfaf7; }

/* админка */
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 8px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.metric::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-2); }
.metric.good::before { background: var(--green); }
.metric.bad::before { background: var(--red); }
.metric-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.metric-value { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.metric-hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table-dense td { padding: 6px 10px; }
.td-actions { text-align: right; white-space: nowrap; }
.row-off td { opacity: 0.55; }
.panel:has(> .table) { overflow-x: auto; }
.cat-list { display: grid; gap: 14px; }
.cat-item { margin: 0; }
.cat-fields { display: grid; grid-template-columns: 160px 1fr 1fr; gap: 0 14px; }
.cat-fields .field-description, .cat-fields .field-items, .cat-fields .field-keywords, .cat-fields .field-url { grid-column: 1 / -1; }
.field-check { flex-direction: row; align-items: center; }
.field-check input { width: 18px; height: 18px; }
.cat-children { background: #faf9f6; border-radius: 10px; padding: 12px 14px; margin: 4px 0 8px; }
.cat-child { display: grid; grid-template-columns: 150px 1fr 1.4fr 36px; gap: 10px; align-items: end; }
.cat-child .field { margin-bottom: 8px; }
.cat-child .field-label { font-size: 11.5px; }
.sticky-actions { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 14px 0; margin-top: 10px; background: linear-gradient(transparent, var(--paper) 30%); }

/* модалки и тосты */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 24, 40, 0.45); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; animation: fade 0.15s; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: min(520px, 100%); box-shadow: var(--shadow-lg); animation: rise 0.18s; }
.modal-wide { width: min(820px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
.modal-head h3 { font-family: var(--serif); font-size: 21px; }
.modal-body { padding: 16px 22px 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); max-width: 380px; transition: opacity 0.4s, transform 0.4s; animation: rise 0.2s; }
.toast-err { background: var(--red); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ───────── адаптив ───────── */
@media (max-width: 1100px) {
  .search-filters { grid-template-columns: 1fr 1fr 1fr; }
  .cards, .topics { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid, .trust-grid, .eng-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 40px 0 60px; }
  .hero-visual { min-height: 0; margin: 0 14px; }
  .strip-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
  .header-row .btn { margin-left: auto; }
  .section { padding: 64px 0; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-row .muted { text-align: left; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 24px; gap: 30px; }
  .auth-side blockquote { font-size: 20px; }
  .auth-box { padding: 32px 24px 48px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform 0.2s; }
  .nav-open .sidebar { transform: none; }
  .nav-scrim { display: none; }
  .nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(15, 24, 40, 0.4); }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 40; padding: 10px 14px; background: var(--ink); color: #fff; }
  .topbar .logo-mark { background: #ffffff12; width: 30px; height: 30px; font-size: 19px; }
  .topbar .logo-text { font-size: 18px; }
  .main { padding: 22px 16px 70px; }
  .page-head h1 { font-size: 26px; }
  .two-col { grid-template-columns: 1fr; }
  .topic-grid, .contract-grid { grid-template-columns: 1fr; }
  .memo { padding: 22px 18px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .cat-fields, .cat-child { grid-template-columns: 1fr; }
  .panel { padding: 18px 16px; }
}
@media (max-width: 600px) {
  .cards, .topics, .steps, .strip-grid { grid-template-columns: 1fr; }
  .display { font-size: 36px; }
  .lead { font-size: 16.5px; }
  .search-main { flex-direction: column; }
  .search-filters { grid-template-columns: 1fr 1fr; }
  .issue-list li { flex-direction: column; align-items: flex-start; }
  .law-wrap { flex-direction: column; }
  .law-actions { flex-direction: row; align-items: center; }
  .results-links { margin-left: 0; }
  .act-actions .btn { flex: 1 1 auto; }
  .issue-act { flex-direction: column; gap: 4px; }
  .paper { padding: 20px; }
  .paper-back { inset: 20px -8px -12px 20px; }
}

/* ───────── печать записки ───────── */
@media print {
  body { background: #fff; font-size: 12pt; }
  .sidebar, .topbar, .page-actions, .act-actions, .feedback-panel, .crumbs, .toasts, .queries, .fb, .fb-wrap { display: none !important; }
  .app { display: block; }
  .main { padding: 0; max-width: none; }
  .panel { box-shadow: none; border: 0; padding: 0; margin-bottom: 14pt; }
  .act { break-inside: avoid; border: 1px solid #ccc; }
  .card-details { display: block; }
  .card-details > * { display: block !important; }
  a { color: #000; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
