/* ===== НКА-Дидойцы — общие стили ===== */

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --green: #1a6b3a;
  --green-d: #0f4a25;
  --gold: #d4a636;
  --gold-s: #e8c870;
  --paper: #f7f2e6;
  --ink: #1a1a1a;
  --muted: #5a5247;
  --line: #d6cdb8;
  --shadow: 0 4px 16px rgba(20, 14, 4, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PT Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* === Шапка === */
.header {
  background: var(--paper);
  border-bottom: 3px solid var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.flag-logo {
  display: block;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s;
  height: 48px;
}
.flag-logo:hover { transform: scale(1.04); }
.flag-logo img {
  height: 48px;
  width: auto;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  display: block;
}

.brand-banner {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.brand-banner img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 74px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
@media (max-width: 900px) {
  .brand-banner img { max-height: 52px; }
}

.brand-text {
  flex: 1;
  min-width: 0;
}
.brand-text .top-line {
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.1;
  margin-bottom: 2px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.brand-text .title,
.brand-text .brand-title {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Блоки входа/регистрации и RU/EN — стилизованный мини-флаг */
.header-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.85) 33.3%,
    rgba(255,255,255,0.85) 33.3%, rgba(255,255,255,0.85) 66.6%,
    rgba(26,107,58,0.85) 66.6%, rgba(26,107,58,0.85) 100%);
  border: 1px solid rgba(0,0,0,0.4);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-right a {
  color: var(--gold) !important;
  text-decoration: none;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6), 0 0 4px rgba(0,0,0,0.4);
  transition: filter 0.15s;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.header-right a:hover {
  filter: brightness(1.3) drop-shadow(0 0 4px rgba(212,166,54,0.6));
}
.header-right a.active {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.header-right .sep {
  color: var(--gold) !important;
  opacity: 0.7;
  font-weight: 400;
  font-size: 14px;
}
.header-right.lang-switch { margin-left: 8px; }

/* === Карточки разделов: триколор Дидойского флага с гербом по центру === */
.columns .col,
.main-index .col {
  position: relative;
  overflow: hidden;
  padding-top: 88px;
  border: 1px solid var(--line);
  border-top: none;
  border-bottom: 4px solid var(--green);
  border-radius: 16px;
}
.columns .col::before,
.main-index .col::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44px;
  background: linear-gradient(90deg,
    var(--black) 0%, var(--black) 33.3%,
    var(--white) 33.3%, var(--white) 66.6%,
    var(--green) 66.6%, var(--green) 100%);
  border-bottom: 2px solid var(--gold);
}
.columns .col::after,
.main-index .col::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background-color: var(--white);
  background-image: url('emblem-dido.png');
  background-size: 50px 50px;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid var(--gold);
  box-shadow: 0 3px 10px rgba(0,0,0,0.28);
}
.columns .col-title,
.main-index .col-title { justify-content: center; text-align: center; margin-top: 4px; }
.columns .col-subtitle,
.main-index .col-subtitle { text-align: center; }
@media (max-width: 760px) {
  .columns .col, .main-index .col { padding-top: 80px; }
  .columns .col::before, .main-index .col::before { height: 38px; }
  .columns .col::after, .main-index .col::after { width: 52px; height: 52px; background-size: 44px 44px; top: 5px; }
}

/* === Шапка: МЕСТНАЯ / НКА «ДИДОЙЦЫ» === */
.brand-text .brand-top {
  font-size: 10px;
  letter-spacing: 3.5px;
  color: var(--green);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.25;
}
.brand-text .brand-title {
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 800;
  font-style: normal;
  color: var(--green);
  line-height: 1.15;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Компьютер: одна строка, по центру между флагом и входом */
@media (min-width: 761px) {
  .header-inner { justify-content: space-between; }
  .brand-text {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 0 18px;
  }
  .brand-text .brand-title {
    font-size: 27px;
    font-weight: 700;
    text-transform: uppercase;
  }
  .brand-text .brand-top {
    font-size: 26px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-weight: 700;
    font-family: Georgia, serif;
    color: var(--green);
    -webkit-text-stroke: 0.35px var(--green);
  }
  .brand-text .brand-title {
    -webkit-text-stroke: 0.35px var(--green);
  }
}

/* Узкий компьютер / планшет — уменьшаем всю надпись */
@media (min-width: 761px) and (max-width: 1100px) {
  .brand-text .brand-title { font-size: 21px; }
  .brand-text .brand-top { font-size: 20px; letter-spacing: 0.4px; }
}

/* Компьютер: НКА и «ДИДОЙЦЫ» в одну строку */
.brand-text .brand-nka { display: inline; }
a.brand-text { text-decoration: none; color: inherit; display: block; }
a.brand-text:hover .brand-title,
a.brand-text:hover .brand-top { filter: brightness(1.12); }

/* Телефон: три строки — МЕСТНАЯ / НКА / «ДИДОЙЦЫ», со смещением вправо */
@media (max-width: 760px) {
  .brand-text { text-align: left; }
  .brand-text .brand-top { font-size: 10px; letter-spacing: 3px; margin-left: 13px; }
  .brand-text .brand-title { font-size: 17px; }
  .brand-text .brand-nka {
    display: block;
    margin-left: 29px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--green);
    line-height: 1.35;
  }
  .header-right.lang-switch { margin-left: auto; padding: 6px 10px; font-size: 12px; }
  .header-right.lang-switch a { font-size: 12px; }
  .mobile-menu-toggle { margin-left: 6px; }
}

/* === Главное меню === */
.main-menu {
  background: var(--paper);
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 60px;
  z-index: 95;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.main-menu-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
}

.menu-item {
  position: relative;
  flex: 1 1 0;
  min-width: 90px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.menu-item > .label,
.menu-item > button.label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
  background: linear-gradient(
    90deg,
    var(--black) 0%, var(--black) 33%,
    var(--white) 33%, var(--white) 66%,
    var(--green) 66%, var(--green) 100%
  );
  position: relative;
  border: none;
  border-right: 1px solid rgba(0,0,0,0.2);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  border-radius: 0;
  font-family: inherit;
  transition: filter 0.2s;
  text-align: center;
  padding: 0 6px;
  margin: 0;
  overflow: hidden;
  text-shadow:
    -1px -1px 0 var(--black),
     1px -1px 0 var(--black),
    -1px  1px 0 var(--black),
     1px  1px 0 var(--black),
     0 0 4px rgba(0,0,0,0.8);
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  width: 100%;
}
.menu-item > a.label {
  cursor: pointer;
}
.menu-item:last-child > .label { border-right: none; }

.menu-item:hover > .label { filter: brightness(1.15) saturate(1.2); }
.menu-item.active > .label {
  box-shadow: inset 0 -3px 0 var(--gold), inset 0 3px 0 var(--gold);
}
.menu-item.open > .label { filter: brightness(1.15) saturate(1.2); }

/* Золотая флажка снизу под подменю */
.menu-item.has-sub::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--gold);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s;
}
.menu-item.has-sub.open::after { opacity: 1; }

/* Подменю dropdown — открывается только через .open (JS) */
.submenu {
  display: block;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 2px solid var(--green);
  border-top: 4px solid var(--gold);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  padding: 8px 0;
  z-index: 200;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.menu-item.has-sub.open .submenu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.submenu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: all 0.15s;
}
.submenu a:last-child { border-bottom: none; }
.submenu a::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}
.submenu a:hover {
  background: var(--green);
  color: var(--white);
  padding-left: 22px;
}
.submenu a:hover::before { background: var(--gold-s); }


/* --- Вложенный список видео в подменю «Медиа» --- */

