/* Палитра по образцу oilakredit.uz:
   тёмный сине-серый #324352 (фирменный цвет платформы) + бирюзовый акцент */
:root {
  --primary: #324352;
  --primary-deep: #26343f;
  --accent: #00a3a3;
  --accent-deep: #00807f;
  --accent-tint: #e5f5f5;
  --bg: #f4f6f8;
  --card: #ffffff;
  --line: #dfe5ea;
  --muted: #66788a;
  --ink: #1f2a33;
  --danger: #c0392b;
  --danger-tint: #fdf0ee;
  --warn-tint: #fff7e0;
  --warn: #8a6d1a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  line-height: 1.6; font-size: 15.5px;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

header { background: var(--primary); color: #eef3f7; padding: 24px 0; }
header .wrap { display: flex; align-items: center; gap: 14px; }
.emblem {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 20px; flex-shrink: 0;
}
header h1 { font-size: 20px; font-weight: 600; line-height: 1.3; }
header p { font-size: 13.5px; opacity: 0.8; margin-top: 2px; }
.lang { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }
.lang button {
  background: transparent; border: 1px solid rgba(255,255,255,0.3);
  color: #eef3f7; padding: 5px 12px; border-radius: 8px;
  font-family: inherit; font-size: 13px; cursor: pointer;
}
.lang button.on { background: #fff; color: var(--primary); border-color: #fff; }

.route { background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; }
.route-inner {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 20px; max-width: 860px; margin: 0 auto; min-width: 620px;
}
.route-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.route-step .dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.route-step.now { color: var(--primary); font-weight: 600; }
.route-step.now .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.route-arrow { color: var(--line); flex-shrink: 0; }

main { padding: 30px 0 60px; }

.meta-bar {
  display: flex; flex-wrap: wrap; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 18px;
}
.meta-bar .m { flex: 1; min-width: 160px; }
.meta-bar .m span { display: block; font-size: 12px; color: var(--muted); }
.meta-bar .m b { font-size: 16px; font-weight: 600; color: var(--primary); }

section.block {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; margin-bottom: 16px;
}
.block-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.block-num {
  font-size: 13px; font-weight: 600; color: #fff;
  background: var(--primary); border-radius: 6px;
  padding: 1px 9px; flex-shrink: 0;
}
.block-head h2 { font-size: 17px; font-weight: 600; color: var(--primary); }
.block-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

label.fld { display: block; }
label.fld span.t { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
label.fld span.t em { color: var(--danger); font-style: normal; }
/* password, email и tel раньше не входили в список — поле пароля
   на входе в кабинеты оставалось голым браузерным прямоугольником */
input[type=text], input[type=number], input[type=password],
input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: #fff; outline: none;
}
textarea { resize: vertical; min-height: 74px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
input:disabled, select:disabled { background: var(--bg); color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

#tech-block { transition: opacity 0.2s; }
#tech-block.off {
  opacity: 0.45; pointer-events: none; user-select: none;
}
#tech-note {
  background: var(--warn-tint); color: var(--warn);
  border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-top: 8px;
}

.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 6px 0 18px; }
.agree input { margin-top: 4px; accent-color: var(--accent); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  font-family: inherit; font-size: 15px; font-weight: 500;
  padding: 12px 24px; border-radius: 10px; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-deep); }
.btn-secondary { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover:not(:disabled) { background: var(--accent-tint); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Кнопка-ссылка: без display она остаётся строчной, её поля не
   раздвигают строку, и соседний текст наезжает на кнопку — так было
   на странице политики. */
a.btn {
  display: inline-block;
  text-decoration: none;
  line-height: 1.2;
}

/* Кнопка внутри текста политики — с отступами от абзацев */
.pdp-cta { margin: 22px 0; }
.gate-hint { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Текст заявки под формой */
.doc-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; margin-top: 26px; overflow: hidden;
}
.doc-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: #fafbfc;
}
.doc-title { font-size: 13.5px; font-weight: 600; color: var(--primary); margin-right: auto; }
.doc {
  padding: 40px 48px; font-family: 'PT Serif', Georgia, serif;
  font-size: 14.5px; line-height: 1.8; color: #222; background: #fff;
}
@media (max-width: 620px) { .doc { padding: 26px 20px; } }
.doc p { margin-bottom: 10px; }
.d-center { text-align: center; }
.d-b { font-weight: 700; }
.d-title { font-weight: 700; font-size: 17px; text-align: center; letter-spacing: 0.05em; margin-bottom: 18px; }
.d-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.d-table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.d-table td, .d-table th {
  border: 1px solid #444; padding: 7px 10px; vertical-align: top;
  font-size: 13.5px; text-align: left;
}
.d-table th { background: #f0f2f4; font-weight: 700; }
.d-table td:first-child { width: 38%; font-weight: 700; }
.d-sign { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.d-small { font-size: 12px; color: var(--muted); }

.val {
  background: var(--warn-tint); color: var(--warn);
  padding: 0 5px; border-radius: 4px;
  border-bottom: 1.5px dashed #d3b545; font-style: italic;
}
.val.filled {
  background: var(--accent-tint); color: var(--accent-deep);
  border-bottom-color: var(--accent); font-style: normal; font-weight: 700;
}

.done {
  display: none; background: var(--card);
  border: 1.5px solid var(--accent); border-radius: 12px;
  padding: 30px; text-align: center; margin-bottom: 18px;
}
.done .big { font-size: 38px; color: var(--accent); }
.done h2 { font-size: 20px; margin: 8px 0 6px; color: var(--primary); }
.done p { color: var(--muted); font-size: 14px; max-width: 480px; margin: 0 auto; }
.done .num {
  display: inline-block; margin-top: 14px;
  background: var(--accent-tint); color: var(--accent-deep);
  font-weight: 600; padding: 6px 16px; border-radius: 20px; font-size: 14px;
}

footer { border-top: 1px solid var(--line); padding: 20px 0 40px; font-size: 13px; color: var(--muted); }

/* ===== Страница гарантийного письма ===== */
.k-right { text-align: right; font-weight: 700; margin-left: 32%; line-height: 1.5; }
.k-note {
  background: var(--accent-tint); color: var(--accent-deep);
  border-radius: 8px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 16px;
}
.k-warn {
  display: none; background: var(--danger-tint); color: var(--danger);
  border-radius: 8px; padding: 14px 16px; font-size: 14px; margin-bottom: 16px;
}
.k-warn a { color: var(--danger); }
.back-link {
  display: inline-block; margin-bottom: 14px; font-size: 14px;
  color: var(--primary); text-decoration: none; font-weight: 500;
}
.back-link:hover { text-decoration: underline; }


/* ===== Страница документов и статусы ===== */
.doc-item { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.doc-item .info { flex: 1; min-width: 220px; }
.doc-item .info h3 { font-size: 16px; font-weight: 600; color: var(--primary); }
.doc-item .info p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.doc-ico {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent-tint); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.rec-cell {
  border: 1.5px dashed var(--line); border-radius: 8px;
  padding: 12px 16px; font-size: 14px; color: var(--muted);
  cursor: pointer; background: #fff;
}
.rec-cell:hover { border-color: var(--accent); }
.rec-cell.ok { border-style: solid; border-color: var(--accent); background: var(--accent-tint); color: var(--accent-deep); font-weight: 500; }
.rec-cell .rm { color: var(--danger); text-decoration: underline; cursor: pointer; font-weight: 400; font-size: 12.5px; }
.badge {
  display: inline-block; padding: 4px 14px; border-radius: 20px;
  font-size: 13.5px; font-weight: 600;
  background: var(--warn-tint); color: var(--warn);
}
.badge.ok { background: var(--accent-tint); color: var(--accent-deep); }
.status-banner {
  display: none; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0; padding: 14px 18px; margin-bottom: 18px; font-size: 14.5px;
}
.status-banner a { color: var(--primary); font-weight: 600; text-decoration: none; margin-left: auto; }
.status-banner a:hover { text-decoration: underline; }

/* Кабинет фонда */
.fond-table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 14px; }
.fond-table th, .fond-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.fond-table th { background: var(--primary); color: #fff; font-weight: 500; }
.fond-table .links a { display: inline-block; margin: 2px 8px 2px 0; color: var(--accent-deep); font-size: 13px; }
.btn-approve {
  font-family: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
  padding: 7px 14px; border-radius: 8px; border: 1.5px solid var(--accent);
  background: #fff; color: var(--accent-deep);
}
.btn-approve:hover { background: var(--accent-tint); }

/* ===== Результат проверки рекомендательного письма ===== */
.check-box {
  display: none; margin-top: 14px; border-radius: 10px;
  padding: 14px 16px; font-size: 13.5px; border: 1px solid var(--line);
  background: var(--card);
}
.check-box.ok { border-color: var(--accent); background: var(--accent-tint); }
.check-box.warn { border-color: #d3b545; background: var(--warn-tint); }
.check-box.info { border-color: var(--line); background: var(--bg); }
.check-box .head { font-weight: 600; margin-bottom: 8px; }
.check-box ul { list-style: none; margin: 0; padding: 0; }
.check-box li { padding: 3px 0 3px 22px; position: relative; }
.check-box li.bad::before { content: '✗'; position: absolute; left: 0; color: var(--danger); font-weight: 700; }
.check-box li.good::before { content: '✓'; position: absolute; left: 0; color: var(--accent-deep); font-weight: 700; }
.check-box .note { margin-top: 8px; color: var(--muted); }

/* ===== Блок проверки по ИНН ===== */
.inn-check { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.inn-demo {
  display: inline-block; margin-left: 12px; font-size: 12.5px;
  color: var(--warn); background: var(--warn-tint);
  padding: 4px 10px; border-radius: 6px;
}
.inn-results { margin-top: 14px; display: none; }
.inn-results.show { display: block; }
.inn-card {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px; background: var(--card);
}
.inn-card .h {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; margin-bottom: 6px;
}
.inn-card .src { font-size: 12px; color: var(--muted); margin-left: auto; font-weight: 400; }
.inn-card .v { font-size: 14px; }
.inn-badge {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.inn-badge.good { background: var(--accent); }
.inn-badge.bad { background: var(--danger); }
.inn-badge.neutral { background: var(--muted); }
.inn-card.good { border-color: var(--accent); }
.inn-card.bad { border-color: var(--danger); }
.inn-sum { font-weight: 600; }
.inn-sum.bad { color: var(--danger); }
.inn-sum.good { color: var(--accent-deep); }
.inn-error { color: var(--danger); font-size: 13.5px; margin-top: 8px; }

/* ===== Кабинет сотрудников Фонда ===== */
.login-card {
  max-width: 420px; margin: 40px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 28px;
}
.login-card h2 { font-size: 18px; color: var(--primary); margin-bottom: 18px; }
.login-card .fld { margin-bottom: 14px; }
.login-card .btn { width: 100%; margin-top: 6px; }
.staff-name { font-size: 13px; opacity: .85; margin-right: 6px; white-space: nowrap; }
#logout {
  background: transparent; border: 1px solid rgba(255,255,255,.3); color: #eef3f7;
  padding: 5px 12px; border-radius: 8px; font-family: inherit; font-size: 13px; cursor: pointer;
}

.apps-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.apps-table th {
  text-align: left; padding: 12px 14px; background: var(--bg);
  font-size: 12.5px; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.apps-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.apps-table tbody tr { cursor: pointer; }
.apps-table tbody tr:hover { background: var(--accent-tint); }
.apps-table tbody tr.sel { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.fund-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 14px; }

.status-badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 12px; white-space: nowrap;
}
.status-badge.wait { background: var(--warn-tint); color: var(--warn); }
.status-badge.ok { background: var(--accent-tint); color: var(--accent-deep); }
.status-badge.bad { background: var(--danger-tint); color: var(--danger); }

.det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin-top: 14px; }
@media (max-width: 620px) { .det-grid { grid-template-columns: 1fr; } }
.det-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.det-row span { color: var(--muted); flex-shrink: 0; }
.det-row b { text-align: right; font-weight: 500; }
.det-sub { font-size: 15px; color: var(--primary); margin: 20px 0 10px; }
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-tint); }

.badge.bad { background: var(--danger-tint); color: var(--danger); }

/* ===== Договор поручительства ===== */
.d-head { width: 100%; margin-bottom: 14px; font-size: 13px; }
.d-sec { margin-top: 14px; }
.d-parties td { vertical-align: top; font-size: 12.5px; line-height: 1.5; }

/* Чья платёжеспособность показана */
.inn-who {
  font-size: 13px; font-weight: 600; color: var(--primary);
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}

/* ===== Оплата аванса ===== */
.adv-amount {
  font-size: 26px; font-weight: 700; color: var(--accent-deep);
  font-family: 'PT Serif', serif;
}
.done-check {
  font-size: 40px; text-align: center; color: var(--accent); margin-bottom: 8px;
}

.det-adv-note { font-size: 13.5px; color: var(--muted); margin: 6px 0 10px; }
.det-adv-ok { font-size: 13.5px; color: var(--accent-deep); font-weight: 600; margin: 6px 0 10px; }

/* ===== История заявок фермера ===== */
.hist { margin-top: 26px; text-align: left; }
.hist h3 { font-size: 15px; color: var(--primary); margin-bottom: 4px; }
.hist-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.hist-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hist-table th {
  text-align: left; font-weight: 600; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px;
}
.hist-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.hist-table tbody tr { cursor: pointer; }
.hist-table tbody tr:hover { background: var(--bg-soft); }
.hist-table tr.on { background: rgba(0, 163, 163, 0.08); }
.hist-table tr.on td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.hist-badge {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.hist-badge.pending { background: #fdf6e3; color: #8a6d1f; }
.hist-badge.ok { background: rgba(0, 163, 163, 0.12); color: var(--accent-deep); }
.hist-badge.bad { background: #fdecec; color: #b3261e; }
.hist-reason { font-size: 12px; color: #b3261e; margin-top: 3px; }

/* ===== Кабинет хозяйства ===== */
.cab-who { color: #fff; font-size: 13px; opacity: .9; margin-right: 4px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.auth-tab {
  padding: 9px 18px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 14px;
  color: var(--muted); font-weight: 500;
}
.auth-tab.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.auth-error {
  margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  background: #fdecec; color: #b3261e; font-size: 13px;
}

/* Вкладки кабинета сотрудника */
.fond-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.fond-tabs .auth-tab { font-size: 13.5px; padding: 8px 16px; }

/* ===== График лизинговых платежей ===== */
.sched-head { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.sched-head .fld { margin: 0; }

.sched-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin: 14px 0;
}
.sched-card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.sched-card span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.sched-card b { font-size: 15px; color: var(--primary); }
.sched-card.bad { background: #fdecec; border-color: #f3c9c9; }
.sched-card.bad b { color: #b3261e; }
.sched-card.over { background: #e7f0fd; border-color: #c6d9f7; }
.sched-card.over b { color: #1a56b0; }

.sched-wrap { max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.sched-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sched-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--bg-soft); text-align: left; font-weight: 600;
  font-size: 12px; color: var(--muted); padding: 9px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.sched-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sched-table td:nth-child(n+4) { text-align: right; }
.sched-row { cursor: pointer; }
.sched-row:hover { filter: brightness(0.97); }
.sched-row.q-end td { border-bottom: 2px solid var(--line); }

/* Цвет строки по состоянию платежа */
.sched-row.paid { background: #e6f4ea; }
.sched-row.debt { background: #fdecec; }
.sched-row.over { background: #e7f0fd; }
.sched-row.wait { background: #fff; }
.sched-row.debt .sched-diff { color: #b3261e; font-weight: 600; }
.sched-row.over .sched-diff { color: #1a56b0; font-weight: 600; }
.sched-row.paid .sched-paid { color: var(--accent-deep); font-weight: 600; }

.sched-grace {
  font-size: 10.5px; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}

/* Частично оплачен, но срок ещё не наступил — это не долг */
.sched-row.partial { background: #fffaf0; }
.sched-row.partial .sched-diff { color: #8a6d1f; font-weight: 600; }

/* Пояснение к цветам графика */
.sched-legend {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px;
  font-size: 12.5px; color: var(--muted);
}
.sched-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sched-legend .lg {
  width: 14px; height: 14px; border-radius: 3px;
  border: 1px solid var(--line); display: inline-block;
}
.sched-legend .lg.paid { background: #e6f4ea; }
.sched-legend .lg.debt { background: #fdecec; }
.sched-legend .lg.over { background: #e7f0fd; }
.sched-legend .lg.partial { background: #fffaf0; }
.sched-legend .lg.wait { background: #fff; }
/* ===== Статистика: вкладки разрезов внутри отчёта ===== */
.stats-tabs { display: flex; gap: 6px; margin: 16px 0 10px; flex-wrap: wrap; }
.stats-tabs .auth-tab { font-size: 13px; padding: 7px 14px; }

/* ==========================================================================
   ПУБЛИЧНАЯ ЧАСТЬ САЙТА (витрина Фонда)
   Дописывается в конец style.css. Использует те же переменные, что и
   кабинеты: --primary, --accent, --ink, --line, --muted.
   ========================================================================== */

/* Плавность анимаций. cubic-bezier задаёт характер движения: быстрый
   старт и мягкое торможение — так перемещение выглядит естественно. */
body.public { --ease: cubic-bezier(0.22, 1, 0.36, 1); }

/* Логотип вместо буквы «Ф» в шапке */
.emblem-logo {
  padding: 0;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emblem-logo img { width: 100%; height: 100%; object-fit: contain; }

.ico {
  width: 1em; height: 1em;
  fill: none; stroke: currentColor;
  display: inline-block; flex-shrink: 0;
}

/* Уважаем системную настройку «уменьшить движение»: анимации могут быть
   неприятны людям с вестибулярными нарушениями. */
@media (prefers-reduced-motion: reduce) {
  body.public *, body.public *::before, body.public *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------- Меню разделов */

.pubnav {
  background: var(--primary-deep);
  border-bottom: 1px solid rgba(255,255,255,0.09);
  position: sticky; top: 0; z-index: 40;
}
.pubnav .wrap { display: flex; gap: 4px; padding: 0 20px; }
.pubnav a {
  padding: 13px 16px;
  font-size: 14.5px;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.pubnav a:hover { color: #fff; }

/* Пункт меню с выпадающим списком — как переключатель языков.
   Открывается наведением, на телефоне — касанием (см. public.js). */
.navdrop { position: relative; display: inline-flex; }

.navdrop-menu {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, -6px);
  min-width: 230px; padding: 6px;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 44px -22px rgba(0, 0, 0, .45);
  z-index: 130;
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.navdrop:hover .navdrop-menu,
.navdrop:focus-within .navdrop-menu,
.navdrop.open .navdrop-menu {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}

.navdrop-menu a {
  padding: 10px 12px; border-radius: 8px; border-bottom: none;
  font-size: 14px; color: var(--ink); white-space: nowrap;
}
.navdrop-menu a:hover { background: var(--accent-tint); color: var(--accent-deep); }

/* Невидимый мостик между пунктом и списком: иначе список закрывается,
   пока курсор проходит зазор между ними. */
.navdrop-menu::before {
  content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px;
}

@media (max-width: 860px) {
  .navdrop-menu { position: static; transform: none; min-width: 0; box-shadow: none; }
  .navdrop:hover .navdrop-menu, .navdrop.open .navdrop-menu { transform: none; }
}
.pubnav a.on { color: #fff; border-bottom-color: var(--accent); }

.hdr-apply, .hdr-cab { text-decoration: none; padding: 6px 12px; }
@media (max-width: 760px) { .hdr-cab { display: none; } }

/* --------------------------------------------------- Первый экран */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 70%);
  color: #fff;
}

.hero-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; opacity: .5;
}
.hero-lines path {
  fill: none; stroke: var(--accent); stroke-width: 1.3;
  /* Приём «прорисовки»: делаем пунктир длиной во всю линию и уводим его
     за край, а анимация возвращает сдвиг к нулю — линия будто рисуется. */
  stroke-dasharray: 1100; stroke-dashoffset: 1100;
  animation: pub-draw 2.4s var(--ease) forwards;
}
.hero-lines path:nth-child(2) { animation-delay: .1s; }
.hero-lines path:nth-child(3) { animation-delay: .2s; }
.hero-lines path:nth-child(4) { animation-delay: .3s; }
.hero-lines path:nth-child(5) { animation-delay: .4s; }

@keyframes pub-draw { to { stroke-dashoffset: 0; } }

.hero-inner {
  position: relative; z-index: 2;
  padding: 76px 20px 66px;
  opacity: 0; transform: translateY(22px);
  animation: pub-rise .85s var(--ease) .2s forwards;
}
@keyframes pub-rise { to { opacity: 1; transform: translateY(0); } }

.eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}

.hero h2 {
  font-family: 'PT Serif', Georgia, serif;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.15; margin: 14px 0 0; max-width: 17ch; color: #fff;
}
.hero-lead {
  margin-top: 16px; font-size: 17px; max-width: 54ch;
  color: rgba(255,255,255,.82);
}
.hero-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn-lg { padding: 13px 26px; font-size: 15.5px; }
.btn-ghost {
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  position: relative; z-index: 2;
  border-top: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.16);
}
.hero-stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 20px; }
.hero-stats > .wrap > div {
  padding: 22px 18px;
  border-left: 1px solid rgba(255,255,255,.12);
}
.hero-stats > .wrap > div:first-child { border-left: none; }
.hero-stats b {
  display: block; font-family: 'PT Serif', Georgia, serif;
  font-size: 28px; color: var(--accent);
}
.hero-stats span { font-size: 12.5px; color: rgba(255,255,255,.65); }

@media (max-width: 720px) {
  .hero-stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .hero-stats > .wrap > div:nth-child(3) { border-left: none; }
}

/* Короткая шапка внутренних страниц */

.pub-hero-sm {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 75%);
  color: #fff; padding: 46px 0 42px;
}
.pub-hero-sm h2 {
  font-family: 'PT Serif', Georgia, serif;
  font-size: clamp(24px, 3.4vw, 36px);
  margin: 12px 0 0; max-width: 24ch; color: #fff; line-height: 1.2;
}
.pub-hero-sm p { margin-top: 12px; max-width: 58ch; color: rgba(255,255,255,.8); }

.doc-meta {
  margin-top: 22px; display: flex; gap: 30px; flex-wrap: wrap; font-size: 13.5px;
  color: rgba(255,255,255,.78);
}
.doc-meta b {
  display: block; font-size: 10.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 3px; font-weight: 600;
}

/* --------------------------------------------------- Появление при прокрутке */

/* Запасной вариант, если motion.js не загрузился (без класса motion-js):
   блоки появляются один раз, через public.js. Основные правила —
   в разделе «Плавность» в конце файла. */
html:not(.motion-js) .reveal:not(.shown),
html:not(.motion-js) .reveal-group:not(.shown) > * { opacity: 0; transform: translateY(24px); }
html:not(.motion-js) .reveal,
html:not(.motion-js) .reveal-group > * { transition: opacity .65s var(--ease), transform .65s var(--ease); }

/* --------------------------------------------------- Секции и карточки */

.pub-sec { padding: 54px 0 10px; scroll-margin-top: 70px; }
.pub-h2 {
  font-family: 'PT Serif', Georgia, serif;
  font-size: clamp(22px, 3vw, 32px);
  margin: 12px 0 0; color: var(--ink); line-height: 1.25;
}
.pub-lead { margin-top: 10px; color: var(--muted); max-width: 62ch; }

.pub-cards {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.pub-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px 20px;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .25s ease;
}
.pub-card:not(.static):hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px -22px rgba(31,42,51,.5);
  border-color: var(--accent);
}
.pub-ico {
  width: 46px; height: 46px; border-radius: 11px;
  background: var(--accent-tint); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
}
.pub-ico .ico { width: 23px; height: 23px; }

.pub-card h3 {
  margin: 16px 0 0; font-size: 17px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif; line-height: 1.3;
}
.pub-card p { margin: 8px 0 0; font-size: 14px; color: var(--muted); flex: 1; }
.pub-card a { color: var(--accent-deep); text-decoration: none; }
.pub-more {
  margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--accent-deep);
  transition: transform .25s var(--ease);
  display: inline-block;
}
.pub-card:hover .pub-more { transform: translateX(4px); }

@media (max-width: 980px) { .pub-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pub-cards { grid-template-columns: 1fr; } }

/* --------------------------------------------------- Шаги */

.pub-steps {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 22px;
}
.pub-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 600;
}
/* h3 — шаг идёт сразу под заголовком раздела h2; h4 — для старых страниц */
.pub-step :is(h3, h4) {
  margin: 12px 0 0; font-size: 16px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif;
}
.pub-step p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }

@media (max-width: 880px) { .pub-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .pub-steps { grid-template-columns: 1fr; } }
/* Четыре шага — два ряда по два, чтобы последний не оставался один */
@media (min-width: 541px) { .pub-steps.four { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------------------- Блок услуги */

.srv-block {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 30px;
  display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 26px;
  margin: 22px 0;
  /* Отступ для якорной ссылки, чтобы заголовок не спрятался под меню */
  scroll-margin-top: 70px;
}
.srv-intro h3 {
  margin: 14px 0 0; font-size: 20px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif; line-height: 1.3;
}
.srv-intro p { margin: 9px 0 0; font-size: 14px; color: var(--muted); }

.srv-col h4 {
  margin: 0 0 10px; font-size: 11.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent-deep); font-weight: 600;
}
.srv-list li {
  position: relative; padding: 8px 0 8px 16px;
  font-size: 13.5px; color: var(--muted); line-height: 1.55;
  border-top: 1px solid var(--line);
}
.srv-list li:first-child { border-top: none; }
.srv-list li::before {
  content: ''; position: absolute; left: 0; top: 15px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.srv-list-warn li::before { background: var(--warn); }

@media (max-width: 1080px) { .srv-block { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .srv-block { grid-template-columns: 1fr; padding: 22px; } }

/* --------------------------------------------------- Документ (условия) */

.doc-layout { display: grid; grid-template-columns: 230px 1fr; gap: 46px; padding: 40px 20px 60px; }

.doc-toc {
  position: sticky; top: 62px; align-self: start;
  border-left: 2px solid var(--line); padding-left: 16px;
}
.doc-toc > span {
  display: block; font-size: 10.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent-deep);
  margin-bottom: 10px; font-weight: 600;
}
.doc-toc a {
  display: block; padding: 6px 0 6px 16px; margin-left: -18px;
  font-size: 13px; color: var(--muted); text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.doc-toc a:hover, .doc-toc a.on { color: var(--accent-deep); border-left-color: var(--accent); }

.doc-body { max-width: 740px; }
.doc-chapter {
  padding: 30px 0; border-top: 1px solid var(--line);
  scroll-margin-top: 70px;
}
.doc-chapter:first-child { border-top: none; padding-top: 0; }

.ch-tag {
  font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 600;
}
.doc-chapter h3 {
  margin: 7px 0 0; font-size: 22px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif;
}
.doc-chapter h4 { margin: 20px 0 0; font-size: 14.5px; color: var(--ink); }
.doc-chapter p { margin: 13px 0 0; font-size: 15px; line-height: 1.7; color: var(--muted); }

.doc-lede {
  font-weight: 500; color: var(--ink) !important;
  border-left: 3px solid var(--accent); padding-left: 16px;
}

.doc-list { margin-top: 12px; }
.doc-list li {
  position: relative; padding: 10px 0 10px 20px;
  font-size: 14.5px; line-height: 1.6; color: var(--muted);
  border-top: 1px dashed var(--line);
}
.doc-list li:first-child { border-top: none; }
.doc-list li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

.doc-note {
  margin-top: 20px; padding: 14px 16px;
  background: var(--warn-tint); border: 1px solid rgba(138,109,26,.25);
  border-radius: 8px; font-size: 13px; line-height: 1.65; color: var(--warn);
}
.doc-foot {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.75; color: var(--muted); opacity: .85;
}

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 26px; }
  .doc-toc {
    position: static; border-left: none; padding-left: 0;
    border-bottom: 1px solid var(--line); padding-bottom: 14px;
    display: flex; flex-wrap: wrap; gap: 4px 16px;
  }
  .doc-toc a { margin-left: 0; padding-left: 0; border-left: none; }
  /* подпись «Главы документа» — отдельной строкой, иначе первая глава
     вставала с ней в один ряд, а остальные — столбиком ниже */
  .doc-toc > span { flex-basis: 100%; margin-bottom: 2px; }
}

/* --------------------------------------------------- Призыв к действию */

.pub-cta {
  margin-top: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 75%);
  color: #fff; text-align: center; padding: 62px 0;
}
.pub-cta h2 {
  font-family: 'PT Serif', Georgia, serif;
  font-size: clamp(22px, 3.2vw, 34px); color: #fff; margin: 0;
}
.pub-cta p { margin: 12px auto 0; max-width: 52ch; color: rgba(255,255,255,.8); }

body.lang-uz [data-lang-ru] { display: none; }
body:not(.lang-uz) [data-lang-uz] { display: none; }

/* --------------------------------------------------- Список материалов */

/* Лента материалов: карточки идут слева направо, страница вниз не растёт.
   Прокрутка обычная, чтобы работали колесо мыши, палец на телефоне
   и клавиши, а стрелки только помогают. */
.news-carousel { position: relative; }

/* Переход между страницами списка материалов */
.news-pages {
  display: flex; gap: 14px; align-items: center; justify-content: center;
  margin: 10px 0 28px;
}
.news-pages-info { color: var(--muted); font-size: 14px; }

.news-list {
  margin: 34px 0 20px;
  display: flex; gap: 18px;
  overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.news-list::-webkit-scrollbar { height: 8px; }
.news-list::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: 4px;
}

.news-list > .news-card {
  flex: 0 0 320px; scroll-snap-align: start;
}

/* Круглые стрелки по краям ленты */
.news-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45);
  z-index: 3;
}
.news-nav:hover { border-color: var(--accent); color: var(--accent); }
.news-prev { left: -12px; }
.news-next { right: -12px; }

/* Новости и объявления на компьютере — шире обычной страницы (860 px):
   в ряд целое число карточек (3 или 4), а не две с половиной. */
.wrap.wrap-news { max-width: 1240px; }
@media (min-width: 900px) {
  .wrap-news .news-list > .news-card { flex-basis: calc((100% - 36px) / 3); }
}
@media (min-width: 1200px) {
  .wrap-news .news-list > .news-card { flex-basis: calc((100% - 54px) / 4); }
}

@media (max-width: 620px) {
  .news-list > .news-card { flex-basis: 84%; }
  .news-nav { display: none; }   /* на телефоне листают пальцем */
}

.news-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .25s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -22px rgba(31,42,51,.5);
  border-color: var(--accent);
}

.news-cover {
  display: block; margin: -20px -20px 16px;
  border-radius: 12px 12px 0 0; overflow: hidden;
  /* Фиксированная пропорция: карточки в ряду не разъезжаются
     из-за снимков разной высоты. */
  aspect-ratio: 16 / 10; background: var(--accent-tint);
}
.news-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.news-date {
  font-size: 12px; letter-spacing: .05em;
  color: var(--accent-deep); font-weight: 600;
}
.news-card h3 {
  margin: 10px 0 0; font-size: 17px; line-height: 1.35;
  color: var(--ink); font-family: 'PT Serif', Georgia, serif;
}
.news-card p { margin: 9px 0 0; font-size: 14px; color: var(--muted); flex: 1; }

.news-badge {
  align-self: flex-start; margin-top: 12px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent-tint); color: var(--accent-deep);
  font-size: 12px; font-weight: 600;
}
.news-card .pub-more { margin-top: 12px; }

.news-empty {
  margin: 40px 0 60px; text-align: center;
  color: var(--muted); font-size: 15px;
}



/* --------------------------------------------------- Страница материала */

.news-article { max-width: 820px; padding: 34px 20px 60px; }

.back-link {
  display: inline-block; margin-bottom: 10px;
  font-size: 14px; color: var(--accent-deep); text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

.news-lead {
  margin: 20px 0 0; font-size: 17px; line-height: 1.65;
  color: var(--ink); font-weight: 500;
  border-left: 3px solid var(--accent); padding-left: 16px;
}

.news-h3 {
  margin: 30px 0 12px; font-size: 18px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif;
}

/* Галерея */

.news-gallery { margin-top: 24px; }
.gal-main {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: var(--accent-tint); aspect-ratio: 16 / 10;
}
.gal-main img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; cursor: zoom-in;
}
.gal-strip {
  margin-top: 10px; display: flex; gap: 8px;
  overflow-x: auto; padding-bottom: 4px;
}
.gal-strip img {
  width: 92px; height: 68px; object-fit: cover; flex-shrink: 0;
  border-radius: 8px; border: 2px solid transparent; cursor: pointer;
  transition: border-color .2s ease, opacity .2s ease;
  opacity: .7;
}
.gal-strip img:hover { opacity: 1; }
.gal-strip img.on { border-color: var(--accent); opacity: 1; }

/* Просмотр в полный размер */

.zoom {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(18,26,32,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; cursor: zoom-out;
}
.zoom[hidden] { display: none; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* Таблица товаров */

.goods-wrap { overflow-x: auto; margin-top: 4px; }

.goods-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; min-width: 560px;
}
.goods-table th {
  text-align: left; padding: 10px 12px;
  background: var(--primary); color: #fff;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  font-weight: 600; white-space: nowrap;
}
.goods-table th:first-child { border-radius: 8px 0 0 0; width: 44px; }
.goods-table th:last-child { border-radius: 0 8px 0 0; }
.goods-table td {
  padding: 11px 12px; border-bottom: 1px solid var(--line);
  color: var(--muted); vertical-align: top;
}
.goods-table tbody tr:hover td { background: var(--accent-tint); }
.goods-table .g-name { color: var(--ink); font-weight: 500; }
.goods-table .g-price {
  color: var(--ink); font-weight: 600; white-space: nowrap; text-align: right;
}

/* Текст и контакты */

.news-body { margin-top: 24px; }
.news-body p {
  margin: 0 0 14px; font-size: 15.5px; line-height: 1.75; color: var(--muted);
}

.news-contact {
  margin-top: 30px; padding: 18px 20px;
  background: var(--accent-tint); border-radius: 10px;
}
.news-contact .news-h3 { margin-top: 0; }
.news-contact p {
  margin: 8px 0 0; display: flex; align-items: center; gap: 9px;
  font-size: 15px; color: var(--ink);
}
.news-contact .ico { width: 17px; height: 17px; color: var(--accent-deep); }
.news-contact a { color: var(--ink); text-decoration: none; font-weight: 600; }
.news-contact a:hover { color: var(--accent-deep); }

.news-author {
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}


.staff-list { margin: 34px 0 10px; display: flex; flex-direction: column; gap: 16px; }

.staff-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px;
  display: grid; grid-template-columns: 150px 1fr; gap: 24px;
  transition: box-shadow .3s var(--ease), border-color .25s ease;
}
.staff-card:hover { box-shadow: 0 18px 34px -26px rgba(31,42,51,.45); border-color: var(--accent); }

.staff-photo {
  aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden;
  background: var(--accent-tint);
  display: flex; align-items: center; justify-content: center;
}
.staff-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.staff-initials {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 40px; color: var(--accent-deep); font-weight: 700;
}

.staff-info h3 {
  margin: 0; font-size: 21px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif; line-height: 1.3;
}
.staff-post {
  margin: 7px 0 0; font-size: 14.5px;
  color: var(--accent-deep); font-weight: 500;
}

.staff-meta { margin: 16px 0 0; display: flex; flex-direction: column; gap: 7px; }
.staff-meta > div { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.staff-meta dt { margin: 0; color: var(--muted); font-weight: 600; }
.staff-meta dt::after { content: ':'; }
.staff-meta dd { margin: 0; color: var(--ink); }
.staff-meta a { color: var(--accent-deep); text-decoration: none; }
.staff-meta a:hover { text-decoration: underline; }

.staff-common {
  margin: 30px 0 60px; padding: 20px 22px;
  background: var(--accent-tint); border-radius: 10px;
}
.staff-common .news-h3 { margin-top: 0; }
.staff-common p {
  margin: 8px 0 0; display: flex; align-items: center; gap: 9px;
  font-size: 15px; color: var(--ink);
}
.staff-common .ico { width: 17px; height: 17px; color: var(--accent-deep); }
.staff-common a { color: var(--ink); text-decoration: none; font-weight: 600; }
.staff-common a:hover { color: var(--accent-deep); }

@media (max-width: 620px) {
  .staff-card { grid-template-columns: 1fr; }
  .staff-photo { max-width: 150px; }
}


.nf-items-table input {
  width: 100%; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit; font-size: 13.5px; background: #fff;
}
.nf-items-table input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,163,163,.12);
}
.nf-items-table td { padding: 5px 6px; }
.nf-items-table .it-del { padding: 6px 10px; line-height: 1; }

.nf-photos {
  margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px;
}
.nf-photo { position: relative; width: 130px; }
.nf-photo img {
  width: 130px; height: 96px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); display: block;
}
.nf-photo-del {
  position: absolute; top: -7px; right: -7px;
  width: 24px; height: 24px; border-radius: 50%;
  border: none; background: var(--danger, #c0392b); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
}
.nf-photo-del:hover { opacity: .85; }

/* ==========================================================================
   РАЗДЕЛ «ИНСТРУКЦИИ» — дописать в конец style.css
   ========================================================================== */

/* Меню внутри страницы */

.ins-nav {
  background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.ins-nav .wrap { display: flex; gap: 4px; padding: 0 20px; flex-wrap: wrap; }
.ins-nav a {
  padding: 13px 16px; font-size: 14.5px;
  color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.ins-nav a:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }

/* Якоря учитывают липкое меню, иначе заголовок прячется под ним */
#steps, #docs, #faq { scroll-margin-top: 60px; }

/* --------------------------------------------------- Шаги */

.ins-steps { margin-top: 28px; }

.ins-step {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.ins-step:first-child { border-top: none; padding-top: 8px; }

.ins-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}

.ins-step-body h3 {
  margin: 8px 0 0; font-size: 19px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif; line-height: 1.3;
}
.ins-step-body > p { margin: 8px 0 0; font-size: 15px; color: var(--muted); }

.ins-points { margin: 12px 0 0; }
.ins-points li {
  position: relative; padding: 6px 0 6px 20px;
  font-size: 14px; color: var(--muted); line-height: 1.55;
}
.ins-points li::before {
  content: ''; position: absolute; left: 2px; top: 14px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

@media (max-width: 560px) {
  .ins-step { grid-template-columns: 1fr; gap: 10px; }
}

/* --------------------------------------------------- Документы */

.ins-docs {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}

.ins-doc {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px 20px;
  display: flex; flex-direction: column;
  transition: box-shadow .3s var(--ease), border-color .25s ease;
}
.ins-doc:hover {
  box-shadow: 0 18px 34px -24px rgba(31,42,51,.45);
  border-color: var(--accent);
}
.ins-doc h3 {
  margin: 15px 0 0; font-size: 16px; line-height: 1.35;
  color: var(--ink); font-family: 'PT Serif', Georgia, serif;
}
.ins-where { margin: 9px 0 0; font-size: 14px; color: var(--muted); flex: 1; }
.ins-note {
  margin: 12px 0 0; padding: 10px 12px;
  background: var(--accent-tint); border-radius: 8px;
  font-size: 13px; line-height: 1.55; color: var(--accent-deep);
}

@media (max-width: 940px) { .ins-docs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .ins-docs { grid-template-columns: 1fr; } }

/* --------------------------------------------------- Вопросы и ответы */

.ins-faq { margin-top: 24px; max-width: 800px; }

.faq-item {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); margin-bottom: 10px;
  transition: border-color .25s ease;
}
.faq-item[open] { border-color: var(--accent); }

.faq-item summary {
  padding: 15px 44px 15px 18px;
  font-size: 15.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; position: relative;
  /* убираем стандартный треугольник браузера — рисуем свой знак */
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+'; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 20px; font-weight: 400; color: var(--accent-deep);
  transition: transform .25s var(--ease);
}
.faq-item[open] summary::after { content: '−'; }

.faq-item summary:hover { color: var(--accent-deep); }

.faq-item p {
  margin: 0; padding: 0 18px 16px;
  font-size: 14.5px; line-height: 1.7; color: var(--muted);
}

/* ==========================================================================
   КНОПКА ПОКАЗА ПАРОЛЯ — дописать в конец style.css
   ========================================================================== */

/* Обёртку создаёт password-toggle.js вокруг каждого поля пароля.
   display:block нужен, чтобы поле сохранило свою ширину внутри .fld. */
.pw-wrap { position: relative; display: block; }

/* Освобождаем справа место под кнопку, иначе длинный пароль
   заезжает под неё. !important — потому что ширина и отступы
   полей заданы в общих правилах .fld input. */
.pw-wrap input { padding-right: 42px !important; width: 100%; }

.pw-toggle {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--muted); border-radius: 6px;
  transition: color .2s ease, background .2s ease;
}
.pw-toggle:hover { color: var(--accent-deep); background: var(--accent-tint); }
.pw-toggle:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.pw-toggle svg { width: 18px; height: 18px; display: block; }

.srv-intro { display: flex; flex-direction: column; }
.srv-intro p { flex: 1; }
.srv-apply { align-self: flex-start; margin-top: 16px; }

/* ==========================================================================
   ОКНО ОПРОСА «ОТКУДА ВЫ УЗНАЛИ О ФОНДЕ» — дописать в конец style.css
   ========================================================================== */

.ref-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(18, 26, 32, .6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  /* Появление: начинаем прозрачным, класс .on включает переход.
     visibility нужен, чтобы скрытое окно не перехватывало клики. */
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.ref-overlay.on { opacity: 1; visibility: visible; }

.ref-card {
  position: relative;
  width: 100%; max-width: 460px;
  background: var(--card); border-radius: 14px;
  padding: 30px 28px 24px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
  transform: translateY(14px);
  transition: transform .3s var(--ease);
}
.ref-overlay.on .ref-card { transform: translateY(0); }

.ref-card h2 {
  margin: 0; font-size: 21px; line-height: 1.3; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif; padding-right: 26px;
}
.ref-card > p {
  margin: 9px 0 0; font-size: 14px; color: var(--muted);
}

.ref-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; padding: 0;
  border: none; background: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--muted);
  border-radius: 6px;
}
.ref-close:hover { color: var(--ink); background: var(--bg); }

.ref-options { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }

.ref-option {
  text-align: left; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; cursor: pointer;
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color .2s ease, background .2s ease, transform .2s var(--ease);
}
.ref-option:hover:not(:disabled) {
  border-color: var(--accent); background: var(--accent-tint);
  transform: translateX(3px);
}
.ref-option:disabled { opacity: .5; cursor: default; }
.ref-option.picked {
  border-color: var(--accent); background: var(--accent);
  color: #fff; opacity: 1;
}

.ref-later {
  display: block; margin: 14px auto 0; padding: 6px;
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--muted);
  text-decoration: underline;
}
.ref-later:hover { color: var(--ink); }

.ref-done {
  margin: 14px 0 0; text-align: center;
  font-size: 14.5px; font-weight: 600; color: var(--accent-deep);
}

@media (max-width: 480px) {
  .ref-card { padding: 26px 20px 20px; }
  .ref-card h2 { font-size: 19px; }
}

/* ==========================================================================
   КУРСЫ ВАЛЮТ И КАРТА В ПОДВАЛЕ  (исправленная версия)

   ВАЖНО: это ЗАМЕНА прошлой секции, а не добавление.
   Найдите в style.css строку
       КУРСЫ ВАЛЮТ И КАРТА В ПОДВАЛЕ — дописать в конец style.css
   и удалите всё от неё до конца файла, затем вставьте этот текст.
   ========================================================================== */

/* --------------------------------------------------- Курсы валют */

.rates-band {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

/* auto-fit с minmax сам решает, сколько карточек поместится в ряд:
   на широком экране семь, на планшете четыре, на телефоне одна.
   190px — минимум, при котором «11 785,30» и название помещаются
   в строку целиком и не переносятся. */
.rates-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2px;
}

.rate-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 9px 14px;
  border-left: 1px solid var(--line);
}
.rate-item:first-child { border-left: none; }

.rate-top { display: flex; align-items: center; gap: 8px; }

.rate-flag { width: 20px; height: 15px; flex: none; display: block; }
.rate-flag svg {
  width: 100%; height: 100%; display: block; border-radius: 2px;
  /* тонкая рамка: белые флаги (Япония) не сливаются с фоном */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.rate-code {
  font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .04em;
}

.rate-diff {
  margin-left: auto;               /* прижимаем к правому краю */
  font-size: 11.5px; color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rate-diff.up { color: #1f8a4c; }
.rate-diff.down { color: #c0392b; }

.rate-bottom { display: flex; align-items: baseline; gap: 8px; }

.rate-name {
  flex: 1;
  /* min-width:0 обязателен: без него флекс-элемент не даёт себя сжать
     и многоточие вместо длинного названия не появляется */
  min-width: 0;
  font-size: 11.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.rate-value {
  margin-left: auto;
  font-size: 16px; font-weight: 600; color: var(--ink);
  white-space: nowrap;             /* число не разрывается посередине */
  font-variant-numeric: tabular-nums;   /* цифры одной ширины — курсы не «прыгают» */
}

.rates-note { margin: 8px 0 0; padding: 0 14px; font-size: 11.5px; color: var(--muted); }
.rates-none { margin: 0; padding: 6px 14px; font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .rate-item { border-left: none; border-top: 1px solid var(--line); }
  .rate-item:first-child { border-top: none; }
}

/* ==========================================================================
   КАРТА В ПОДВАЛЕ  (исправлено под светлый подвал)

   ЧТО ДЕЛАТЬ: в style.css найдите комментарий
       --------------------------------------------------- Карта в подвале
   и удалите всё от него ДО КОНЦА ФАЙЛА, затем вставьте этот текст.
   Секцию с курсами валют, которая идёт выше, трогать не нужно.
   ========================================================================== */

/* --------------------------------------------------- Карта в подвале */

/* Подвал сайта светлый, поэтому текст здесь тёмный — теми же цветами,
   что и на остальных страницах: --ink для заголовка, --muted для строк,
   --accent-deep для ссылок. В прошлой версии цвета были рассчитаны
   на тёмный фон, и белые надписи сливались с подложкой. */

.footer-map { border-top: 1px solid var(--line); }

.footer-map .wrap {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 26px;
  padding: 28px 20px;
  align-items: center;
}

/* Селекторы начинаются с footer намеренно: у подвала есть свои правила
   цвета, и без этого уточнения они перебивают наши. */
footer .footer-map .map-info h3 {
  margin: 0 0 14px; font-size: 18px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif;
}

footer .footer-map .map-info p {
  margin: 9px 0 0; display: flex; align-items: flex-start; gap: 9px;
  font-size: 14.5px; color: var(--ink);
}
footer .footer-map .map-info p span { color: var(--ink); }

footer .footer-map .map-info a {
  color: var(--accent-deep); text-decoration: none; font-weight: 600;
}
footer .footer-map .map-info a:hover { text-decoration: underline; }

footer .footer-map .map-info .ico {
  width: 16px; height: 16px; margin-top: 3px; flex: none;
  color: var(--accent-deep);
}

footer .footer-map .map-link {
  display: inline-block; margin-top: 18px;
  padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-tint);
  font-size: 13.5px; font-weight: 600;
  color: var(--accent-deep); text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
footer .footer-map .map-link:hover {
  background: var(--accent); color: #fff; text-decoration: none;
}

.map-frame {
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10; background: var(--bg);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 780px) {
  .footer-map .wrap { grid-template-columns: 1fr; }
}

/* ==========================================================================
   НОЧНАЯ ТЕМА — дописать в конец style.css

   Устроена на переопределении переменных. Весь сайт уже берёт цвета
   из :root, поэтому достаточно задать другие значения тех же имён —
   и тёмными станут все страницы разом, включая кабинеты.

   Тема включается атрибутом на теге <html>: data-theme="dark".
   Его ставит theme.js.
   ========================================================================== */

[data-theme="dark"] {
  /* Фон и карточки. Не чёрный, а очень тёмный сине-серый:
     чистый чёрный на больших площадях утомляет глаза, потому что
     контраст с белым текстом получается предельным. */
  --bg: #131a21;
  --card: #1b242d;

  /* Шапки и тёмные секции. В светлой теме они были темнее фона,
     здесь наоборот — чуть светлее, иначе шапка сольётся со страницей. */
  --primary: #1f2b35;
  --primary-deep: #18222b;

  /* Текст. Не чистый белый: #e8eef3 мягче и читается спокойнее. */
  --ink: #e8eef3;
  --muted: #94a7b6;

  --line: #2c3945;

  /* Акцент. На тёмном фоне бирюза должна быть светлее, а не темнее:
     accent-deep в светлой теме — тёмный вариант для текста на белом,
     здесь он выполняет ту же роль, но уже на тёмном, поэтому светлеет. */
  --accent: #19b6b6;
  --accent-deep: #57d6d6;
  --accent-tint: rgba(25, 182, 182, .13);

  /* Предупреждения и ошибки */
  --warn: #d9a441;
  --warn-tint: rgba(217, 164, 65, .13);
  --danger: #e05c4a;
}

/* ------------------------------------------------------------------
   Места, где цвет был вписан числом, а не переменной.
   Их немного, и все они здесь.
   ------------------------------------------------------------------ */

[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

/* Заголовок блока окрашен в --primary, а в тёмной теме это почти цвет
   фона — текст пропадал. Здесь берём обычный цвет текста. */
[data-theme="dark"] .block-head h2 { color: var(--ink); }
[data-theme="dark"] .block-num { background: var(--accent); color: #0e1620; }

/* Поля ввода: белый фон пришлось бы менять в каждой форме отдельно */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .ref-option,
[data-theme="dark"] .nf-items-table input {
  background: #16202a;
  color: var(--ink);
  border-color: var(--line);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #6b7d8c; }

/* Выпадающие списки в тёмной теме иначе показывают стрелку */
[data-theme="dark"] select option { background: #16202a; color: var(--ink); }

/* Тени. На светлом фоне тень — это затемнение, на тёмном она
   почти не видна, поэтому делаем её глубже. */
[data-theme="dark"] .pub-card:hover,
[data-theme="dark"] .news-card:hover,
[data-theme="dark"] .contact-item:hover,
[data-theme="dark"] .staff-card:hover,
[data-theme="dark"] .ins-doc:hover {
  box-shadow: 0 18px 34px -20px rgba(0, 0, 0, .7);
}
[data-theme="dark"] .ref-card {
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8);
}

/* Рамка вокруг флагов: на тёмном фоне тёмная обводка не видна */
[data-theme="dark"] .rate-flag svg {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22);
}

/* Логотип Фонда — на белой подложке, оставляем её и в тёмной теме,
   иначе тёмные детали герба сольются с фоном шапки */
[data-theme="dark"] .emblem-logo { background: #fff; }

/* Карта OpenStreetMap рисуется светлой всегда. Слегка приглушаем,
   чтобы яркий прямоугольник не бил по глазам среди тёмной страницы. */
[data-theme="dark"] .map-frame iframe { filter: brightness(.88) saturate(.9); }

/* ------------------------------------------------------------------
   Переключатель темы: солнце и месяц

   Повторяет вид кнопок языка РУ / ЎЗ, которые стоят рядом:
   обе видны, активная подсвечена классом on.
   ------------------------------------------------------------------ */

.theme-switch { display: inline-flex; gap: 4px; }

.theme-btn {
  width: 32px; height: 30px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 6px;
  color: rgba(255, 255, 255, .6);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.theme-btn:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }

/* Активная кнопка: тот же приём, что у переключателя языка */
.theme-btn.on {
  color: #fff;
  border-color: var(--accent);
  background: rgba(255, 255, 255, .1);
}

.theme-btn svg { width: 16px; height: 16px; display: block; }

/* На страницах со светлой шапкой (кабинеты и шаги заявки) */
.theme-switch.on-light .theme-btn {
  border-color: var(--line); color: var(--muted);
}
.theme-switch.on-light .theme-btn:hover {
  color: var(--accent-deep); border-color: var(--accent);
}
.theme-switch.on-light .theme-btn.on {
  color: var(--accent-deep);
  border-color: var(--accent);
  background: var(--accent-tint);
}

/* Плавная смена темы. Переход задан только для цветов: анимировать
   всё подряд означало бы тормоза при каждой перерисовке страницы. */
body, header, footer, .pubnav, .pub-card, .news-card, .srv-block,
.ins-doc, .staff-card, .rates-band, .faq-item, .doc-note {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

/* Уважаем системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  body, header, footer, .pubnav { transition: none; }
}

/* ==========================================================================
   НОЧНАЯ ТЕМА И ПЕРЕКЛЮЧАТЕЛИ — дописать в конец style.css

   Если вы уже добавляли прошлую версию (секция «НОЧНАЯ ТЕМА»),
   удалите её целиком и вставьте этот текст вместо неё:
   стили кнопок изменились.
   ========================================================================== */

/* ------------------------------------------------------------------
   Переменные ночной темы

   Весь сайт берёт цвета из :root, поэтому достаточно задать другие
   значения тех же имён — темнеют все страницы разом, включая кабинеты.
   ------------------------------------------------------------------ */

[data-theme="dark"] {
  /* Не чёрный, а очень тёмный сине-серый: чистый чёрный на больших
     площадях утомляет, контраст с белым текстом получается предельным. */
  --bg: #131a21;
  --card: #1b242d;

  /* Шапки. В светлой теме они темнее фона, здесь чуть светлее —
     иначе шапка сольётся со страницей. */
  --primary: #1f2b35;
  --primary-deep: #18222b;

  --ink: #e8eef3;          /* не чистый белый: мягче для глаз */
  --muted: #94a7b6;
  --line: #2c3945;

  /* Акцент светлеет, а не темнеет: accent-deep в светлой теме —
     тёмный вариант для текста на белом; здесь он играет ту же роль,
     но фон тёмный, поэтому цвет уходит в другую сторону. */
  --accent: #19b6b6;
  --accent-deep: #57d6d6;
  --accent-tint: rgba(25, 182, 182, .13);

  --warn: #d9a441;
  --warn-tint: rgba(217, 164, 65, .13);
  --danger: #e05c4a;
}

/* ------------------------------------------------------------------
   Места, где цвет вписан числом, а не переменной
   ------------------------------------------------------------------ */

[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .ref-option,
[data-theme="dark"] .nf-items-table input {
  background: #16202a; color: var(--ink); border-color: var(--line);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #6b7d8c; }
[data-theme="dark"] select option { background: #16202a; color: var(--ink); }

/* Тень на тёмном фоне почти не видна — делаем глубже */
[data-theme="dark"] .pub-card:hover,
[data-theme="dark"] .news-card:hover,
[data-theme="dark"] .contact-item:hover,
[data-theme="dark"] .staff-card:hover,
[data-theme="dark"] .ins-doc:hover {
  box-shadow: 0 18px 34px -20px rgba(0, 0, 0, .7);
}
[data-theme="dark"] .ref-card { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); }

/* Тёмная обводка флагов на тёмном фоне не видна */
[data-theme="dark"] .rate-flag svg { box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }

/* Белая подложка логотипа остаётся: тёмные детали герба
   иначе сольются с фоном шапки */
[data-theme="dark"] .emblem-logo { background: #fff; }

/* Карта OpenStreetMap всегда светлая — приглушаем, чтобы яркий
   прямоугольник не бил по глазам среди тёмной страницы */
[data-theme="dark"] .map-frame iframe { filter: brightness(.88) saturate(.9); }

/* ------------------------------------------------------------------
   Переключатели темы и языка

   Отдельная группа справа от .lang. Родные кнопки РУ / ЎЗ скрыты,
   но остаются в разметке: страницы навешивают на них обработчики
   при загрузке, и удаление могло бы что-то сломать.
   ------------------------------------------------------------------ */

.sw-hidden { display: none !important; }

.hdr-tools { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

.sw { position: relative; }

.sw-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: transparent;
  color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .2s ease, border-color .2s ease;
}
.sw-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); }

.sw-ico { display: flex; }
.sw-ico svg { width: 20px; height: 20px; display: block; }

.sw-label { line-height: 1; }

.sw-chev { display: flex; opacity: .7; }
.sw-chev svg { width: 14px; height: 14px; display: block; transition: transform .2s ease; }
.sw.open .sw-chev svg { transform: rotate(180deg); }

/* Выпадающая панель */

.sw-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 190px; padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 44px -22px rgba(0, 0, 0, .45);
  z-index: 120;
  /* Скрыта до открытия. visibility нужен, чтобы невидимая панель
     не перехватывала клики по тому, что под ней. */
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.sw.open .sw-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.sw-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border: none; border-radius: 8px; background: none;
  font-family: inherit; font-size: 14px; color: var(--ink);
  text-align: left; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.sw-item:hover { background: var(--accent-tint); color: var(--accent-deep); }
.sw-item.on { background: var(--accent-tint); color: var(--accent-deep); font-weight: 600; }
.sw-item .sw-ico svg { width: 18px; height: 18px; }

.sw-code {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 22px; border-radius: 5px;
  background: var(--accent-tint); color: var(--accent-deep);
  font-size: 12px; font-weight: 700;
}
.sw-item.on .sw-code { background: var(--accent); color: #fff; }

/* Кабинеты: шапка светлая, кнопке нужен тёмный контур */
.hdr-tools.on-light .sw-btn {
  border-color: var(--line); color: var(--ink);
}
.hdr-tools.on-light .sw-btn:hover {
  background: var(--accent-tint); border-color: var(--accent); color: var(--accent-deep);
}

@media (max-width: 720px) {
  .sw-label { display: none; }        /* на телефоне остаётся только значок */
  .sw-btn { padding: 0 10px; }
}

/* Плавная смена темы. Переход задан только для цветов: анимировать
   всё подряд означало бы тормоза при каждой перерисовке. */
body, header, footer, .pubnav, .pub-card, .news-card, .srv-block,
.ins-doc, .staff-card, .rates-band, .faq-item, .doc-note {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

@media (prefers-reduced-motion: reduce) {
  body, header, footer, .pubnav { transition: none; }
  .sw-menu { transition: none; }
}

/* ==========================================================================
   НОЧНАЯ ТЕМА И ПЕРЕКЛЮЧАТЕЛИ — дописать в конец style.css

   Если вы уже добавляли прошлую версию (секция «НОЧНАЯ ТЕМА»),
   удалите её целиком и вставьте этот текст вместо неё:
   стили кнопок изменились.
   ========================================================================== */

/* ------------------------------------------------------------------
   Переменные ночной темы

   Весь сайт берёт цвета из :root, поэтому достаточно задать другие
   значения тех же имён — темнеют все страницы разом, включая кабинеты.
   ------------------------------------------------------------------ */

[data-theme="dark"] {
  /* Не чёрный, а очень тёмный сине-серый: чистый чёрный на больших
     площадях утомляет, контраст с белым текстом получается предельным. */
  --bg: #131a21;
  --card: #1b242d;

  /* Шапки. В светлой теме они темнее фона, здесь чуть светлее —
     иначе шапка сольётся со страницей. */
  --primary: #1f2b35;
  --primary-deep: #18222b;

  --ink: #e8eef3;          /* не чистый белый: мягче для глаз */
  --muted: #94a7b6;
  --line: #2c3945;

  /* Акцент светлеет, а не темнеет: accent-deep в светлой теме —
     тёмный вариант для текста на белом; здесь он играет ту же роль,
     но фон тёмный, поэтому цвет уходит в другую сторону. */
  --accent: #19b6b6;
  --accent-deep: #57d6d6;
  --accent-tint: rgba(25, 182, 182, .13);

  --warn: #d9a441;
  --warn-tint: rgba(217, 164, 65, .13);
  --danger: #e05c4a;
}

/* ------------------------------------------------------------------
   Места, где цвет вписан числом, а не переменной
   ------------------------------------------------------------------ */

[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .ref-option,
[data-theme="dark"] .nf-items-table input {
  background: #16202a; color: var(--ink); border-color: var(--line);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #6b7d8c; }
[data-theme="dark"] select option { background: #16202a; color: var(--ink); }

/* Тень на тёмном фоне почти не видна — делаем глубже */
[data-theme="dark"] .pub-card:hover,
[data-theme="dark"] .news-card:hover,
[data-theme="dark"] .contact-item:hover,
[data-theme="dark"] .staff-card:hover,
[data-theme="dark"] .ins-doc:hover {
  box-shadow: 0 18px 34px -20px rgba(0, 0, 0, .7);
}
[data-theme="dark"] .ref-card { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); }

/* Тёмная обводка флагов на тёмном фоне не видна */
[data-theme="dark"] .rate-flag svg { box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }

/* Белая подложка логотипа остаётся: тёмные детали герба
   иначе сольются с фоном шапки */
[data-theme="dark"] .emblem-logo { background: #fff; }

/* Карта OpenStreetMap всегда светлая — приглушаем, чтобы яркий
   прямоугольник не бил по глазам среди тёмной страницы */
[data-theme="dark"] .map-frame iframe { filter: brightness(.88) saturate(.9); }

/* ------------------------------------------------------------------
   Переключатели темы и языка

   Отдельная группа справа от .lang. Родные кнопки РУ / ЎЗ скрыты,
   но остаются в разметке: страницы навешивают на них обработчики
   при загрузке, и удаление могло бы что-то сломать.
   ------------------------------------------------------------------ */

.sw-hidden { display: none !important; }

.hdr-tools { display: flex; align-items: center; gap: 10px; margin-left: 10px; }

/* ---------- Круглая кнопка темы ---------- */

.sw-round {
  width: 42px; height: 42px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: transparent; color: #fff; cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.sw-round:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .55);
}
.sw-round:active { transform: scale(.94); }
.sw-round svg { width: 21px; height: 21px; display: block; }

/* ---------- Выбор языка ---------- */

.sw { position: relative; }

.sw-btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: transparent; color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .2s ease, border-color .2s ease;
}
.sw-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); }

/* Флаг: фиксированный размер и тонкая обводка, иначе белые полосы
   российского флага сливаются со светлым фоном списка */
.sw-flag { display: block; width: 24px; height: 18px; flex: none; }
.sw-flag svg {
  width: 100%; height: 100%; display: block;
  border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
}

.sw-label { line-height: 1; }

.sw-chev { display: flex; opacity: .75; }
.sw-chev svg { width: 14px; height: 14px; display: block; transition: transform .2s ease; }
.sw.open .sw-chev svg { transform: rotate(180deg); }

/* Выпадающая панель */

.sw-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 200px; padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 44px -22px rgba(0, 0, 0, .45);
  z-index: 120;
  /* Скрыта до открытия. visibility нужен, чтобы невидимая панель
     не перехватывала клики по тому, что под ней. */
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.sw.open .sw-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.sw-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 10px 12px;
  border: none; border-radius: 8px; background: none;
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  text-align: left; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.sw-item:hover { background: var(--accent-tint); color: var(--accent-deep); }
.sw-item.on { background: var(--accent-tint); color: var(--accent-deep); font-weight: 600; }

/* Кабинеты: шапка светлая, кнопкам нужен тёмный контур */
.hdr-tools.on-light .sw-round,
.hdr-tools.on-light .sw-btn {
  border-color: var(--line); color: var(--ink);
}
.hdr-tools.on-light .sw-round:hover,
.hdr-tools.on-light .sw-btn:hover {
  background: var(--accent-tint); border-color: var(--accent); color: var(--accent-deep);
}

@media (max-width: 760px) {
  .sw-label { display: none; }        /* на телефоне остаются флаг и стрелка */
  .sw-btn { padding: 0 11px; }
}

/* ------------------------------------------------------------------
   Плавная смена темы

   Класс theme-anim вешается на <html> в момент переключения и
   снимается через 420 мс (см. switchers.js). Пока он есть, плавно
   меняются цвета всех элементов сразу — и фон, и текст, и рамки,
   и значки.

   Почему не сделать переход постоянным: тогда браузеру пришлось бы
   просчитывать анимацию при каждом наведении мыши и любой
   перерисовке. На странице с сотнями элементов это заметно
   подтормаживает. Здесь же переход живёт доли секунды.

   !important нужен, чтобы перекрыть собственные переходы элементов
   (у карточек, кнопок и ссылок они свои). Опасности нет: правило
   действует только в эти 420 мс.
   ------------------------------------------------------------------ */

.theme-anim,
.theme-anim *,
.theme-anim *::before,
.theme-anim *::after {
  transition: background-color .35s ease,
              border-color .35s ease,
              color .35s ease,
              fill .35s ease,
              stroke .35s ease,
              box-shadow .35s ease !important;
}

/* Уважаем системную настройку «уменьшить движение»: скрипт в этом
   случае класс не вешает, но правило оставляем на случай, если
   настройку включат при уже открытой странице. */
@media (prefers-reduced-motion: reduce) {
  .theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
    transition: none !important;
  }
  .sw-menu { transition: none; }
}

/* ==========================================================================
   СТРАНИЦА КОНТАКТОВ И ФОРМА ОБРАЩЕНИЯ — дописать в конец style.css
   ========================================================================== */

.contact-layout {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 28px;
  padding: 44px 0 60px;
  align-items: start;
}

/* --------------------------------------------------- Контактные сведения */

.contact-side {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 28px 26px;
}
.contact-side .pub-h2 { margin: 0 0 20px; font-size: 22px; }

.ci { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; }
.ci:first-of-type { margin-top: 0; }

.ci-ico {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
}
.ci-ico .ico { width: 19px; height: 19px; }

.ci b {
  display: block; font-size: 15px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif; font-weight: 700; margin-bottom: 3px;
}
.ci a, .ci span { font-size: 14.5px; color: var(--muted); text-decoration: none; }
.ci a:hover { color: var(--accent-deep); text-decoration: underline; }

/* --------------------------------------------------- Форма */

.contact-form {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 28px 26px;
}
.contact-form .pub-h2 { margin: 0; font-size: 22px; }
.contact-form .pub-lead { margin: 8px 0 22px; font-size: 14.5px; }

.ap-field { display: block; margin-bottom: 16px; }
.ap-field > span {
  display: block; margin-bottom: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}

.ap-field input,
.ap-field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg); color: var(--ink);
  font-family: inherit; font-size: 14.5px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ap-field textarea { resize: vertical; min-height: 120px; }

.ap-field input:focus,
.ap-field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.ap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* Поле-приманка для роботов. Не display:none — часть ботов такие поля
   распознаёт и пропускает. Поэтому убираем его за край экрана:
   человек не увидит, а робот сочтёт обычным полем и заполнит. */
.ap-trap {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.ap-submit { width: 100%; justify-content: center; margin-top: 4px; }

.ap-status {
  margin: 0 0 14px; padding: 0;
  font-size: 14px; line-height: 1.55;
  display: none;
}
.ap-status.is-visible { display: block; padding: 12px 14px; border-radius: 9px; }
.ap-status.ok {
  background: var(--accent-tint); color: var(--accent-deep);
  border: 1px solid var(--accent);
}
.ap-status.error {
  background: rgba(192, 57, 43, .1); color: #c0392b;
  border: 1px solid rgba(192, 57, 43, .3);
}
[data-theme="dark"] .ap-status.error {
  background: rgba(224, 92, 74, .14); color: #ea8577;
  border-color: rgba(224, 92, 74, .4);
}

.ap-note {
  margin: 14px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted);
}

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ap-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   РАЗДЕЛ «ОБРАЩЕНИЯ» В КАБИНЕТЕ — дописать в конец style.css
   ========================================================================== */

/* Текст обращения приходит от посетителя как есть, с его переносами
   строк. pre-wrap сохраняет их и при этом переносит длинные строки
   по ширине блока — обычный <p> склеил бы абзацы в один. */
.ac-message {
  white-space: pre-wrap;
  margin: 0 0 6px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
}

/* Состояние «в работе» — своя пометка рядом с уже имеющимися
   ok / bad / pending из таблиц кабинета */
.hist-badge.wait {
  background: var(--warn-tint);
  color: var(--warn);
}

/* --------------------------------------------------- Сводка опроса */

.ref-num, .ref-pct {
  font-variant-numeric: tabular-nums;   /* цифры одной ширины — столбик ровный */
  text-align: right;
  white-space: nowrap;
}

.ref-bar-cell { width: 45%; padding-right: 14px !important; }

/* Полоса показывает долю наглядно: сравнивать длину глазом
   легче, чем числа в столбик */
.ref-bar {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: var(--accent);
  min-width: 2px;
  transition: width .3s ease;
}

.sched-head .m { display: flex; align-items: baseline; gap: 8px; }

/* ==========================================================================
   ЗНАЧКИ СОЦСЕТЕЙ В ОКНЕ ОПРОСА — дописать в конец style.css,
   после прежней секции окна опроса.

   Соцсети теперь такие же варианты ответа, как остальные: обычные
   кнопки в общем списке, только со значком слева.
   ========================================================================== */

/* Кнопка варианта: значок и текст в строку.
   Прежнее правило задавало только text-align, поэтому дополняем. */
.ref-option {
  display: flex; align-items: center; gap: 11px;
}

.ref-logo { display: flex; flex: none; }
.ref-logo svg { width: 20px; height: 20px; display: block; }

/* Текст занимает оставшееся место. min-width:0 обязателен: без него
   флекс-элемент не даёт себя сжать, и длинная строка распирает кнопку. */
.ref-text { flex: 1; min-width: 0; }

/* У выбранного варианта текст белеет вместе с фоном,
   а фирменный цвет значка остаётся — так он и узнаётся */
.ref-option.picked .ref-text { color: #fff; }

[data-theme="dark"] .ref-option { background: #16202a; }
[data-theme="dark"] .ref-option.picked { background: var(--accent); }

.ref-msg {
  padding: 18px 12px !important;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* Итоговая строка по соцсетям отделяется от остальных */
.ref-total-row td {
  border-top: 2px solid var(--line) !important;
  background: var(--accent-tint);
}

/* ==========================================================================
   БЛОК «О ФОНДЕ» НА ГЛАВНОЙ — дописать в конец style.css
   ========================================================================== */

.about-fund {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  padding: 66px 0 10px;
  /* start вместо center: колонки начинаются от одной линии.
     При center высокая колонка с текстом «топит» картинку вниз. */
  align-items: start;
}

.about-text .pub-h2 { margin: 12px 0 18px; max-width: 20ch; }

.about-text p {
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--muted);
}
.about-text p:last-of-type { margin-bottom: 0; }

/* --------------------------------------------------- Цифры */

.about-facts {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.about-facts b {
  display: block;
  font-family: 'PT Serif', Georgia, serif;
  font-size: 26px;
  line-height: 1.1;
  color: var(--accent-deep);
}
.about-facts span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* --------------------------------------------------- Изображение */

.about-photo {
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: var(--accent-tint);
  /* Картинка «прилипает» при прокрутке, пока текст рядом длиннее её.
     Так она остаётся в кадре и не уезжает раньше времени. */
  position: sticky;
  top: 80px;
}

.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;      /* снимок заполняет рамку без искажения пропорций */
  display: block;
}

.about-photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 18px 14px;
  /* Подложка снизу: белая подпись на светлом участке снимка
     иначе может оказаться нечитаемой. */
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
}

/* Запасная иллюстрация, если фотография не задана */
.about-art {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-deep) 100%);
}
.about-art svg { width: 100%; height: 100%; display: block; }

@media (max-width: 900px) {
  .about-fund { grid-template-columns: 1fr; gap: 30px; padding-top: 48px; }
  .about-photo { aspect-ratio: 16 / 10; order: -1; }
  .about-text .pub-h2 { max-width: none; }
}
@media (max-width: 480px) {
  .about-facts { grid-template-columns: 1fr; gap: 14px; }
}

/* Вход блока «О фонде» — общими правилами раздела «Плавность» (motion.js). */

/* ==========================================================================
   РАМКА ПОД ГОРИЗОНТАЛЬНУЮ ФОТОГРАФИЮ — дописать в конец style.css
   ========================================================================== */

/* Снимок горизонтальный (1200×800, то есть 3:2), а рамка была задана
   вертикальной 4:5. При object-fit:cover лишнее обрезается по бокам —
   пропали бы флаги по краям кадра. Приводим рамку к пропорции снимка,
   тогда он помещается целиком. */
.about-photo { aspect-ratio: 3 / 2; }

/* Если всё же понадобится обрезка (например, на узком экране),
   кадрируем от верха: лицо в кадре выше центра, и при обрезке
   снизу оно остаётся на месте. */
.about-photo img { object-position: center top; }

/* Фотография ниже колонки с текстом, поэтому прижимаем её к верху
   и не даём растягиваться на всю высоту блока. */
.about-fund { align-items: start; }

@media (max-width: 900px) {
  /* На узком экране колонки складываются в одну, снимок уходит
     наверх — пропорцию оставляем ту же, чтобы не обрезать. */
  .about-photo { aspect-ratio: 3 / 2; }
}

/* ==========================================================================
   СПЕЦИАЛЬНЫЕ ВОЗМОЖНОСТИ И ТЕЛЕФОН В ШАПКЕ
   Дописать в конец style.css
   ========================================================================== */

/* --------------------------------------------------- Масштаб страницы

   Размеры на сайте заданы в пикселях, поэтому менять font-size у корня
   бесполезно: пиксели на него не реагируют. Свойство zoom масштабирует
   и текст, и разметку — так же, как встроенное увеличение браузера.  */

html[data-a11y-font="-1"] { zoom: 0.9; }
html[data-a11y-font="1"]  { zoom: 1.15; }
html[data-a11y-font="2"]  { zoom: 1.3; }
html[data-a11y-font="3"]  { zoom: 1.5; }

/* --------------------------------------------------- Вид сайта */

/* Чёрно-белый: обесцвечиваем всю страницу одним фильтром.
   Так не приходится переопределять сотни цветов по отдельности. */
html[data-a11y-view="bw"] { filter: grayscale(1); }

/* Высокий контраст: чёрный фон, белый текст, жёлтые акценты.
   Сочетание принято в версиях для слабовидящих на госсайтах. */
html[data-a11y-view="contrast"] {
  --bg: #000;
  --card: #000;
  --ink: #fff;
  --muted: #fff;
  --line: #fff;
  --primary: #000;
  --primary-deep: #000;
  --accent: #ffe000;
  --accent-deep: #ffe000;
  --accent-tint: #1a1a00;
}
html[data-a11y-view="contrast"] body { background: #000; color: #fff; }
html[data-a11y-view="contrast"] img { filter: grayscale(1) contrast(1.15); }
html[data-a11y-view="contrast"] .btn,
html[data-a11y-view="contrast"] .sw-btn,
html[data-a11y-view="contrast"] .sw-round,
html[data-a11y-view="contrast"] .a11y-btn {
  background: #000 !important;
  color: #ffe000 !important;
  border: 2px solid #ffe000 !important;
}
/* Тонкие рамки в этом режиме не видны — усиливаем */
html[data-a11y-view="contrast"] .pub-card,
html[data-a11y-view="contrast"] .news-card,
html[data-a11y-view="contrast"] .srv-block,
html[data-a11y-view="contrast"] .contact-side,
html[data-a11y-view="contrast"] .contact-form,
html[data-a11y-view="contrast"] .staff-card,
html[data-a11y-view="contrast"] .ins-doc { border-width: 2px; }

/* --------------------------------------------------- Кнопка в шапке */

.a11y-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: transparent; color: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .2s ease, border-color .2s ease;
}
.a11y-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); }
.a11y-btn svg { width: 20px; height: 20px; flex: none; }

.hdr-tools.on-light .a11y-btn { border-color: var(--line); color: var(--ink); }
.hdr-tools.on-light .a11y-btn:hover {
  background: var(--accent-tint); border-color: var(--accent); color: var(--accent-deep);
}

@media (max-width: 980px) { .a11y-btn span { display: none; } .a11y-btn { padding: 0 11px; } }

/* --------------------------------------------------- Телефон под кнопками */

.hdr-phone {
  display: flex; align-items: center; justify-content: flex-end; gap: 7px;
  margin-top: 8px;
  font-size: 14px; font-weight: 600;
  color: rgba(255, 255, 255, .9); text-decoration: none;
  white-space: nowrap;
}
.hdr-phone:hover { color: var(--accent); }
.hdr-phone svg { width: 15px; height: 15px; color: var(--accent); }
.hdr-phone small {
  font-weight: 400; font-size: 12px; color: rgba(255, 255, 255, .6);
}

/* Правая часть шапки становится колонкой: сверху переключатели,
   под ними телефон */
.header-right { display: flex; flex-direction: column; align-items: flex-end; }
.header-right .row { display: flex; align-items: center; gap: 10px; }

@media (max-width: 760px) { .hdr-phone small { display: none; } }

/* --------------------------------------------------- Окно панели */

.a11y-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(18, 26, 32, .6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.a11y-overlay.on { opacity: 1; visibility: visible; }

.a11y-card {
  position: relative; width: 100%; max-width: 520px;
  background: var(--card); border-radius: 14px; padding: 30px 28px 24px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
  transform: translateY(12px);
  transition: transform .25s var(--ease);
}
.a11y-overlay.on .a11y-card { transform: translateY(0); }

.a11y-card h2 {
  margin: 0 0 22px; font-size: 24px; color: var(--ink);
  font-family: 'PT Serif', Georgia, serif; padding-right: 30px;
}

.a11y-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; padding: 0;
  border: none; background: none; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--muted); border-radius: 6px;
}
.a11y-close:hover { color: var(--ink); background: var(--bg); }

.a11y-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0; border-top: 1px solid var(--line);
}
.a11y-row:first-of-type { border-top: none; }
.a11y-row > span { font-size: 15px; color: var(--ink); }

.a11y-btns { display: flex; gap: 8px; flex: none; }

/* Кнопки выбора вида: каждая показывает букву в своём оформлении,
   поэтому выбор понятен без подписей */
.a11y-view {
  width: 48px; height: 48px; border-radius: 8px;
  border: 2px solid var(--line); cursor: pointer;
  font-family: inherit; font-size: 20px; font-weight: 700;
  transition: border-color .2s ease, transform .15s ease;
}
.a11y-view:hover { transform: translateY(-2px); }
.a11y-view.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

.a11y-view.v-normal   { background: #1b4b8f; color: #fff; }
.a11y-view.v-bw       { background: #d8dade; color: #fff; }
.a11y-view.v-contrast { background: #000; color: #ffe000; }

.a11y-step {
  width: 48px; height: 48px; border-radius: 8px;
  border: 2px solid var(--accent); background: transparent;
  color: var(--accent-deep); cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 700;
  transition: background .2s ease, opacity .2s ease;
}
.a11y-step:hover:not(:disabled) { background: var(--accent-tint); }
.a11y-step:disabled { opacity: .35; cursor: default; border-color: var(--line); color: var(--muted); }

/* Переключатель чтения вслух */
.a11y-switch {
  width: 52px; height: 28px; flex: none; padding: 3px;
  border: none; border-radius: 999px; background: var(--line);
  cursor: pointer; transition: background .2s ease;
}
.a11y-switch span {
  display: block; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .2s var(--ease);
}
.a11y-switch.on { background: var(--accent); }
.a11y-switch.on span { transform: translateX(24px); }

.a11y-hint {
  margin: 4px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted);
}

.a11y-actions {
  margin-top: 22px; display: flex; gap: 10px;
}
.a11y-actions .btn { flex: 1; justify-content: center; }

@media (max-width: 480px) {
  .a11y-row { flex-direction: column; align-items: flex-start; }
  .a11y-card h2 { font-size: 21px; }
}

/* ==========================================================================
   ШАПКА: место под название и кнопки — дописать в конец style.css
   ========================================================================== */

/* Кнопок в шапке стало четыре, и колонке с названием осталось мало
   места — оно переносилось на четыре строки, а логотип съезжал вниз.
   Растягиваем шапку на всю ширину экрана и раздаём место заново. */

.public header .wrap {
  max-width: 1500px;
  gap: 18px;
  align-items: center;
}

/* Название занимает всё свободное место и не сжимается до предела.
   min-width:0 нужен, чтобы длинный текст не распирал контейнер. */
.public header .wrap > div:not(.lang):not(.hdr-tools):not(.header-right) {
  flex: 1;
  min-width: 0;
}

.public header h1 {
  /* На широком экране название встаёт в две строки, а не в четыре */
  max-width: 30ch;
  line-height: 1.25;
}

/* Логотип не сжимается вместе с текстом */
.public header .emblem,
.public header .emblem-logo { flex: none; align-self: center; }

/* Кнопки не переносятся на новую строку и не растягиваются */
.hdr-tools { flex: none; }

/* --------------------------------------------------- Узкие экраны */

@media (max-width: 1200px) {
  /* Прячем подпись у кнопки спецвозможностей — значка достаточно,
     подсказка при наведении остаётся */
  .a11y-btn span { display: none; }
  .a11y-btn { padding: 0 11px; }
}

@media (max-width: 1000px) {
  .sw-label { display: none; }        /* у языка остаётся флаг и стрелка */
  .sw-btn { padding: 0 11px; }
}

@media (max-width: 820px) {
  /* Кнопка кабинета — самая длинная, на телефоне она лишняя:
     тот же переход есть в подвале и в меню */
  .public header .hdr-cab { display: none; }
}

@media (max-width: 640px) {
  .public header .wrap { flex-wrap: wrap; }
  .public header h1 { font-size: 13px; }
}

/* ==========================================================================
   ССЫЛКИ И СОЦСЕТИ В ПОДВАЛЕ — дописать в конец style.css
   ========================================================================== */

/* Колонок в подвале стало четыре: бренд, разделы, ресурсы, контакты */
.footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr 1.1fr; }

.footer-col a,
.footer-col span {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--accent-deep); }

/* --------------------------------------------------- Значки соцсетей */

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.footer-social a {
  width: 38px; height: 38px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: transform .2s var(--ease), border-color .2s ease, box-shadow .2s ease;
}
.footer-social a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .35);
}

.footer-social svg { width: 22px; height: 22px; display: block; }

/* В тёмной теме подложка под значками светлее фона, иначе
   тёмные части логотипов сливаются с подвалом */
[data-theme="dark"] .footer-social a { background: #202b35; }

/* --------------------------------------------------- Узкие экраны */

@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-social { justify-content: flex-start; }
}

/* ==========================================================================
   РАЗМЕР ЛОГОТИПА В ПОДВАЛЕ — дописать в конец style.css

   Без этого правила изображение растягивается на всю ширину колонки:
   у <img> нет собственного ограничения размера, он занимает столько,
   сколько ему дадут.
   ========================================================================== */

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand img {
  width: 52px;
  height: 52px;
  flex: none;          /* не сжимается и не растягивается вместе с текстом */
  object-fit: contain;
}

.footer-brand p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 40ch;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 560px) {
  .footer-brand { flex-direction: column; }
}

/* ==========================================================================
   ВЫБОР АДРЕСАТА ОБРАЩЕНИЯ — дописать в конец style.css
   ========================================================================== */

.ap-recipients {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.ap-to {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.ap-to:hover { border-color: var(--accent); background: var(--accent-tint); }

.ap-to.on {
  border-color: var(--accent);
  background: var(--accent-tint);
  /* Вторая рамка вместо толстой: толщина сдвигала бы соседние
     кнопки при выборе, а тень — нет. */
  box-shadow: 0 0 0 2px var(--accent-tint);
}

.ap-to b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.ap-to.on b { color: var(--accent-deep); }

.ap-to span {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* ==========================================================================
   ВИДЕО В НОВОСТЯХ — дописать в конец style.css
   ========================================================================== */

.news-video {
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  /* Пропорция задана заранее: пока проигрыватель грузится, блок уже
     занимает своё место и текст под ним не «прыгает». 16:9 — формат,
     в котором YouTube отдаёт почти все ролики. */
  aspect-ratio: 16 / 9;
  background: #000;
}
.news-video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Пометки на карточке в списке */

.news-marks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.news-marks .news-badge { margin-top: 0; }

.news-badge-video {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 0, 0, .1);
  color: #c0392b;
}
.news-badge-video svg { width: 13px; height: 13px; }

[data-theme="dark"] .news-badge-video {
  background: rgba(255, 60, 60, .16);
  color: #ff7b6b;
}

/* ==========================================================================
   АНГЛИЙСКИЙ ДЛЯ НОВОСТЕЙ ИЗ БАЗЫ ДАННЫХ

   Куда: НАЙТИ в style.css строки

       body.lang-uz [data-lang-ru] { display: none; }
       body:not(.lang-uz) [data-lang-uz] { display: none; }

   и ЗАМЕНИТЬ их этими тремя правилами — состояний теперь три
   (русский по умолчанию, узбекский, английский), а не два.

   Ни одно из правил не задаёт display для «показанного» варианта —
   только скрывает лишние. Так специально: среди этих элементов есть
   и <span> (заголовок), и <div> (текст новости, из нескольких <p>) —
   у них разные естественные значения display, а единое присвоенное
   значение подошло бы только одному из двух видов тегов.
   ========================================================================== */

body:not(.lang-uz):not(.lang-en) [data-lang-uz],
body:not(.lang-uz):not(.lang-en) [data-lang-en] { display: none; }

body.lang-uz [data-lang-ru],
body.lang-uz [data-lang-en] { display: none; }

body.lang-en [data-lang-ru],
body.lang-en [data-lang-uz] { display: none; }

/* ==========================================================================
   КАРТА ФОНДА — дописать в конец style.css
   ========================================================================== */

.map-legend {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin: 22px 0 0;
  font-size: 13px; color: var(--muted);
}
.map-legend-item { display: flex; align-items: center; gap: 8px; }

.map-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #1a5c52; border: 1px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  flex: none;
}

.map-legend-scale {
  width: 60px; height: 12px; border-radius: 3px; flex: none;
  background: linear-gradient(90deg, #e8f3f1, hsl(174, 55%, 30%));
  border: 1px solid var(--line);
}

.map-hint {
  margin: 14px 0 0;
  font-size: 13px; color: var(--muted);
}

.map-error {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

/* Всплывающая подсказка Leaflet — подгоняем под шрифт и цвета сайта,
   а не оставляем библиотечные значения по умолчанию */
.leaflet-popup-content-wrapper {
  border-radius: 10px;
  font-family: 'IBM Plex Sans', sans-serif;
}
.map-popup b { color: var(--ink); }
.map-popup-row { margin-top: 6px; font-size: 13px; color: var(--muted); }
.map-popup-director b { color: var(--accent-deep); }
.map-popup-director i { font-style: normal; opacity: .7; }

.leaflet-tooltip {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  border-radius: 6px;
}

/* Тёмная тема: приглушаем яркие плитки OpenStreetMap, как и для
   карты на странице контактов — иначе яркий прямоугольник
   выбивается среди тёмной страницы */
[data-theme="dark"] .uz-map .leaflet-tile-pane { filter: brightness(.85) saturate(.85); }
[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip { background: var(--card); color: var(--ink); }

/* ==========================================================================
   КАРТА ФОНДА (серверный SVG) — заменить прежний блок «КАРТА ФОНДА»
   в конце style.css этим целиком
   ========================================================================== */

.uz-map {
  position: relative;   /* точка отсчёта для всплывающей подсказки */
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  margin: 20px 0;
}

.uz-map-svg {
  display: block;
  width: 100%;
  height: auto;
}

.uz-region {
  cursor: pointer;
  transition: fill .2s ease, stroke-width .15s ease;
}
.uz-region-hover,
.uz-region:hover {
  stroke-width: 4;
}

/* Точки направлений в подсказке карты — как значки на инфографике */
.fin-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 7px; vertical-align: 1px;
}
.fin-dot-plots { background: #d64545; }
.fin-dot-services { background: #e08a2e; }
.fin-dot-farms { background: #2f8f4e; }

.uz-map-popup-sep {
  height: 1px; margin: 8px 0 6px;
  background: var(--line);
}

/* Таблица финансирования: числа читаются ровным столбцом */
.fin-table td.g-price { font-variant-numeric: tabular-nums; }

.map-search {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.map-search input { max-width: 320px; }

/* Результат поиска закреплён в углу самой карты: строка над картой
   уходила за край экрана, когда посетитель смотрел на приближённый город */
.map-found {
  position: absolute; top: 12px; left: 12px; z-index: 11;
  max-width: 260px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .35);
  font-size: 14px; line-height: 1.6;
  pointer-events: none;   /* не мешает тащить карту под собой */
}
.map-found b { font-size: 15px; }
.map-found span { color: var(--muted); }

/* Найденный поиском город подсвечивается: среди соседних точек
   иначе непонятно, какая именно нашлась. */
.uz-city-found {
  fill: var(--accent);
  stroke-width: 2;
}

.uz-city {
  fill: #1a5c52;
  stroke: #fff;
  stroke-width: .7;
  cursor: pointer;
}

/* --------------------------------------------------- Легенда */

.map-legend {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin: 22px 0 0;
  font-size: 13px; color: var(--muted);
}
.map-legend-item { display: flex; align-items: center; gap: 8px; }

.map-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #1a5c52; border: 1px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  flex: none;
}

.map-legend-scale {
  width: 60px; height: 12px; border-radius: 3px; flex: none;
  background: linear-gradient(90deg, #cdeae5, hsl(174, 60%, 24%));
  border: 1px solid var(--line);
}

.map-hint {
  margin: 14px 0 0;
  font-size: 13px; color: var(--muted);
}

/* --------------------------------------------------- Подсказка при наведении */

.uz-map-popup {
  position: absolute;
  z-index: 10;
  max-width: 240px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .35);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  pointer-events: none;   /* не мешает наведению на саму область под ней */
}
.uz-map-popup b { color: var(--ink); }
.uz-map-popup-row { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.uz-map-popup-director b { color: var(--accent-deep); }
.uz-map-popup-director i { font-style: normal; opacity: .7; }

/* Тёмная тема: приглушаем яркость заливки регионов, чтобы не резала глаз
   на тёмном фоне страницы */
[data-theme="dark"] .uz-map-svg rect { fill: #1a2530; }

/* ==========================================================================
   КАРТА ФОНДА (серверный SVG) — заменить прежний блок «КАРТА ФОНДА»
   в конце style.css этим целиком
   ========================================================================== */

.uz-map {
  position: relative;   /* точка отсчёта для всплывающей подсказки */
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  margin: 20px 0;
}

.uz-map-svg {
  display: block;
  width: 100%;
  height: auto;
}

.uz-region {
  cursor: pointer;
  transition: fill .2s ease, stroke-width .15s ease;
}
.uz-region-hover,
.uz-region:hover {
  stroke-width: 4;
}

.uz-city {
  fill: #1a5c52;
  stroke: #fff;
  stroke-width: .7;
  cursor: pointer;
}

/* --------------------------------------------------- Легенда */

.map-legend {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin: 22px 0 0;
  font-size: 13px; color: var(--muted);
}
.map-legend-item { display: flex; align-items: center; gap: 8px; }

.map-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #1a5c52; border: 1px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  flex: none;
}

.map-legend-scale {
  width: 60px; height: 12px; border-radius: 3px; flex: none;
  background: linear-gradient(90deg, #cdeae5, hsl(174, 60%, 24%));
  border: 1px solid var(--line);
}

.map-hint {
  margin: 14px 0 0;
  font-size: 13px; color: var(--muted);
}

/* --------------------------------------------------- Подсказка при наведении */

.uz-map-popup {
  position: absolute;
  z-index: 10;
  max-width: 240px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .35);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  pointer-events: none;   /* не мешает наведению на саму область под ней */
}
.uz-map-popup b { color: var(--ink); }
.uz-map-popup-row { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.uz-map-popup-director b { color: var(--accent-deep); }
.uz-map-popup-director i { font-style: normal; opacity: .7; }

/* Тёмная тема: приглушаем яркость заливки регионов, чтобы не резала глаз
   на тёмном фоне страницы */
[data-theme="dark"] .uz-map-svg rect { fill: #1a2530; }

/* Курсор во время перетаскивания — зажатая рука, чтобы было понятно,
   что происходит. В остальное время курсор обычный: сам факт того,
   что «есть что тащить», появляется только после приближения. */
.uz-map-dragging,
.uz-map-dragging .uz-region,
.uz-map-dragging .uz-city { cursor: grabbing !important; }

/* ==========================================================================
   ДОПИСАТЬ В КОНЕЦ style.css — делает страницу карты компактнее,
   чтобы сама карта показывалась выше, без лишней прокрутки. Не трогает
   .pub-hero-sm и .wrap на остальных страницах — правки только для
   новых классов, добавленных именно в map.html.
   ========================================================================== */

/* Шапка страницы карты — короче обычной: одна строка текста вместо
   всей высоты, отведённой под заголовок и подзаголовок на других
   внутренних страницах. */
.map-hero-compact {
  padding: 22px 0 20px;
}
.map-hero-compact h2 {
  margin-top: 6px;
  font-size: clamp(20px, 2.6vw, 28px);
}
.map-hero-compact p {
  margin-top: 6px;
}

/* Меньше пустого пространства перед самим блоком карты: main
   на остальных страницах задаёт 30px сверху — здесь достаточно
   заметно меньше, легенда и картинка идут почти сразу после шапки. */
.map-page-main {
  padding-top: 8px;
}
.map-page-main .map-legend {
  margin-top: 10px;
}

/* ---------- Подсказка области: читаемая раскладка ----------
   Шире прежних 240px: имена председателей и строки финансирования
   переносились посреди слов. Подпись — мелко над значением,
   финансирование — маленькой таблицей с числами в столбик. */
.uz-map-popup { max-width: 330px; min-width: 270px; padding: 12px 16px; }
.pp-title { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.pp-apps { margin-top: 2px; font-size: 13px; color: var(--muted); }
.pp-apps b { color: var(--ink); }
.pp-muted { color: var(--muted); }
.pp-block {
  margin-top: 10px; padding-top: 9px;
  border-top: 1px solid var(--line);
}
.pp-label {
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 3px;
}
.pp-value { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.pp-value + .pp-value { margin-top: 4px; }
.pp-phone {
  display: block; font-weight: 500; font-size: 12.5px;
  color: var(--accent-deep); font-variant-numeric: tabular-nums;
}
.pp-fin { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pp-fin th {
  font-size: 10.5px; font-weight: 500; color: var(--muted);
  text-align: right; padding: 0 0 3px 8px;
}
.pp-fin td { padding: 3px 0; color: var(--ink); vertical-align: top; }
.pp-fin td + td {
  text-align: right; padding-left: 10px; white-space: nowrap;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .pp-phone { color: var(--accent); }

/* Значки направлений финансирования — цвета как на инфографике */
.fin-ico { width: 19px; height: 19px; flex: none; vertical-align: -4px; margin-right: 7px; }
.fin-ico-plots { fill: #d23c3c; }
.fin-ico-services { fill: #e2852b; }
.fin-ico-farms { fill: #2f8f4e; }
.fin-cell { display: inline-flex; align-items: center; }
.fin-table th .fin-ico { width: 20px; height: 20px; display: block; margin: 0 auto 4px; }

/* ---------- Таблица финансирования по регионам ----------
   Своя, а не общая .goods-table: у той тёмная шапка и мелкие заглавные,
   а здесь шесть числовых столбцов, и их нужно читать слитно. */
.fin-wrap {
  overflow-x: auto; margin-top: 18px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
}
.fin-table {
  width: 100%; min-width: 720px; border-collapse: collapse;
  font-size: 14.5px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.fin-table th, .fin-table td { padding: 11px 12px; text-align: right; }
.fin-table th { font-weight: 600; color: var(--muted); font-size: 13px; vertical-align: bottom; }
.fin-table thead { background: var(--bg); }
.fin-table .fin-groups th { border-bottom: 1px solid var(--line); }
.fin-table .fin-sub th { font-size: 12px; font-weight: 500; padding-top: 6px; }

.fin-group { text-align: center !important; color: var(--ink) !important; font-size: 13.5px !important; }
.fin-group-head { display: inline-flex; align-items: center; gap: 8px; }
.fin-group-head .fin-ico { width: 22px; height: 22px; margin: 0; display: inline-block; }

/* Регион — слева, шире, без переносов внутри названия */
.fin-table .fin-region { text-align: left; min-width: 170px; font-weight: 600; color: var(--ink); }

/* Тонкая вертикальная черта перед каждым направлением */
.fin-table .fin-start, .fin-table .fin-group, .fin-table .fin-total, .fin-table .fin-total-head {
  border-left: 1px solid var(--line);
}

.fin-table tbody tr { border-top: 1px solid var(--line); }
.fin-table tbody tr:nth-child(even) { background: var(--bg); }
.fin-table tbody tr:hover { background: var(--accent-tint); }

/* Итог по региону и по стране — выделены */
.fin-table .fin-total, .fin-table .fin-total-head { font-weight: 700; color: var(--accent-deep); }
.fin-table tfoot td {
  font-weight: 700; border-top: 2px solid var(--ink);
  background: var(--accent-tint);
}
[data-theme="dark"] .fin-table .fin-total,
[data-theme="dark"] .fin-table .fin-total-head { color: var(--accent); }


/* ===== Читаемость текста в обеих темах =====
   Вторичный текст (подсказки, заголовки столбцов, неактивные вкладки)
   был слишком бледным: в светлой теме серый на белом, в тёмной — серые
   буквы на белых кнопках вкладок. Здесь он темнее в светлой теме и
   светлее в тёмной, а кнопки вкладок в тёмной теме — тёмные. */
:root { --muted: #4b5d6e; }
[data-theme="dark"] { --muted: #b4c3cf; }

.hint, .hist-hint, .d-small { font-size: 13px; line-height: 1.5; }
.block-sub { font-size: 14px; line-height: 1.55; }
header p { opacity: .92; }

/* Вкладки кабинетов */
.auth-tab { color: #34444f; font-weight: 600; }
.auth-tab:hover { border-color: var(--accent); color: var(--accent-deep); }
.auth-tab.on, .auth-tab.on:hover { color: #fff; border-color: var(--primary); }
[data-theme="dark"] .auth-tab {
  background: var(--card); color: #dbe5ec; border-color: #3b4b58;
}
[data-theme="dark"] .auth-tab:hover { color: #fff; border-color: var(--accent); }
[data-theme="dark"] .auth-tab.on,
[data-theme="dark"] .auth-tab.on:hover {
  background: #0e6f6e; border-color: #1fb3b2; color: #fff;
}

/* Шапка кабинетов тёмная в обеих темах — кнопки языка, темы и
   спецвозможностей в ней должны быть светлыми, а не тёмными */
header .hdr-tools.on-light .sw-btn,
header .hdr-tools.on-light .sw-round,
header .hdr-tools.on-light .a11y-btn,
header .a11y-btn {
  color: #fff; border-color: rgba(255, 255, 255, .38);
}
header .hdr-tools.on-light .sw-btn:hover,
header .hdr-tools.on-light .sw-round:hover,
header .hdr-tools.on-light .a11y-btn:hover,
header .a11y-btn:hover {
  background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .6); color: #fff;
}

/* ===== Кабинет сотрудника: ширина, цифры, вход ===== */
/* Десять вкладок и широкие таблицы не помещались в обычную ширину
   страницы и вылезали вправо — кабинет сотрудника шире и по центру */
.wrap.wrap-wide { max-width: 1240px; }
.fond-tabs { flex-wrap: wrap; justify-content: center; }
.fond-tabs .auth-tab { padding: 8px 12px; }

/* Суммы и числа не переносим посреди числа: «690 000 / 000» */
#apps-body td:nth-child(5),
.fin-table .fin-start, .fin-table .fin-total,
.sched-table td, .stats-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Счётчики «Всего заявок / Одобрено …» и заголовок входа в тёмной теме
   были тёмно-синими на тёмном фоне */
.meta-bar .m b { font-size: 20px; font-weight: 700; }
[data-theme="dark"] .meta-bar .m b,
[data-theme="dark"] .login-card h2 { color: var(--ink); }
[data-theme="dark"] label.fld span.t { color: #dbe5ec; }
label.fld span.t { font-size: 13.5px; font-weight: 600; }

/* Иконки «Субсидии на скважины» и «По поручениям Кабмина» на карте:
   цвет у них не был задан, и в тёмной теме они пропадали */
.fin-ico-subsidies { fill: #2f7fd6; }
.fin-ico-orders { fill: #c48a12; }
[data-theme="dark"] .fin-ico-subsidies { fill: #5aa6f0; }
[data-theme="dark"] .fin-ico-orders { fill: #e7b23c; }
[data-theme="dark"] .fin-ico-farms { fill: #4cbb6e; }
[data-theme="dark"] .fin-ico-plots { fill: #ef5a5a; }

/* Итоговый столбец таблицы финансирования ярче в тёмной теме */
[data-theme="dark"] .fin-table .fin-total,
[data-theme="dark"] .fin-table .fin-total-head { color: #5fd8d6; }

/* ===== Контраст кнопок и подписей (по замерам: не ниже 4,5 : 1) ===== */
/* Белый текст на светло-бирюзовой кнопке читался плохо — кнопка темнее */
.btn-primary, .emblem { background: #00796f; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #005f57; }
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .emblem { background: #0b7a72; color: #fff; }
[data-theme="dark"] .btn-primary:hover:not(:disabled) { background: #08655f; }

/* Подзаголовки карточек («Фотографии», «Документы») в тёмной теме */
[data-theme="dark"] .det-sub { color: var(--ink); }

/* «(необязательно)» и звёздочка обязательного поля */
[data-theme="dark"] label.fld span.t em { color: #ff8f80; }

/* Метки состояния: зелёный текст на светлом фоне был бледным */
.hist-badge.ok, .status-badge.ok { color: #00665e; }
[data-theme="dark"] .hist-badge.ok,
[data-theme="dark"] .status-badge.ok { color: #6fe0d6; }

/* Пометка языков у новостей: RU · UZ · EN */
.nl-on { margin-left: 4px; font-weight: 700; color: #0b6e45; }
.nl-off { margin-left: 4px; color: var(--muted); text-decoration: line-through; }
[data-theme="dark"] .nl-on { color: #6ee0a2; }

/* Шаги подачи заявки, ссылки и предупреждения */
.route-arrow { color: var(--muted); }
.route-step.now .dot { background: #00796f; border-color: #00796f; color: #fff; }
[data-theme="dark"] .route-step.now { color: var(--ink); }
[data-theme="dark"] .route-step.now .dot { background: #0b7a72; border-color: #0b7a72; }
.back-link { color: #24333f; }
[data-theme="dark"] .back-link { color: #8fdcd6; }
[data-theme="dark"] main a:not(.btn) { color: #7fd6d0; }
[data-theme="dark"] .k-warn { background: #3a2222; color: #ffc2b8; }
[data-theme="dark"] .k-warn span, [data-theme="dark"] .k-warn a { color: #ffc2b8; }

/* Бланк документа — это «лист бумаги», он белый в обеих темах,
   поэтому и подсветка полей на нём всегда в светлых цветах */
.doc .val { background: #fff7e0; color: #6f5410; }
.doc .val.filled { background: #e5f5f5; color: #00665e; }
.doc .d-small, .doc em { color: #55616c; }
[data-theme="dark"] .doc-item .info h3 { color: var(--ink); }
[data-theme="dark"] .rec-cell { background: var(--card); color: #c9d6df; }
[data-theme="dark"] .rec-cell.ok { background: #123a38; color: #8fe3dc; }

/* ===== Вкладки кабинета сотрудника: один ряд, с иконками =====
   Плитки одинаковой ширины: иконка сверху, подпись под ней в одну-две
   строки. Так все вкладки помещаются в один ряд на любом языке, а на
   узком экране ряд прокручивается вбок, а не переносится. */
.fond-main-tabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr);
  gap: 6px; overflow-x: auto; padding-bottom: 2px;
  justify-content: stretch;
}
.fond-main-tabs .auth-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 6px; padding: 10px 6px 9px; min-height: 74px;
  font-size: 12.5px; line-height: 1.25; text-align: center;
  border-radius: 10px; transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.fond-main-tabs .auth-tab span { display: block; }
.tab-ico {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.fond-main-tabs .auth-tab .tab-ico { color: #00796f; }
.fond-main-tabs .auth-tab.on .tab-ico { color: #fff; }
[data-theme="dark"] .fond-main-tabs .auth-tab .tab-ico { color: #5fd8d6; }
[data-theme="dark"] .fond-main-tabs .auth-tab.on .tab-ico { color: #fff; }
.fond-main-tabs .auth-tab:hover .tab-ico { transform: translateY(-1px); }

/* ===== Меню разделов сайта с иконками =====
   Иконка над подписью: так все пункты помещаются в одну строку.
   В выпадающем списке «Руководство» — иконка слева от текста. */
.pubnav .wrap > a, .pubnav .navdrop > a {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 5px; padding: 10px 12px 9px; text-align: center; line-height: 1.25;
}
.nav-ico {
  width: 22px; height: 22px; flex: none; display: block;
  color: #7fd6d0; transition: color .2s ease, transform .2s ease;
}
.pubnav a:hover .nav-ico { color: #fff; transform: translateY(-1px); }
.pubnav a.on .nav-ico { color: #fff; }
.navdrop-menu a { display: flex; align-items: center; gap: 10px; }
.navdrop-menu .nav-ico { width: 19px; height: 19px; color: #00796f; }
[data-theme="dark"] .navdrop-menu .nav-ico { color: #5fd8d6; }
.navdrop-menu a:hover .nav-ico { transform: none; color: inherit; }
@media (max-width: 860px) {
  .pubnav .wrap { overflow-x: auto; }
  .nav-ico { width: 20px; height: 20px; }
}

/* ===== Учебные центры на карте ===== */
.tr-num {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff; background: #d23c3c;
}
.tr-maplink {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 14px; font-weight: 600; color: #00796f; text-decoration: none;
}
.tr-maplink .ico { width: 17px; height: 17px; }
.tr-maplink:hover { text-decoration: underline; }
[data-theme="dark"] .tr-maplink { color: #7fd6d0; }
.tr-card { transition: border-color .15s ease, box-shadow .15s ease; }
.tr-card.hl { border-color: #d23c3c; box-shadow: 0 0 0 2px rgba(210, 60, 60, .25); }

.tr-map {
  margin-top: 24px; padding: 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card);
}
.trm-svg { display: block; width: 100%; height: auto; }
/* Граница страны: толстая обводка под областями */
.trm-outline path { fill: none; stroke: #0a5f55; stroke-width: 7; stroke-linejoin: round; }
.trm-regions path { fill: #dff1ee; stroke: #6aa9a0; stroke-width: 1.2; stroke-linejoin: round; }
[data-theme="dark"] .trm-outline path { stroke: #5fd8d6; }
[data-theme="dark"] .trm-regions path { fill: #1f3a3c; stroke: #3f6e6c; }
.trm-pin { cursor: pointer; }
.trm-pin-body { fill: #d23c3c; stroke: #fff; stroke-width: 2.5; transition: fill .15s ease; }
.trm-pin text { fill: #fff; font: 800 15px/1 'Inter', system-ui, sans-serif; pointer-events: none; }
.trm-pin:hover .trm-pin-body, .trm-pin.hl .trm-pin-body { fill: #a81f1f; }
.tr-map-yandex { padding: 0; height: 520px; overflow: hidden; position: relative; }
/* Своя карта под картой Яндекса — видна, если Яндекс спрятан */
.tr-map-fallback { position: absolute; inset: 0; padding: 18px; display: flex;
  align-items: center; justify-content: center; }
.tr-map-fallback .trm-svg { width: 100%; height: 100%; }
.tr-map-yandex iframe { position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; border: 0; display: block; }
.tr-map-open { margin: 10px 0 0; text-align: right; }
@media (max-width: 640px) { .tr-map-yandex { height: 380px; } }


/* ==========================================================================
   ТЕЛЕФОНЫ: шапка и меню разделов сайта
   ========================================================================== */

/* Меню разделов: лента значков, которая листается пальцем вбок.
   Выпадающий список «Руководство» не занимает места в ленте, пока
   закрыт; открытый — всплывает панелью под меню (высоту ставит public.js). */
@media (max-width: 860px) {
  .pubnav .wrap {
    gap: 0; padding: 0 34px 0 6px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  /* правый край тает — видно, что меню продолжается.
     Именно накладка, а не mask-image: маска обрезала бы и всплывающий
     список «Руководство» */
  .pubnav::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 34px;
    background: linear-gradient(90deg, transparent, var(--primary-deep));
    pointer-events: none;
  }
  .pubnav .wrap::-webkit-scrollbar { display: none; }
  .pubnav .wrap > a, .pubnav .navdrop > a {
    flex: none; min-width: 74px; padding: 9px 9px 8px;
    font-size: 12.5px; white-space: nowrap;
  }
  .navdrop-menu, .navdrop:hover .navdrop-menu { display: none; }
  .navdrop.open .navdrop-menu {
    display: flex; position: fixed; left: 12px; right: 12px;
    top: var(--navdrop-top, 120px);
    transform: none; min-width: 0; opacity: 1; visibility: visible;
    box-shadow: 0 22px 44px -16px rgba(0, 0, 0, .55); z-index: 200;
  }
  .navdrop-menu::before { display: none; }
  .navdrop-menu a { padding: 13px 12px; font-size: 15px; white-space: normal; }
}

/* Шапка: первая строка — логотип и название, вторая — язык, тема,
   спецвозможности и телефон доверия. Подзаголовок на телефоне лишний. */
@media (max-width: 640px) {
  .public header { padding: 14px 0; }
  .public header .wrap {
    display: grid; grid-template-columns: auto 1fr;
    column-gap: 12px; row-gap: 12px; align-items: center;
  }
  .public header .emblem-logo { width: 46px; height: 46px; }
  .public header h1 { font-size: 15.5px; max-width: none; line-height: 1.3; }
  .public header .wrap > div:not(.header-right) p { display: none; }
  .public header .header-right {
    grid-column: 1 / -1;
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 10px; padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }
  .public header .header-right .row { gap: 8px; }
  .public header .hdr-tools { margin-left: 0; gap: 8px; }
  .public header .lang { margin-left: 0; }
  .public header .hdr-phone { margin-top: 0; font-size: 14px; white-space: nowrap; }
}
@media (max-width: 380px) {
  .public header .hdr-phone { font-size: 13px; }
  .public header .hdr-phone svg { display: none; }
}

/* Фото «О Фонде» выезжает сбоку; на телефоне сдвиг вбок давал
   горизонтальную прокрутку страницы — там оно поднимается снизу */
@media (max-width: 900px) {
  .about-fund .about-photo { transform: translateY(24px) scale(.98); }
}

/* Первый экран, цифры «О Фонде» и подвал на телефоне */
@media (max-width: 640px) {
  .hero-inner { padding: 40px 20px 44px; }
  .pub-hero-sm { padding: 32px 0 30px; }
  .about-facts { grid-template-columns: 1fr 1fr; gap: 18px 14px; }
  .footer-col h4 { margin-bottom: 6px; }
}

/* Подвал: колонки были объявлены, но сам блок оставался обычным,
   и все колонки шли одна под другой без отступов — включаем сетку */
.footer-grid { display: grid; gap: 30px 40px; align-items: start; padding: 26px 0 10px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
@media (max-width: 560px) {
  .footer-grid { gap: 26px; }
  /* разделы и ресурсы — в две колонки, чтобы подвал не был бесконечным */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand, .footer-grid > .footer-col:last-child { grid-column: 1 / -1; }
  .footer-col a, .footer-col span { padding: 6px 0; }
}

/* Таблица представителей в регионах: на телефоне помещается
   целиком, без прокрутки вбок и обрезанных имён */
@media (max-width: 640px) {
  .public .goods-table { min-width: 0; font-size: 13.5px; }
  .public .goods-table th, .public .goods-table td { padding: 9px 8px; }
}
@media (max-width: 640px) {
  .public .goods-table a[href^="tel:"] { white-space: nowrap; }
}

/* Кнопка «Кабинет хозяйства» видна на любом экране — для фермера это
   главный вход. На телефоне: язык, тема и спецвозможности слева,
   кабинет справа; ниже строкой — телефон доверия. */
@media (max-width: 820px) {
  .public header .lang .hdr-cab {
    display: inline-flex; align-items: center; white-space: nowrap;
  }
}
@media (max-width: 640px) {
  .public header .header-right {
    flex-direction: column; align-items: stretch; gap: 10px;
  }
  .public header .header-right .row { justify-content: space-between; }
  .public header .hdr-tools { order: 1; }
  .public header .lang { order: 2; margin-left: auto; }
  .public header .lang .hdr-cab {
    padding: 0 14px; height: 42px; border-radius: 21px;
    font-size: 13.5px; font-weight: 600;
  }
  .public header .hdr-phone { align-self: flex-start; font-size: 14px; }
  .public header .hdr-phone small { display: inline; }
}
@media (max-width: 380px) {
  .public header .header-right .row { gap: 6px; }
  .public header .hdr-tools { gap: 6px; }
  .public header .lang .hdr-cab { padding: 0 11px; font-size: 13px; }
  .public header .hdr-phone svg { display: inline-block; }
}

/* ==========================================================================
   ТЕЛЕФОНЫ: КАБИНЕТЫ (хозяйства, продавца, сотрудника) и страницы подачи
   ========================================================================== */

/* Шапка кабинета: первая строка — эмблема и название; ниже — имя,
   кнопки «Сменить пароль», «Выйти», язык, тема и спецвозможности.
   Кнопки переносятся на следующую строку, а не уезжают за экран. */
@media (max-width: 720px) {
  body:not(.public) header { padding: 14px 0; }
  body:not(.public) header .wrap { flex-wrap: wrap; row-gap: 12px; }
  body:not(.public) header .wrap > div:nth-child(2) { flex: 1 1 calc(100% - 64px); min-width: 0; }
  body:not(.public) header h1 { font-size: 15.5px; }
  body:not(.public) header p { font-size: 12.5px; }
  body:not(.public) header .lang {
    margin-left: 0; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: 8px;
  }
  body:not(.public) header .lang:empty { display: none; }
  body:not(.public) header .lang > a,
  body:not(.public) header .lang > button { white-space: nowrap; }
  body:not(.public) header .staff-name,
  body:not(.public) header .cab-who { flex-basis: 100%; font-size: 13px; }
  body:not(.public) header .hdr-tools { margin-left: auto; }
}

/* Шаги подачи (Заявка → … → Договор): на телефоне в две колонки,
   все шаги видны сразу, текущий выделен */
@media (max-width: 720px) {
  .route { overflow: visible; }
  .route-inner {
    min-width: 0; display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px 12px; padding: 12px 16px;
  }
  .route-arrow { display: none; }
  .route-step { white-space: normal; font-size: 12.5px; line-height: 1.25; }
}

/* Вкладки кабинета сотрудника: на телефоне — плитки по три в ряд,
   все разделы видны без прокрутки вбок */
@media (max-width: 720px) {
  .fond-main-tabs {
    grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto;
    overflow: visible;
  }
  .fond-main-tabs .auth-tab { min-height: 68px; padding: 9px 4px 8px; font-size: 12px; }
}
@media (min-width: 480px) and (max-width: 720px) {
  .fond-main-tabs { grid-template-columns: repeat(4, 1fr); }
}

/* Таблицы-списки (заявки, продавцы, обращения, сотрудники …) на телефоне:
   каждая строка — карточка, слева название столбца, справа значение.
   Подписи ставит js/responsive.js. Все данные видны без прокрутки вбок. */
@media (max-width: 720px) {
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt { min-width: 0 !important; border: 0; }
  table.rt thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  table.rt tbody tr {
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--card); padding: 6px 14px; margin: 0 0 10px;
  }
  table.rt tbody tr:hover { background: var(--card); }
  table.rt tbody tr.on, table.rt tbody tr.sel {
    border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent);
  }
  table.rt tr.on td:first-child { box-shadow: none; }
  /* подпись — слева в своей колонке, всё содержимое ячейки (текст,
     адрес второй строкой, причина отказа, кнопки) — справа. Ячейка
     становится маленькой таблицей: подпись — первая клетка, а всё
     остальное браузер сам собирает во вторую. */
  table.rt td {
    display: table; table-layout: fixed; width: 100%;
    padding: 9px 0; border: 0; border-bottom: 1px dashed var(--line);
    text-align: left !important; white-space: normal !important;
    overflow-wrap: anywhere;
  }
  table.rt td:last-child { border-bottom: 0; }
  table.rt td::before {
    content: attr(data-label);
    display: table-cell; width: 38%; padding-right: 12px; vertical-align: top;
    font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.35;
    overflow-wrap: break-word;
  }
  table.rt td[data-label=""]::before { display: none; }
  table.rt td .btn { margin: 3px 6px 3px 0; }
  table.rt td:empty { display: none; }
  .hist, #farmers-list, #accounts-list, #staff-list, #pd-log-list { overflow-x: visible; }
  .goods-wrap:has(table.rt) { overflow-x: visible; }
}

/* Таблица представителей в регионах (с объединёнными ячейками) и
   прочие таблицы, оставшиеся таблицами: плотнее на телефоне */
@media (max-width: 420px) {
  .public .goods-table:not(.rt) { font-size: 12.5px; }
  .public .goods-table:not(.rt) th, .public .goods-table:not(.rt) td { padding: 8px 4px; }
  .public .goods-table:not(.rt) th { font-size: 11.5px; letter-spacing: 0; }
  .public .goods-table:not(.rt) td:first-child { overflow-wrap: anywhere; }
}

/* Длинные числовые таблицы (график платежей, финансирование по
   регионам) листаются вбок, как на компьютере, но первый столбец
   (номер, дата, регион) стоит на месте — понятно, к чему относятся цифры */
@media (max-width: 720px) {
  .fin-table th:first-child, .fin-table td:first-child,
  .sched-table th:first-child, .sched-table td:first-child {
    position: sticky; left: 0; z-index: 1; background: inherit;
    box-shadow: 1px 0 0 var(--line);
  }
  /* у строки должен быть свой фон, иначе под закреплённым столбцом
     просвечивают уехавшие цифры */
  .fin-table tbody tr, .sched-table tbody tr { background-color: var(--card); }
  .fin-table thead th:first-child { background: var(--bg); z-index: 2; }
  .sched-table thead th:first-child { background: var(--bg-soft); z-index: 3; }
  .fin-table th, .fin-table td { padding: 9px 9px; font-size: 13.5px; }
  .sched-table th, .sched-table td { padding: 7px 8px; }
  .fin-wrap, .sched-wrap { -webkit-overflow-scrolling: touch; }
}

/* Мелкие подписи, которые на телефоне читались с трудом */
@media (max-width: 720px) {
  .doc-meta b, .doc-toc > span, .sched-grace { font-size: 12px; }
}

/* Подробности заявки в кабинете сотрудника: длинное название поля
   («Полное наименование поручителя») больше не выталкивает значение
   за край экрана */
@media (max-width: 620px) {
  .det-row span { flex: 0 1 44%; }
  .det-row b { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
}

/* Список «К конкурсу не допускаются» и подобные: маркеры внутри поля,
   а не за краем экрана */
.pub-list { padding-left: 1.25em; }
.pub-list li { margin: 4px 0; }

/* Подсказка про Ctrl + колесо мыши на сенсорном экране не нужна */
@media (hover: none) { .map-hint[data-i18n="map_hint_zoom"] { display: none; } }

/* Инструкции: у пунктов своя зелёная точка, стандартный маркер списка
   был лишним и на телефоне вылезал за левый край экрана */
.ins-points { list-style: none; }
/* Политика обработки данных: маркеры списков внутри текста */
.pdp ul, .pdp ol { padding-left: 1.25em; }
.pdp li { margin: 3px 0; }
/* Списки условий и документов: тоже своя метка, без стандартного маркера */
.srv-list, .doc-list { list-style: none; }

/* ===== График платежей в тёмной теме =====
   Переменная --bg-soft нигде не была задана, поэтому шапка графика
   была прозрачной, а строки и итоговые суммы оставались светлыми
   с белым текстом (или тёмными цифрами на тёмном фоне). */
:root { --bg-soft: #f1f4f7; }
[data-theme="dark"] { --bg-soft: #222d37; }
[data-theme="dark"] .sched-card b { color: var(--ink); }
[data-theme="dark"] .sched-card.bad { background: #3a1f22; border-color: #5a2c2f; }
[data-theme="dark"] .sched-card.bad b { color: #ff9a8f; }
[data-theme="dark"] .sched-card.over { background: #1b2b45; border-color: #2c4670; }
[data-theme="dark"] .sched-card.over b { color: #9cc0ff; }
[data-theme="dark"] .sched-row.paid { background: #163a30; }
[data-theme="dark"] .sched-row.debt { background: #3a1f22; }
[data-theme="dark"] .sched-row.over { background: #1b2b45; }
[data-theme="dark"] .sched-row.wait { background: var(--card); }
[data-theme="dark"] .sched-row.partial { background: #362f1e; }
[data-theme="dark"] .sched-row.debt .sched-diff { color: #ff9a8f; }
[data-theme="dark"] .sched-row.over .sched-diff { color: #9cc0ff; }
[data-theme="dark"] .sched-row.paid .sched-paid { color: #5fd8d6; }
[data-theme="dark"] .sched-row.partial .sched-diff { color: #e3c26b; }

/* Закреплённый столбец таблицы финансирования: сплошной фон
   и у чётных строк, чтобы цифры под ним не просвечивали */
@media (max-width: 720px) {
  .fin-table tbody tr:nth-child(even) td:first-child { background: var(--bg); }
  .fin-table tbody tr td:first-child { background-color: var(--card); }
  .fin-table tbody tr:nth-child(even) td:first-child { background-color: var(--bg); }
}
[data-theme="dark"] .sched-legend .lg.paid { background: #163a30; }
[data-theme="dark"] .sched-legend .lg.debt { background: #3a1f22; }
[data-theme="dark"] .sched-legend .lg.over { background: #1b2b45; }
[data-theme="dark"] .sched-legend .lg.partial { background: #362f1e; }
[data-theme="dark"] .sched-legend .lg.wait { background: var(--card); }

/* ===== Поиск и отбор заявок в кабинете сотрудника ===== */
.apps-filter { margin: 14px 0; padding: 16px 18px; }
.apps-filter .af-row + .af-row { margin-top: 12px; }
.af-search {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  padding: 0 12px;
}
.af-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 163, 163, .15); }
.af-search .af-ico { width: 20px; height: 20px; color: var(--muted); }
.af-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 12px 0; font: inherit; font-size: 15px; color: var(--ink);
}
.af-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 12px; }
.af-grid .fld { margin: 0; }
.af-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; min-height: 0; }
.af-foot .hint { margin: 0; }
.af-foot:has(#af-found:empty):has(#af-reset[style*="none"]) { display: none; }
@media (max-width: 1000px) { .af-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .apps-filter { padding: 14px; }
  .af-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .af-grid .fld:nth-child(-n+3) { grid-column: 1 / -1; }
}

/* Счётчики над списком — они же кнопки отбора по статусу */
.meta-bar .m-btn {
  font: inherit; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  padding: 6px 10px; margin: 0; color: inherit;
  transition: background .15s ease, border-color .15s ease;
}
.meta-bar .m-btn:hover { background: var(--accent-tint); }
.meta-bar .m-btn.on { border-color: var(--accent); background: var(--accent-tint); }
[data-theme="dark"] .meta-bar .m-btn:hover,
[data-theme="dark"] .meta-bar .m-btn.on { background: rgba(95, 216, 214, .1); }
.apps-table td .hint { margin: 2px 0 0; font-size: 12px; }

/* Поля даты, поиска и ссылки оформлены как остальные поля формы:
   раньше они оставались маленькими браузерными прямоугольниками */
input[type=date], input[type=search], input[type=url] {
  width: 100%; padding: 9px 12px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: #fff; outline: none;
}
[data-theme="dark"] input[type=date] { color-scheme: dark; }
/* в строке поиска заявок поле без своей рамки — рамка у обёртки */
.apps-filter .af-search input[type=search] {
  border: 0; box-shadow: none; background: transparent; min-height: 0;
  padding: 12px 0; border-radius: 0;
}
@media (max-width: 620px) {
  .meta-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; }
  .meta-bar .m { min-width: 0; }
}
[data-theme="dark"] input[type=date], [data-theme="dark"] input[type=search],
[data-theme="dark"] input[type=url] { background: #16202a; color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .apps-filter .af-search input[type=search] { background: transparent; }
.af-grid { align-items: end; }

/* ===== Двухэтапный вход сотрудников ===== */
.tf-code-input {
  font-size: 22px !important; letter-spacing: .3em; text-align: center;
  font-variant-numeric: tabular-nums; max-width: 220px;
}
.tf-login-hint { margin: 0 0 12px; }
.login-card #login-back { display: block; width: 100%; margin: 8px 0 0; }
header #staff-2fa.tf-on { border-color: #5fd8d6; }

.tf-modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10, 18, 26, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.tf-dialog {
  position: relative; width: 100%; max-width: 520px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 26px 22px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6);
}
.tf-dialog h2 { font-size: 19px; color: var(--ink); margin: 0 34px 12px 0; }
.tf-dialog p { line-height: 1.55; margin: 0 0 12px; }
.tf-dialog .fld { margin: 12px 0 0; }
.tf-dialog .actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.tf-x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.tf-x:hover { background: var(--accent-tint); color: var(--ink); }
.tf-steps { padding-left: 1.3em; margin: 0 0 10px; line-height: 1.55; }
.tf-steps li { margin: 4px 0; }
.tf-qr {
  width: 210px; height: 210px; margin: 6px auto 12px;
  background: #fff; border-radius: 12px; padding: 4px;
}
.tf-qr svg { width: 100%; height: 100%; display: block; }
.tf-manual { margin: 0 0 12px; }
.tf-manual summary { cursor: pointer; color: var(--accent-deep); font-weight: 600; font-size: 14px; }
[data-theme="dark"] .tf-manual summary { color: #5fd8d6; }
.tf-key { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.tf-key code {
  font-size: 16px; letter-spacing: .06em; padding: 8px 10px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--line); word-break: break-all;
}
@media (max-width: 520px) {
  .tf-modal { padding: 12px 10px; }
  .tf-dialog { padding: 22px 16px 18px; }
}

/* Уведомления на почту в кабинете хозяйства */
.ntf-ok { color: var(--accent-deep); font-size: 14px; margin-top: 10px; }
[data-theme="dark"] .ntf-ok { color: #5fd8d6; }

/* ==========================================================================
   ПЛАВНЫЕ АНИМАЦИИ КНОПОК: наведение и нажатие — по всему сайту
   Наведение: кнопка чуть приподнимается и получает мягкую тень.
   Нажатие: кнопка «вдавливается» (чуть уменьшается), от точки касания
   расходится волна (js/responsive.js). Фокус с клавиатуры — заметная рамка.
   ========================================================================== */
:root {
  --btn-ease: cubic-bezier(.2, .7, .2, 1);
  --btn-shadow: 0 8px 18px -10px rgba(0, 80, 74, .55);
  --btn-shadow-soft: 0 6px 14px -10px rgba(20, 40, 60, .45);
}
[data-theme="dark"] {
  --btn-shadow: 0 8px 20px -10px rgba(0, 0, 0, .8);
  --btn-shadow-soft: 0 6px 16px -10px rgba(0, 0, 0, .75);
}

.btn, .auth-tab, .m-btn, .sw-btn, .sw-round, .a11y-btn, .sw-item,
.lang button, .pubnav .wrap > a, .pubnav .navdrop > a, .navdrop-menu a,
.news-nav, .footer-social a, .tr-maplink, .tf-x,
.btn-approve, .btn-ghost, .ref-option, .hist-table.rt tbody tr,
button.ap-recipient, .af-search, input[type=submit], input[type=button] {
  transition:
    transform .22s var(--btn-ease), box-shadow .22s var(--btn-ease),
    background-color .2s ease, border-color .2s ease, color .2s ease,
    filter .2s ease, opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Наведение — только там, где есть мышь: на телефоне «зависшее»
   состояние после касания выглядело бы как ошибка */
@media (hover: hover) {
  .btn:hover:not(:disabled), .btn-approve:hover:not(:disabled),
  .btn-ghost:hover, input[type=submit]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--btn-shadow);
  }
  .btn-secondary:hover:not(:disabled), .btn-danger:hover:not(:disabled) {
    box-shadow: var(--btn-shadow-soft);
  }
  .auth-tab:hover:not(.on), .m-btn:hover, .sw-item:hover, .ref-option:hover {
    transform: translateY(-1px);
    box-shadow: var(--btn-shadow-soft);
  }
  .sw-btn:hover, .sw-round:hover, .a11y-btn:hover, .lang button:hover,
  .footer-social a:hover {
    transform: translateY(-1px);
  }
  .pubnav .wrap > a:hover, .pubnav .navdrop > a:hover { transform: translateY(-1px); }
  .navdrop-menu a:hover { transform: translateX(3px); }
  .tr-maplink:hover { transform: translateX(2px); }
  .tf-x:hover { transform: rotate(90deg); }
  /* стрелки ленты новостей стоят по центру через transform — сохраняем его */
  .news-nav:hover { transform: translateY(-50%) scale(1.08); }
}
.news-nav:active { transform: translateY(-50%) scale(.92); transition-duration: .08s; }

/* Нажатие: быстро и коротко, чтобы отклик был мгновенным */
.btn:active:not(:disabled), .btn-approve:active:not(:disabled), .btn-ghost:active,
.auth-tab:active, .m-btn:active, .sw-btn:active, .sw-round:active, .a11y-btn:active,
.sw-item:active, .lang button:active,
.footer-social a:active, .ref-option:active, input[type=submit]:active:not(:disabled) {
  transform: translateY(0) scale(.96);
  box-shadow: none;
  filter: brightness(.96);
  transition-duration: .08s;
}
.pubnav .wrap > a:active, .pubnav .navdrop > a:active,
.navdrop-menu a:active, .tr-maplink:active {
  transform: scale(.96);
  transition-duration: .08s;
}
.hist-table.rt tbody tr:active { transform: scale(.985); transition-duration: .08s; }

/* Фокус с клавиатуры (Tab) — видимая рамка, мышью — без рамки */
.btn:focus-visible, .auth-tab:focus-visible, .m-btn:focus-visible,
.sw-btn:focus-visible, .sw-round:focus-visible, .a11y-btn:focus-visible,
.lang button:focus-visible, .pubnav a:focus-visible, .navdrop-menu a:focus-visible,
.footer-social a:focus-visible, .news-prev:focus-visible, .news-next:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Волна от точки нажатия (создаёт js/responsive.js) */
.has-ripple { position: relative; overflow: hidden; isolation: isolate; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  background: currentColor; opacity: .22;
  transform: scale(0);
  animation: ripple-out .55s var(--btn-ease) forwards;
}
.btn-primary .ripple, .auth-tab.on .ripple { background: #fff; opacity: .3; }
@keyframes ripple-out {
  to { transform: scale(1); opacity: 0; }
}

/* Кто попросил систему убрать анимации — без движения, только цвет */
@media (prefers-reduced-motion: reduce) {
  .btn, .auth-tab, .m-btn, .sw-btn, .sw-round, .a11y-btn, .sw-item,
  .lang button, .pubnav a, .navdrop-menu a,
  .footer-social a, .tr-maplink, .tf-x, .ref-option, .hist-table.rt tbody tr {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease !important;
    transform: none !important;
  }
  .ripple { display: none; }
}

/* ===================== ПАРОЛИ КАБИНЕТОВ =====================
   Ссылка-кнопка «Забыли пароль?», блок смены пароля в кабинетах
   хозяйства и продавца (cabinet.js, seller.js). */
.link-btn {
  background: none; border: 0; padding: 6px 2px; margin: 0;
  font: inherit; font-size: 14px; color: var(--accent, #0f766e);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { text-decoration-thickness: 2px; }
.link-btn:disabled { opacity: .5; cursor: default; }
.link-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
.actions .link-btn { align-self: center; }
.pw-box { margin-top: 26px; }
.pw-box .k-note { margin-top: 8px; }
#pane-forgot h3 { margin: 0 0 6px; }

/* ===================== СЧЁТЧИК ПОСЕЩЕНИЙ (подвал) =====================
   Открытая сводка «Посещений сайта · Сегодня» — js/visits.js */
.footer-visits {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin-top: 8px; font-size: 12.5px; color: var(--muted);
}
.footer-visits[hidden] { display: none; }
.footer-visits b { color: var(--ink, inherit); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===================== КОД ПОДТВЕРЖДЕНИЯ: ШЕСТЬ КЛЕТОК =====================
   Восстановление пароля в кабинете хозяйства (cabinet.js) */
.otp { display: flex; gap: 10px; margin: 14px 0 6px; }
.otp input {
  width: 52px; height: 60px; padding: 0; text-align: center;
  font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--line, #d6dde3); border-radius: 12px;
  background: var(--card, #fff); color: var(--ink, #1f2a33);
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.otp input:focus { outline: none; border-color: var(--accent, #00a3a3); box-shadow: 0 0 0 3px rgba(0, 163, 163, .18); }
.otp input.bad { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214, 69, 69, .15); }
.otp-timer { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }
.otp-timer.over { color: #d64545; }
@media (max-width: 420px) {
  .otp { gap: 6px; }
  .otp input { width: 42px; height: 50px; font-size: 22px; border-radius: 10px; }
}
[data-theme="dark"] .otp input { background: var(--bg-soft, #222d37); border-color: rgba(255,255,255,.18); color: var(--ink); }

/* ==========================================================================
   Главная: «Кредиты Фонда: 7 отраслей, 60 направлений» (credits_block.html).
   Повторяет презентацию Фонда: плитки отраслей, график сроков,
   все направления с метками сроков, 6 шагов, договор и банки.
   ========================================================================== */

.cr {
  /* Раздел шире основной колонки текста */
  --cr-w: min(1180px, calc(100vw - 40px));
  width: var(--cr-w);
  margin-left: calc(50% - var(--cr-w) / 2);
  scroll-margin-top: 70px;
}
/* Цвета отраслей и сроков — общие для главной и страницы кредитов */
.cr, .cr-page {
  --cr-green: #d8efe3;   --cr-green-s: #86d0a6;
  --cr-blue: #d7ebf9;    --cr-blue-s: #8fc6ee;
  --cr-orange: #fbe3cf;  --cr-orange-s: #f4b57c;
  --cr-purple: #e5e0f6;  --cr-purple-s: #b9acec;
  --cr-teal: #d5f0ee;    --cr-teal-s: #8fdad3;
  --cr-yellow: #fff2c8;  --cr-yellow-s: #ffdf86;
  --cr-gold: #ffe7a3;
  --cr-dark: var(--primary);
  --cr-grace: #ffd93d;
  --cr-repay: #22aee6;
  --cr-pill-ink: #1f2a33;
}
[data-theme="dark"] .cr, [data-theme="dark"] .cr-page {
  --cr-green: rgba(134, 208, 166, .14);
  --cr-blue: rgba(143, 198, 238, .14);
  --cr-orange: rgba(244, 181, 124, .14);
  --cr-purple: rgba(185, 172, 236, .15);
  --cr-teal: rgba(143, 218, 211, .14);
  --cr-yellow: rgba(255, 223, 134, .13);
  --cr-gold: rgba(255, 217, 61, .2);
  --cr-dark: #2f6f68;
}

.cr .tone-green, .cr-page .tone-green  { --t: var(--cr-green);  --ts: var(--cr-green-s); }
.cr .tone-blue, .cr-page .tone-blue   { --t: var(--cr-blue);   --ts: var(--cr-blue-s); }
.cr .tone-orange, .cr-page .tone-orange { --t: var(--cr-orange); --ts: var(--cr-orange-s); }
.cr .tone-purple, .cr-page .tone-purple { --t: var(--cr-purple); --ts: var(--cr-purple-s); }
.cr .tone-teal, .cr-page .tone-teal   { --t: var(--cr-teal);   --ts: var(--cr-teal-s); }
.cr .tone-yellow, .cr-page .tone-yellow { --t: var(--cr-yellow); --ts: var(--cr-yellow-s); }
.cr .tone-gold, .cr-page .tone-gold   { --t: var(--cr-gold);   --ts: var(--cr-grace); }

.cr-h3 {
  font-family: 'PT Serif', Georgia, serif;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--ink); margin: 0; line-height: 1.3;
}
.cr-h3-big { font-size: clamp(20px, 2.6vw, 28px); margin: 48px 0 0; }

/* ---------- Плитки отраслей ---------- */
.cr-tiles {
  margin-top: 26px;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px;
}
.cr-tile {
  background: var(--t); border: 1px solid color-mix(in srgb, var(--ts) 55%, transparent);
  border-radius: 12px; padding: 14px 14px 16px;
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.cr-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -22px rgba(31,42,51,.55); }
.cr-tile-top { display: flex; align-items: flex-start; justify-content: space-between; }
.cr-ico {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cr-dark); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.cr-ico svg { width: 21px; height: 21px; }
.cr-roman { font-size: 13px; font-weight: 600; color: var(--muted); }
.cr-tile-num {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 34px; line-height: 1; margin-top: 18px; color: var(--ink);
}
.cr-tile-name { margin-top: 6px; font-size: 13.5px; font-weight: 600; line-height: 1.3; }

/* ---------- График сроков ---------- */
.cr-chart-head {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
}
.cr-key { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--ink); }
.cr-key span { display: inline-flex; align-items: center; gap: 8px; }
.cr-sw { width: 18px; height: 18px; border-radius: 4px; display: inline-block; }
.cr-sw.grace, .cr-bar.grace { background: var(--cr-grace); }
.cr-sw.repay, .cr-bar.repay { background: var(--cr-repay); }

.cr-chart { margin-top: 14px; }
.cr-axis, .cr-row {
  display: grid; grid-template-columns: 84px 1fr minmax(220px, 290px); gap: 0 22px; align-items: center;
}
.cr-axis-scale { position: relative; height: 22px; font-size: 12px; color: var(--muted); }
.cr-axis-scale i { position: absolute; top: 0; transform: translateX(-50%); font-style: normal; }
.cr-axis-scale em { position: absolute; right: -34px; top: 0; font-style: normal; }
.cr-row { margin-top: 12px; }
.cr-track { position: relative; height: 34px; display: flex; }
.cr-grid { position: absolute; top: -8px; bottom: -8px; width: 1px; background: var(--line); }
.cr-bar { position: relative; height: 100%; }
.cr-bar.grace { border-radius: 4px 0 0 4px; }
.cr-bar.repay { border-radius: 0 4px 4px 0; }
.cr-row-text { font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.cr-row-text b { display: block; color: var(--ink); font-size: 14px; }

/* Метки сроков: 3/7, 1/5, 1/4, 1/3, 18 мес. */
.cr-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; border-radius: 9px; padding: 0 10px;
  font-size: 14px; font-weight: 600; color: var(--cr-pill-ink); white-space: nowrap;
}
.cr-pill.sm { height: 22px; min-width: 42px; border-radius: 999px; font-size: 12px; padding: 0 9px; }
.cr-pill.t37 { background: var(--cr-green-s); }
.cr-pill.t15 { background: var(--cr-purple-s); }
.cr-pill.t14 { background: var(--cr-teal-s); }
.cr-pill.t13 { background: var(--cr-blue-s); }
.cr-pill.t18 { background: var(--cr-orange-s); }

/* ---------- Все направления ---------- */
.cr-board {
  margin-top: 22px;
  display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 16px; align-items: start;
}
.cr-col { display: flex; flex-direction: column; gap: 16px; }
.cr-sector, .cr-legend {
  background: var(--t, var(--cr-green)); border: 1px solid color-mix(in srgb, var(--ts, var(--cr-green-s)) 55%, transparent);
  border-radius: 12px; padding: 16px 16px 14px; scroll-margin-top: 80px;
}
.cr-sec-head { display: flex; align-items: center; gap: 10px; }
.cr-dot {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--cr-dark); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.cr-sector h4, .cr-legend h4 {
  margin: 0; flex: 1; font-size: 15px; line-height: 1.3; color: var(--ink);
}
.cr-sector ul { list-style: none; margin: 12px 0 0; padding: 0; }
.cr-sector li {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 3px 0 3px 16px; font-size: 13.5px; line-height: 1.35; color: var(--ink);
}
.cr-sector li::before {
  content: ""; position: absolute; left: 2px; top: .8em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--cr-dark);
}
.cr-sector.wide ul { columns: 2; column-gap: 26px; }
.cr-sector.wide li { break-inside: avoid; }
.cr-legend { background: color-mix(in srgb, var(--cr-green) 60%, var(--card)); }
.cr-legend-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.cr-legend-grid div { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); line-height: 1.3; }
.cr-legend-grid .cr-pill { height: 28px; min-width: 50px; border-radius: 8px; font-size: 13px; }

/* ---------- 6 шагов ---------- */
.cr-steps { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cr-step {
  background: var(--t); border: 1px solid color-mix(in srgb, var(--ts) 55%, transparent);
  border-radius: 12px; padding: 18px 18px 20px;
}
.cr-step-head { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.cr-step h4 { margin: 0; font-family: 'PT Serif', Georgia, serif; font-size: 18px; line-height: 1.2; color: var(--ink); }
.cr-step p { margin: 10px 0 0; font-size: 14px; color: var(--ink); opacity: .85; line-height: 1.45; }

/* ---------- Договор и банки ---------- */
.cr-bottom { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cr-panel {
  background: color-mix(in srgb, var(--cr-green) 55%, var(--card));
  border: 1px solid var(--line); border-radius: 12px; padding: 18px;
}
.cr-panel h4 { margin: 0; font-family: 'PT Serif', Georgia, serif; font-size: 18px; color: var(--ink); }
.cr-panel p { margin: 14px 0 0; font-size: 14px; color: var(--ink); opacity: .85; }
.cr-parties { margin-top: 18px; display: flex; align-items: center; }
.cr-party {
  flex: 1; min-height: 52px; border-radius: 10px; padding: 8px;
  background: var(--ts); color: var(--cr-pill-ink);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 14px; font-weight: 600; line-height: 1.25;
}
.cr-link { flex: 0 0 22px; height: 2px; background: var(--cr-dark); }
.cr-banks { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cr-banks span {
  border: 2px solid var(--cr-green-s); border-radius: 9px; background: var(--card);
  min-height: 38px; padding: 6px 8px; text-align: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.25;
}
.cr-banks span:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }

/* ---------- Узкие экраны ---------- */
@media (max-width: 1100px) {
  .cr-tiles { grid-template-columns: repeat(4, 1fr); }
  /* Колонки слайда рассыпаются, карточки идут по порядку I…VII */
  .cr-board { grid-template-columns: 1fr 1fr; }
  .cr-col { display: contents; }
  .cr-sector.wide, .cr-legend { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .cr-axis, .cr-row { grid-template-columns: 64px 1fr; }
  .cr-axis-pad2 { display: none; }
  .cr-row { row-gap: 6px; }
  .cr-row-text { grid-column: 2; }
  .cr-axis-scale em { right: 0; top: -18px; }
  .cr-steps { grid-template-columns: 1fr 1fr; }
  .cr-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cr-tiles { grid-template-columns: repeat(2, 1fr); }
  .cr-tile:last-child { grid-column: 1 / -1; }
  .cr-chart { padding-right: 12px; }
  .cr-board { grid-template-columns: 1fr; }
  .cr-sector.wide ul { columns: 1; }
  .cr-legend-grid { grid-template-columns: 1fr; }
  .cr-steps { grid-template-columns: 1fr; }
  .cr-banks { grid-template-columns: 1fr 1fr; }
  .cr-banks span:last-child:nth-child(3n + 1) { grid-column: auto; }
  .cr-banks span:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cr-parties { flex-direction: column; align-items: stretch; }
  .cr-link { flex: 0 0 14px; width: 2px; height: 14px; align-self: center; }
  .cr-pill { height: 30px; font-size: 13px; padding: 0 6px; }
  .cr-tile-num { font-size: 30px; }
}

html[data-a11y-view="contrast"] .cr-tile,
html[data-a11y-view="contrast"] .cr-sector,
html[data-a11y-view="contrast"] .cr-legend,
html[data-a11y-view="contrast"] .cr-step,
html[data-a11y-view="contrast"] .cr-panel { background: #000; border: 2px solid #fff; color: #fff; }

/* ==========================================================================
   Проекты Фонда: карточка-баннер (project_card.html).
   По шаблону баннера Фонда: кремовый фон, тёмные плитки с цифрами,
   золотые плашка и подвал «У вас тоже есть проект?».
   ========================================================================== */

.prj-wrap { max-width: 1220px; padding-top: 34px; padding-bottom: 50px; }
.prj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; align-items: start; }
.prj-home {
  --prj-w: min(1180px, calc(100vw - 40px));
  width: var(--prj-w); margin-left: calc(50% - var(--prj-w) / 2);
  margin-top: 26px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.prj-home:has(> :only-child) { grid-template-columns: minmax(0, 560px); justify-content: center; }
.prj-all { text-align: center; margin-top: 22px; }

.prj-card {
  --prj-bg: #f7f1e6; --prj-dark: var(--primary); --prj-gold: #e5a633; --prj-ink: #1f3a33;
  background: var(--prj-bg); color: var(--prj-ink);
  border: 1px solid #eadfcb; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  scroll-margin-top: 80px;
}
[data-theme="dark"] .prj-card {
  --prj-bg: #1f2721; --prj-dark: #121a20; --prj-ink: #e8eef3;
  border-color: #33402f;
}
.prj-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.prj-fund { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; line-height: 1.25; max-width: 52%; }
.prj-fund img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.prj-badge {
  background: var(--prj-gold); color: #1f2a33;
  font-size: 12px; font-weight: 700; line-height: 1.25; text-align: right;
  padding: 6px 10px; border-radius: 6px; max-width: 48%;
}
.prj-photo { position: relative; margin: 0 18px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #5b9bd5; }
.prj-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prj-nophoto { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.8); background: linear-gradient(135deg, #5b9bd5, #3f7fb9); }
.prj-nophoto svg { width: 64px; height: 64px; }
.prj-place {
  position: absolute; left: 0; bottom: 0;
  background: var(--prj-dark); color: #fff;
  font-size: 13px; font-weight: 700; padding: 8px 16px; border-top-right-radius: 6px;
}
.prj-body { padding: 14px 18px 18px; flex: 1; }
.prj-head { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; color: var(--prj-ink); }
.prj-text { margin: 8px 0 0; font-size: 14px; line-height: 1.45; opacity: .85; }
.prj-stats { margin-top: 14px; display: flex; gap: 8px; }
.prj-stats > div { flex: 1 1 0; }
.prj-stats > div { background: var(--prj-dark); color: #fff; border-radius: 4px; padding: 10px 10px 12px; min-width: 0; }
.prj-stats > div > span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; line-height: 1.25; }
.prj-stats b { display: block; margin-top: 8px; color: var(--prj-gold); font-size: 17px; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.prj-stats b.cap { font-size: 14px; }
.prj-stats small { font-size: 13px; font-weight: 700; }
.prj-adv-title { margin: 16px 0 0; font-family: 'PT Serif', Georgia, serif; font-size: 19px; color: var(--prj-ink); }
.prj-adv { margin: 8px 0 0; padding: 10px 12px 10px 30px; border: 1px solid color-mix(in srgb, var(--prj-ink) 22%, transparent); border-radius: 4px; font-size: 14px; line-height: 1.45; }
.prj-adv li + li { margin-top: 3px; }
.prj-adv li::marker { color: var(--prj-gold); }
.prj-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--prj-gold); color: #1f2a33; text-decoration: none;
  padding: 12px 18px; font-size: 13px; line-height: 1.3;
}
.prj-cta, .prj-cta b, .prj-cta span { color: #1f2a33; }
.prj-cta b { font-size: 15px; }
.prj-cta span { text-align: right; font-weight: 700; white-space: nowrap; }
.prj-cta:hover b { text-decoration: underline; }

@media (max-width: 420px) {
  .prj-grid, .prj-home { grid-template-columns: 1fr; }
  .prj-head { font-size: 19px; }
  .prj-stats { gap: 6px; }
  .prj-stats > div { padding: 8px 7px 10px; }
  .prj-stats > div > span { font-size: 9.5px; letter-spacing: .03em; }
  .prj-stats b { font-size: 15px; }
}
html[data-a11y-view="contrast"] .prj-card { background: #000; color: #fff; border: 2px solid #fff; }

/* Вкладка «Проекты» в кабинете Фонда (projects-admin.js) */
.pr-thumb { width: 72px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
.pr-photo-now { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.pr-photo-now img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.pr-own { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.pr-own summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.pr-now { font-size: 13px; margin-top: 6px; padding: 8px 10px; background: var(--bg); border-radius: 8px; }
.pr-now span { color: var(--muted); }
.pr-now b { color: var(--accent-deep); margin-right: 4px; }

/* ==========================================================================
   Услуги: хаб из двух разделов (services.html)
   ========================================================================== */

.srv-main { margin-top: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.srv-main-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px 26px 24px; text-decoration: none; color: var(--ink);
  scroll-margin-top: 80px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .25s ease;
}
.srv-main-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 36px -24px rgba(31,42,51,.55); }
.srv-main-card.is-credit .pub-ico { background: #fff2c8; color: #8a6400; }
[data-theme="dark"] .srv-main-card.is-credit .pub-ico { background: rgba(255,217,61,.15); color: #ffd93d; }
.srv-main-num {
  position: absolute; top: 22px; right: 24px;
  font-family: 'PT Serif', Georgia, serif; font-size: 44px; line-height: 1;
  color: var(--line); font-weight: 700;
}
.srv-main-card h3 { margin: 16px 0 0; font-family: 'PT Serif', Georgia, serif; font-size: 22px; line-height: 1.25; }
.srv-main-card p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }
.srv-main-card ul { list-style: none; margin: 16px 0 0; padding: 0; flex: 1; }
.srv-main-card li { position: relative; padding: 6px 0 6px 26px; font-size: 14.5px; border-top: 1px dashed var(--line); }
.srv-main-card li::before {
  content: ""; position: absolute; left: 3px; top: 12px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.srv-main-card .pub-more { margin-top: 16px; }
.srv-main-card:hover .pub-more { transform: translateX(4px); }
@media (max-width: 760px) { .srv-main { grid-template-columns: 1fr; } }

/* ==========================================================================
   Страница «Привлечение кредитных ресурсов» (services_credit.html):
   1 на что → 2 на какой срок → 3 через какой банк → 4 как получить
   ========================================================================== */

.cr-page .cr-wrap { max-width: 1180px; }
.cr-hero .wrap { max-width: 1180px; }
.cr-figs {
  margin-top: 26px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; overflow: hidden;
}
.cr-figs > div { background: rgba(10,20,28,.28); padding: 14px 16px; }
.cr-figs b { display: block; font-family: 'PT Serif', Georgia, serif; font-size: 26px; line-height: 1.15; color: #fff; }
.cr-figs > div > span { display: block; margin-top: 4px; font-size: 13px; color: rgba(255,255,255,.75); }

.cr-toc { background: var(--card); border-bottom: 1px solid var(--line); }
.cr-toc .wrap { max-width: 1180px; display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.cr-toc a {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: border-color .2s ease, background .2s ease;
}
.cr-toc a:hover { border-color: var(--accent); background: var(--accent-tint); }
.cr-toc i {
  font-style: normal; width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 12.5px;
  display: inline-flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .cr-toc i { background: var(--accent); color: #0e1620; }

.cr-part { padding: 48px 0 6px; scroll-margin-top: 70px; }
.cr-part + .cr-part { border-top: 1px solid var(--line); margin-top: 40px; }
.cr-part-head { display: flex; gap: 18px; align-items: flex-start; }
.cr-part-num {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent-deep); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'PT Serif', Georgia, serif; font-size: 22px; font-weight: 700;
}
.cr-part-head .pub-h2 { margin-top: 4px; }
.cr-part-head .pub-lead { max-width: 70ch; }
.cr-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
}

/* --- 1. Выбор отрасли --- */
.cr-explorer { margin-top: 26px; display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.cr-tabs { display: flex; flex-direction: column; gap: 8px; }
.cr-tab {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--ts);
  transition: background .2s ease, transform .2s var(--ease), box-shadow .2s ease;
}
.cr-tab:hover { transform: translateX(3px); }
.cr-tab[aria-selected="true"] { background: var(--t); box-shadow: 0 10px 24px -20px rgba(31,42,51,.7); }
.cr-tab .cr-ico { width: 38px; height: 38px; flex: none; }
.cr-tab-txt { flex: 1; min-width: 0; line-height: 1.25; }
.cr-tab-txt b { display: block; font-size: 14.5px; }
.cr-tab-txt small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.cr-tab .cr-roman { flex: none; }

.cr-panels { display: flex; flex-direction: column; gap: 16px; }
.cr-panel-s {
  background: var(--t); border: 1px solid color-mix(in srgb, var(--ts) 60%, transparent);
  border-radius: 14px; padding: 20px 22px 18px; scroll-margin-top: 80px;
}
.cr-ps-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cr-ps-head h3 { margin: 0; flex: 1; min-width: 200px; font-family: 'PT Serif', Georgia, serif; font-size: 21px; color: var(--ink); line-height: 1.25; }
.cr-ps-term { display: inline-flex; align-items: center; gap: 8px; }
.cr-ps-term small { font-size: 12.5px; color: var(--muted); }
.cr-items { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.cr-items li {
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--card) 78%, transparent); border-radius: 10px; padding: 9px 12px;
  font-size: 14px; line-height: 1.35; color: var(--ink);
}
.cr-item-n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--cr-dark); color: #fff; font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.cr-item-t { flex: 1; }
.cr-items .cr-pill { flex: none; }

/* --- 2. Сроки --- */
#terms .cr-card { margin-top: 22px; }
#terms .cr-key { margin-bottom: 6px; }
#terms .cr-chart { margin-top: 10px; }

/* --- 3. Банки --- */
.cr-bank-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 980px) { .cr-bank-grid { grid-template-columns: repeat(2, 1fr); } }
.cr-bank {
  position: relative; text-decoration: none;
  transition: border-color .2s ease, transform .2s var(--ease), box-shadow .2s ease;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  font-size: 15px; color: var(--ink);
}
.cr-bank-mark {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  background: var(--cr-green); color: var(--cr-dark);
  display: inline-flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .cr-bank-mark { color: var(--cr-green-s); }
.cr-bank-mark svg { width: 22px; height: 22px; }
.cr-deal { margin-top: 16px; }
.cr-deal h3 { margin: 0; font-family: 'PT Serif', Georgia, serif; font-size: 19px; color: var(--ink); }
.cr-deal p { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.cr-deal .cr-parties { max-width: 720px; }

/* --- 4. Шаги: вертикальная лента --- */
.cr-timeline { list-style: none; margin: 26px 0 0; padding: 0; position: relative; }
.cr-timeline li { position: relative; display: flex; gap: 18px; padding-bottom: 18px; }
.cr-timeline li:not(:last-child)::before {
  content: ""; position: absolute; left: 22px; top: 46px; bottom: 0; width: 2px;
  background: linear-gradient(var(--ts), var(--line));
}
.cr-tl-num {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--ts); color: var(--cr-pill-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: 'PT Serif', Georgia, serif; font-size: 20px; font-weight: 700;
  box-shadow: 0 0 0 5px var(--bg);
}
.cr-tl-body {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ts);
  border-radius: 12px; padding: 14px 18px 16px;
}
.cr-tl-actor {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}
.cr-tl-body h3 { margin: 4px 0 0; font-family: 'PT Serif', Georgia, serif; font-size: 19px; color: var(--ink); }
.cr-tl-body p { margin: 6px 0 0; font-size: 14.5px; color: var(--ink); opacity: .85; }
.cr-tl-body .btn { margin-top: 12px; }

/* --- Условия и документы --- */
.cr-docs { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cr-docs h4 { margin: 0 0 10px; font-size: 15px; color: var(--ink); }

/* Главная: кнопка под плитками */
.cr-more { margin-top: 20px; }

@media (max-width: 980px) {
  .cr-figs { grid-template-columns: repeat(3, 1fr); }
  .cr-docs { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cr-explorer { grid-template-columns: 1fr; }
  .cr-explorer.is-tabs .cr-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .cr-explorer.is-tabs .cr-tab { flex: none; max-width: 220px; }
  .cr-explorer.is-tabs .cr-tab .cr-roman { display: none; }
  .cr-tab:hover { transform: none; }
  .cr-items { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cr-figs { grid-template-columns: 1fr 1fr; }
  .cr-figs > div:last-child { grid-column: 1 / -1; }
  .cr-figs b { font-size: 22px; }
  .cr-part-head { gap: 12px; }
  .cr-part-num { width: 38px; height: 38px; font-size: 18px; }
  .cr-panel-s { padding: 16px 14px; }
  .cr-timeline li { gap: 12px; }
  .cr-tl-num { width: 38px; height: 38px; font-size: 17px; }
  .cr-timeline li:not(:last-child)::before { left: 18px; top: 38px; }
}
html[data-a11y-view="contrast"] .cr-tab,
html[data-a11y-view="contrast"] .cr-panel-s,
html[data-a11y-view="contrast"] .cr-tl-body,
html[data-a11y-view="contrast"] .srv-main-card { background: #000; border: 2px solid #fff; color: #fff; }

/* Банки с логотипом: логотип на белой плашке (так он задуман банком),
   название — под ним; карточка ведёт на сайт банка */
.cr-bank:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 12px 26px -20px rgba(31,42,51,.6); }
.cr-bank-go { position: absolute; top: 8px; right: 10px; font-size: 13px; color: var(--muted); opacity: 0; transition: opacity .2s ease; }
.cr-bank:hover .cr-bank-go { opacity: 1; }
.cr-bank.has-logo { flex-direction: column; align-items: stretch; gap: 10px; text-align: center; padding: 12px; }
.cr-bank-logo {
  height: 72px; border-radius: 8px; background: #fff; border: 1px solid #eef1f4;
  display: flex; align-items: center; justify-content: center; padding: 10px 14px;
}
.cr-bank-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.cr-bank.has-logo b { font-size: 13.5px; }
.cr-bank, .cr-bank b, [data-theme="dark"] .cr-bank b { color: var(--ink); }
@media (max-width: 420px) { .cr-bank-grid { gap: 8px; } .cr-bank-logo { height: 54px; padding: 8px; } .cr-bank.has-logo { padding: 8px; } .cr-bank.has-logo b { font-size: 12.5px; } }


/* Срок кредита словами (services_credit.html, макрос term_full) */
.cr-term { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 5px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.cr-term b { color: var(--ink); font-weight: 700; }
.cr-term > i { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-right: -6px; }
.cr-term.t37 > i { background: var(--cr-green-s); }
.cr-term.t15 > i { background: var(--cr-purple-s); }
.cr-term.t14 > i { background: var(--cr-teal-s); }
.cr-term.t13 > i { background: var(--cr-blue-s); }
.cr-term.t18 > i { background: var(--cr-orange-s); }
.cr-term > span + span::before { content: "·"; margin-right: 10px; color: var(--muted); }
.cr-items li { align-items: flex-start; }
.cr-items .cr-item-n { margin-top: 1px; }
.cr-item-t > span:first-child { display: block; }
.cr-ps-term { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.cr-ps-term .cr-term { margin-top: 0; font-size: 14px; justify-content: flex-end; }
.cr-ps-term .cr-term > i { width: 11px; height: 11px; }
#terms .cr-axis, #terms .cr-row { grid-template-columns: 120px 1fr minmax(220px, 290px); }
#terms .cr-pill { padding: 0 8px; font-size: 13px; }
@media (max-width: 860px) {
  #terms .cr-axis, #terms .cr-row { grid-template-columns: 96px 1fr; }
  .cr-ps-term { align-items: flex-start; text-align: left; width: 100%; }
  .cr-ps-term .cr-term { justify-content: flex-start; }
}
/* В списке направлений — срок и льготный период отдельными строками */
.cr-items .cr-term { flex-direction: column; align-items: flex-start; gap: 1px; position: relative; padding-left: 15px; }
.cr-items .cr-term > i { position: absolute; left: 0; top: 4px; margin: 0; }
.cr-items .cr-term > span + span::before { content: none; }
.cr-tab, [data-theme="dark"] .cr-tab { color: var(--ink); }
/* Направления — одним столбцом, по порядку */
.cr-items { grid-template-columns: 1fr !important; }


/* ── Оплата через Payme на странице графика ─────────────────────────── */
.pay-box { --pay: #00a3a3; --pay-deep: #007f7e;
  border: 1px solid color-mix(in srgb, var(--pay) 45%, var(--line)); background: var(--card);
  border-radius: 18px; margin: 16px 0 22px; overflow: hidden;
  box-shadow: 0 18px 40px -28px rgba(0, 110, 110, .75); }
.pay-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 22px;
  background: linear-gradient(120deg, #00b3b3, #007f7e); color: #fff; }
.pay-head-ico { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.18);
  display: grid; place-items: center; flex: none; }
.pay-head-ico svg { width: 24px; height: 24px; }
.pay-head-txt { flex: 1 1 220px; min-width: 0; }
.pay-head h3 { margin: 0; font-size: 20px; color: #fff; line-height: 1.2; }
.pay-head-txt span { font-size: 13.5px; opacity: .9; }
.pay-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); font-size: 12.5px; font-weight: 600; }
.pay-tag svg { width: 14px; height: 14px; }

.pay-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.pay-opts { border: 0; margin: 0; padding: 18px 22px 20px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pay-opts legend { padding: 0; margin-bottom: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted); float: left; width: 100%; }
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--bg); transition: border-color .15s, box-shadow .15s, background .15s; }
.pay-opt:hover { border-color: color-mix(in srgb, var(--pay) 55%, var(--line)); }
.pay-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--pay); flex: none; }
.pay-opt:has(input:checked) { border-color: var(--pay); background: color-mix(in srgb, var(--pay) 9%, var(--card));
  box-shadow: 0 0 0 1px var(--pay) inset; }
.pay-opt:has(input:focus-visible) { outline: 3px solid var(--pay); outline-offset: 2px; }
.pay-opt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pay-opt-main b { font-size: 15px; color: var(--ink); }
.pay-opt-main small { font-size: 12.5px; color: var(--muted); }
.pay-opt.is-debt .pay-opt-main small { color: #c0392b; }
[data-theme="dark"] .pay-opt.is-debt .pay-opt-main small { color: #ff8a80; }
.pay-opt-sum { font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.pay-opt-sum small { font-size: 12px; font-weight: 500; color: var(--muted); }
.pay-other { display: flex; align-items: center; gap: 10px; padding: 4px 2px 0 44px; }
.pay-other[hidden] { display: none; }
.pay-other input { flex: 1; min-width: 0; font: inherit; font-size: 20px; font-weight: 700; padding: 11px 14px;
  border-radius: 10px; border: 1.5px solid var(--pay); background: var(--card); color: var(--ink); }
.pay-other span { color: var(--muted); font-weight: 600; }

.pay-side { padding: 20px 22px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px;
  background: color-mix(in srgb, var(--pay) 5%, var(--card)); }
.pay-side-label { font-size: 12.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.pay-total { font-size: 15px; font-weight: 600; color: var(--muted); }
.pay-total b { font-size: 34px; line-height: 1.1; color: var(--ink); letter-spacing: -.5px; }
.pay-go-txt { font-size: 19px; }
.pay-go { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; white-space: nowrap;
  min-height: 58px; padding: 0 18px; border: 0; border-radius: 14px; cursor: pointer; margin-top: 4px;
  background: linear-gradient(135deg, #00bdbd, #008584); color: #fff;
  font: inherit; font-size: 17.5px; font-weight: 700;
  box-shadow: 0 12px 24px -12px rgba(0, 128, 127, .95); transition: transform .15s ease, box-shadow .15s ease, filter .15s; }
.pay-go:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 16px 28px -12px rgba(0, 128, 127, 1); }
.pay-go:active { transform: translateY(0); }
.pay-go:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.pay-logo { display: inline-flex; align-items: center; justify-content: center; height: 36px; min-width: 40px;
  padding: 0 8px; border-radius: 9px; background: #fff; flex: none; }
.pay-logo img { height: 26px; width: auto; display: block; }
.pay-logo b { display: none; color: #00a3a3; font-size: 16px; font-weight: 800; }
.pay-logo.no-img b { display: inline; }
.pay-err { color: #c0392b; font-size: 14px; min-height: 1em; font-weight: 600; }
[data-theme="dark"] .pay-err { color: #ff8a80; }
.pay-note { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin: 0; }
@media (max-width: 760px) {
  .pay-grid { grid-template-columns: 1fr; }
  .pay-side { border-left: 0; border-top: 1px solid var(--line); }
  .pay-head, .pay-opts, .pay-side { padding-left: 16px; padding-right: 16px; }
  .pay-total b { font-size: 30px; }
  .pay-other { padding-left: 0; }
}
@media (max-width: 480px) {
  .pay-opt { flex-wrap: wrap; row-gap: 6px; }
  .pay-opt-sum { flex-basis: 100%; padding-left: 30px; font-size: 18px; }
}
@media print { .pay-box { display: none !important; } }

/* Тёмная тема: заголовки, у которых цвет был --primary (в тёмной теме
   он почти сливается с фоном) — «Мои заявки» в кабинете и т. п. */
[data-theme="dark"] .hist h3,
[data-theme="dark"] .doc-title,
[data-theme="dark"] .done h2 { color: var(--ink); }
[data-theme="dark"] .status-banner a { color: var(--accent); }

/* Кабинет хозяйства: заметная кнопка «График и оплата» у одобренной заявки */
.hist-badge, .hist-pay { vertical-align: middle; }
.hist-pay { display: inline-flex; align-items: center; gap: 7px; margin: 4px 0 4px 10px;
  padding: 8px 14px; border-radius: 999px; background: linear-gradient(135deg, #00b8b8, #008a89);
  color: #fff; font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 16px -10px rgba(0, 128, 127, .9); transition: transform .15s ease; }
.hist-pay svg { width: 17px; height: 17px; flex: none; }
.hist-pay:hover { transform: translateY(-1px); color: #fff; }
.hist-pay:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (max-width: 700px) { .hist-pay { margin-left: 0; } }
/* В тёмной теме общие правила красят ссылки в бирюзовый — у кнопки текст белый */
.hist-table a.hist-pay, [data-theme="dark"] .hist-table a.hist-pay,
.hist-table a.hist-pay:hover, [data-theme="dark"] .hist-table a.hist-pay:hover { color: #fff; }

/* ── Фото отраслей на странице кредитов (сменяются, см. credit.js) ── */
.cr-gal { position: relative; aspect-ratio: 21 / 8; border-radius: 14px; overflow: hidden;
  margin: 0 0 16px; background: var(--bg); }
.cr-gal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04); transition: opacity .9s ease, transform 5.5s ease; }
.cr-gal img.on { opacity: 1; transform: scale(1); }
.cr-gal::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.55)); }
.cr-gal-name { position: absolute; left: 16px; bottom: 12px; z-index: 1; color: #fff;
  font-weight: 700; font-size: 18px; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.cr-gal-dots { position: absolute; right: 14px; bottom: 15px; z-index: 1; display: flex; gap: 6px; }
.cr-gal-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5);
  cursor: pointer; transition: width .25s, background .25s; }
.cr-gal-dots i.on { width: 22px; border-radius: 4px; background: #fff; }
@media (max-width: 560px) { .cr-gal { aspect-ratio: 16 / 9; } .cr-gal-name { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .cr-gal img { transition: opacity .3s ease; transform: none; } }
@media print { .cr-gal { display: none; } }

/* Пометка о единицах над таблицей выделенных средств */
.fin-unit-note { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 12px; padding: 7px 12px;
  border-radius: 10px; background: var(--accent-tint); color: var(--ink); font-size: 14px; font-weight: 600; }
.fin-unit-note::before { content: "i"; display: inline-grid; place-items: center; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; font-style: italic; }
[data-theme="dark"] .fin-unit-note { background: rgba(0, 163, 163, .14); }

/* ── Сертификат CERT International: в шапке, по центру (только на главной) ── */
.hero-cert { display: flex; align-items: center; gap: 12px; margin: 0 auto; flex: 0 1 auto; min-width: 0;
  padding: 8px 14px 8px 12px; border-radius: 12px; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18);
  transition: background .2s, transform .2s; }
.hero-cert:hover { background: rgba(255,255,255,.13); transform: translateY(-1px); color: #fff; }
.hero-cert:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hero-cert-logo { flex: none; display: grid; place-items: center; }
.hero-cert-logo img { display: block; width: 112px; height: auto; }
.hero-cert-txt { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; min-width: 0;
  padding-left: 12px; border-left: 1px solid rgba(255,255,255,.22); }
.hero-cert-txt small { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.7); white-space: nowrap; }
.hero-cert-txt b { font-size: 13.5px; font-weight: 700; color: #fff; white-space: nowrap; }
.hero-cert-txt > span { font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; }
/* Узкая шапка: сертификат — отдельной строкой по центру, над меню разделов */
header .wrap.hc-row { display: none; }
@media (max-width: 1360px) {
  .hero-cert.hc-inline { display: none; }
  header .wrap.hc-row { display: flex; justify-content: center; padding-top: 14px; }
}
@media (max-width: 480px) {
  .hero-cert { width: 100%; justify-content: center; gap: 10px; padding: 8px 10px; }
  .hero-cert-logo img { width: 92px; }
  .hero-cert-txt { padding-left: 10px; }
  .hero-cert-txt small, .hero-cert-txt b, .hero-cert-txt > span { white-space: normal; }
  .hero-cert-txt b { font-size: 12.5px; }
}
@media print { .hero-cert { display: none; } }

/* Карточка проекта без фото: место — строкой над заголовком */
.prj-place-line { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--prj-gold); }

/* Подвал: полное название Фонда на узбекском (латиница и кириллица) */
.footer-names { font-size: 13px; font-weight: 600; line-height: 1.45; margin: 10px 0 8px; opacity: .92; }

/* ── Кредиты: погашение онлайн через приложения банков ──────────────── */
.cr-bank-pay { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; background: rgba(0,163,163,.12); color: var(--accent-deep); }
[data-theme="dark"] .cr-bank-pay { color: var(--accent); background: rgba(0,163,163,.18); }
.cr-repay { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cr-rp { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.cr-rp.is-ready { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 16px 34px -26px rgba(0,110,110,.7); }
.cr-rp-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cr-rp.is-ready .cr-rp-head { background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.cr-rp-logo { flex: none; width: 116px; height: 50px; display: grid; place-items: center; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.cr-rp-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cr-rp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cr-rp-name b { font-size: 17px; color: var(--ink); }
.cr-rp-name span { font-size: 13.5px; color: var(--muted); }
.cr-rp-name strong { color: var(--ink); }
.cr-rp-status { flex: none; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(0,163,163,.14); color: var(--accent-deep); }
.cr-rp.is-soon .cr-rp-status { background: rgba(230,160,40,.16); color: #9a6200; }
[data-theme="dark"] .cr-rp-status { color: var(--accent); }
[data-theme="dark"] .cr-rp.is-soon .cr-rp-status { color: #f0b54a; }
.cr-rp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; padding: 18px; }
.cr-rp-links { display: flex; flex-direction: column; gap: 10px; }
.cr-rp-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-decoration: none;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 600; transition: border-color .15s, transform .15s; }
.cr-rp-btn:hover { border-color: var(--accent); transform: translateY(-1px); color: var(--ink); }
.cr-rp-btn.is-web { background: linear-gradient(135deg, #00b3b3, #007f7e); border-color: transparent; color: #fff; }
.cr-rp-btn.is-web:hover { color: #fff; filter: brightness(1.05); }
.cr-rp-btn svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cr-rp-btn span { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.cr-rp-btn small { font-size: 12px; font-weight: 500; opacity: .75; }
.cr-rp-btn i { font-style: normal; opacity: .7; }
.cr-rp-steps h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cr-rp-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.cr-rp-steps li { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 15px; color: var(--ink); }
.cr-rp-steps li + li::before { content: ""; position: absolute; left: 13px; top: -7px; height: 14px; width: 2px; background: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.cr-rp-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.cr-rp-steps li:last-child { font-weight: 700; }
.cr-rp-soon { margin: 0; padding: 16px 18px; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.cr-rp-src { margin: 0; padding: 10px 18px 14px; font-size: 12px; color: var(--muted); }
.cr-rp-other { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }
@media (max-width: 980px) { .cr-repay { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .cr-rp-body { grid-template-columns: 1fr; }
  .cr-rp-head { flex-wrap: wrap; }
  .cr-rp-logo { width: 96px; height: 44px; }
}
@media (max-width: 640px) { .cr-rp-head { flex-wrap: nowrap; } .cr-rp-logo { width: 84px; height: 40px; } .cr-rp-name b { font-size: 15.5px; } }
/* в тёмной теме общие правила красят ссылки — у бирюзовой кнопки текст белый */
.cr-rp-btn.is-web, [data-theme="dark"] .cr-rp-btn.is-web, .cr-rp-btn.is-web:hover { color: #fff !important; }
[data-theme="dark"] .cr-rp-btn { color: var(--ink); }
.cr-bank .cr-bank-pay { align-self: center; width: fit-content; }

/* ── Загруженные видеофайлы (mp4 и др.) в новостях и проектах ─────────── */
.news-vfile { margin: 18px 0; border-radius: 12px; overflow: hidden; background: #000; }
.news-vfile video { display: block; width: 100%; max-height: 78vh; background: #000; }
.prj-video { background: #000; }
.prj-video video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
/* подпись места у видео — вверху, чтобы не закрывать кнопки проигрывателя */
.prj-video .prj-place { top: 10px; bottom: auto; pointer-events: none; }
/* видео проекта — отдельным блоком внизу карточки, над полосой контактов */
.prj-video-bottom { margin: 0 18px 18px; }

/* Кабинет сотрудника: загрузка видео */
.vf-box:empty { display: none; }
.vf-box { margin: 8px 0 4px; }
.vf-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.vf-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.vf-bar[hidden] { display: none; }
.vf-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.vf-preview { display: block; width: 100%; max-width: 480px; max-height: 270px; margin-top: 10px; border-radius: 8px; background: #000; }
/* ==========================================================================
   ПОРУЧЕНИЯ И ХОД РАССМОТРЕНИЯ ЗАЯВКИ (js/workflow.js)
   ========================================================================== */
.wf-inbox { margin-bottom: 18px; }
.wf-group + .wf-group { margin-top: 6px; }
.wf-count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 11px;
  background: var(--accent); color: #fff; font-size: 12px; text-align: center; }
.wf-list { list-style: none; margin: 0 0 8px; padding: 0; }
.wf-list > li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.wf-list > li:last-child { border-bottom: 0; }
.wf-link { background: none; border: 0; padding: 0; color: var(--accent-deep); cursor: pointer;
  font: inherit; text-align: left; }
.wf-link:hover { text-decoration: underline; }
.wf-text { margin-top: 3px; white-space: pre-wrap; }
.wf-report { margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--accent-tint); white-space: pre-wrap; }
.wf-note { margin-top: 4px; color: var(--warn); white-space: pre-wrap; }
.wf-due { font-size: 13px; color: var(--muted); }
.wf-due.bad { color: var(--danger); font-weight: 600; }
.wf-stage { display: inline-block; padding: 4px 12px; border-radius: 14px; font-weight: 600;
  background: var(--accent-tint); color: var(--accent-deep); }
.wf-stage-returned, .wf-stage-docs_requested { background: var(--warn-tint); color: var(--warn); }
.wf-stage-rejected { background: var(--danger-tint); color: var(--danger); }
.wf-state { font-size: 13px; color: var(--muted); }
.wf-state-done { color: var(--accent-deep); }
.wf-vote-for { color: var(--accent-deep); font-weight: 600; }
.wf-vote-against { color: var(--danger); font-weight: 600; }
.wf-h4 { font-size: 14px; margin: 16px 0 6px; }
.wf-assess { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.wf-assess p { margin: 4px 0 0; white-space: pre-wrap; }
.wf-form { margin: 12px 0; }
.wf-form > summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); padding: 6px 0; }  /* не --primary: это цвет шапки, в тёмной теме не виден */
.wf-box { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.wf-people { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto;
  margin: 8px 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.wf-person { display: block; padding: 2px 0; }
.wf-queue { margin: 6px 0 10px; padding-left: 22px; }
.wf-queue li { margin: 3px 0; }
.wf-queue li.now { font-weight: 600; }
.wf-now { color: var(--accent-deep); font-weight: 600; }
.wf-history { margin-top: 14px; }
.wf-history > summary { cursor: pointer; color: var(--muted); }
.wf-history ol { margin: 8px 0 0; padding-left: 20px; }
.wf-history li { margin: 4px 0; }
/* «Входящие» как почта: от кого · заявка · что сделать · когда; непрочитанные — жирным */
.wf-mail { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.wf-mail-row + .wf-mail-row { border-top: 1px solid var(--line); }
.wf-mail-btn { display: grid; grid-template-columns: minmax(160px, 1.2fr) 3fr auto; gap: 2px 14px; align-items: baseline;
  width: 100%; padding: 10px 14px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wf-mail-btn:hover, .wf-mail-btn:focus-visible { background: var(--accent-tint); }
.wf-mail-from { grid-column: 1; grid-row: 1 / span 2; color: var(--muted); overflow-wrap: anywhere; }
.wf-mail-subj { grid-column: 2; }
.wf-mail-todo { grid-column: 2; color: var(--accent-deep); }
.wf-mail-note { grid-column: 2; color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.wf-mail-date { grid-column: 3; grid-row: 1; color: var(--muted); font-size: 13px; white-space: nowrap; }
.wf-mail-row.unread { border-left: 3px solid var(--accent); }
.wf-mail-row.unread .wf-mail-from, .wf-mail-row.unread .wf-mail-todo { font-weight: 700; color: var(--ink, inherit); }
@media (max-width: 640px) {
  .wf-mail-btn { grid-template-columns: 1fr auto; }
  .wf-mail-from { grid-column: 1; grid-row: auto; }
  .wf-mail-subj, .wf-mail-todo, .wf-mail-note { grid-column: 1 / -1; }
  .wf-mail-date { grid-column: 2; grid-row: 1; }
}
/* «Ваше действие» вверху карточки и строка «Шаг N из 5 · сейчас у …» */
#det-action { margin: 4px 0 14px; }
.wf-where { margin-bottom: 8px; }
.wf-action { border-color: var(--accent); background: var(--accent-tint); }
.wf-action .det-sub { margin-top: 0; }
.wf-return { margin-top: 10px; }
.wf-return > summary { cursor: pointer; color: var(--warn); font-weight: 600; }
/* состав комиссии (без «кто как проголосовал») и свой голос */
.wf-members { margin: 6px 0 10px; padding-left: 20px; }
.wf-members li { margin: 3px 0; }
.wf-mine { margin: 0 0 10px; font-weight: 600; color: var(--accent-deep); }
/* Просмотр документов на странице (js/fond.js, viewDoc) */
.dv-views { align-items: center; }
.dv-label { color: var(--muted); margin-right: 4px; }
.doc-viewer { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dv-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--accent-tint); }
.dv-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.dv-body { padding: 0; }
.dv-body > .hint { padding: 16px; margin: 0; }
.dv-frame { display: block; width: 100%; height: 80vh; min-height: 420px; border: 0; background: #fff; }
.dv-img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
@media (max-width: 640px) { .dv-frame { height: 70vh; min-height: 320px; } }

/* Шапка кабинетов и заявки (не публичных страниц). Раньше она была
   шириной с форму (860 пикселей): логотип, три кнопки и переключатели
   оставляли названию около 95 пикселей, и оно стояло столбиком по слову.
   Теперь шапка шире формы, название не уже 22 знаков, а кнопки при
   нехватке места переходят на вторую строку целиком. */
body:not(.public) header .wrap { max-width: 1280px; flex-wrap: wrap; row-gap: 12px; }
body:not(.public) header .wrap > div:not(.lang):not(.hdr-tools) { flex: 1 1 22ch; min-width: min(22ch, 100%); }
body:not(.public) header .lang { flex: 0 1 auto; max-width: 100%; flex-wrap: wrap; }
body:not(.public) header .emblem-logo { flex: none; }

/* Заявка только из кабинета (apply-gate.js): пока идёт проверка входа,
   форма не мелькает; без входа вместо неё блок со ссылкой на кабинет. */
main[data-gate="wait"] .wrap > :not(#apply-gate),
main[data-gate="closed"] .wrap > :not(#apply-gate) { display: none; }
.apply-gate { text-align: center; }
.apply-gate .btn { display: inline-block; margin-top: 8px; text-decoration: none; }

/* =================================================================
   Плавность (motion.js): появление при прокрутке, переходы между
   страницами, полоска меню, раскрывающиеся блоки, шрифт заголовков.
   Кривые — длинное «быстро начать, мягко остановиться», как у Apple
   и Mercedes-Benz. «Уменьшить движение» в системе выключает всё.
   ================================================================= */

:root {
  --m-ease: cubic-bezier(.16, 1, .3, 1);          /* основная: мягкая остановка */
  --m-ease-io: cubic-bezier(.65, 0, .35, 1);      /* для перемещений туда-обратно */
  --m-dur: 1.1s;
  --font-display: 'Playfair Display', 'PT Serif', Georgia, serif;
}

/* ---------- Появление при прокрутке: блоки и карточки групп ----------
   Сдвиг и прозрачность задаются только СКРЫТОМУ блоку (:not(.shown)).
   Показанный ничем не перебит, и у карточек работают свои эффекты при
   наведении (подъём, тень). Длинный переход 1,1 с действует только пока
   идёт появление — потом (класс m-done) у карточки снова свои переходы.
   Карточки групп (.reveal-group > *) motion.js помечает m-item и следит
   за каждой отдельно: длинный список появляется по мере прокрутки. */
.motion-js .reveal:not(.m-done), .motion-js .m-item:not(.m-done) {
  transition: opacity var(--m-dur) var(--m-ease), transform var(--m-dur) var(--m-ease);
}
.motion-js .reveal:not(.shown) { opacity: 0; transform: translateY(42px); }
.motion-js .m-item:not(.shown) { opacity: 0; transform: translateY(46px) scale(.98); }

/* Отдельные абзацы, надписи и кнопки первого экрана */
.motion-js .m-fade:not(.m-done) { transition: opacity 1s var(--m-ease) .15s, transform 1s var(--m-ease) .15s; }
.motion-js .m-fade:not(.shown) { opacity: 0; transform: translateY(26px); }

/* Заголовки: каждое слово выезжает снизу из-под маски, по очереди */
.m-head .m-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.m-head .m-w > span { display: inline-block; }
.motion-js .m-head .m-w > span {
  transform: translateY(108%); opacity: 0;
  transition: transform 1.15s var(--m-ease), opacity .8s var(--m-ease);
}
.motion-js .m-head.shown .m-w > span { transform: none; opacity: 1; }

/* Картинки: проявляются из-под «шторки» с лёгким приближением */
.motion-js .m-img:not(.m-done) {
  transition: clip-path 1.3s var(--m-ease), opacity 1s var(--m-ease), transform 1.6s var(--m-ease);
}
.motion-js .m-img:not(.shown) { clip-path: inset(9% 9% 9% 9%); opacity: 0; transform: scale(1.08); }

/* Размытие при появлении — как в примерах. Только для текста (маленькая
   площадь, видеокарте это дёшево) и только на компьютерах с мышью:
   на телефонах размытие крупных участков подтормаживает прокрутку. */
@media (hover: hover) and (pointer: fine) {
  .motion-js .m-fade:not(.m-done), .motion-js .m-head .m-w > span { transition-property: opacity, transform, filter; }
  .motion-js .m-fade:not(.shown), .motion-js .m-head:not(.shown) .m-w > span { filter: blur(8px); }
  .motion-js .m-head .m-w > span { transition-duration: 1.15s, 1.15s, .9s; }
}

/* Вернулись к блоку прокруткой вверх — он выезжает сверху, а не снизу */
.motion-js .reveal.m-above:not(.shown) { transform: translateY(-42px); }
.motion-js .m-item.m-above:not(.shown) { transform: translateY(-46px) scale(.98); }
.motion-js .m-fade.m-above:not(.shown) { transform: translateY(-26px); }
.motion-js .m-head.m-above .m-w > span { transform: translateY(-108%); }

/* Крупные снимки: проявляются из-под «шторки» со скруглёнными краями */
.motion-js .m-clip:not(.m-done) { transition: clip-path 1.4s var(--m-ease), opacity 1s var(--m-ease); }
.motion-js .m-clip:not(.shown) { clip-path: inset(12% 6% 12% 6% round 22px); opacity: .25; transform: none; }

/* Блок «О фонде»: снимок на всю ширину сверху, как у UFRD; под ним текст
   в две колонки — заголовок слева (держится при прокрутке), абзацы справа. */
.about-fund { display: flex; flex-direction: column; gap: 52px; }
.about-fund .about-photo {
  --photo-w: min(1280px, calc(100vw - 48px));
  order: -1; position: relative; top: auto; align-self: flex-start;
  /* шире колонки текста: выходит за её края поровну с обеих сторон */
  width: var(--photo-w); margin-left: calc((100% - var(--photo-w)) / 2);
  aspect-ratio: 16 / 8; border-radius: 22px;
}
.about-fund .about-photo img { object-position: center 24%; transform-origin: 50% 40%; will-change: transform; }
.about-fund .about-photo figcaption {
  padding: 80px 34px 28px; font-family: var(--font-display);
  font-size: clamp(16px, 1.7vw, 22px); line-height: 1.35;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}
.about-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 56px; align-items: start; }
.about-head { position: sticky; top: 96px; }
.about-text .pub-h2 { max-width: 15ch; margin-bottom: 0; }
@media (max-width: 900px) {
  .about-fund { gap: 30px; }
  .about-fund .about-photo { aspect-ratio: 4 / 3; border-radius: 16px; }
  .about-fund .about-photo figcaption { padding: 50px 18px 16px; }
  .about-text { grid-template-columns: 1fr; gap: 18px; }
  .about-head { position: static; }
}

/* Живые волны первого экрана (hero-waves.js): холст поверх прежних линий.
   Если скрипт не запустился (или «Уменьшить движение») — остаются SVG-линии. */
.hero-waves { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero.waves-live .hero-lines { display: none; }

/* ---------- Переходы между страницами (View Transitions) ----------
   Новая страница не «мигает»: старая уходит вверх и тает, новая
   поднимается. Шапка и меню стоят на месте, а полоска под разделом
   меню сама переезжает к новому пункту. */
@view-transition { navigation: auto; }
body.public > header { view-transition-name: site-header; }
/* Имя перехода делает шапку отдельным «слоем», и без z-index выпадающий
   список языков уходил под меню разделов. Шапка — над меню (у меню 40). */
body > header { position: relative; z-index: 45; }
.pubnav { view-transition-name: site-nav; }
.nav-ink { view-transition-name: nav-ink; }
.ai-fab { view-transition-name: ai-fab; }
::view-transition-old(root) { animation: m-page-out .38s var(--m-ease-io) both; }
::view-transition-new(root) { animation: m-page-in .7s var(--m-ease) both; }
::view-transition-group(nav-ink) { animation-duration: .7s; animation-timing-function: var(--m-ease); }
@keyframes m-page-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes m-page-in { from { opacity: 0; transform: translateY(22px); } }

/* ---------- Полоска под активным разделом меню ---------- */
.pubnav .wrap { position: relative; }
.pubnav.has-ink a.on, .pubnav.has-ink a { border-bottom-color: transparent; }
.nav-ink {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); border-radius: 2px; pointer-events: none; opacity: 0;
  transition: transform .6s var(--m-ease), width .6s var(--m-ease), opacity .3s ease;
}
.nav-ink.no-anim { transition: none; }

/* Выпадающие списки меню: раскрываются мягко, пункты — по очереди */
.navdrop-menu { transition: opacity .45s var(--m-ease), transform .55s var(--m-ease), visibility .45s; }
@media (min-width: 861px) {
  .navdrop-menu { transform: translate(-50%, -12px) scale(.98); transform-origin: 50% 0; }
  .navdrop:hover .navdrop-menu, .navdrop:focus-within .navdrop-menu, .navdrop.open .navdrop-menu {
    transform: translate(-50%, 0) scale(1);
  }
}
/* Сдвиг задаётся только ЗАКРЫТОМУ списку: у открытого пункты ничем не
   перебиты и при наведении, как раньше, подсвечиваются и сдвигаются вправо. */
.navdrop-menu a { transition: opacity .4s var(--m-ease), transform .35s var(--m-ease), background-color .2s ease, color .2s ease; }
.navdrop:not(:hover):not(:focus-within):not(.open) .navdrop-menu a { opacity: 0; transform: translateY(-6px); }
.navdrop:hover .navdrop-menu a:nth-child(2), .navdrop:focus-within .navdrop-menu a:nth-child(2) { transition-delay: .05s, 0s, 0s, 0s; }
.navdrop:hover .navdrop-menu a:nth-child(3), .navdrop:focus-within .navdrop-menu a:nth-child(3) { transition-delay: .1s, 0s, 0s, 0s; }

/* ---------- Раскрывающиеся блоки: стрелка поворачивается ---------- */
.faq-item summary::after {
  content: ''; width: 9px; height: 9px; font-size: 0;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-75%) rotate(45deg); transition: transform .55s var(--m-ease);
}
.faq-item[open]:not(.closing) summary::after { content: ''; transform: translateY(-25%) rotate(-135deg); }
details > :not(summary) { transition: opacity .5s var(--m-ease); }
details.closing > :not(summary) { opacity: 0; }

/* ---------- Шрифт крупных заголовков публичных страниц ---------- */
body.public :is(h1, h2):not(footer *):not(header *):not(.pubnav *) {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1.12;
}
body.public .hero h2 { font-size: clamp(34px, 5vw, 62px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
body.public .pub-h2 { font-size: clamp(26px, 3.2vw, 40px); }
body.public .cr-figs b, body.public .srv-main-card .num { font-family: var(--font-display); }
body.public .eyebrow { letter-spacing: .22em; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .motion-js .reveal, .motion-js .m-item, .motion-js .m-fade,
  .motion-js .m-head .m-w > span, .motion-js .m-img, .motion-js .m-clip {
    opacity: 1 !important; transform: none !important; filter: none !important;
    clip-path: none !important; transition: none !important;
  }
  .nav-ink, .navdrop-menu, .navdrop-menu a { transition: none; }
}
@media print {
  .motion-js .reveal, .motion-js .m-item, .motion-js .m-fade,
  .motion-js .m-head .m-w > span, .motion-js .m-img, .motion-js .m-clip { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; }
}

/* =================================================================
   Анимация иконок: у каждой — своя, по смыслу. Срабатывает один раз при
   наведении на кнопку, ссылку или карточку с иконкой, на телефоне — при
   касании. В покое ничего не движется и не нагружает компьютер.
   Трактор едет, телефон звонит, листок вырастает, медаль качается,
   письмо улетает и возвращается, булавка падает на карту и т. д.
   ================================================================= */

@keyframes ico-hop { 0%,100%{transform:none}25%{transform:translateY(-4px) scaleY(1.06)}50%{transform:scale(1.1,.88)}72%{transform:translateY(-1.5px)} }
@keyframes ico-nod { 0%,100%{transform:none}30%{transform:rotate(-11deg)}60%{transform:rotate(8deg)}85%{transform:rotate(-3deg)} }
@keyframes ico-carry { 0%,100%{transform:none}30%{transform:translateY(-3px) rotate(-9deg)}60%{transform:translateY(-1px) rotate(7deg)}85%{transform:rotate(-2deg)} }
@keyframes ico-flip { 0%{transform:perspective(60px) rotateY(0)}100%{transform:perspective(60px) rotateY(360deg)} }
@keyframes ico-shout { 0%,100%{transform:none;filter:none}20%{transform:scale(1.16) rotate(-12deg);filter:drop-shadow(0 0 4px currentColor)}40%{transform:scale(1) rotate(-4deg)}60%{transform:scale(1.13) rotate(-12deg);filter:drop-shadow(0 0 5px currentColor)} }
@keyframes ico-swing { 0%,100%{transform:none}18%{transform:rotate(20deg)}38%{transform:rotate(-14deg)}58%{transform:rotate(8deg)}78%{transform:rotate(-3deg)} }
@keyframes ico-toss { 0%,100%{transform:none}35%{transform:translateY(-7px) rotate(-20deg)}62%{transform:translateY(-1px) rotate(10deg)}82%{transform:rotate(-3deg)} }
@keyframes ico-stamp { 0%,100%{transform:none}28%{transform:scale(.84)}55%{transform:scale(1.16) rotate(-7deg)}78%{transform:scale(.98) rotate(2deg)} }
@keyframes ico-ring { 0%,100%{transform:none}8%{transform:rotate(-17deg)}16%{transform:rotate(15deg)}24%{transform:rotate(-15deg)}32%{transform:rotate(13deg)}40%{transform:rotate(-11deg)}48%{transform:rotate(8deg)}58%{transform:rotate(-5deg)}70%{transform:rotate(2deg)} }
@keyframes ico-drop { 0%,100%{transform:none}30%{transform:translateY(-7px)}52%{transform:scale(1.14,.84)}72%{transform:translateY(-2px) scale(.97,1.04)} }
@keyframes ico-bars { 0%{transform:scaleY(.3)}60%{transform:scaleY(1.12)}80%{transform:scaleY(.96)}100%{transform:none} }
@keyframes ico-leaf { 0%{transform:scale(.35) rotate(-28deg);opacity:.4}60%{transform:scale(1.14) rotate(6deg);opacity:1}82%{transform:scale(.97) rotate(-2deg)}100%{transform:none} }
@keyframes ico-sprout { 0%{transform:scale(.7,.15)}55%{transform:scale(1.05,1.16)}78%{transform:scale(1,.95)}100%{transform:none} }
@keyframes ico-coin { 0%{transform:perspective(60px) rotateY(0)}45%{transform:perspective(60px) translateY(-4px) rotateY(200deg)}100%{transform:perspective(60px) rotateY(360deg)} }
@keyframes ico-spin { 0%{transform:none}70%{transform:rotate(390deg)}100%{transform:rotate(360deg)} }
@keyframes ico-send { 0%,100%{transform:none;opacity:1}40%{transform:translate(9px,-7px) rotate(-14deg);opacity:0}41%{transform:translate(-9px,5px);opacity:0} }
@keyframes ico-tick { 0%,100%{transform:none}14%{transform:rotate(13deg)}28%{transform:rotate(-11deg)}42%{transform:rotate(9deg)}56%{transform:rotate(-6deg)}72%{transform:rotate(3deg)} }
@keyframes ico-drive { 0%,100%{transform:none;opacity:1}15%{transform:translateX(-2px) rotate(3deg)}45%{transform:translate(10px,-1px) rotate(-2deg);opacity:0}46%{transform:translateX(-10px);opacity:0}70%{transform:translate(1px,-1px);opacity:1}85%{transform:translateX(-1px)} }
@keyframes ico-puff { 0%,100%{transform:none}30%{transform:scaleY(1.14)}52%{transform:scaleY(.92)}74%{transform:scaleY(1.05)} }
@keyframes ico-fall { 0%{transform:translateY(-9px) rotate(-16deg);opacity:.3}52%{transform:translateY(1px) rotate(4deg) scale(1.08,.9);opacity:1}74%{transform:translateY(-2px)}100%{transform:none} }
@keyframes ico-shine { 0%,100%{transform:none;filter:none}45%{transform:rotate(-10deg) scale(1.14);filter:drop-shadow(0 0 6px #ffd93d)} }
@keyframes ico-swirl { 0%,100%{transform:none}18%{transform:rotate(-15deg)}36%{transform:rotate(13deg)}54%{transform:rotate(-9deg)}72%{transform:rotate(5deg)} }
@keyframes ico-bob { 0%,100%{transform:none}25%{transform:translateY(-3px) rotate(-7deg)}50%{transform:rotate(5deg)}75%{transform:translateY(-2px) rotate(-2deg)} }
@keyframes ico-rise { 0%{transform:translateY(4px) scale(.9)}60%{transform:translateY(-2px) scale(1.07)}100%{transform:none} }
@keyframes ico-pop { 0%,100%{transform:none}38%{transform:scale(1.2) rotate(-8deg)}68%{transform:scale(.95) rotate(3deg)} }
@keyframes ico-blink { 0%,100%{transform:none}40%{transform:scaleY(.1)} }
@keyframes ico-sun { 0%{transform:none}100%{transform:rotate(180deg)} }
@keyframes ico-flag { 0%,100%{transform:none}25%{transform:skewY(-7deg) scale(1.06)}50%{transform:skewY(5deg)}75%{transform:skewY(-3deg)} }

@media (hover: hover) {
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg { animation: ico-pop .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-home"]) { animation: ico-hop .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-staff"]) { animation: ico-nod .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 90%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-team"]) { animation: ico-nod .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 90%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-services"]) { animation: ico-carry .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 10%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-news"]) { animation: ico-flip .8s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-ann"]) { animation: ico-shout .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 30% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-grants"]) { animation: ico-swing 1.1s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 0%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-train"]) { animation: ico-toss .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-cond"]) { animation: ico-stamp .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 60%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-contacts"]) { animation: ico-ring .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-phone"]) { animation: ico-ring .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-pin"]) { animation: ico-drop .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-pin"]) { animation: ico-drop .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-n-report"]) { animation: ico-bars .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-leaf"]) { animation: ico-leaf .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 20% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-sprout"]) { animation: ico-sprout .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-coins"]) { animation: ico-coin .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#cr-coins"]) { animation: ico-coin .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-compass"]) { animation: ico-spin 1.1s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-mail"]) { animation: ico-send .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-doc"]) { animation: ico-flip .8s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#i-clock"]) { animation: ico-tick .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#cr-tractor"]) { animation: ico-drive 1s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#cr-factory"]) { animation: ico-puff .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#cr-apple"]) { animation: ico-fall .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 0%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#cr-solar"]) { animation: ico-shine .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#cr-flask"]) { animation: ico-swirl .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#cr-cow"]) { animation: ico-bob .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) svg:has(use[href="#cr-bank"]) { animation: ico-rise .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) .sw-round svg:has(circle) { animation: ico-sun .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) .sw-round svg:not(:has(circle)) { animation: ico-swing 1.1s cubic-bezier(.3,.7,.3,1) both; transform-origin: 60% 20%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) .pw-toggle svg { animation: ico-blink .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) .a11y-btn svg { animation: ico-nod .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 90%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) .rate-flag svg, .sw-item svg { animation: ico-flag .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 0% 50%; }
  :is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):is(:hover, :focus-visible) .ai-fab-tg svg { animation: ico-send .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
}
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg { animation: ico-pop .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-home"]) { animation: ico-hop .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-staff"]) { animation: ico-nod .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 90%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-team"]) { animation: ico-nod .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 90%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-services"]) { animation: ico-carry .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 10%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-news"]) { animation: ico-flip .8s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-ann"]) { animation: ico-shout .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 30% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-grants"]) { animation: ico-swing 1.1s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 0%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-train"]) { animation: ico-toss .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-cond"]) { animation: ico-stamp .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 60%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-contacts"]) { animation: ico-ring .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-phone"]) { animation: ico-ring .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-pin"]) { animation: ico-drop .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-pin"]) { animation: ico-drop .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-n-report"]) { animation: ico-bars .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-leaf"]) { animation: ico-leaf .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 20% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-sprout"]) { animation: ico-sprout .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-coins"]) { animation: ico-coin .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#cr-coins"]) { animation: ico-coin .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-compass"]) { animation: ico-spin 1.1s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-mail"]) { animation: ico-send .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-doc"]) { animation: ico-flip .8s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#i-clock"]) { animation: ico-tick .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#cr-tractor"]) { animation: ico-drive 1s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#cr-factory"]) { animation: ico-puff .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#cr-apple"]) { animation: ico-fall .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 0%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#cr-solar"]) { animation: ico-shine .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#cr-flask"]) { animation: ico-swirl .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#cr-cow"]) { animation: ico-bob .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active svg:has(use[href="#cr-bank"]) { animation: ico-rise .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 100%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active .sw-round svg:has(circle) { animation: ico-sun .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active .sw-round svg:not(:has(circle)) { animation: ico-swing 1.1s cubic-bezier(.3,.7,.3,1) both; transform-origin: 60% 20%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active .pw-toggle svg { animation: ico-blink .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active .a11y-btn svg { animation: ico-nod .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 90%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active .rate-flag svg, .sw-item svg { animation: ico-flag .75s cubic-bezier(.3,.7,.3,1) both; transform-origin: 0% 50%; }
:is(a, button, summary, label, [role=button], .pub-card, .pub-step, .cr-tile, .srv-main-card, .staff-card, .news-card, .ci, .ins-doc, .map-info p, .cr-step, .rate-card, .ap-recipient):active .ai-fab-tg svg { animation: ico-send .9s cubic-bezier(.3,.7,.3,1) both; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: reduce) { :is(a, button, summary, label, [role=button], div, span, p, article) svg { animation: none !important; } }

/* Контраст по замечаниям PageSpeed (WCAG: мелкий текст — не меньше 4,5:1).
   Тот же бирюзовый и зелёный, только темнее на светлом фоне и светлее на тёмном. */
.rate-diff.up { color: #16703c; }                                        /* было 4,4:1 — стало 6,2:1 */
html:not([data-theme="dark"]) footer .footer-map .map-info a,
html:not([data-theme="dark"]) footer .footer-map .map-link { color: #006b6a; }   /* было 4,3:1 — стало 5,7:1 */
.hero-cert-txt > span { color: #4fd6d5; }                                /* на тёмной шапке: было 3,5:1 — стало 6,2:1 */
[data-theme="dark"] .rate-diff.up { color: #5fd394; }                    /* на тёмной карточке */
[data-theme="dark"] .rate-diff.down { color: #ff8a7a; }
html:not([data-theme="dark"]) footer .footer-map .map-link:hover { color: #fff; }   /* при наведении — белый на бирюзовом */

/* ===== Приглашение в новости на главной ===== */
.news-cta {
  display: flex; align-items: center; gap: 20px;
  margin: 44px 0 6px; padding: 22px 26px;
  background: var(--accent-tint); border: 1px solid var(--line);
  border-radius: 16px;
}
.news-cta-ico {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--accent-deep);
}
.news-cta-ico svg { width: 26px; height: 26px; }
.news-cta-text { flex: 1; min-width: 0; }
.news-cta h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.news-cta p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.news-cta .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 620px) {
  .news-cta { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; }
  .news-cta .btn { width: 100%; text-align: center; }
}

/* Доработка по заключению лизинговой комиссии (documents.html, js/documents.js) */
.rework { text-align: left; margin: 18px 0; padding: 18px; border: 1px solid var(--line);
  border-left: 4px solid var(--danger); border-radius: 12px; background: var(--card); }
.rework .hint { text-align: left; margin: 6px 0; max-width: none; }
.rework h3 { margin: 0 0 8px; }
.rework h4 { margin: 16px 0 6px; }
.rework .rw-label { margin: 8px 0 2px; font-weight: 600; }
.rework .rw-conclusion { white-space: pre-line; margin: 0 0 8px; color: var(--danger); font-weight: 600; }
.rework .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; }
.rework .fld.full { grid-column: 1 / -1; }
.rework input, .rework textarea, .rework select { width: 100%; box-sizing: border-box; }
/* заключение комиссии на странице Фонда (js/workflow.js) */
.wf-conclusion { white-space: pre-line; }

/* Районы (туманы) на карте Фонда: тонкие границы поверх раскрашенных областей.
   Заливка почти прозрачная — область под ней видна, а наведение ловит район. */
.uz-district {
  fill: rgba(255, 255, 255, 0.001);
  stroke: #0a6b5f; stroke-opacity: .85; stroke-width: .9;
  cursor: pointer;
  transition: fill .15s ease;
}
.uz-district:hover { fill: rgba(255, 255, 255, .35); stroke-opacity: 1; stroke-width: 1.2; }
.uz-district.uz-city-found { fill: rgba(255, 255, 255, .45); stroke: var(--accent); stroke-opacity: 1; stroke-width: 2; }
[data-theme="dark"] .uz-district { stroke: #0a5a50; }
.uz-map-dragging .uz-district { cursor: grabbing; }

/* Лист оценки проекта грантовой комиссией (js/grants-admin.js) */
.gs-form { margin-top: 10px; display: grid; gap: 8px; }
.gs-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; }
.gs-row select { width: 100%; }
@media (max-width: 620px) { .gs-row { grid-template-columns: 1fr; } }

/* «Входящие» как почтовое приложение (js/workflow.js, 18.11.2026) */
.mx-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.mx-tool { background: none; border: 1px solid transparent; border-radius: 18px; padding: 6px 12px;
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.mx-tool:hover, .mx-tool:focus-visible { background: var(--accent-tint); border-color: var(--line); }
.mx-range { margin-left: auto; color: var(--muted); font-size: 13px; }
.mx-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.mx-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 18px 9px;
  font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.mx-tab:hover { background: var(--accent-tint); }
.mx-tab.on { color: var(--accent-deep); border-bottom-color: var(--accent); }
.mx-new { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 12px;
  background: var(--accent); color: #fff; font-weight: 600; }
.mx-list { list-style: none; margin: 0; padding: 0; }
.mx-row + .mx-row { border-top: 1px solid var(--line); }
.mx-line { display: grid; grid-template-columns: 14px minmax(140px, 220px) 1fr auto; gap: 12px; align-items: center;
  width: 100%; padding: 10px 12px; background: none; border: 0; text-align: left; font: inherit;
  color: var(--muted); cursor: pointer; }
.mx-line:hover, .mx-line:focus-visible { background: var(--accent-tint); box-shadow: inset 0 -1px 0 var(--line); }
.mx-dot { width: 8px; height: 8px; border-radius: 50%; }
.mx-row.unread .mx-dot { background: var(--accent); }
.mx-from, .mx-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-row.unread .mx-from, .mx-row.unread .mx-subj, .mx-row.unread .mx-date { font-weight: 700; color: var(--text); }
.mx-subj { color: var(--text); }
.mx-sep, .mx-snip { color: var(--muted); }
.mx-date { font-size: 13px; white-space: nowrap; }
.mx-empty { padding: 18px 12px; }
.mx-reader { padding: 4px 4px 8px; }
.mx-title { margin: 10px 0 6px; font-size: 20px; }
.mx-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); margin-bottom: 14px; }
.mx-meta b { color: var(--text); }
.mx-body { margin: 0 0 10px; font-size: 16px; }
.mx-note { color: var(--muted); white-space: pre-wrap; }
.mx-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 6px 0 16px; }
.mx-facts dt { color: var(--muted); }
.mx-facts dd { margin: 0; font-weight: 600; }
@media (max-width: 700px) {
  .mx-line { grid-template-columns: 10px 1fr auto; }
  .mx-text { grid-column: 2 / 4; white-space: normal; }
}
