/* ============================================================
   Гидрогеология-2027 — стили сайта
   ============================================================ */
:root {
    --navy: #0b3d5c;
    --navy-2: #0f4f74;
    --deep: #072a40;
    --aqua: #1a9bb8;
    --aqua-soft: #e3f3f7;
    --sand: #f5f1ea;
    --ink: #1c2a33;
    --muted: #5d6e78;
    --line: #dfe6ea;
    --bg: #ffffff;
    --ok: #237a4b;
    --warn: #a86b00;
    --err: #b3261e;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(7, 42, 64, .06), 0 6px 24px rgba(7, 42, 64, .06);
    --serif: "PT Serif", Georgia, "Times New Roman", serif;
    --sans: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--bg);
    -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--aqua); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--deep); margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
code { background: var(--sand); padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.lead { font-size: 19px; color: var(--muted); }

/* ---------- Шапка ---------- */
.site-header, .admin-header {
    position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.logo-mark { width: 40px; height: 40px; color: var(--navy); flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text strong { font-family: var(--serif); font-size: 19px; }
.logo-text small { font-size: 12px; color: var(--muted); }
.main-nav { display: flex; gap: 4px; align-items: center; }
.main-nav a {
    text-decoration: none; color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 15px;
}
.main-nav a:hover { background: var(--aqua-soft); color: var(--navy); }
.main-nav a.active { color: var(--navy); background: var(--aqua-soft); }
.main-nav a.nav-cta { background: var(--navy); color: #fff; margin-left: 8px; }
.main-nav a.nav-cta:hover, .main-nav a.nav-cta.active { background: var(--aqua); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px;
    border-radius: 8px; border: 1px solid transparent; font: 600 15px/1.2 var(--sans);
    text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--aqua); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-ghost-dark { border-color: var(--line); color: var(--navy); background: #fff; }
.btn-ghost-dark:hover { border-color: var(--navy); color: var(--navy); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--aqua-soft); color: var(--navy); }
.btn-danger { background: #fff; color: var(--err); border-color: #f0c9c6; }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-link { background: none; border: 0; color: var(--navy-2); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.btn-link.danger { color: var(--err); }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; transition: margin .15s; }
.link-arrow:hover::after { margin-left: 4px; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden; color: var(--deep);
    background: linear-gradient(180deg, #e4edf6 0%, #f3f7fb 100%);
    border-bottom: 1px solid var(--line);
}
.hero-art { position: absolute; right: 0; bottom: 0; width: min(62%, 900px); height: 100%; pointer-events: none; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero-art .g1 { stroke: #c9d8e6; stroke-width: .5; }
.hero-art .g2 { stroke: #b7c9da; stroke-width: .8; }
.hero-art .aq path { stroke: #9fb6ca; stroke-width: 1; }
.hero-art .surface { stroke: #8aa3b9; stroke-width: 1.2; }
.hero-art .swl { stroke: #6f93b1; stroke-width: 1; stroke-dasharray: 6 6; }
.hero-art .cone { fill: none; stroke: var(--aqua); stroke-width: 2.5; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.4s .3s ease-out forwards; }
.hero-art .well { fill: #f3f7fb; stroke: #6f8ba3; stroke-width: 1.2; }
.hero-art .well.main { stroke: var(--navy); stroke-width: 1.6; }
.hero-art .lvl { stroke: var(--aqua); stroke-width: 2; }
.hero-art .flow { stroke: var(--aqua); stroke-width: 2; stroke-dasharray: 4 5; animation: up 1.2s linear infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes up { to { stroke-dashoffset: 18; } }
@media (prefers-reduced-motion: reduce) { .hero-art .cone { animation: none; stroke-dashoffset: 0; } .hero-art .flow { animation: none; } }
.hero-inner { position: relative; padding: 72px 24px 88px; max-width: 1200px; }
.hero-kind { font-size: clamp(16px, 1.8vw, 20px); color: var(--navy-2); margin-bottom: 10px; max-width: 620px; }
.hero-title {
    font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    font-size: clamp(34px, 6vw, 68px); line-height: 1.05; color: var(--navy); margin: 0 0 18px; max-width: 760px;
}
.hero-tagline { font-family: var(--serif); font-size: clamp(18px, 2.2vw, 24px); color: var(--ink); max-width: 620px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 30px 0; font-size: 18px; font-weight: 600; max-width: 700px; }
.meta-label { display: block; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 16px 0 0; color: var(--navy-2); font-weight: 500; max-width: 560px; }
.countdown { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 40px; }
.countdown > div:not(.cd-caption) {
    background: rgba(255, 255, 255, .75); border: 1px solid var(--line);
    border-radius: 10px; padding: 10px 16px; min-width: 84px; text-align: center; backdrop-filter: blur(4px);
}
.countdown b { display: block; font: 700 28px/1.1 var(--serif); color: var(--navy); }
.countdown span { font-size: 12px; color: var(--muted); }
.cd-caption { color: var(--muted); font-size: 14px; padding: 0 0 8px 6px; }

/* ---------- Секции ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 40px 0 80px; }
.section-alt { background: var(--sand); }
.section-title { margin-bottom: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.section-head .section-title { margin: 0; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--aqua-soft); border-radius: var(--radius); padding: 24px; }
.stat b { display: block; font: 700 34px/1.1 var(--serif); color: var(--navy); }
.stat span { color: var(--muted); font-size: 14px; }

.cards { display: grid; gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.topic h3 { font-size: 17px; margin-bottom: 8px; }
.topic p { color: var(--muted); font-size: 14px; margin: 0; }
.topic-num { display: inline-block; font: 700 13px var(--sans); color: var(--aqua); margin-bottom: 12px; letter-spacing: .05em; }
.news-card { text-decoration: none; color: inherit; display: block; }
.news-card:hover { transform: translateY(-3px); color: inherit; }
.news-card time { font-size: 13px; color: var(--aqua); font-weight: 600; }
.news-card h3 { margin: 8px 0; }
.news-card p { color: var(--muted); font-size: 15px; margin: 0; }

/* Хронология */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--line); }
.timeline li { position: relative; padding: 32px 16px 0 0; }
.timeline li::before {
    content: ""; position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; border: 3px solid var(--aqua);
}
.timeline li.past::before { background: var(--aqua); }
.timeline li.past { opacity: .6; }
.timeline time { display: block; font: 700 18px var(--serif); color: var(--navy); }
.timeline span { color: var(--muted); font-size: 15px; }

/* CTA */
.cta { background: linear-gradient(135deg, var(--navy) 0%, #12668f 100%); color: #fff; padding: 64px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta h2 { color: #fff; margin-bottom: 8px; }
.cta p { color: #d7eef5; margin: 0; max-width: 640px; }
.badge { background: rgba(255, 255, 255, .15); padding: 10px 18px; border-radius: 8px; }

/* ---------- Внутренние страницы ---------- */
.page-head { background: var(--sand); padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 10px; }
.page-head .lead { margin: 0; }
.back { display: inline-block; margin-bottom: 16px; text-decoration: none; font-size: 14px; }
.news-date { display: block; color: var(--aqua); font-weight: 600; font-size: 14px; margin-bottom: 8px; }

.prose { font-size: 17px; }
.prose h2 { margin-top: 48px; padding-top: 8px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose blockquote { margin: 1.4em 0; padding: 4px 20px; border-left: 3px solid var(--aqua); color: var(--muted); }
.prose img { border-radius: var(--radius); }

.info-layout { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 96px; }
.toc nav { display: flex; flex-direction: column; border-left: 2px solid var(--line); }
.toc a { padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: 15px; }
.toc a:hover, .toc a.active { color: var(--navy); border-left-color: var(--aqua); }
.info-content { max-width: 820px; }
.sections-list li { margin-bottom: 10px; }
.committee { list-style: none; padding: 0 !important; }
.committee li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.info-cta { margin-top: 40px; }

.news-list { display: flex; flex-direction: column; }
.news-row { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.news-row:first-child { padding-top: 0; }
.news-row time { color: var(--aqua); font-weight: 600; font-size: 14px; padding-top: 4px; }
.news-row h2 { font-size: 22px; margin-bottom: 8px; }
.news-row h2 a { text-decoration: none; color: var(--deep); }
.news-row h2 a:hover { color: var(--aqua); }
.news-row p { color: var(--muted); margin: 0; }
.pager { display: flex; gap: 6px; margin-top: 32px; }
.pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pager a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Таблицы ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 1em; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; background: #fafcfd; }
.table tr.past td { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap .table { margin: 0; }

/* ---------- Формы ---------- */
.form fieldset { border: 0; padding: 0; margin: 0 0 40px; }
.form legend { display: flex; align-items: center; gap: 12px; font: 700 22px var(--serif); color: var(--deep); margin-bottom: 20px; padding: 0; }
.form legend span {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--navy); color: #fff; font: 600 15px var(--sans);
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; font-weight: 500; font-size: 14px; color: var(--ink); }
.field input, .field select, .field textarea, .filters input, .filters select {
    font: 400 16px/1.4 var(--sans); padding: 11px 14px; border: 1px solid #c9d4da; border-radius: 8px;
    background: #fff; color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; }
.field textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus {
    outline: none; border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(26, 155, 184, .18);
}
.is-invalid, .field .is-invalid { border-color: var(--err) !important; }
.field-error { color: var(--err); font-size: 13px; font-weight: 500; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 20px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; font-size: 15px; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.check.is-invalid { color: var(--err); }
.check-pad { padding-top: 34px; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.radio-card { position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card span {
    display: block; padding: 14px 16px 14px 44px; border: 1px solid #c9d4da; border-radius: 8px; font-size: 15px;
    position: relative; transition: .15s; height: 100%;
}
.radio-card span::before {
    content: ""; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; border-radius: 50%; border: 2px solid #9fb0b9; background: #fff;
}
.radio-card input:checked + span { border-color: var(--navy); background: var(--aqua-soft); }
.radio-card input:checked + span::before { border-color: var(--navy); box-shadow: inset 0 0 0 3px #fff; background: var(--navy); }
.radio-card input:focus-visible + span { box-shadow: 0 0 0 3px rgba(26, 155, 184, .3); }
.file-drop {
    position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 96px; padding: 20px; border: 2px dashed #b9c8d0; border-radius: 10px; background: #fafcfd;
    cursor: pointer; transition: .15s; color: var(--muted); font-weight: 400;
}
.file-drop:hover, .file-drop.drag { border-color: var(--aqua); background: var(--aqua-soft); }
.file-drop.has-file { border-style: solid; border-color: var(--ok); color: var(--ok); font-weight: 600; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#report-block[hidden] { display: none; }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 15px; border: 1px solid; }
.alert-ok { background: #ecf7f0; border-color: #bfe3cc; color: var(--ok); }
.alert-error { background: #fdf0ef; border-color: #f2c7c3; color: var(--err); }
.alert-warn { background: #fff7e6; border-color: #f4dca8; color: var(--warn); }
.success-box { background: #ecf7f0; border: 1px solid #bfe3cc; border-radius: var(--radius); padding: 40px; }
.success-box h2 { color: var(--ok); }
.success-box .code { font-family: var(--serif); font-size: 24px; color: var(--deep); letter-spacing: .02em; }
.success-box .btn { margin: 8px 8px 0 0; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--deep); color: #b8cdd8; font-size: 14px; padding: 56px 0 0; }
.site-footer a { color: #e3f3f7; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-title { color: #fff; font-weight: 600; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; padding-bottom: 24px; font-size: 13px; color: #87a3b2; }

/* ---------- Админка ---------- */
body.admin { background: #f3f6f8; }
.admin-main { padding: 32px 0 64px; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-title h1 { font-size: 28px; margin: 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.panel h2 { font-size: 20px; }
.panel h3 { font-size: 16px; margin-top: 16px; }
.admin-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0 0 24px; font-size: 15px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.abstract { background: #fafcfd; border: 1px solid var(--line); border-radius: 8px; padding: 16px; font-size: 15px; }
.login-box { max-width: 400px; margin: 60px auto; background: #fff; padding: 36px; border-radius: var(--radius); border: 1px solid var(--line); }
.login-box h1 { font-size: 24px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input { flex: 1 1 280px; width: auto; }
.filters select { flex: 0 1 260px; width: auto; }
.status-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.pill b { margin-left: 4px; color: var(--muted); }
.pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill.active b { color: #cfe8f0; }
.admin-table td { font-size: 14px; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #f7fbfc; }
.actions { display: flex; gap: 14px; align-items: center; }
.actions form.inline { display: inline; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-new { background: #e3f0fb; color: #1d5fa0; }
.st-review { background: #fff4dc; color: #8a5a00; }
.st-revision { background: #fde9dc; color: #a2470f; }
.st-accepted { background: #e2f4e8; color: #1f6d41; }
.st-rejected { background: #eceff1; color: #5b6870; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
    .cards-4 { grid-template-columns: repeat(2, 1fr); }
    .timeline { grid-auto-flow: row; grid-template-columns: 1fr; gap: 0; }
    .timeline::before { left: 9px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
    .timeline li { padding: 0 0 24px 40px; }
    .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
        background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px 20px; display: none;
    }
    .main-nav.open { display: flex; }
    .main-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .two-col, .info-layout, .footer-grid, .cards-3 { grid-template-columns: 1fr; gap: 32px; }
    .toc { position: static; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .check-pad { padding-top: 0; }
    .news-row { grid-template-columns: 1fr; gap: 6px; }
    .section { padding: 56px 0; }
    .dl { grid-template-columns: 1fr; gap: 2px; }
    .dl dd { margin-bottom: 10px; }
}
@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .cards-4, .stats { grid-template-columns: 1fr; }
    .hero-inner { padding: 56px 16px 72px; }
    .logo-text small { display: none; }
    .success-box { padding: 24px; }
}
@media print {
    .site-header, .site-footer, .toc, .hero-actions, .countdown, .nav-toggle { display: none !important; }
}
@media (max-width: 860px) {
    .admin .main-nav { position: static; display: flex; flex-direction: row; flex-wrap: wrap; padding: 0; border: 0; background: none; }
    .admin .header-inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
}
.prose-sm p:last-child{margin-bottom:0}

/* ---------- Админка: редактор строк ---------- */
.field-short { max-width: 240px; }
.rows-editor { display: flex; flex-direction: column; gap: 8px; font-weight: 400; }
.rows-head, .rows-row { display: grid; gap: 8px; align-items: start; }
.rows-head span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rows-row input, .rows-row textarea {
    font: 400 15px/1.4 var(--sans); padding: 9px 12px; border: 1px solid #c9d4da; border-radius: 8px; width: 100%;
}
.rows-row input:focus, .rows-row textarea:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(26,155,184,.18); }
.row-del { height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; }
.row-del:hover { color: var(--err); border-color: #f0c9c6; }
.rows-editor [data-row-add] { align-self: flex-start; }
.admin-sub { font-size: 13px; color: var(--muted); margin-right: 6px; }
@media (max-width: 860px) {
    .rows-head { display: none; }
    .rows-row { grid-template-columns: 1fr 36px !important; }
    .rows-row > :not(.row-del):not([type=hidden]) { grid-column: 1; }
    .rows-row .row-del { grid-column: 2; grid-row: 1; }
}
.narrow-panel { max-width: 560px; }
.img-field { display: flex; gap: 16px; align-items: flex-start; font-weight: 400; flex-wrap: wrap; }
.img-field img { max-width: 220px; max-height: 140px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; }
.img-field > div { display: flex; flex-direction: column; gap: 8px; }
.img-empty { display: grid; place-items: center; width: 160px; height: 90px; border: 1px dashed #c9d4da; border-radius: 8px; color: var(--muted); font-size: 13px; }
.row-img { display: flex; flex-direction: column; gap: 6px; }
.row-img img { max-height: 48px; max-width: 140px; object-fit: contain; align-self: flex-start; }
.row-img input[type=file] { font-size: 13px; padding: 6px; }


/* ---------- v3: меню с подпунктами ---------- */
.logo-img { height: 44px; width: auto; max-width: 120px; object-fit: contain; }
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; gap: 6px; }
.caret { width: 10px; height: 6px; opacity: .6; transition: transform .15s; }
.sub {
    position: absolute; top: 100%; left: 0; min-width: 240px; padding: 8px; margin-top: 4px;
    background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(4px);
    transition: opacity .15s, transform .15s, visibility .15s; z-index: 60;
}
.sub::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.sub a { padding: 9px 12px; font-weight: 400; white-space: nowrap; }
.nav-item:hover .sub, .nav-item:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.nav-item:hover .caret { transform: rotate(180deg); }

/* ---------- v3: блоки главной ---------- */
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--aqua); font-weight: 600; margin-bottom: 10px; }
.section-lead { color: var(--muted); font-size: 17px; margin: -16px 0 32px; }
.jubilee-inner { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
.jubilee-photos { display: flex; gap: 14px; }
.jubilee-photos img { height: 260px; width: auto; border-radius: 6px; filter: grayscale(1); box-shadow: var(--shadow); background: #fff; padding: 6px; }
.jubilee h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 4px; }
.jubilee-years { display: inline-block; background: #e3e7ea; padding: 3px 12px; border-radius: 4px; font-size: 15px; margin-bottom: 18px; }
.page-photos { justify-content: center; margin-bottom: 32px; }
.page-photos img { height: 320px; }
.directions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; counter-reset: d; }
.direction { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.direction .topic-num { font: 700 22px var(--serif); color: var(--aqua); margin: 0; }
.direction h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; margin: 2px 0 4px; }
.direction p { margin: 0; color: var(--muted); font-size: 15px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.format-card { border-top: 4px solid var(--aqua); }
.format-card h3 { font-size: 19px; }
.format-card p { color: var(--muted); margin: 0; }
.venue { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.partners-title { font-size: 20px; margin-bottom: 16px; }
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.partner {
    display: flex; flex-direction: column; gap: 10px; justify-content: center; min-height: 96px; padding: 16px;
    border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-size: 14px; background: #fff;
}
a.partner:hover { border-color: var(--aqua); color: var(--navy); }
.partner img { max-height: 56px; max-width: 100%; object-fit: contain; align-self: flex-start; }

@media (max-width: 1024px) {
    .jubilee-inner { grid-template-columns: 1fr; gap: 28px; }
    .hero-art { width: 100%; opacity: .45; }
}
@media (max-width: 860px) {
    .main-nav .nav-item { display: flex; flex-direction: column; }
    .main-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; margin: 0; min-width: 0; }
    .main-nav .sub a { padding: 6px 14px; font-size: 14px; color: var(--muted); }
    .caret { display: none; }
    .directions, .venue, .cards-2 { grid-template-columns: 1fr; gap: 0 32px; }
    .venue { gap: 32px; }
    .jubilee-photos img { height: 190px; }
    .page-photos img { height: 220px; }
    .main-nav { max-height: calc(100vh - 72px); overflow-y: auto; }
}
@media (max-width: 560px) {
    .jubilee-photos img { height: 150px; }
    .hero-title { letter-spacing: .02em; }
}
@media (min-width: 861px) and (max-width: 1180px) { .main-nav a { padding: 8px 9px; font-size: 14px; } .logo-text small { display: none; } }

/* ---------- v4: страницы разделов ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--navy-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-head .lead { max-width: 860px; }
.with-side { display: grid; grid-template-columns: 250px 1fr; gap: 56px; align-items: start; }
.side-nav { position: sticky; top: 96px; }
.side-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.side-nav nav { display: flex; flex-direction: column; border-left: 2px solid var(--line); }
.side-nav a { padding: 9px 0 9px 16px; margin-left: -2px; border-left: 3px solid transparent; text-decoration: none; color: var(--ink); font-size: 15px; }
.side-nav a:hover { color: var(--navy); background: linear-gradient(90deg, var(--aqua-soft), transparent); }
.side-nav a.active { color: var(--navy); font-weight: 600; border-left-color: var(--aqua); background: linear-gradient(90deg, var(--aqua-soft), transparent); }
.side-nav a.side-cta { margin-top: 10px; color: var(--aqua); font-weight: 600; }
.page-body { min-width: 0; max-width: 860px; }
.page-body.wide { max-width: none; }
.page-body > h2 { margin-top: 40px; }
.page-body > h2:first-child { margin-top: 0; }
.next-page {
    display: flex; flex-direction: column; gap: 2px; margin-top: 48px; padding: 18px 22px; border: 1px solid var(--line);
    border-radius: var(--radius); text-decoration: none; max-width: 420px; margin-left: auto; text-align: right;
}
.next-page span { font-size: 13px; color: var(--muted); }
.next-page b { color: var(--navy); font-size: 17px; }
.next-page:hover { border-color: var(--aqua); }
.section-more { margin: 24px 0 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 28px 0; }
.facts > div { background: var(--aqua-soft); border-radius: var(--radius); padding: 16px 18px; }
.facts span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.facts b { color: var(--deep); font-size: 16px; line-height: 1.4; }
.cards.cards-2, .cards.cards-3 { margin-bottom: 28px; }
.directions-1 { grid-template-columns: 1fr; margin-bottom: 24px; }

.next-deadline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; background: var(--sand); border-left: 4px solid var(--aqua); padding: 16px 20px; border-radius: 8px; margin: 24px 0; }
.next-deadline span { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.next-deadline b { font: 700 20px var(--serif); color: var(--navy); }
.next-deadline em { font-style: normal; }
.steps { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; }
.steps h3 { font-family: var(--sans); font-size: 18px; margin: 6px 0 4px; }
.steps p { margin: 0 0 6px; color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 0 0 24px; }
.check-list li { padding: 10px 0 10px 32px; border-bottom: 1px solid var(--line); position: relative; }
.check-list li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 12px; height: 7px; border-left: 2px solid var(--aqua); border-bottom: 2px solid var(--aqua); transform: rotate(-45deg); }
.vtimeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.vtimeline li { position: relative; padding: 0 0 26px 28px; }
.vtimeline li::before { content: ""; position: absolute; left: -10px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--aqua); }
.vtimeline li.past { opacity: .55; }
.vtimeline li.past::before { background: var(--aqua); }
.vtimeline time { display: block; font: 700 19px var(--serif); color: var(--navy); }
.committee-title { margin-top: 36px; margin-bottom: 4px; }
.people { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.people li { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.people span { color: var(--muted); font-size: 14px; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 28px; }
.contact { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; }
.contact span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.contact b { color: var(--navy); word-break: break-word; }

/* страница юбиляра */
.jubilee-page .fig-right { float: right; width: min(42%, 340px); margin: 6px 0 16px 28px; }
.jubilee-page figure { margin: 0; }
.jubilee-page figure img { width: 100%; border-radius: 6px; box-shadow: var(--shadow); }
.jubilee-page .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; clear: both; }
.jubilee-page .gallery img { aspect-ratio: 4 / 3; object-fit: cover; }
.jubilee-page ol.pubs { font-size: 15px; }
.jubilee-page ol.pubs li { margin-bottom: 8px; }
.jubilee-page blockquote p { margin-bottom: .8em; }
.jubilee-page .source { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.jubilee-page h3 { clear: none; }

.footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: #b8cdd8; }

@media (max-width: 1024px) {
    .with-side { grid-template-columns: 1fr; gap: 24px; }
    .side-nav { position: static; }
    .side-nav nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; border-left: 0; border-bottom: 2px solid var(--line); gap: 4px; -webkit-overflow-scrolling: touch; }
    .side-nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; margin: 0 0 -2px; padding: 10px 12px; background: none !important; }
    .side-nav a.active { border-bottom-color: var(--aqua); }
    .side-nav a.side-cta { margin: 0 0 -2px; }
    .side-title { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .jubilee-page .fig-right { float: none; width: 100%; margin: 0 0 16px; }
    .jubilee-page .gallery { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .next-page { max-width: none; }
}

/* ---------- v4: админка — письма ---------- */
.notify-box { background: #f7fbfc; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.notify-box[hidden] { display: none; }
.mail-hist { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.mail-hist li { padding: 8px 0 8px 14px; border-bottom: 1px solid var(--line); position: relative; }
.mail-hist li::before { content: ""; position: absolute; left: 0; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.mail-hist li.fail::before { background: var(--err); }
.mail-hist span { color: var(--muted); margin-right: 6px; }
.mail-hist small { display: block; color: var(--err); }
.mailing-grid { grid-template-columns: 1fr 440px; }
.mailing-side { position: sticky; top: 90px; }
.aud-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.aud-groups fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.aud-groups legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.aud-groups .check { font-size: 14px; margin-bottom: 6px; }
.rcpt-count { font-size: 15px; color: var(--muted); }
.rcpt-count b { font: 700 36px var(--serif); color: var(--navy); margin-right: 6px; }
.mailing-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.mailing-actions .btn { width: 100%; }
.test-row { display: flex; gap: 8px; }
.test-row input { flex: 1; min-width: 0; font: 400 15px var(--sans); padding: 10px 12px; border: 1px solid #c9d4da; border-radius: 8px; }
.test-row .btn { width: auto; }
.mail-preview { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 8px; background: #eef3f7; }
.progress-bar { height: 12px; background: #e6edf1; border-radius: 6px; overflow: hidden; margin-bottom: 14px; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--aqua), var(--navy-2)); transition: width .4s; }
.progress-errors { font-size: 13px; color: var(--err); padding-left: 18px; max-height: 160px; overflow-y: auto; }
.mailing-actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mailing-actions-row form { margin: 0; }
.err-text { color: var(--err); }
.ms-draft { background: #eceff1; color: #5b6870; }
.ms-sending { background: #fff4dc; color: #8a5a00; }
.ms-paused { background: #fde9dc; color: #a2470f; }
.ms-done { background: #e2f4e8; color: #1f6d41; }
.rstat { font-size: 13px; font-weight: 600; }
.rs-sent { color: var(--ok); } .rs-failed { color: var(--err); } .rs-pending { color: var(--warn); } .rs-skipped { color: var(--muted); }
@media (max-width: 1024px) { .mailing-grid { grid-template-columns: 1fr; } .mailing-side { position: static; } .aud-groups { grid-template-columns: 1fr; } }

/* ---------- v5: визуальный редактор ---------- */
.field .jodit-container { font-weight: 400; border-radius: 8px; }
.field .jodit-container:not(.jodit_inline) { border-color: #c9d4da; }
.jodit-wysiwyg { font: 16px/1.6 var(--sans); color: var(--ink); padding: 14px 18px !important; }
.jodit-wysiwyg h2 { font: 700 22px/1.25 var(--serif); color: var(--deep); margin: 18px 0 8px; }
.jodit-wysiwyg h3 { font: 700 18px/1.3 var(--serif); color: var(--deep); margin: 16px 0 6px; }
.jodit-wysiwyg p { margin: 0 0 10px; }
.jodit-wysiwyg img { max-width: 100%; height: auto; }
.jodit-wysiwyg .fig-right { float: right; width: 40%; margin: 0 0 12px 18px; }
.jodit-wysiwyg .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.jodit-wysiwyg blockquote { border-left: 3px solid var(--aqua); margin: 12px 0; padding: 4px 16px; color: var(--muted); }
.jodit-wysiwyg table td, .jodit-wysiwyg table th { border: 1px solid var(--line); padding: 6px 10px; }
.prose table:not(.table) { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 15px; }
.prose table:not(.table) td, .prose table:not(.table) th { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose table:not(.table) tr:first-child td { background: #fafcfd; font-weight: 600; }