/* === Контент === */
.page-hero {
  padding: 40px 24px 20px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.page-hero .eyebrow {
  color: var(--green);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.page-hero h2 {
  font-family: Georgia, serif;
  font-size: 38px;
  color: var(--black);
  margin-bottom: 8px;
}
.page-hero p { color: var(--muted); font-size: 15px; }

.content { max-width: 900px; margin: 0 auto; padding: 20px 24px 60px; }
.intro-block {
  background: var(--white);
  border-left: 4px solid var(--green);
  padding: 18px 22px;
  border-radius: 8px;
  margin-bottom: 30px;
  font-size: 15px;
  color: var(--muted);
}
.content h3 {
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--black);
  margin-bottom: 14px;
  margin-top: 10px;
}
.items { list-style: none; }
.items li {
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}
.items li:hover { border-color: var(--green); transform: translateX(2px); }
.items li::before {
  content: '→';
  color: var(--gold);
  font-weight: 700;
  font-size: 18px;
}

.coming {
  background: linear-gradient(135deg, var(--black) 0%, var(--green-d) 100%);
  color: var(--white);
  padding: 24px 28px;
  border-radius: 12px;
  margin-top: 30px;
  text-align: center;
  border: 1px solid var(--gold);
}
.coming .star { color: var(--gold); font-size: 24px; margin-bottom: 8px; }
.coming p { font-size: 14px; color: var(--gold-s); }

footer {
  margin-top: 40px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
footer .stripe {
  display: inline-block;
  width: 60px;
  height: 18px;
  background: linear-gradient(90deg, var(--black) 0% 33.3%, var(--white) 33.3% 66.6%, var(--green) 66.6% 100%);
  border-radius: 3px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
footer .legal-links {
  margin-top: 10px;
  font-size: 12px;
}
footer .legal-links a {
  color: var(--green);
  text-decoration: none;
  margin: 0 4px;
  font-weight: 500;
}
footer .legal-links a:hover {
  color: var(--gold);
  text-decoration: underline;
}
footer .legal-links .sep {
  color: var(--muted);
  margin: 0 4px;
}

/* Утилиты */
.owner-section { padding: 30px 24px 40px; max-width: 900px; margin: 0 auto; }
.owner-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  border: 1px solid var(--line);
}
.owner-photo {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-d) 100%);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.owner-photo .person-name {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: 1px;
  color: var(--gold-s);
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45);
}
.owner-info .role-green {
  background: linear-gradient(135deg, var(--black) 0%, var(--green-d) 100%);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 4px;
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  color: var(--white);
  text-align: center;
}
.owner-photo img {
  width: 100%; max-width: 240px; aspect-ratio: 1; object-fit: cover;
  border-radius: 12px; border: 4px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.owner-info { padding: 32px 28px; }
.owner-info .role {
  display: inline-block;
  background: linear-gradient(135deg, var(--black) 0%, var(--green-d) 100%);
  color: var(--gold-s);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  border: 1px solid var(--gold);
}
.owner-info h3 { font-family: Georgia, serif; font-size: 26px; color: var(--black); margin-bottom: 6px; }
.owner-info .name-full { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 20px; }
.owner-info .role-block {
  border-left: 3px solid var(--green);
  padding: 10px 0 10px 16px;
  margin: 14px 0;
}
.owner-info .role-block .label { font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.owner-info .role-block .value { font-size: 15px; color: var(--ink); font-weight: 600; }
.owner-info .contacts { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.owner-info .contacts a { color: var(--green-d); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.owner-info .contacts a:hover { color: var(--green); }
.owner-card + .owner-card { margin-top: 26px; }
.owner-photo.is-portrait img { aspect-ratio: 3 / 4; object-position: center 12%; }

/* ===== Голос старших / цитата ===== */
/* карточки цитат: флаг-триколор + герб по центру */
.quote-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: none;
  border-bottom: 4px solid var(--green);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 84px 26px 24px;
  margin-bottom: 16px;
  text-align: center;
}
.quote-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44px;
  background: linear-gradient(90deg,
    var(--black) 0%, var(--black) 33.3%,
    var(--white) 33.3%, var(--white) 66.6%,
    var(--green) 66.6%, var(--green) 100%);
  border-bottom: 2px solid var(--gold);
}
.quote-card::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background-color: var(--white);
  background-image: url('emblem-dido.png');
  background-size: 50px 50px;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid var(--gold);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.quote-card-slogan { margin-bottom: 26px; }
.quote-card .citation-author {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 16px;
  color: var(--green-d);
  margin-top: 14px;
}
.quote-card .citation-text {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
}
.quote-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 34px;
}
.quote-block .stripe-flag { height: 12px; background: linear-gradient(90deg, #000 0 33.3%, #fff 33.3% 66.6%, var(--green) 66.6% 100%); }
.quote-title {
  font-family: Georgia, serif;
  font-size: 20px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 22px 26px 0;
}
.quote-text {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.35;
  color: var(--green-d);
  padding: 0;
  text-align: center;
}
.owner-info .presidium-list {
  list-style: none;
  margin: 8px 0 0;
  padding-left: 0;
}
.presidium-card { display: block; }
.presidium-card .stripe-flag { height: 12px; background: linear-gradient(90deg, #000 0 33.3%, #fff 33.3% 66.6%, var(--green) 66.6% 100%); }
.presidium-title {
  font-family: Georgia, serif;
  font-size: 20px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 20px 26px 4px;
}
.presidium-card .presidium-list {
  list-style: none;
  margin: 0;
  padding: 10px 26px 24px;
  columns: 2;
  column-gap: 26px;
}
.presidium-list li { font-size: 14px; line-height: 1.45; color: var(--ink); margin-bottom: 5px; break-inside: avoid; }
.author-line { margin: 26px 0 12px; font-size: 15px; color: var(--muted); }
.citation {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.citation-text { font-family: Georgia, serif; font-size: 16px; line-height: 1.55; color: var(--ink); }
.citation-author { margin-top: 10px; font-size: 13px; color: var(--gold); }
.quote-authors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  justify-content: center;
  padding: 16px 26px 24px;
}
.quote-authors span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink);
  background: #f3efe3;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 5px 12px;
}
.content .quote-lead {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  color: var(--green-d);
  font-size: 18px;
}
.map-figure { margin: 26px 0 0; text-align: center; }
.map-figure img {
  max-width: 100%;
  border-radius: 14px;
  border: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}
.map-figure figcaption {
  margin-top: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
}

/* ===== Глаз-переключатель пароля ===== */
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  width: 100%;
  padding-right: 44px !important;
}
.toggle-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.toggle-eye:hover {
  background: var(--paper);
  color: var(--green-d);
  border-color: var(--green-d);
}
.toggle-eye:active {
  transform: translateY(-50%) scale(0.95);
}
.toggle-eye svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toggle-eye .eye-off { display: none; }
.toggle-eye.showing .eye-on { display: none; }
.toggle-eye.showing .eye-off { display: block; }
.toggle-eye.showing {
  color: var(--green);
  border-color: var(--green);
}

/* =================================================================
   АДАПТИВНАЯ МОБИЛЬНАЯ ВЕРСИЯ
   ================================================================= */

/* Планшет ≤900px: колонки в одну, меню в скролл */
@media (max-width: 900px) {
  .columns { grid-template-columns: 1fr !important; gap: 18px; }
  .menu-item { flex: 0 0 auto; min-width: 110px; }
  .main-menu-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .main-menu-inner::-webkit-scrollbar { display: none; }
  .brand-text .title,
  .brand-text .brand-title { font-size: 18px; }
  .brand-text .top-line { font-size: 9px; letter-spacing: 1px; }
}

/* Мобильный ≤700px */
@media (max-width: 700px) {
  body { font-size: 15px; }

  /* Шапка — компактнее */
  .header { position: sticky; top: 0; }
  .header-inner {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .flag-logo { height: 36px; }
  .flag-logo img { height: 36px; }
  .brand-text .title,
  .brand-text .brand-title { font-size: 15px; }
  .brand-text .top-line { font-size: 8px; letter-spacing: 1px; }

  .header-right {
    margin-left: 0;
    padding: 3px 6px;
    font-size: 10px;
    gap: 4px;
    border-radius: 3px;
  }
  .header-right a { font-size: 10px; letter-spacing: 0; }
  .header-right .sep { font-size: 11px; }
  .header-right.lang-switch { margin-left: 4px; }

  /* === Мобильное меню: горизонтальная полоса со скроллом === */
  .main-menu {
    top: 60px;
    padding: 0;
  }
  .main-menu-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .main-menu-inner::-webkit-scrollbar { display: none; }
  .menu-item { flex: 0 0 auto; min-width: 110px; }
  .menu-item > .label,
  .menu-item > button.label {
    font-size: 11px;
    height: 38px;
    letter-spacing: 0;
    padding: 0 4px;
  }

  /* Контент */
  .hero-index { padding: 30px 16px 20px; }
  .hero-index h2 { font-size: 22px; line-height: 1.2; }
  .hero-index p { font-size: 14px; }
  .page-hero { padding: 28px 16px 16px; }
  .page-hero h2 { font-size: 26px; }
  .page-hero p { font-size: 14px; }
  .page-hero .eyebrow { font-size: 11px; letter-spacing: 1.5px; }
  .content { padding: 16px 16px 40px; }
  .content h3 { font-size: 20px; }
  .items li { font-size: 14px; padding: 12px 14px; }

  /* Колонки на главной */
  .main-index { padding: 30px 16px 50px; }
  .col { padding: 20px 18px; }
  .col-title { font-size: 19px; gap: 8px; }
  .col-title .num { width: 28px; height: 28px; font-size: 13px; }
  .col-subtitle { font-size: 11px; margin-bottom: 18px; padding-bottom: 12px; }

  /* Кто мы — фичи в 2 колонки */
  .about-index .features { grid-template-columns: 1fr 1fr; gap: 14px; }
  .about-index .feature { padding: 16px 14px; }
  .about-index .feature .icon { font-size: 28px; }
  .about-index .feature h4 { font-size: 15px; }
  .about-index .feature p { font-size: 12px; }
  .about-index > h3,
  .about-index .intro-block { font-size: 14px; }

  /* Owner card — одна колонка */
  .owner-card { grid-template-columns: 1fr; }
  .presidium-card .presidium-list { columns: 1; }
  .quote-card { padding: 76px 18px 20px; }
  .quote-card::before { height: 38px; }
  .quote-card::after { width: 52px; height: 52px; background-size: 44px 44px; top: 5px; }
  .quote-card .citation-text { font-size: 17px; }
  .quote-card .citation-author { font-size: 15px; }
  .owner-photo { padding: 16px; }
  .owner-info { padding: 24px 20px; }
  .owner-photo .person-name { font-size: 14px; }
  .owner-info .role-green { font-size: 15px; padding: 12px 14px; }
  .owner-info h3 { font-size: 22px; }

  /* Формы */
  .auth-page { padding: 24px 16px; }
  .auth-card { padding: 24px 18px; max-width: 100%; }
  .auth-card h1 { font-size: 22px; }
  .auth-form input { font-size: 16px; padding: 12px 14px; }
  .contact-form { padding: 24px 16px; }
  .contact-form input,
  .contact-form textarea { font-size: 16px; padding: 12px 14px; }

  /* Footer */
  footer { padding: 20px 16px; font-size: 12px; }
  footer .stripe { width: 50px; height: 14px; }
  footer .legal-links { font-size: 11px; }
}

/* Маленький мобильный ≤480px */
@media (max-width: 480px) {
  .flag-logo { height: 30px; }
  .flag-logo img { height: 30px; }
  .brand-text .title,
  .brand-text .brand-title { font-size: 13px; }
  .header-right { font-size: 9px; padding: 2px 4px; gap: 3px; }
  .header-right a { font-size: 9px; }
  .hero-index h2 { font-size: 20px; }
  .page-hero h2 { font-size: 22px; }
  .about-index .features { grid-template-columns: 1fr; }
  .mobile-menu-toggle button { font-size: 11px; padding: 6px 10px; }
  .mobile-menu-toggle .mm-icon { width: 16px; }
}

/* === Кнопка МЕНЮ (по умолчанию скрыта на десктопе) === */
.mobile-menu-toggle { display: none; margin-left: auto; }
.mobile-menu-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  /* 3 полосы флага */
  background: linear-gradient(90deg,
    var(--black) 0%, var(--black) 33.3%,
    var(--white) 33.3%, var(--white) 66.6%,
    var(--green) 66.6%, var(--green) 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  text-shadow: -1px -1px 0 var(--black),
               1px -1px 0 var(--black),
              -1px  1px 0 var(--black),
               1px  1px 0 var(--black),
               0 0 4px rgba(0,0,0,0.6);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mobile-menu-toggle button:active { transform: scale(0.97); }
.mobile-menu-toggle .mm-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 14px;
  flex-shrink: 0;
}
.mobile-menu-toggle .mm-line {
  display: block;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

/* === Drawer === */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.mobile-drawer.open { display: block; }
.mobile-drawer .drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.mobile-drawer .drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 360px;
  height: 100%;
  background: var(--paper);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -8px 0 24px rgba(0,0,0,0.25);
  animation: slide-in 0.25s ease-out;
}
@keyframes slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.mobile-drawer .drawer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding: 16px;
  background: linear-gradient(90deg,
    var(--black) 0%, var(--black) 33.3%,
    var(--white) 33.3%, var(--white) 66.6%,
    var(--green) 66.6%, var(--green) 100%);
  border-bottom: 2px solid var(--gold);
}
.mobile-drawer .drawer-header img {
  width: 40px;
  height: 30px;
  border-radius: 3px;
  flex-shrink: 0;
}
.mobile-drawer .drawer-brand {
  position: absolute;
  left: 58px;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  pointer-events: none;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  white-space: nowrap;
}
.mobile-drawer .drawer-brand-top {
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.mobile-drawer .drawer-brand-title {
  font-family: Georgia, serif;
  font-size: 18px;
  color: var(--gold);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.mobile-drawer .drawer-close {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 24px;
  font-weight: 700;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-left: auto;
  cursor: pointer;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.mobile-drawer .drawer-close:active { transform: scale(0.92); }

.mobile-drawer .drawer-link {
  display: block;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 1px;
  -webkit-tap-highlight-color: transparent;
}
.mobile-drawer .drawer-link:first-of-type {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.mobile-drawer .drawer-link:active { background: var(--green); color: var(--white); }

.mobile-drawer .drawer-section {
  margin-top: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.mobile-drawer .drawer-section-title {
  padding: 12px 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.mobile-drawer .drawer-sub {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}
.mobile-drawer .drawer-sub:active { background: var(--green); color: var(--white); }

.mobile-drawer .drawer-footer {
  padding: 20px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.mobile-drawer .drawer-footer a { color: var(--green-d); font-weight: 600; }
.mobile-drawer .drawer-footer .sep { color: var(--muted); margin: 0 4px; }

/* === МОБИЛЬНОЕ МЕНЮ — как на Dido Sport, в цветах Дидойского флага === */
@media (max-width: 760px) {
  .main-menu { display: none; }
  .mobile-menu-toggle { display: inline-flex; align-items: center; }
  .mobile-menu-toggle button { height: 40px; }
  .header-right.auth-on-brand { display: none; }

  .mobile-drawer .drawer-panel {
    width: min(400px, 94vw);
    max-width: none;
    border-left: 4px solid var(--gold);
    background: var(--paper);
  }
  .mobile-drawer .drawer-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px 34px;
  }
  .mobile-drawer .drawer-menu { display: block !important; max-width: none; margin: 0; }
  .mobile-drawer .drawer-account { margin: 0 0 4px; }

  /* Верхний уровень: крупная скруглённая «кнопка» с плюсом */
  .mobile-drawer .menu-item {
    display: block;
    width: auto;
    min-width: 0;
    margin: 0 0 10px;
  }
  .mobile-drawer .menu-item > .label,
  .mobile-drawer .menu-item > button.label,
  .mobile-drawer .drawer-account > .label {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    min-height: 54px;
    padding: 15px 48px 15px 16px;
    margin: 0;
    background: var(--white) !important;
    color: var(--black) !important;
    text-shadow: none;
    text-align: left;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .5px;
    border: 2px solid var(--black);
    border-radius: 12px;
    box-shadow: 0 2px 0 rgba(0,0,0,.18);
    filter: none !important;
  }
  .mobile-drawer .menu-item > a.label { text-decoration: none; }
  .mobile-drawer .menu-item > .label:active,
  .mobile-drawer .menu-item > button.label:active { transform: scale(.99); }

  /* Кружок «+» / «×» справа */
  .mobile-drawer .menu-item.has-sub::after { display: none; }
  .mobile-drawer .menu-item.has-sub > .label::after {
    content: '+';
    position: absolute;
    right: 13px; top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    line-height: 25px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid var(--green);
    background: var(--white);
    color: var(--green);
    font-size: 19px;
    font-weight: 900;
    text-shadow: none;
    box-shadow: none;
  }
  /* Открытая группа — в цветах флага */
  .mobile-drawer .menu-item.has-sub.open > .label {
    background: linear-gradient(90deg,
      var(--black) 0%, var(--black) 33%,
      var(--white) 33%, var(--white) 66%,
      var(--green) 66%, var(--green) 100%) !important;
    color: var(--gold) !important;
    text-shadow: -1px -1px 0 var(--black), 1px -1px 0 var(--black),
                -1px 1px 0 var(--black), 1px 1px 0 var(--black), 0 0 5px rgba(0,0,0,.8);
    border-color: var(--gold);
  }
  .mobile-drawer .menu-item.has-sub.open > .label::after {
    content: '\00d7';
    background: var(--black);
    border-color: var(--gold);
    color: var(--gold);
    line-height: 25px;
  }

  /* Подпункты */
  .mobile-drawer .submenu {
    position: static;
    display: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    min-width: 0;
    border: none;
    border-left: 3px solid var(--green);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 2px 0 0 10px;
    margin: 0 0 6px;
  }
  .mobile-drawer .menu-item.has-sub.open .submenu { display: block; }
  .mobile-drawer .submenu a {
    display: block;
    margin-bottom: 8px;
    padding: 13px 14px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
  }
  .mobile-drawer .submenu a::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--green);
    vertical-align: middle;
  }
  .mobile-drawer .submenu a:active { background: var(--green); color: var(--white); }



  /* Вложенные списки «Видео» и «Сёла» — свёрнуты, раскрываются по кнопке */
  .mobile-drawer .submenu-videos,
  .mobile-drawer .submenu-villages {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px 0 2px 12px;
    margin: 0 0 10px;
    max-height: none;
    overflow: visible;
    border-top: 1px dashed rgba(0,0,0,.15);
  }
  .mobile-drawer .submenu-videos a,
  .mobile-drawer .submenu-villages a {
    margin-bottom: 0;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
  }
  .mobile-drawer .submenu-videos a::before,
  .mobile-drawer .submenu-villages a::before {
    width: 6px; height: 6px;
    margin-right: 6px;
  }
  .mobile-drawer .submenu-group-head {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 6px;
  }
  .mobile-drawer .submenu-group-link {
    flex: 1;
    padding: 13px 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    border: 2px solid var(--line);
    background: var(--white);
    color: var(--ink);
  }
  .mobile-drawer .submenu-group-link::before {
    width: 8px; height: 8px;
    background: var(--green);
  }
  .mobile-drawer .submenu-group-toggle {
    flex: 0 0 52px;
    border: 2px solid var(--green);
    border-radius: 10px;
    background: var(--white);
    color: var(--green);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
  }
  .mobile-drawer .submenu-group.open .submenu-group-toggle {
    background: var(--green);
    color: var(--white);
  }
  /* Личный кабинет */
  .mobile-drawer .drawer-account-links { padding-left: 2px; }
  .mobile-drawer .drawer-account-links a {
    display: block;
    margin-bottom: 8px;
    padding: 13px 14px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink) !important;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    text-shadow: none !important;
  }
  .mobile-drawer .drawer-account-links a:active { background: var(--green); color: var(--white) !important; }
  .mobile-drawer .drawer-account-links .account-pair { display: flex; gap: 8px; }
  .mobile-drawer .drawer-account-links .account-pair a { flex: 1; text-align: center; margin-bottom: 8px; }
  .mobile-drawer .drawer-account-links .account-pair .sep { display: none; }
}

/* === МЕНЮ ВНУТРИ ДИДОЙСКОГО ФЛАГА: герб виден, кнопки по центру === */
@media (max-width: 760px) {
  .mobile-drawer .drawer-panel {
    width: min(400px, 94vw);
    max-width: none;
    border-left: 4px solid var(--gold);
    background: var(--paper) url("flag-dido.png") repeat-y center top / 100% auto;
    background-color: var(--paper);
  }
  .mobile-drawer .drawer-header {
    position: sticky;
    top: 0;
    z-index: 3;
  }
  .mobile-drawer .drawer-body {
    position: relative;
    padding: 14px 10px 26px;
    background: rgba(255,255,255,.58);
    -webkit-backdrop-filter: blur(1.5px);
    backdrop-filter: blur(1.5px);
  }

  /* Кнопки по центру, карточками */
  .mobile-drawer .menu-item {
    display: block;
    width: 100%;
    max-width: 94%;
    margin: 0 auto 10px;
  }
  .mobile-drawer .menu-item > .label,
  .mobile-drawer .menu-item > button.label,
  .mobile-drawer .drawer-account > .label {
    padding: 15px 46px 15px 16px;
    text-align: center;
    background: rgba(255,255,255,.94) !important;
    border-color: var(--black);
  }
  .mobile-drawer .menu-item.has-sub.open > .label {
    background: linear-gradient(90deg,
      rgba(10,10,10,.96) 0%, rgba(10,10,10,.96) 33%,
      rgba(255,255,255,.96) 33%, rgba(255,255,255,.96) 66%,
      var(--green) 66%, var(--green) 100%) !important;
  }
  .mobile-drawer .menu-item.has-sub > .label::after { right: 11px; }

  /* Подпункты — тоже карточки по центру */
  .mobile-drawer .submenu {
    max-width: 94%;
    margin: 0 auto 6px;
    padding: 2px 0 0 8px;
  }
  .mobile-drawer .submenu a,
  .mobile-drawer .drawer-account-links a {
    background: rgba(255,255,255,.94);
  }

  /* Кнопка закрытия внизу */
  .mobile-drawer .drawer-close-bottom {
    display: block;
    width: 94%;
    max-width: 94%;
    margin: 16px auto 0;
    padding: 15px 16px;
    border: 2px solid var(--black);
    border-radius: 12px;
    background: var(--black);
    color: var(--gold);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 2px 0 rgba(0,0,0,.25);
  }
  .mobile-drawer .drawer-close-bottom:active { transform: scale(.99); }
}

/* Крестик на самой кнопке «МЕНЮ» в шапке */
.mobile-menu-toggle button[aria-expanded="true"] .mm-icon .mm-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle button[aria-expanded="true"] .mm-icon .mm-line:nth-child(2) { opacity: 0; }
.mobile-menu-toggle button[aria-expanded="true"] .mm-icon .mm-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Маленький герб в шапке мобильной панели */
@media (max-width: 760px) {
  .mobile-drawer .drawer-emblem {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
    box-shadow: 0 0 0 2px rgba(0,0,0,.35);
    flex: 0 0 auto;
  }
}

/* Герб внутри флага — виден только у раскрытого раздела */
@media (max-width: 760px) {
  .mobile-drawer .label .sec-emblem { display: none; }
  .mobile-drawer .menu-item.has-sub > .label { position: relative; }
  .mobile-drawer .menu-item.has-sub.open > .label { padding-left: 58px; text-align: left; }
  .mobile-drawer .menu-item.has-sub.open > .label .sec-emblem {
    display: block;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
    box-shadow: 0 0 0 2px rgba(0,0,0,.5);
  }
}

@media (max-width: 760px) {
  .mobile-drawer .menu-item.has-sub.open > .label {
    padding-left: 70px;
    min-height: 58px;
    font-size: 16px;
  }
  .mobile-drawer .menu-item.has-sub.open > .label .sec-emblem {
    width: 42px;
    height: 42px;
    left: 12px;
  }
}

/* ================= Раздел «История» ================= */
.history .hist-lead {
  margin-bottom: 26px;
}
.history .hist-h {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  color: var(--green-d);
  text-align: center;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.history .hist-lead .hist-h { color: var(--gold); }
.history .hist-lead p,
.history .hist-card p {
  font-size: 16px;
  line-height: 1.68;
  color: var(--ink);
  margin: 0 0 12px;
  text-align: justify;
}
.history .hist-lead p:last-child,
.history .hist-card p:last-child { margin-bottom: 0; }
.history .hist-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.history .hist-card.major {
  border-left: 1px solid var(--line);
  border-top: none;
  border-bottom: 4px solid var(--green);
  padding: 84px 26px 24px;
  text-align: center;
  overflow: hidden;
}
.history .hist-card.major::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44px;
  background: linear-gradient(90deg,
    var(--black) 0%, var(--black) 33.3%,
    var(--white) 33.3%, var(--white) 66.6%,
    var(--green) 66.6%, var(--green) 100%);
  border-bottom: 2px solid var(--gold);
}
.history .hist-card.major::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background-color: var(--white);
  background-image: url('emblem-dido.png');
  background-size: 50px 50px;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid var(--gold);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.history .hist-card.major .hist-h { margin-top: 4px; }
.history .hist-card.major p { text-align: center; }
.history .hist-quotes { margin: 26px 0; }
.history .hist-quotes-title { color: var(--gold); margin-bottom: 16px; }
.history .hist-quote {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-d) 100%);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.history .hist-quote-text {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.45;
  color: var(--white);
  text-align: center;
}
.history .hist-quote-src {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--gold-s);
  text-align: center;
  margin-top: 10px;
  text-transform: uppercase;
}
.history .hist-sign {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  color: var(--green-d);
  text-align: right;
  padding: 6px 6px 22px;
}
.history .hist-ras {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 10px;
}
.history .hist-ras-head {
  position: relative;
  background: var(--white);
  padding: 56px 22px 18px;
  border-bottom: 2px solid var(--gold);
}
.history .hist-ras-head::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(90deg, var(--black) 0%, var(--black) 33.3%,
    var(--white) 33.3%, var(--white) 66.6%, var(--green) 66.6%, var(--green) 100%);
}
.history .hist-ras-title {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.history .hist-ras-body { padding: 20px 24px 24px; }
.history .hist-ras-body p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 12px;
  text-align: justify;
}
.history .hist-ras-body p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .history .hist-h { font-size: 19px; }
  .history .hist-card { padding: 18px 16px; }
  .history .hist-card.major { padding: 76px 16px 20px; }
  .history .hist-card.major::before { height: 38px; }
  .history .hist-card.major::after { width: 52px; height: 52px; background-size: 44px 44px; top: 5px; }
  .history .hist-lead p, .history .hist-card p { font-size: 15px; text-align: left; }
  .history .hist-card.major p { text-align: center; }
  .history .hist-quote-text { font-size: 16px; }
  .history .hist-ras-body { padding: 16px 16px 20px; }
  .history .hist-ras-body p { font-size: 14.5px; text-align: left; }
}

/* ================= Раздел «Язык» ================= */
.history .lang-alphabet {
  display: flex;
  gap: 22px;
  align-items: center;
  text-align: left;
}
.history .lang-alphabet-text { flex: 1 1 auto; }
.history .lang-alphabet-text p { text-align: left; }
.history .lang-alphabet-img { flex: 0 0 auto; width: 280px; text-align: center; }
.history .lang-alphabet-img img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.history .lang-alphabet-cap {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
}
.history .lang-poem-text {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.7;
  color: var(--green-d);
  text-align: center;
  margin-top: 6px;
}
.history .lang-apps {
  margin-top: 26px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.history .lang-apps .hist-h { margin-bottom: 12px; }
.history .lang-apps ul { margin: 0; padding-left: 20px; }
.history .lang-apps li { margin-bottom: 8px; font-size: 15.5px; }
.history .lang-apps a { color: var(--green-d); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--gold); }
.history .lang-apps a:hover { color: var(--gold); }
@media (max-width: 760px) {
  .history .lang-alphabet { flex-direction: column; gap: 14px; }
  .history .lang-alphabet-img { width: 100%; max-width: 280px; }
  .history .lang-poem-text { font-size: 17px; }
}

/* ================= Раздел «Этнос и политика» ================= */
.history .ethnos-steps { margin: 12px 0 0 0; padding-left: 22px; }
.history .ethnos-steps li { margin-bottom: 12px; font-size: 16px; line-height: 1.7; }
.history .ethnos-steps li::marker { color: var(--green-d); font-weight: 700; }
.history .ethnos-map {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-top: 6px;
}
.history .ethnos-map-img { flex: 0 0 auto; width: 340px; }
.history .ethnos-map-img img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.history .ethnos-map-text { flex: 1 1 auto; }
.history .ethnos-map-text p { text-align: left; }
.history .ethnos-lit ol { margin: 10px 0 0 0; padding-left: 22px; }
.history .ethnos-lit li { margin-bottom: 10px; font-size: 15.5px; line-height: 1.6; }
.history .ethnos-lit li::marker { color: var(--green-d); font-weight: 700; }
.history .ethnos-dido-text {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.8;
  color: var(--green-d);
}
.history .ethnos-fable p { font-family: Georgia, serif; font-style: italic; font-size: 18px; line-height: 1.75; color: #2a2a2a; }
@media (max-width: 760px) {
  .history .ethnos-map { flex-direction: column; gap: 12px; }
  .history .ethnos-map-img { width: 100%; max-width: 340px; }
  .history .ethnos-dido-text { font-size: 16px; }
}

/* ===== Раздел «Этнос и политика»: текст слева ===== */
.history.ethnos-page .hist-card.major p,
.history.ethnos-page .hist-lead p { text-align: left; }

/* ================= Раздел «Проекты» ================= */
.history .proj-list { margin: 26px 0; display: flex; flex-direction: column; gap: 18px; }
.history .proj-card {
  background: #fff;
  border: 1px solid var(--line, #e6e0d2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.history .proj-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 6px;
  background: linear-gradient(90deg, #000 0%, #fff 50%, var(--green-d) 100%);
}
.history .proj-head {
  margin: 6px 0 0 0;
  padding: 18px 24px 10px 24px;
}
.history .proj-num {
  font-family: Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: 21px;
  color: var(--green-d);
  line-height: 1.35;
}
.history .proj-body { padding: 0 24px 20px 24px; }
.history .proj-body p { text-align: left; margin-bottom: 12px; }
.history .proj-app {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  color: var(--gold);
  border-bottom: 1px dashed var(--gold);
  padding-bottom: 2px;
}
.history .proj-app.missing { color: #8a8a8a; border-bottom: 1px dashed #c9c4b8; }
.history .proj-app.missing span,
.history .lang-apps .app-missing span { font-weight: 400; font-style: normal; font-size: 13px; color: #8a8a8a; }
.history .lang-apps .app-missing { color: #8a8a8a; }
@media (max-width: 760px) {
  .history .proj-head { padding: 16px 16px 8px 16px; }
  .history .proj-body { padding: 0 16px 16px 16px; }
  .history .proj-num { font-size: 18px; }
}

/* ================= Блок «Кто такие ДИДОЙЦЫ?» на главной ================= */
.who-dido {
  margin: 34px 0 30px;
  padding: 34px 28px 30px;
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.who-dido .who-stripe {
  position: relative;
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, #000 0%, #fff 50%, var(--green-d) 100%);
  margin: 0 auto 22px;
  max-width: 720px;
}
.who-dido .who-emblem {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gold);
  padding: 3px;
  box-sizing: border-box;
}
.who-dido .who-title {
  font-family: Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: 30px;
  line-height: 1.25;
  color: var(--green-d);
  margin: 26px 0 8px;
  letter-spacing: 0.5px;
}
.who-dido .who-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0 28px;
}
.who-dido .who-stat {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line, #e6e0d2);
  border-top: none;
  border-bottom: 4px solid var(--green-d);
  border-radius: 16px;
  padding: 58px 12px 16px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.who-dido .who-stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(90deg,
    #000 0%, #000 33.3%,
    #fff 33.3%, #fff 66.6%,
    var(--green-d) 66.6%, var(--green-d) 100%);
  border-bottom: 2px solid var(--gold);
}
.who-dido .who-stat::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background-image: url('emblem-dido.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.who-dido .who-stat-v {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--green-d);
  line-height: 1.2;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.who-dido .who-stat-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
  background: rgba(15, 74, 37, 0.08);
  border: 1px solid rgba(15, 74, 37, 0.22);
}
.who-dido .who-stat-l {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}
.who-dido .who-blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  text-align: left;
}
.who-dido .who-card {
  background: #fff;
  border: 1px solid var(--line, #e6e0d2);
  border-radius: 14px;
  padding: 22px 24px 20px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.who-dido .who-card::before {
  content: "";
  position: absolute;
  left: 22px; right: 22px; top: 0;
  height: 5px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #000 0%, #fff 50%, var(--green-d) 100%);
}
.who-dido .who-h {
  font-family: Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: 21px;
  color: var(--green-d);
  margin: 14px 0 10px;
}
.who-dido .who-card p {
  text-align: left;
  font-size: 16.5px;
  line-height: 1.65;
  color: #333;
}
.who-dido .who-acc {
  background: #fff;
  border: 1px solid var(--line, #e6e0d2);
  border-radius: 14px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  overflow: hidden;
}
.who-dido .who-acc::before {
  content: "";
  position: absolute;
  left: 22px; right: 22px; top: 0;
  height: 5px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #000 0%, #fff 50%, var(--green-d) 100%);
}
.who-dido .who-acc > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 16px;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
  font-style: italic;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: .2px;
  color: var(--green-d);
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.who-dido .who-acc > summary::-webkit-details-marker { display: none; }
.who-dido .who-acc > summary::after {
  content: "▾";
  order: -1;
  margin-right: 4px;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: transform .2s;
}
.who-dido .who-acc[open] > summary::after { transform: rotate(180deg); }
.who-dido .who-acc[open] > summary { border-bottom: 1px solid var(--line); }
.who-dido .who-acc-body {
  padding: 12px 22px 18px;
}
.who-dido .who-acc-body p {
  text-align: left;
  font-size: 16.5px;
  line-height: 1.65;
  color: #333;
}
.who-dido .who-more {
  display: inline-block;
  margin-top: 10px;
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 15px;
  color: var(--gold);
  border-bottom: 1px dashed var(--gold);
  padding-bottom: 2px;
}
.who-dido .who-append {
  margin-top: 22px;
  text-align: left;
}
.who-dido .who-append-h {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
  font-style: italic;
  font-size: 21px;
  line-height: 1.3;
  color: var(--green-d);
  margin-bottom: 14px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.who-dido .who-append-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.who-dido .who-append-item {
  background: #fff;
  border: 1px solid var(--line, #e6e0d2);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  overflow: hidden;
}
.who-dido .who-append-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.who-dido .who-append-item > summary::-webkit-details-marker { display: none; }
.who-dido .who-append-item > summary::after {
  content: "▾";
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: var(--gold);
  transition: transform .2s;
}
.who-dido .who-append-item[open] > summary::after { transform: rotate(180deg); }
.who-dido .who-append-n {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--green-d);
}
.who-dido .who-append-t {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
}
.who-dido .who-append-body {
  padding: 0 16px 16px;
}
.who-dido .who-append-body p {
  font-size: 14.5px;
  line-height: 1.55;
  color: #444;
}
.who-dido .who-append-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.who-dido .who-append-links a {
  flex: 1 1 140px;
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.2;
  color: #fff;
  text-decoration: none;
  background: var(--green-d);
  border: 1px solid var(--green-d);
  border-radius: 10px;
  padding: 11px 12px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.who-dido .who-append-links a:last-child {
  color: var(--green-d);
  background: #fff;
  border-color: var(--gold);
}
.who-dido .who-append-links a:active { transform: scale(.98); }
.who-dido .who-append-links a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
}
.who-dido .who-app { margin-top: 12px; }
.who-dido .who-app a {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 15px;
  color: var(--gold);
  border-bottom: 1px dashed var(--gold);
  padding-bottom: 2px;
}
@media (max-width: 960px) {
  .who-dido .who-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .who-dido { padding: 26px 16px 22px; }
  .who-dido .who-title { font-size: 23px; }
  .who-dido .who-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .who-dido .who-stat { padding: 50px 10px 12px; }
  .who-dido .who-stat-v { font-size: 17px; }
  .who-dido .who-stat::before { height: 32px; }
  .who-dido .who-stat::after { width: 24px; height: 24px; top: 4px; }
  .who-dido .who-stat-ic { width: 24px; height: 24px; font-size: 12px; }
  .who-dido .who-stat-l { font-size: 12.5px; }
  .who-dido .who-card { padding: 18px 16px 16px; }
  .who-dido .who-h { font-size: 18px; }
  .who-dido .who-card p { font-size: 15.5px; }
  .who-dido .who-acc > summary { padding: 16px 14px 13px; font-size: 17px; gap: 9px; }
  .who-dido .who-acc-body { padding: 12px 14px 16px; }
  .who-dido .who-acc-body p { font-size: 15.5px; }
  .who-dido .who-append-grid { grid-template-columns: 1fr; gap: 10px; }
  .who-dido .who-append-h { font-size: 18px; letter-spacing: .5px; }
  .who-dido .who-append-links a { flex: 1 1 100%; padding: 13px 12px; font-size: 15px; }
}

/* ===== Исправление: карточки-цитаты (Кто такие ДИДОЙЦЫ?) =====
   .citation задавал свой padding и перебивал .quote-card — текст заезжал
   под герб и обрезался. Ниже — приоритетное правило + перенос строк. */
.citation.quote-card {
  padding: 84px 26px 24px;
}
.quote-card .citation-text {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}
@media (max-width: 620px) {
  .citation.quote-card { padding: 74px 16px 20px; }
  .quote-card .citation-text { max-width: 100%; }
}

/* ===== Раздел «Устав» ===== */
.ustav-page .ustav-lead .hist-h {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 14px;
  text-align: center;
}
.ustav-page .ustav-lead p,
.docs-page .ustav-lead p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.66;
  color: var(--ink);
  text-align: center;
}
.docs-page .ustav-lead .hist-h {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.3;
  color: var(--green-d);
  margin: 0 0 12px;
}

.ustav-top {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.ustav-top-title {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.32;
  color: var(--black);
}
.ustav-top-city {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold);
}
.ustav-btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-d) 100%);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 22px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ustav-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 14, 4, .18); }
.ustav-btn-t { display: block; font-family: Georgia, serif; font-size: 16px; font-weight: 700; color: var(--white); }
.ustav-btn-n { display: block; margin-top: 4px; font-size: 11.5px; color: rgba(255, 255, 255, .86); }

.ustav-req {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 18px;
}
.ustav-req-h {
  font-family: Georgia, serif;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.ustav-req ul { margin: 0; padding-left: 20px; }
.ustav-req li { font-size: 14.5px; line-height: 1.6; color: var(--ink); margin-bottom: 6px; }
.ustav-req li:last-child { margin-bottom: 0; }

.ustav-toc {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.ustav-toc-h { font-family: Georgia, serif; font-size: 18px; color: var(--black); margin-bottom: 12px; }
.ustav-toc ol { margin: 0; padding-left: 22px; }
.ustav-toc li { margin-bottom: 7px; font-size: 15px; }
.ustav-toc a { display: flex; gap: 10px; align-items: baseline; color: var(--green-d); text-decoration: none; }
.ustav-toc a:hover { color: var(--gold); }
.ustav-toc-n { flex: 0 0 auto; min-width: 20px; font-family: Georgia, serif; font-weight: 700; color: var(--gold); }
.ustav-toc-t { border-bottom: 1px solid transparent; }
.ustav-toc a:hover .ustav-toc-t { border-bottom-color: var(--gold); }

.ustav-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.ustav-toggle {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--green-d);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.ustav-toggle:hover { border-color: var(--gold); color: var(--gold); background: var(--paper); }

.ustav-full-h {
  font-family: Georgia, serif;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.ustav-sec {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ustav-sec > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 15px 20px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(90deg, var(--paper) 0%, var(--white) 100%);
}
.ustav-sec > summary::-webkit-details-marker { display: none; }
.ustav-sec[open] > summary { border-bottom: 1px solid var(--line); }
.ustav-sec-word { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.ustav-sec-num { font-family: Georgia, serif; font-size: 20px; font-weight: 700; color: var(--gold); }
.ustav-sec-name { font-family: Georgia, serif; font-size: 17px; font-weight: 700; color: var(--black); }
.ustav-sec-body { padding: 4px 20px 14px; }

.ustav-point {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.ustav-point:last-child { border-bottom: none; padding-bottom: 6px; }
.ustav-p-num {
  flex: 0 0 58px;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--green-d);
  padding-top: 2px;
}
.ustav-p-text { flex: 1 1 auto; min-width: 0; }
.ustav-p-text p { margin: 0 0 10px; font-size: 15.5px; line-height: 1.68; color: var(--ink); text-align: justify; }
.ustav-p-text p:last-child { margin-bottom: 0; }
.ustav-sub { display: flex; gap: 14px; padding: 5px 0; }
.ustav-sub .ustav-p-num { flex-basis: 74px; font-size: 14px; color: var(--gold); }
.ustav-sub p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink); }
.ustav-items { margin: 10px 0 0; padding-left: 22px; }
.ustav-items li { font-size: 15px; line-height: 1.62; color: var(--ink); margin-bottom: 7px; }
.ustav-items li:last-child { margin-bottom: 0; }

.ustav-foot { margin-top: 26px; text-align: center; }
.ustav-docs-link {
  display: inline-block;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--green) 0%, var(--green-d) 100%);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 11px 26px;
  text-decoration: none;
  transition: color .15s ease;
}
.ustav-docs-link:hover { color: var(--gold); }

/* ===== Раздел «Документы» ===== */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.doc-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 14px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
}
.doc-card-main {
  grid-column: 1 / -1;
  border-top: none;
  border-bottom: 4px solid var(--green);
  background: linear-gradient(180deg, var(--paper) 0%, var(--white) 60%);
  padding: 24px 24px 20px;
}
.doc-badge {
  align-self: flex-start;
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.doc-card-main .doc-badge { color: var(--white); background: var(--green); border-color: var(--green); }
.doc-title { font-family: Georgia, serif; font-size: 17.5px; line-height: 1.35; color: var(--black); margin: 0 0 10px; }
.doc-card-main .doc-title { font-size: 22px; }
.doc-text { flex: 1 1 auto; margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.doc-btn {
  align-self: flex-start;
  display: inline-block;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--green) 0%, var(--green-d) 100%);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 9px 18px;
  transition: color .15s ease;
}
.doc-btn:hover { color: var(--gold); }
.doc-note { margin-top: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* Пометки к восстановленным приложениям */
.history .lang-apps .app-note,
.history .proj-app .app-note {
  font-weight: 400;
  font-style: normal;
  font-size: 13px;
  color: #8a8a8a;
}
.history .proj-app a { color: var(--green-d); font-style: normal; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--gold); }
.history .proj-app a:hover { color: var(--gold); }

@media (max-width: 760px) {
  .ustav-top { padding: 18px 16px; }
  .ustav-top-title { font-size: 17.5px; }
  .ustav-btn { width: 100%; }
  .ustav-req, .ustav-toc { padding: 16px 16px; }
  .ustav-sec > summary { padding: 13px 14px; gap: 8px; }
  .ustav-sec-name { flex: 1 1 100%; font-size: 15.5px; }
  .ustav-sec-body { padding: 4px 14px 12px; }
  .ustav-point, .ustav-sub { display: block; }
  .ustav-p-num { display: block; flex-basis: auto; margin-bottom: 4px; }
  .ustav-p-text p { text-align: left; }
  .ustav-page .ustav-lead .hist-h { font-size: 16.5px; text-align: left; }
  .ustav-page .ustav-lead p, .docs-page .ustav-lead p { text-align: left; }
  .doc-grid { grid-template-columns: 1fr; }
  .doc-card-main .doc-title { font-size: 19px; }
  .ustav-docs-link { font-size: 15px; padding: 10px 20px; }
}

/* --- Двуязычные пары (общие для всех страниц) --- */
.sp-en { display: none; }
html.lang-en .sp-ru { display: none; }
html.lang-en .sp-en { display: inline; }

/* --- Кнопка «Назад» --- */
.back-strip { margin: 0 0 18px; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--green);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.back-btn:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.back-btn:active { transform: scale(.98); }
.back-arrow { font-size: 17px; line-height: 1; }

@media (max-width: 760px) {
  .back-strip { margin-bottom: 14px; }
  .back-btn { padding: 10px 16px; font-size: 16px; }
}

/* ===== Карточки людей внутри дидойского флага с гербом ===== */
.owner-flag-wrap {
  position: relative;
  padding: 118px 22px 26px;
  border-radius: 20px;
  border: 3px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(247,249,246,0.97), rgba(255,255,255,0.99));
  box-shadow: 0 14px 40px rgba(0,0,0,0.16);
  margin-bottom: 26px;
}
.owner-flag-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 16px;
  border-radius: 17px 17px 0 0;
  background: linear-gradient(90deg,
    var(--black) 0%, var(--black) 33.3%,
    var(--white) 33.3%, var(--white) 66.6%,
    var(--green) 66.6%, var(--green) 100%);
  border-bottom: 2px solid var(--gold);
}

.owner-flag-image {
  position: absolute;
  top: 26px; left: 24px;
  width: 96px; height: 64px;
  object-fit: cover;
  border: 2px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
  z-index: 2;
}
.owner-flag-emblem {
  position: absolute;
  top: 26px; left: 50%;
  transform: translateX(-50%);
  width: 78px; height: 78px;
  border-radius: 50%;
  background-color: var(--white);
  background-image: url('emblem-dido.png');
  background-size: 64px 64px;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid var(--gold);
  box-shadow: 0 3px 14px rgba(0,0,0,0.3);
  z-index: 2;
}
.owner-flag-wrap > .owner-card { position: relative; z-index: 1; }
.owner-flag-wrap .owner-card { position: relative; z-index: 1; }
.owner-flag-wrap .owner-card:first-of-type { margin-top: 0; }
.owner-info .role-block .value a { color: var(--green-d); font-weight: 700; }
.owner-info .role-block .value a:hover { color: var(--green); }

@media (max-width: 640px) {
  .owner-flag-wrap { padding: 112px 12px 18px; }
  .owner-flag-emblem { width: 66px; height: 66px; background-size: 54px 54px; }
}

/* --- Группы подменю «Медиа»: Видео / Сёла --- */
.submenu-group { display: block; }
.submenu-group-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: all .15s;
}
.submenu-group-link::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}
.submenu-group-link:hover { background: var(--green); color: var(--white); padding-left: 22px; }
.submenu-group-link:hover::before { background: var(--gold-s); }
.submenu-group-head { display: flex; align-items: stretch; gap: 6px; }
.submenu-group-toggle {
  flex: 0 0 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--green);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.submenu-group.open .submenu-group-toggle { background: var(--green); color: var(--white); }
.submenu-videos, .submenu-villages {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
  padding: 6px 8px 6px 16px;
  max-height: 300px;
  overflow-y: auto;
}
.submenu-group.open .submenu-videos,
.submenu-group.open .submenu-villages { display: grid; }
.submenu-videos a, .submenu-villages a {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
  padding: 4px 6px;
  color: var(--muted);
  border: none;
}
.submenu-videos a::before, .submenu-villages a::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 6px;
  background: var(--green);
  border-radius: 50%;
  vertical-align: middle;
}
.submenu-videos a:hover, .submenu-villages a:hover { background: var(--green); color: var(--white); padding-left: 10px; }
.submenu-videos a:hover::before, .submenu-villages a:hover::before { background: var(--gold-s); }

/* Вложенные списки на десктопе — отдельной выпадающей панелью справа */
@media (min-width: 761px) {
  .submenu-group { position: relative; }
  .submenu-videos, .submenu-villages {
    position: absolute;
    left: 100%;
    top: -8px;
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--white);
    border: 2px solid var(--green);
    border-top: 4px solid var(--gold);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    padding: 8px 10px;
    z-index: 210;
  }
  .submenu-videos a, .submenu-villages a { border-bottom: 1px solid var(--line); }
}


/* Кнопки магазинов приложений */
.app-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; margin: 12px 0 6px; }
.app-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px;
  background: #0F6B3F; color: #fff; text-decoration: none; font-weight: 700;
  border: 2px solid #0B2C1D; transition: transform .15s ease, box-shadow .15s ease;
}
.app-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15,107,63,.28); color: #fff; }
.app-btn.is-soon { background: #EEF3EF; color: #2C3A31; border: 2px dashed #9BB3A3; cursor: default; }
.app-btn.is-soon:hover { transform: none; box-shadow: none; color: #2C3A31; }
.soon-tag {
  font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase;
  background: #D4A636; color: #17170F; border-radius: 20px; padding: 2px 8px; letter-spacing: .5px;
}
.app-hint { font-size: 13px; color: #4A524C; margin: 6px 0 4px; }

/* Кнопки магазинов: карточки приложений в один столбец, кнопки — в ряд/стопкой */
.items li:has(.app-actions) { flex-wrap: wrap; }
.items li:has(.app-actions) > span { flex: 1 1 calc(100% - 26px); }
.items li:has(.app-actions) .app-actions,
.items li:has(.app-actions) .app-hint { flex: 1 1 100%; }
.items li:has(.app-actions) .app-actions { gap: 8px; }
@media (max-width: 760px) {
  .items li:has(.app-actions) .app-btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Раздел «Книги»: читалка ------------------------------- */
.ustav-btn > span { display: block; font-family: Georgia, serif; font-size: 16px; font-weight: 700; color: var(--white); }
.rd-top-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rd-meta { font-size: 13px; color: var(--muted); }
.book-sections { margin-top: 6px; }
.book-sec-body { font-size: 15.5px; line-height: 1.75; color: var(--black); }
.book-p { margin: 0 0 13px; text-align: justify; hyphens: auto; }
.book-loading { font-size: 14px; color: var(--muted); font-style: italic; }
.book-sec[open] > summary .ustav-sec-name { color: var(--green-d); }
@media (max-width: 640px) {
  .book-p { text-align: left; }
}

/* двуязычные пары в карточках книг */
.doc-badge .sp-en { display: inline; }
.doc-title .sp-en, .doc-text .sp-en, .doc-note .sp-en { display: block; }
.page-hero-title .sp-en, .page-hero-lead .sp-en { display: block; }
.page-hero-title .sp-en { display: inline; }

/* ---- Книги: словарные статьи ---- */
.book-word { font-weight: 700; color: var(--black); }
.book-p .book-word + span { font-weight: 400; }

.who-dido .who-lead {
  background: #fff;
  border: 1px solid var(--line, #e6e0d2);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  padding: 22px 22px 18px;
}
.who-dido .who-lead::before {
  content: "";
  position: absolute;
  left: 22px; right: 22px; top: 0;
  height: 5px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #000 0%, #fff 50%, var(--green-d) 100%);
}
.who-dido .who-lead-h {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
  font-style: italic;
  font-size: 21px;
  line-height: 1.25;
  color: var(--green-d);
  margin-bottom: 10px;
}
.who-dido .who-lead p {
  text-align: left;
  font-size: 16.5px;
  line-height: 1.65;
  color: #333;
}
@media (max-width: 760px) {
  .who-dido .who-lead { padding: 18px 14px 14px; }
  .who-dido .who-lead-h { font-size: 17px; }
  .who-dido .who-lead p { font-size: 15.5px; }
  .who-dido .who-acc > summary::after { font-size: 26px; }
}

/* ===== Канал «История дидойцев» ===== */
.ch-block { margin-top: 42px; }
.ch-block-h {
  font-size: 24px; font-weight: 800; color: var(--green, #1a6b3a);
  margin: 0 0 8px; padding-left: 14px; border-left: 4px solid var(--gold, #d4a636);
}
.ch-block-lead { margin: 0 0 22px; opacity: .82; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ch-card {
  position: relative;
  background: #fffdf7; border: 1px solid rgba(26,107,58,.18); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 6px 18px rgba(15,74,37,.08); transition: transform .18s ease, box-shadow .18s ease;
}
.ch-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(15,74,37,.16); }
.ch-card-img { background: #eef3ea; }
.ch-card-img img { display: block; width: 100%; height: 170px; object-fit: cover; }
.ch-card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ch-card-date { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #a8853a; }
.ch-card-body h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.ch-card-body p { margin: 0; font-size: 14px; line-height: 1.5; opacity: .82; }
.ch-more { margin-top: auto; font-weight: 700; color: #1a6b3a; text-decoration: none; }
.ch-more:hover { color: #0f4a25; }
.post-hero h2 { max-width: 900px; }
.post-lead { margin-bottom: 18px; }
.post-fig { margin: 0 0 18px; }
.post-fig img { width: 100%; border-radius: 12px; }
.post-cap { font-size: 13px; opacity: .7; margin-top: 6px; }
.post-body p { font-size: 16px; line-height: 1.65; }
.post-src { margin-top: 26px; padding: 14px 18px; background: rgba(212,166,54,.12); border-left: 4px solid #d4a636; border-radius: 8px; }
.post-src a { font-weight: 700; color: #1a6b3a; }
@media (max-width: 760px) {
  .ch-block-h { font-size: 20px; }
  .ch-grid { grid-template-columns: 1fr; }
  .post-body p { font-size: 15px; }
}

/* ===== Патриотичное оформление публикаций автономии ===== */
.ch-card, .ch-card * { }
.ch-card { padding-top: 46px; }
.ch-card-flag {
  position: absolute; top: 0; left: 0; right: 0; height: 34px;
  background: linear-gradient(90deg,
    #000 0%, #000 33.3%,
    #fff 33.3%, #fff 66.6%,
    var(--green-d) 66.6%, var(--green-d) 100%);
  border-bottom: 2px solid var(--gold);
  z-index: 2;
}
.ch-card-emblem {
  position: absolute; top: 3px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: url('emblem-dido.png') center/contain no-repeat;
  box-shadow: 0 0 0 2px rgba(212,166,54,.85);
}
.ch-card-img img { height: 190px; }
.ch-card-body h3 { font-family: Georgia, serif; color: var(--green-d); }
.ch-card-date { color: #a8853a; font-weight: 700; letter-spacing: .06em; }
.ch-more {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: var(--green-d); color: #fff !important; font-weight: 700;
  letter-spacing: .02em; box-shadow: 0 4px 12px rgba(15,74,37,.22);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  align-self: flex-start;
}
.ch-more:hover { background: var(--green); color: #fff !important; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,74,37,.28); }

/* флаговый баннер блока канала */
.ch-block { position: relative; padding-top: 52px; }
.ch-block-band {
  position: absolute; top: 0; left: 0; right: 0; height: 40px;
  background: linear-gradient(90deg,
    #000 0%, #000 33.3%,
    #fff 33.3%, #fff 66.6%,
    var(--green-d) 66.6%, var(--green-d) 100%);
  border-bottom: 2px solid var(--gold);
  border-radius: 14px 14px 0 0;
}
.ch-block-emblem {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: url('emblem-dido.png') center/contain no-repeat;
  box-shadow: 0 0 0 2px rgba(212,166,54,.9);
}
.ch-block-h { margin-top: 4px; }

/* страница публикации */
.post-band {
  position: relative; height: 44px; margin: 0 0 24px;
  background: linear-gradient(90deg,
    #000 0%, #000 33.3%,
    #fff 33.3%, #fff 66.6%,
    var(--green-d) 66.6%, var(--green-d) 100%);
  border-bottom: 3px solid var(--gold); border-radius: 10px;
}
.post-band-emblem {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: url('emblem-dido.png') center/contain no-repeat;
  box-shadow: 0 0 0 2px rgba(212,166,54,.9);
}
.post-body h3, .post-body h4 {
  font-family: Georgia, serif; color: var(--green-d);
  border-left: 4px solid var(--gold); padding-left: 12px; margin: 26px 0 12px;
}
.post-end {
  margin-top: 34px; padding-top: 22px; border-top: 2px solid rgba(212,166,54,.5);
  text-align: center;
}
.post-end-flag {
  position: relative; height: 46px; margin-bottom: 14px;
  background: linear-gradient(90deg,
    #000 0%, #000 33.3%,
    #fff 33.3%, #fff 66.6%,
    var(--green-d) 66.6%, var(--green-d) 100%);
  border-bottom: 3px solid var(--gold); border-radius: 10px;
}
.post-end-emblem {
  position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: url('emblem-dido.png') center/contain no-repeat;
  box-shadow: 0 0 0 2px rgba(212,166,54,.9);
}
.post-end-txt {
  margin: 0; font-family: Georgia, serif; font-style: italic;
  color: var(--green-d); font-size: 16px; line-height: 1.5;
}
@media (max-width: 760px) {
  .ch-card { padding-top: 40px; }
  .ch-card-flag { height: 28px; }
  .ch-card-emblem { width: 24px; height: 24px; }
  .ch-card-img img { height: 165px; }
  .ch-block { padding-top: 46px; }
  .ch-block-band { height: 34px; }
  .ch-block-emblem { width: 26px; height: 26px; }
  .post-band { height: 34px; }
  .post-band-emblem { width: 26px; height: 26px; top: 3px; }
  .post-end-flag { height: 36px; }
  .post-end-emblem { width: 28px; height: 28px; top: 3px; }
}

/* ===== Вложенный пункт меню (Словарь внутри Языка) ===== */
.submenu .submenu-sub { display: block; }
.submenu .submenu-sub a {
  padding-left: 34px;
  font-style: italic;
  color: var(--green);
  border-top: 1px dashed rgba(26,107,58,.22);
}
.submenu .submenu-sub a::before { content: "↳"; color: var(--gold-s); }
.submenu .submenu-sub a:hover { padding-left: 38px; }
@media (max-width: 760px) {
  .mobile-drawer .submenu .submenu-sub a { padding-left: 40px; }
}

/* ===== Словарь ===== */
.dict-page { padding-top: 10px; }
.dict-intro p { margin: 0 0 12px; line-height: 1.6; }
.dict-lead {
  font-family: Georgia, serif; color: var(--green-d);
  border-left: 4px solid var(--gold); padding: 10px 14px;
  background: rgba(212,166,54,.08); border-radius: 0 10px 10px 0;
}
.dict-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0;
}
.dict-stat {
  position: relative; overflow: hidden; text-align: center;
  background: var(--paper); border: 1px solid rgba(26,107,58,.2);
  border-radius: 14px; padding: 16px 10px 14px;
}
.dict-stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: linear-gradient(90deg, #000 0 33.3%, #fff 33.3% 66.6%, var(--green-d) 66.6% 100%);
}
.dict-stat b {
  display: block; font-family: Georgia, serif; font-size: 28px;
  color: var(--green-d); line-height: 1.1;
}
.dict-stat span { font-size: 13px; color: var(--muted); }
.dict-tools { margin: 0 0 22px; }
.dict-search {
  width: 100%; padding: 13px 16px; font-size: 16px;
  border: 2px solid var(--green); border-radius: 999px;
  background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgba(15,74,37,.08);
}
.dict-search:focus { outline: none; box-shadow: 0 0 0 3px rgba(212,166,54,.35); }
.dict-ltrs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dict-ltr {
  min-width: 34px; padding: 6px 8px; font-family: Georgia, serif; font-size: 15px;
  background: var(--paper); border: 1px solid rgba(26,107,58,.28); border-radius: 8px;
  color: var(--green-d); cursor: pointer; transition: all .15s ease;
}
.dict-ltr:hover { background: var(--green-d); color: #fff; }
.dict-ltr.on { background: var(--green-d); color: #fff; border-color: var(--gold); }
.dict-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dict-card {
  position: relative; overflow: hidden; background: #fffdf7;
  border: 1px solid rgba(26,107,58,.18); border-radius: 14px;
  padding-top: 44px; box-shadow: 0 5px 16px rgba(15,74,37,.07);
  transition: transform .18s ease, box-shadow .18s ease;
}
.dict-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(15,74,37,.14); }
.dict-card-flag {
  position: absolute; top: 0; left: 0; right: 0; height: 32px;
  background: linear-gradient(90deg, #000 0 33.3%, #fff 33.3% 66.6%, var(--green-d) 66.6% 100%);
  border-bottom: 2px solid var(--gold);
}
.dict-card-emblem {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: url('emblem-dido.png') center/contain no-repeat;
  box-shadow: 0 0 0 2px rgba(212,166,54,.9);
}
.dict-card-body { padding: 14px 16px 16px; }
.dict-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dict-word {
  font-family: Georgia, serif; font-size: 22px; font-weight: 700;
  color: var(--green-d); line-height: 1.2;
}
.dict-date { font-size: 12px; color: #a8853a; white-space: nowrap; letter-spacing: .04em; }
.dict-def { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.dict-ex { margin: 10px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; color: #3d3a33; }
.dict-ex b { color: var(--green); }
.dict-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.dict-tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: rgba(15,74,37,.08); border: 1px solid rgba(15,74,37,.22); color: var(--green-d);
}
.dict-img { margin: 0 0 12px; }
.dict-img img { width: 100%; height: 170px; object-fit: cover; display: block; }
.dict-empty { display: none; text-align: center; color: var(--muted); font-style: italic; padding: 26px 0; }
.dict-h2 { margin-top: 38px; }
.dict-sub { color: var(--muted); margin: 0 0 14px; }
.dict-art {
  border: 1px solid rgba(26,107,58,.18); border-radius: 12px; margin-bottom: 10px;
  background: #fffdf7; overflow: hidden;
}
.dict-art > summary {
  cursor: pointer; padding: 13px 16px; font-family: Georgia, serif;
  font-size: 16px; color: var(--green-d); display: flex; justify-content: space-between;
  gap: 12px; align-items: baseline; list-style: none;
}
.dict-art > summary::-webkit-details-marker { display: none; }
.dict-art > summary::before { content: "▸ "; color: var(--gold-s); }
.dict-art[open] > summary::before { content: "▾ "; }
.dict-art-date { font-size: 12px; color: #a8853a; font-style: normal; white-space: nowrap; }
.dict-art-body { padding: 4px 16px 16px; border-top: 1px solid rgba(26,107,58,.12); }
.dict-art-body p { margin: 10px 0; line-height: 1.6; font-size: 15px; }
@media (max-width: 900px) { .dict-list { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .dict-stats { grid-template-columns: 1fr; }
  .dict-word { font-size: 19px; }
  .dict-ltrs { gap: 5px; }
  .dict-ltr { min-width: 30px; font-size: 14px; padding: 5px 6px; }
}

/* ===== Блок-приглашение в Словарь на странице «Язык» ===== */
.lang-dict-cta {
  position: relative; overflow: hidden; margin: 0 0 24px;
  background: #fffdf7; border: 1px solid rgba(26,107,58,.2); border-radius: 16px;
  padding: 52px 20px 20px; box-shadow: 0 6px 18px rgba(15,74,37,.09);
}
.lang-dict-cta-flag {
  position: absolute; top: 0; left: 0; right: 0; height: 38px;
  background: linear-gradient(90deg, #000 0 33.3%, #fff 33.3% 66.6%, var(--green-d) 66.6% 100%);
  border-bottom: 2px solid var(--gold);
}
.lang-dict-cta-emblem {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: url('emblem-dido.png') center/contain no-repeat;
  box-shadow: 0 0 0 2px rgba(212,166,54,.9);
}
.lang-dict-cta-body h3 {
  margin: 0 0 8px; font-family: Georgia, serif; font-size: 24px; color: var(--green-d);
}
.lang-dict-cta-body p { margin: 0 0 14px; line-height: 1.55; }
.lang-dict-cta .ch-more { display: inline-block; }
@media (max-width: 760px) {
  .lang-dict-cta { padding: 46px 15px 16px; }
  .lang-dict-cta-body h3 { font-size: 21px; }
}

/* --- Автоиндекс документов ------------------------------------------------ */
.doc-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.doc-btn-alt { background: transparent !important; color: var(--green-d) !important; }
.doc-btn-alt:hover { color: var(--gold) !important; }
.doc-empty { grid-column: 1 / -1; padding: 26px; text-align: center; color: var(--muted); }

/* ===== Документы РАН: страницы разделов «Язык», «Истории», «Этнос и политика» ===== */
.submenu .submenu-sub-docs { border-top: 1px solid rgba(212,166,54,.45); margin-top: 6px; padding-top: 4px; }
.submenu .submenu-sub-docs .submenu-sub-label {
  display: block; padding: 8px 16px 4px 34px; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold); font-weight: 700;
}
.submenu .submenu-sub-docs .submenu-sub-label .sp-en { display: none; }
html.lang-en .submenu .submenu-sub-docs .submenu-sub-label .sp-ru { display: none; }
html.lang-en .submenu .submenu-sub-docs .submenu-sub-label .sp-en { display: inline; }

.doc-page-content .doc-banner {
  display: flex; gap: 18px; align-items: stretch; margin: 22px 0 18px;
  border: 2px solid var(--green); border-radius: 14px; background: #fff; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.07);
}
.doc-page-content .doc-banner-stripe {
  flex: 0 0 56px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #f7f7f7 0 33%, #2a6b3a 33% 66%, #d4a636 66% 100%);
}
.doc-page-content .doc-banner-stripe img { width: 40px; height: 40px; }
.doc-page-content .doc-banner-body { flex: 1 1 auto; padding: 18px 20px 18px 0; min-width: 0; }
.doc-page-content .doc-banner .docv-badge { display: inline-block; margin-bottom: 8px; padding: 4px 12px; border: 1px solid var(--gold); border-radius: 999px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--green-d); font-weight: 700; }
.doc-page-content .doc-banner .docv-badge .sp-en { display: none; }
html.lang-en .doc-page-content .doc-banner .docv-badge .sp-ru { display: none; }
html.lang-en .doc-page-content .doc-banner .docv-badge .sp-en { display: inline; }

.doc-page-content .doc-banner .docv-title { font-family: Georgia, serif; font-size: 20px; line-height: 1.35; color: var(--black); margin: 0 0 10px; }
.doc-page-content .doc-banner .docv-title .sp-en { display: none; }
html.lang-en .doc-page-content .doc-banner .docv-title .sp-ru { display: none; }
html.lang-en .doc-page-content .doc-banner .docv-title .sp-en { display: block; }
.doc-page-content .doc-banner .doc-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.doc-page-content .doc-banner .doc-btn { display: inline-block; }
.doc-page-content .doc-banner .doc-btn .sp-en { display: none; }
html.lang-en .doc-page-content .doc-banner .doc-btn .sp-ru { display: none; }
html.lang-en .doc-page-content .doc-banner .doc-btn .sp-en { display: inline; }
.doc-page-content .docv-text { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.doc-page-content .docv-text .sp-en { display: none; }
html.lang-en .doc-page-content .docv-text .sp-ru { display: none; }
html.lang-en .doc-page-content .docv-text .sp-en { display: block; }
.doc-page-content .doc-banner .docv-note { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.doc-page-content .doc-banner .docv-note .sp-en { display: none; }
html.lang-en .doc-page-content .doc-banner .docv-note .sp-ru { display: none; }
html.lang-en .doc-page-content .doc-banner .docv-note .sp-en { display: inline; }

.doc-text-block {
  border-left: 4px solid var(--gold); background: rgba(26,107,58,.04);
  border-radius: 0 12px 12px 0; padding: 18px 20px; margin: 18px 0;
}
.doc-text-block p { margin: 0 0 12px; line-height: 1.68; font-size: 15px; color: var(--ink); }
.doc-text-block p:last-child { margin-bottom: 0; }
.doc-text-block .doc-sign { text-align: right; font-family: Georgia, serif; font-style: italic; color: var(--green-d); }

.doc-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 18px 0 8px; }
.doc-page { margin: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.doc-page img { display: block; width: 100%; height: auto; }
.doc-page figcaption { padding: 8px 12px; font-size: 12.5px; color: var(--muted); background: rgba(212,166,54,.10); text-align: center; }
.doc-page figcaption .sp-en { display: none; }
html.lang-en .doc-page figcaption .sp-ru { display: none; }
html.lang-en .doc-page figcaption .sp-en { display: inline; }

@media (max-width: 760px) {
  .doc-page-content .doc-banner { flex-direction: column; }
  .doc-page-content .doc-banner-stripe { flex: 0 0 44px; }
  .doc-page-content .doc-banner-body { padding: 14px 16px 16px; }
  .doc-page-content .doc-banner .doc-title { font-size: 18px; }
  .doc-text-block { padding: 14px 14px; }
  .doc-text-block p { font-size: 14.5px; }
  .doc-pages { grid-template-columns: 1fr; }
}

/* Шапка официального документа */
.doc-head {
  border: 2px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px;
  background: #fff; padding: 16px 18px; margin: 16px 0;
}
.doc-head p { margin: 0 0 6px; font-size: 13px; line-height: 1.55; color: var(--ink); }
.doc-head p:last-child { margin-bottom: 0; }
.doc-head .doc-head-org { font-weight: 700; font-family: Georgia, serif; font-size: 13.5px; text-align: center; color: var(--green-d); }
.doc-head .doc-head-date { font-weight: 700; margin-top: 10px !important; }
.doc-head .doc-head-to { margin-top: 10px !important; font-style: italic; color: var(--muted); }
.doc-sub { font-family: Georgia, serif; font-size: 19px; color: var(--green-d); margin: 28px 0 12px; }
.doc-sub .sp-en { display: none; }
html.lang-en .doc-sub .sp-ru { display: none; }
html.lang-en .doc-sub .sp-en { display: block; }

/* Карточка документа внутри раздела */
.doc-inline {
  display: flex; gap: 16px; align-items: stretch; margin: 20px 0 22px;
  border: 2px solid var(--green); border-radius: 14px; background: #fff; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.07);
}
.doc-inline-stripe {
  flex: 0 0 52px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #f7f7f7 0 33%, #2a6b3a 33% 66%, #d4a636 66% 100%);
}
.doc-inline-stripe img { width: 38px; height: 38px; }
.doc-inline-body { flex: 1 1 auto; padding: 16px 18px 16px 0; min-width: 0; }
.doc-inline .docv-badge { display: inline-block; margin-bottom: 8px; padding: 4px 12px; border: 1px solid var(--gold); border-radius: 999px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--green-d); font-weight: 700; }
.doc-inline .docv-badge .sp-en { display: none; }
html.lang-en .doc-inline .docv-badge .sp-ru { display: none; }
html.lang-en .doc-inline .docv-badge .sp-en { display: inline; }
.doc-inline .docv-title { font-family: Georgia, serif; font-size: 19px; line-height: 1.35; color: var(--black); margin: 0 0 8px; }
.doc-inline .docv-title .sp-en { display: none; }
html.lang-en .doc-inline .docv-title .sp-ru { display: none; }
html.lang-en .doc-inline .docv-title .sp-en { display: block; }
.doc-inline .docv-text { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.doc-inline .docv-text .sp-en { display: none; }
html.lang-en .doc-inline .docv-text .sp-ru { display: none; }
html.lang-en .doc-inline .docv-text .sp-en { display: block; }
.doc-inline .doc-links { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-inline .doc-btn { display: inline-block; }
.doc-inline .doc-btn .sp-en { display: none; }
html.lang-en .doc-inline .doc-btn .sp-ru { display: none; }
html.lang-en .doc-inline .doc-btn .sp-en { display: inline; }
@media (max-width: 760px) {
  .doc-inline { flex-direction: column; }
  .doc-inline-stripe { flex: 0 0 42px; }
  .doc-inline-body { padding: 14px 16px 16px; }
  .doc-inline .docv-title { font-size: 17px; }
}

/* Две части документа внутри карточки */
.doc-docrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.doc-docrow-item { border: 1px solid var(--line); border-radius: 12px; background: #fbf8f0; padding: 14px 16px; }
.doc-docrow-title { font-family: Georgia, serif; font-size: 16.5px; font-weight: 700; color: var(--green-d); margin-bottom: 4px; }
.doc-docrow-title .sp-en { display: none; }
html.lang-en .doc-docrow-title .sp-ru { display: none; }
html.lang-en .doc-docrow-title .sp-en { display: block; }
.doc-docrow-note { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-bottom: 10px; }
.doc-docrow-note .sp-en { display: none; }
html.lang-en .doc-docrow-note .sp-ru { display: none; }
html.lang-en .doc-docrow-note .sp-en { display: block; }
.doc-page-one { margin-top: 16px; max-width: 520px; }
.doc-page-one img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 760px) {
  .doc-docrow { grid-template-columns: 1fr; }
}

/* ---------- Карточки приложений (страница «Приложения») ---------- */
.app-cards { display: grid; gap: 16px; margin: 14px 0 8px; }
.app-card {
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  padding: 18px 20px; box-shadow: 0 4px 14px rgba(20,40,28,.06);
}
.app-card-top { display: flex; align-items: center; gap: 14px; }
.app-card-icon {
  width: 62px; height: 62px; border-radius: 15px; object-fit: cover;
  border: 2px solid var(--green); box-shadow: 0 3px 10px rgba(15,107,63,.22); flex: none;
}
.app-card-head { min-width: 0; }
.app-card-name {
  font-family: Georgia, serif; font-size: 20px; font-weight: 700; color: var(--green-d); line-height: 1.2;
}
.app-card-name .sp-en { display: none; }
html.lang-en .app-card-name .sp-ru { display: none; }
html.lang-en .app-card-name .sp-en { display: block; }
.app-card-ver { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.app-card-ver .sp-en { display: none; }
html.lang-en .app-card-ver .sp-ru { display: none; }
html.lang-en .app-card-ver .sp-en { display: inline; }
.app-card-desc { font-size: 14.5px; line-height: 1.6; color: var(--ink); margin: 12px 0 0; }
.app-store-ico { width: 22px; height: 22px; flex: none; }
.app-btn .app-store-ico { filter: brightness(0) invert(1); }
.app-btn.is-soon .app-store-ico { filter: none; }
@media (max-width: 760px) {
  .app-card { padding: 15px 15px; }
  .app-card-icon { width: 54px; height: 54px; }
  .app-card-name { font-size: 18px; }
}

/* ---------- Карточка «ДИДО СПОРТ» в разделе «Проекты» ---------- */
.our-project-card { margin: 0 0 18px; }
.history .our-project-card .proj-app .proj-out-link {
  display: inline-block; background: var(--green); color: #fff !important; text-decoration: none;
  border-bottom: none !important; font-style: normal; font-weight: 700; font-size: 15px;
  padding: 11px 22px; border-radius: 12px;
  box-shadow: 0 4px 12px rgba(15,107,63,.25); transition: transform .15s ease, background .15s ease;
}
.history .our-project-card .proj-app .proj-out-link:hover { background: var(--green-d); transform: translateY(-1px); color: #fff !important; }
