/* VGD — Всероссийское Генеалогическое Древо
   Static styles, mobile-first, docs.vgd.ru visual language.
   Old-device safe: flexbox/block layout, system fonts, no CSS grid dependence,
   no web-font CDN, minimal animations. */

/* ---------- Tokens ---------- */
:root {
  --green:        #305848;
  --green-2:      #2f5a49;
  --green-dark:   #24483b;
  --green-deep:   #1d3a30;
  --line-pale:    #86a69a;
  --on-green:     #ffffff;
  --on-green-mute:#d8e5df;
  --bg:           #ffffff;
  --bg-soft:      #f7f8f5;
  --bg-warm:      #f1efe8;
  --ink:          #1f2522;
  --ink-mute:     #5a635e;
  --rule:         #e3e6e0;
}

/* ---------- Reset & base ----------
   Body typography aligned with gedcom.vgd.ru .basecontent:
   Arial 14px, color #454545, paragraph rhythm ~7pt/14pt. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #454545;
  background: var(--bg);
  word-break: break-word;
}
img { max-width: 100%; height: auto; border: 0; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; color: var(--ink); font-weight: 700; font-family: Arial, Helvetica, sans-serif; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 7px 0 14px; }
ul, ol { padding-left: 1.2em; }
a { color: var(--green-2); text-decoration: underline; }
a:hover { color: var(--green-deep); }
a:focus, button:focus, input:focus, [tabindex]:focus { outline: 2px solid var(--green); outline-offset: 2px; }
:target { scroll-margin-top: 12px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
table { border-collapse: collapse; width: 100%; }

/* Editorial serif used in hero and big section heads */
.serif {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 400;
}

/* ---------- Layout helpers ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-deep); color: #fff; padding: 8px 12px; z-index: 1000;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header (gedcom.vgd.ru template-derived, static) ---------- */
.vgd-header {
  background: #2d584a;
  color: #fff;
}
.vgd-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 80px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  gap: 16px;
}
.vgd-header-logo {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
  min-width: 0;
}
.vgd-header-logo img {
  display: block;
  width: auto;
  height: 50px;
  max-width: 330px;
  flex-shrink: 0;
}
.vgd-header-burger {
  -webkit-appearance: none; appearance: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.vgd-header-burger span:not(.skip) {
  display: block;
  width: 22px;
  height: 2px;
  background: #fcfcfc;
}
.vgd-header-burger:focus { outline: 2px solid #d8e5df; outline-offset: 2px; }

.vgd-header-nav { flex: 0 0 auto; }
.vgd-header-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 0;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
}
.vgd-header-nav li { padding: 0 15px; }
.vgd-header-nav a {
  color: #dfdfdf;
  text-decoration: none;
  font-size: 14px;
  line-height: 80px;
  display: inline-block;
  -webkit-transition: color 0.3s ease-in-out; transition: color 0.3s ease-in-out;
}
.vgd-header-nav a:hover { color: #fff; }

.vgd-header-nav .vgd-header-auth { padding: 0 0 0 8px; display: flex; align-items: center; }
.vgd-header-nav .vgd-header-auth:first-of-type { padding-left: 15px; }
.vgd-header-nav .vgd-header-btn {
  display: inline-block;
  line-height: 1.2;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.vgd-header-nav .vgd-header-btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,0.55);
  background: transparent;
}
.vgd-header-nav .vgd-header-btn-outline:hover {
  color: #2d584a;
  background: #fff;
  border-color: #fff;
}
.vgd-header-nav .vgd-header-btn-primary {
  color: #1d3a30;
  background: #f4c542;
  border-color: #d8a82a;
  padding: 9px 18px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.22);
}
.vgd-header-nav .vgd-header-btn-primary:hover,
.vgd-header-nav .vgd-header-btn-primary:active {
  color: #1d3a30;
  background: #ffd454;
  border-color: #d8a82a;
}

.vgd-header-nav .vgd-header-user {
  padding: 0 0 0 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vgd-header-nav .vgd-header-user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
  color: #fff;
  max-width: 220px;
}
.vgd-header-nav .vgd-header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
  background: rgba(255,255,255,0.12);
  object-fit: cover;
  flex: 0 0 auto;
}
.vgd-header-nav .vgd-header-user-nick {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}
.vgd-header-nav .vgd-header-user-link:hover .vgd-header-user-nick { color: #f4c542; }
.vgd-header-nav .vgd-header-user-logout {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  line-height: 1.2;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 5px 10px;
  border-radius: 4px;
}
.vgd-header-nav .vgd-header-user-logout:hover {
  color: #2d584a;
  background: #fff;
  border-color: #fff;
}

.vgd-header-nav .vgd-header-auth-loading {
  padding-left: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 230px;
  box-sizing: border-box;
}
.vgd-header-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: rgba(255,255,255,0.85);
  animation: vgd-header-spin 0.8s linear infinite;
}
@keyframes vgd-header-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .vgd-header-spinner { animation: none; opacity: 0.6; }
}

@media (max-width: 980px) {
  .vgd-header-inner {
    height: 60px;
    padding: 0 14px;
  }
  .vgd-header-logo img { height: 40px; max-width: 100%; }
  .vgd-header-burger { display: -webkit-box; display: -ms-flexbox; display: flex; }
  .vgd-header-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 60px;
    background: #2d584a;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  }
  .vgd-header-nav.is-open { display: block; }
  .vgd-header-nav ul { flex-direction: column; padding-bottom: 20px; }
  .vgd-header-nav li { padding: 0; border-top: 1px solid rgba(255,255,255,0.08); }
  .vgd-header-nav a {
    line-height: 1.2;
    padding: 14px 20px;
    display: block;
    font-size: 16px;
  }
  .vgd-header-nav .vgd-header-auth { padding: 10px 24px; display: block; box-sizing: border-box; }
  .vgd-header-nav .vgd-header-auth:first-of-type { padding-left: 24px; padding-right: 24px; }
  .vgd-header-nav .vgd-header-btn {
    display: block;
    text-align: center;
    padding: 12px 16px;
    font-size: 15px;
    box-sizing: border-box;
    width: 100%;
  }
  .vgd-header-nav .vgd-header-btn-primary { padding: 12px 18px; }
  .vgd-header-nav .vgd-header-user {
    padding: 12px 24px;
    box-sizing: border-box;
    gap: 12px;
    justify-content: space-between;
  }
  .vgd-header-nav .vgd-header-user-link { max-width: none; flex: 1 1 auto; min-width: 0; }
  .vgd-header-nav .vgd-header-user-nick { max-width: none; font-size: 15px; }
  .vgd-header-nav .vgd-header-user-logout { flex: 0 0 auto; padding: 8px 14px; font-size: 13px; }
  .vgd-header-nav .vgd-header-auth-loading { padding: 14px 24px; min-height: 0; min-width: 0; justify-content: flex-start; }
  .vgd-header { position: relative; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  -webkit-transition: background 0.15s ease, color 0.15s ease;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: center;
  line-height: 1.2;
  font-family: Arial, Helvetica, sans-serif;
}
.btn-primary {
  background: var(--green);
  color: var(--on-green);
  border-color: var(--green);
  -webkit-box-shadow: 0 2px 0 rgba(29,58,48,0.18);
  box-shadow: 0 2px 0 rgba(29,58,48,0.18);
}
.btn-primary:hover { background: var(--green-deep); color: #fff; }
.btn-secondary {
  background: #fff;
  color: var(--green-deep);
  border-color: var(--green);
}
.btn-secondary:hover { background: var(--bg-soft); }
.btn-on-green {
  background: #fff;
  color: var(--green-deep);
  border-color: #fff;
  -webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.18);
  box-shadow: 0 2px 0 rgba(0,0,0,0.18);
}
.btn-on-green:hover { background: var(--bg-soft); color: var(--green-deep); }
.btn-ghost {
  background: transparent;
  color: var(--on-green);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn-link {
  background: transparent; color: var(--green-2);
  text-decoration: underline; padding: 12px 6px;
}

/* ---------- Hero ---------- */
.hero {
  background: #2d584a;
  color: var(--on-green);
  padding: 36px 0 40px;
}
.hero h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: var(--on-green);
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 14px;
}
.hero-mission {
  color: rgba(255,255,255,0.92);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.hero-tag:hover { background: rgba(255,255,255,0.22); color: #fff; }
.hero-tag:focus { outline: 2px solid #fff; outline-offset: 2px; }

@media (min-width: 700px) {
  .hero { padding: 48px 0 52px; }
  .hero h1 { font-size: 32px; }
  .hero-mission { font-size: 15px; }
  .hero-tag { font-size: 13px; padding: 7px 14px; }
}
@media (min-width: 1000px) {
  .hero { padding: 60px 0 64px; }
  .hero h1 { font-size: 36px; }
  .hero-mission { font-size: 15px; }
}

/* ---------- Generic sections ---------- */
.section { padding: 24px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { margin-bottom: 16px; }
.section-head h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: var(--green-deep);
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 6px;
}
.section-head p { color: var(--ink-mute); margin: 0; font-size: 13px; }
.section-aside { color: var(--ink-mute); margin-top: 12px; font-size: 13px; }
.muted { color: var(--ink-mute); }
.small { font-size: 12px; }

@media (min-width: 700px) {
  .section { padding: 40px 0; }
  .section-head { margin-bottom: 18px; }
  .section-head h2 { font-size: 20px; line-height: 1.2; }
  .section-head p { font-size: 14px; }
  .section-aside { margin-top: 14px; }
}

/* ---------- Two-col layouts (flex, with fallback) ----------
   - .two-col      : equal halves (1fr 1fr) for two non-ad columns
   - .two-col-ad   : flexible content + fixed ad column sized to the banner
   - .two-col-wide : legacy 70/30 (kept for compatibility)
*/
.two-col, .two-col-wide, .two-col-ad {
  display: block;
}
@media (min-width: 900px) {
  .two-col, .two-col-wide, .two-col-ad {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    gap: 32px;
    -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start;
  }
  /* Equal halves for non-ad two-col blocks */
  .two-col > .col,
  .two-col > .col-main,
  .two-col > .col-side {
    -webkit-box-flex: 1; -ms-flex: 1 1 0; flex: 1 1 0; min-width: 0;
  }
  /* Ad-right blocks: content flexes, ad column fixed */
  .two-col-ad > .col,
  .two-col-ad > .col-main {
    -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; min-width: 0;
  }
  .two-col-ad > .col-ad {
    -webkit-box-flex: 0; -ms-flex: 0 0 300px; flex: 0 0 300px;
    width: 300px; min-width: 0;
  }
  /* Legacy wide layout */
  .two-col-wide .col { -webkit-box-flex: 1; -ms-flex: 1 1 70%; flex: 1 1 70%; min-width: 0; }
  .two-col-wide .col-narrow { -webkit-box-flex: 0; -ms-flex: 0 1 30%; flex: 0 1 30%; }
}
.col + .col { margin-top: 18px; }
@media (min-width: 900px) { .col + .col { margin-top: 0; } }

/* ---------- Cards / lists ---------- */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 14px 14px 12px;
  -webkit-box-shadow: 0 1px 0 rgba(31,37,34,0.04);
  box-shadow: 0 1px 0 rgba(31,37,34,0.04);
}
@media (min-width: 700px) {
  .card { padding: 18px 18px 14px; }
}
.section-alt .card { background: #fff; }
.card + .card { margin-top: 12px; }
.card-title {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: var(--green-deep);
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.25;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 8px;
}
@media (min-width: 700px) {
  .card-title { font-size: 15px; margin: 0 0 10px; }
}
.card-more {
  display: inline-block; margin-top: 8px;
  font-size: 13px;
}

.list-rich, .live-feed {
  list-style: none; padding: 0; margin: 0;
}
.list-rich li, .live-feed li {
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.5;
}
@media (min-width: 700px) {
  .list-rich li, .live-feed li { padding: 9px 0; font-size: 13px; line-height: 1.55; }
}
.list-rich li:last-child, .live-feed li:last-child { border-bottom: 0; }
.list-rich .meta {
  display: block; font-size: 12px; color: var(--ink-mute); margin-top: 2px;
}
.tree-list .tree-surnames {
  display: block; margin-top: 2px;
  font-size: 12px; color: var(--ink); line-height: 1.5;
}
.tree-list .meta a { color: var(--green-deep); }
.live-feed .tag {
  display: inline-block;
  font-size: 11px;
  background: var(--bg-warm); color: var(--green-deep);
  padding: 1px 6px; border-radius: 3px; margin-right: 6px;
}
.tag-tree    { background: #e7efe9; }
.tag-forum   { background: #ece6d6; }
.tag-gedcom  { background: #e6ecdf; }
.tag-match   { background: #e3eae8; }
.tag-archive { background: #efe7d8; }

.gedcom-imports .meta { color: var(--ink-mute); }

.pulse {
  display: inline-block; width: 8px; height: 8px;
  background: #4caf80; border-radius: 50%;
}

/* ---------- Steps ---------- */
.steps {
  list-style: none; padding: 0; margin: 0;
}
.steps li {
  position: relative;
  padding: 12px 0 12px 48px;
  border-bottom: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 0; }
.step-num {
  position: absolute; left: 0; top: 12px;
  width: 28px; height: 28px;
  background: var(--green);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 14px;
  border-radius: 50%;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.steps h3 { color: var(--green-deep); margin: 0 0 3px; font-size: 14px; line-height: 1.25; font-weight: 700; }
.steps p { margin: 0; color: var(--ink-mute); font-size: 13px; line-height: 1.5; }
@media (min-width: 700px) {
  .steps li { padding: 14px 0 14px 48px; }
  .step-num { left: 0; top: 14px; width: 30px; height: 30px; font-size: 14px; }
  .steps h3 { margin: 0 0 3px; font-size: 14px; }
  .steps p { font-size: 13px; line-height: 1.55; }
}

/* ---------- Forum table ---------- */
.subhead {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: var(--green-deep);
  font-size: 15px;
  margin: 16px 0 8px;
}
.topics {
  font-size: 13px;
}
.topics thead th {
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--rule);
  padding: 8px 8px;
}
.topics tbody td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.topics tbody tr:hover { background: rgba(48,88,72,0.04); }
.topics td a { color: var(--green-deep); text-decoration: none; font-weight: 700; }
.topics td a:hover { text-decoration: underline; }
.topics td:nth-child(2) { color: var(--ink-mute); white-space: nowrap; width: 1%; }
.topics .topic-section {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-mute);
}
@media (max-width: 640px) {
  .topics thead { display: none; }
  .topics tbody tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
  }
  .topics tbody td { display: block; border: 0; padding: 2px 0; white-space: normal; width: auto; }
  .topics tbody td:first-child { font-weight: 600; margin-bottom: 4px; }
  .topics tbody td:nth-child(2)::before { content: "Последний: "; color: var(--ink-mute); }
}

/* ---------- Alphabet grid ---------- */
.alpha-grid {
  list-style: none; padding: 0; margin: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 4px;
}
.alpha-grid li { width: calc(14.28% - 4px); }
.alpha-grid a {
  display: block; text-align: center;
  padding: 7px 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  color: var(--green-deep);
  font-weight: 700;
  font-size: 13px;
}
.alpha-grid a:hover { background: var(--bg-soft); }

/* ---------- CTA zone (e.g. GEDCOM) ---------- */
.cta-zone {
  margin: 12px 0 4px;
  padding: 0;
}
.cta-zone-note {
  margin: 0 0 10px;
  color: var(--ink-mute);
}

/* Button row: stack on mobile, inline on desktop, consistent widths */
.btn-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  gap: 10px;
  margin: 8px 0;
}
.btn-row .btn { width: 100%; }
.btn-row-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
@media (min-width: 700px) {
  .btn-row {
    -webkit-box-orient: horizontal; -webkit-box-direction: normal;
    -ms-flex-direction: row; flex-direction: row;
    -ms-flex-wrap: wrap; flex-wrap: wrap;
    gap: 12px;
  }
  .btn-row .btn { width: auto; }
  .btn-row-center { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
}

/* ---------- News ---------- */
.news-list {
  list-style: none; padding: 0; margin: 0;
}
.news-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.news-item:last-child { border-bottom: 0; }
.news-date { display: block; font-size: 12px; color: var(--ink-mute); margin-bottom: 3px; }
.news-item h3 {
  font-family: Arial, Helvetica, sans-serif; font-weight: 700;
  color: var(--green-deep); font-size: 14px; line-height: 1.3; margin: 0 0 4px;
}
.news-item h3 a { color: inherit; text-decoration: none; }
.news-item h3 a:hover { text-decoration: underline; }
.news-item p { margin: 0; color: var(--ink-mute); font-size: 13px; line-height: 1.5; }
.pebble-block { background: transparent; border: 0; padding: 0; box-shadow: none; }
.pebble-title {
  font-family: Arial, Helvetica, sans-serif; font-weight: 700;
  color: var(--green-deep); margin: 0 0 8px;
  font-size: 15px; line-height: 1.25;
}
.pebble-title a { color: inherit; text-decoration: none; }
.pebble-title a:hover { text-decoration: underline; }
.pebble { margin-top: 8px; }
.pebble p { margin: 6px 0 12px; color: var(--ink); font-size: 13px; line-height: 1.55; }
.pebble .pebble-author { color: var(--ink-mute); font-style: italic; font-size: 12px; margin: 0; }
.pebble-sign {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 8px;
  margin: 6px 0 12px;
}
.pebble-avatar {
  -webkit-box-flex: 0; -ms-flex: 0 0 36px; flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  -o-object-fit: cover; object-fit: cover;
  -o-object-position: center 20%; object-position: center 20%;
  display: block;
}
@media (min-width: 700px) {
  .news-item { padding: 14px 0; }
  .news-date { font-size: 12px; margin-bottom: 3px; }
  .news-item h3 { font-size: 15px; line-height: 1.25; margin: 0 0 5px; }
  .news-item p { font-size: 13px; line-height: 1.55; }
}

/* ---------- Useful ---------- */
.useful-list {
  list-style: none; padding: 0; margin: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 0;
}
.useful-list li { width: 100%; }
@media (min-width: 600px) { .useful-list li { width: 50%; } }
@media (min-width: 900px) { .useful-list li { width: 25%; } }
.useful-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--rule);
  margin: -1px 0 0 -1px; /* collapse adjacent borders for grid feel */
  text-decoration: none;
  color: inherit;
  background: #fff;
  height: 100%;
}
.useful-card:hover { background: var(--bg-soft); }
.useful-card h3 {
  font-family: Arial, Helvetica, sans-serif; font-weight: 700;
  color: var(--green-deep); font-size: 14px; margin: 0 0 4px;
}
.useful-card p { margin: 0; color: var(--ink-mute); font-size: 13px; line-height: 1.5; }

/* Useful section: list on the left, narrow Генеалогический вестник column on the right */
.useful-cols { display: block; }
.useful-cols > .useful-list { width: 100%; }
.useful-aside {
  margin-top: 18px;
  text-align: center;
}
.useful-gv {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}
.useful-gv__img { display: block; width: 150px; max-width: 100%; height: auto; margin: 0 auto 3px; }
.useful-gv__text { color: var(--green-deep); }
.useful-gv:hover .useful-gv__text { text-decoration: underline; }
@media (min-width: 900px) {
  .useful-cols {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    gap: 24px;
    -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start;
  }
  .useful-cols > .useful-list { -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; }
  .useful-aside {
    -webkit-box-flex: 0; -ms-flex: 0 0 170px; flex: 0 0 170px;
    width: 170px; margin-top: 0; padding-top: 0px;
  }
}

/* ---------- Memory (atmospheric photos) ---------- */
.memory { background: var(--bg-warm); }
.memory .section-head h2 { font-size: 18px; line-height: 1.25; }
.memory-list {
  list-style: none; padding: 0; margin: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 0;
}
.memory-list > li { width: 100%; padding: 8px 0 14px; }
@media (min-width: 800px) {
  .memory-list > li { width: 33.33%; padding: 14px; }
  .memory .section-head h2 { font-size: 20px; }
}
.memory-item { margin: 0; }
.memory-photo {
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 4px;
  -webkit-filter: saturate(0.85);
  filter: saturate(0.85);
}
.memory-photo img { width: 100%; height: auto; display: block; }
.memory-body { padding: 0; }
.memory-body h3 {
  font-family: Arial, Helvetica, sans-serif; font-weight: 700;
  color: var(--green-deep); font-size: 14px; line-height: 1.3; margin: 0 0 4px;
}
.memory-body p { color: var(--ink-mute); font-size: 13px; line-height: 1.55; margin: 0; }
@media (min-width: 700px) {
  .memory-body h3 { font-size: 15px; }
  .memory-body p { font-size: 13px; line-height: 1.55; }
}

/* ---------- Privacy ---------- */
.privacy { background: var(--green); color: var(--on-green); padding: 24px 0; }
.privacy .section-head h2 { color: #fff; font-size: 18px; line-height: 1.25; }
.privacy .section-head p { color: var(--on-green-mute); font-size: 13px; }
.privacy-list {
  list-style: none; padding: 0; margin: 0;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
}
.privacy-list > li { width: 100%; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.privacy-list > li:last-child { border-bottom: 0; }
@media (min-width: 700px) {
  .privacy { padding: 40px 0; }
  .privacy .section-head h2 { font-size: 20px; }
  .privacy .section-head p { font-size: 14px; }
}
@media (min-width: 800px) {
  .privacy-list > li { width: 50%; padding: 18px 24px 18px 0; border-bottom: 0; }
}
.privacy-item h3 {
  font-family: Arial, Helvetica, sans-serif; font-weight: 700;
  color: #fff; font-size: 14px; line-height: 1.3; margin: 0 0 4px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 10px;
}
@media (min-width: 700px) { .privacy-item h3 { font-size: 15px; margin: 0 0 6px; } }
.privacy-icon {
  display: inline-block;
  width: 26px; height: 26px;
  border: 1px solid var(--line-pale);
  border-radius: 50%;
  font-size: 11px; line-height: 24px; text-align: center;
  color: #fff; font-weight: 700;
  flex: 0 0 auto;
}
.privacy-item p { color: var(--on-green-mute); margin: 0; font-size: 13px; line-height: 1.5; }
@media (min-width: 700px) { .privacy-item p { font-size: 13px; line-height: 1.55; } }

/* ---------- Responsibility (anti-fraud / safe communication) ---------- */
.responsibility { background: var(--bg-warm); color: var(--ink); padding: 24px 0; }
.responsibility .section-head h2 { color: var(--green-deep); font-size: 18px; line-height: 1.25; }
.responsibility .section-head p { color: var(--ink-mute); font-size: 13px; }
@media (min-width: 700px) {
  .responsibility { padding: 40px 0; }
  .responsibility .section-head h2 { font-size: 20px; }
  .responsibility .section-head p { font-size: 14px; }
}
.responsibility-list {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
}
.responsibility-list > li {
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.responsibility-list > li:last-child { border-bottom: 0; }
@media (min-width: 800px) {
  .responsibility-list > li {
    width: 50%;
    padding: 18px 24px 18px 0;
    border-bottom: 0;
  }
}
.responsibility-item h3 {
  font-family: Arial, Helvetica, sans-serif; font-weight: 700;
  color: var(--green-deep); font-size: 14px; line-height: 1.3; margin: 0 0 4px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 10px;
}
@media (min-width: 700px) { .responsibility-item h3 { font-size: 15px; margin: 0 0 6px; } }
.resp-icon {
  display: inline-block;
  width: 26px; height: 26px;
  border: 1px solid var(--green);
  background: #fff;
  border-radius: 50%;
  font-size: 12px; line-height: 24px; text-align: center;
  color: var(--green-deep);
  flex: 0 0 auto;
}
.responsibility-item p { color: var(--ink-mute); margin: 0; font-size: 13px; line-height: 1.5; }
@media (min-width: 700px) { .responsibility-item p { font-size: 13px; line-height: 1.55; } }
.responsibility-cta { margin: 8px 0 6px; }
.responsibility-closing {
  margin: 6px 0 0; color: var(--green-deep);
  font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 14px;
}
@media (min-width: 700px) { .responsibility-closing { font-size: 14px; } }

/* ---------- Final CTA ---------- */
.section-cta {
  background: var(--green-deep);
  color: var(--on-green);
  text-align: center;
  padding: 28px 0;
}
.section-cta h2 {
  font-family: Arial, Helvetica, sans-serif; font-weight: 700;
  color: #fff; font-size: 20px; line-height: 1.25; margin: 0 0 10px;
}
.section-cta p { color: var(--on-green-mute); font-size: 13px; }
.section-cta .btn-row { margin-top: 14px; }
.section-cta .btn { min-width: 240px; }
@media (min-width: 700px) {
  .section-cta { padding: 40px 0; }
  .section-cta h2 { font-size: 22px; margin: 0 0 10px; }
  .section-cta p { font-size: 14px; }
}

/* CTA banner with photo underlay */
.cta-banner {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  min-height: 360px;
  background: #000;
  isolation: isolate;
}
.cta-banner-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
.cta-banner-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 30%;
  display: block;
  transform: scaleX(-1);
}
.cta-banner-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.78) 28%, rgba(0,0,0,0.30) 52%, rgba(0,0,0,0) 70%);
}
.cta-banner-inner {
  position: relative;
  z-index: 2;
  text-align: left;
}
.cta-banner-inner > * { max-width: 640px; }
.cta-banner-inner .btn-row { max-width: 640px; }
.cta-banner h2 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 400;
  color: #fff;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 12px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.45);
}
.cta-banner p {
  color: #f3ece1;
  font-size: 15px;
  line-height: 1.55;
  max-width: 560px;
  margin: 0 0 20px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
}
.cta-banner .btn-row { margin-top: 18px; justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
.cta-banner .btn { min-width: 0; }
.btn-cta-primary {
  background: #f4c542;
  color: #1d3a30;
  border-color: #d8a82a;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(0,0,0,0.22);
}
.btn-cta-primary:hover { background: #ffd454; color: #1d3a30; }
.btn-cta-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.55);
  backdrop-filter: blur(2px);
}
.btn-cta-ghost:hover { background: rgba(255,255,255,0.22); color: #fff; }

@media (min-width: 700px) {
  .cta-banner { padding: 110px 0; min-height: 460px; }
  .cta-banner h2 { font-size: 34px; margin: 0 0 14px; }
  .cta-banner p { font-size: 16px; }
}
@media (min-width: 1000px) {
  .cta-banner { padding: 140px 0; min-height: 540px; }
  .cta-banner h2 { font-size: 40px; }
}
@media (max-width: 560px) {
  .cta-banner { padding: 320px 0 44px; min-height: 560px; }
  .cta-banner-img img { object-position: 35% 22%; }
  .cta-banner-shade {
    background:
      linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 48%, rgba(0,0,0,0.80) 68%, rgba(0,0,0,0.95) 100%);
  }
  .cta-banner-inner { text-align: center; margin: 0 auto; padding: 0 18px; }
  .cta-banner p { margin-left: auto; margin-right: auto; }
  .cta-banner .btn-row { justify-content: center; }
  .cta-banner h2 { font-size: 24px; }
}

/* ---------- Stones admin alert (separate from posts; shown above Pebbles) ---------- */
.stones-alert {
  background: #fbf6e2;
  border-left: 3px solid #c9a227;
  padding: 10px 12px;
  border-radius: 0 4px 4px 0;
  margin: 0 0 14px;
}
.stones-alert__title {
  font-family: Arial, Helvetica, sans-serif; font-weight: 700;
  color: var(--ink); font-size: 14px; line-height: 1.25;
  margin: 0 0 6px;
}
.stones-alert .disclaimer {
  background: transparent;
  border-left: 0;
  padding: 0;
  border-radius: 0;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}
.stones-alert .disclaimer:last-child { margin-bottom: 0; }

/* Style variants — 10 visually distinct treatments. Tasteful, on-brand.
   Each modifier explicitly overrides background, border, title color,
   and inner .disclaimer color so the cascade cannot mute it. */

/* default — sand/gold accent. */
.stones-alert--default {
  background: #fbf6e2;
  border: 0;
  border-left: 3px solid #c9a227;
}
.stones-alert--default .stones-alert__title { color: #5a4418; }
.stones-alert--default .disclaimer { color: #3a2f12; }

/* alarm — red border and tinted background for urgent notices. */
.stones-alert--alarm {
  background: #fdecea;
  border: 1px solid #d23b2d;
  border-left: 6px solid #b3261e;
  border-radius: 4px;
}
.stones-alert--alarm .stones-alert__title { color: #b3261e; }
.stones-alert--alarm .disclaimer { color: #5a1410; }

/* festive — warm peach gradient with a thick gold ribbon. */
.stones-alert--festive {
  background: linear-gradient(180deg, #fff4d6 0%, #ffe0bf 100%);
  border: 1px solid #e0a93b;
  border-left: 6px solid #c47a1c;
  border-radius: 6px;
}
.stones-alert--festive .stones-alert__title { color: #8a4a0d; }
.stones-alert--festive .disclaimer { color: #5b3a0d; }

/* info — calm blue, like a tip. */
.stones-alert--info {
  background: #eaf2fb;
  border: 0;
  border-left: 4px solid #2f6fb6;
}
.stones-alert--info .stones-alert__title { color: #1d3a5c; }
.stones-alert--info .disclaimer { color: #1d3a5c; }

/* success — soft green congrats tone. */
.stones-alert--success {
  background: #e6f4ea;
  border: 0;
  border-left: 4px solid #2f8049;
}
.stones-alert--success .stones-alert__title { color: #1f5b32; }
.stones-alert--success .disclaimer { color: #1d4a2b; }

/* archive — sepia/parchment for archival announcements. */
.stones-alert--archive {
  background: #f3ecdc;
  border: 1px dashed #b8a373;
  border-left: 4px solid #8a6d2c;
  border-radius: 3px;
}
.stones-alert--archive .stones-alert__title {
  color: #5a4418;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}
.stones-alert--archive .disclaimer { color: #4a3b1a; font-style: italic; }

/* quiet — neutral grey, low emphasis. */
.stones-alert--quiet {
  background: #eceeea;
  border: 0;
  border-left: 3px solid #8a8f88;
}
.stones-alert--quiet .stones-alert__title { color: #3a3f3b; font-weight: 600; }
.stones-alert--quiet .disclaimer { color: #3a3f3b; }

/* contrast — dark inverted card; high attention without alarming red. */
.stones-alert--contrast {
  background: #1f2522;
  border: 0;
  border-left: 3px solid #c9a227;
  border-radius: 4px;
}
.stones-alert--contrast .stones-alert__title { color: #f7e6a8; }
.stones-alert--contrast .disclaimer { color: #e6e3d7; }
.stones-alert--contrast a { color: #f7e6a8; }

/* official — VGD green-on-pale, formal announcement. */
.stones-alert--official {
  background: #eef4f0;
  border: 1px solid #305848;
  border-left: 6px solid #305848;
  border-radius: 4px;
}
.stones-alert--official .stones-alert__title {
  color: #24483b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13px;
}
.stones-alert--official .disclaimer { color: #1d3a30; }

/* memorial — restrained black band, for mourning notices. */
.stones-alert--memorial {
  background: #f4f3f0;
  border: 0;
  border-top: 2px solid #1f2522;
  border-bottom: 2px solid #1f2522;
  border-radius: 0;
  padding: 12px 14px;
}
.stones-alert--memorial .stones-alert__title {
  color: #1f2522;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.02em;
}
.stones-alert--memorial .disclaimer { color: #2a2a2a; }

/* ---------- Stones critical message (full-width row above #start two-col block) ---------- */
.stones-critical-wrap {
  display: block;
  width: 100%;
  background: transparent;
  margin: 0;
  padding: 18px 0;
}
.stones-critical-wrap > .wrap {
  padding-top: 0;
  padding-bottom: 0;
}
.stones-critical {
  margin: 0;
  padding: 14px 18px;
  border-radius: 6px;
}
.stones-critical .stones-critical__title {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 8px;
  font-weight: 700;
}
.stones-critical .disclaimer {
  font-size: 14px;
  line-height: 1.6;
}
@media (max-width: 700px) {
  .stones-critical-wrap { padding-top: 12px; padding-bottom: 12px; }
  .stones-critical { padding: 12px 14px; }
  .stones-critical .stones-critical__title { font-size: 16px; }
  .stones-critical .disclaimer { font-size: 13px; }
}

/* ---------- Disclaimer ---------- */
.disclaimer {
  background: var(--bg-warm);
  border-left: 3px solid var(--green);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  border-radius: 0 4px 4px 0;
  margin: 0 0 14px;
}
@media (min-width: 700px) {
  .disclaimer { padding: 10px 14px; font-size: 13px; line-height: 1.55; }
}

/* ---------- Ads (frameless, calm whitespace) ---------- */
.ad {
  background: transparent;
  border: 0;
  margin: 16px auto;
  max-width: 1180px;
  padding: 0 18px;
  text-align: center;
}
.ad-sidebar { padding: 0; }
@media (max-width: 899px) {
  .ad-sidebar-rtb { max-height: 300px; overflow: hidden; }
}
@media (min-width: 900px) {
  .ad-sidebar-rtb { max-height: 630px; overflow: hidden; }
}
.ad-incontent { margin-top: 16px; margin-bottom: 16px; }
@media (min-width: 700px) {
  .ad-incontent { margin-top: 28px; margin-bottom: 28px; }
}
/* Scoped height cap for in-content RTB block (R-A-191795-14): preserves
   the visual geometry of the previous three-card row, with ~20% headroom. */
.ad-incontent-rtb { max-height: 415px; overflow: hidden; }
@media (min-width: 720px) {
  .ad-incontent-rtb { max-height: 145px; }
}
/* Scoped height cap for bottom in-content RTB block (R-A-191795-15):
   preserves the visual geometry of the previous bottom three-card row,
   with ~20% headroom. */
.ad-incontent-bottom-rtb { max-height: 415px; overflow: hidden; }
@media (min-width: 720px) {
  .ad-incontent-bottom-rtb { max-height: 145px; }
}
.ad-placeholder {
  background: transparent;
  color: transparent;
  border: 0;
  font-size: 0;
  display: block;
  margin: 0 auto;
}
.ad-728x90    { height: 80px; }
.ad-300x250   { height: 200px; max-width: 300px; }
.ad-320x100   { height: 80px;  max-width: 320px; }
.ad-adaptive  { height: 80px; }
@media (min-width: 700px) {
  .ad { margin: 28px auto; }
  .ad-728x90  { height: 90px; }
  .ad-300x250 { height: 250px; }
  .ad-320x100 { height: 100px; }
  .ad-adaptive { height: 120px; }
}

/* ---------- Ad mock placeholders (static, visual layout only) ---------- */
.ad-mock {
  text-align: left;
  font-family: inherit;
  color: #1a1a1a;
}
.ad-mock-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .ad-mock-row { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
.ad-mock-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  background: #ffffff;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 88px;
  box-shadow: 0 1px 2px rgba(20, 30, 40, 0.06);
}
.ad-mock-thumb {
  flex: 0 0 64px;
  width: 64px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}
.ad-mock-thumb span { line-height: 1; }
.ad-thumb-archive { background: linear-gradient(135deg, #d97a3a 0%, #b85a2a 100%); }
.ad-thumb-photo   { background: linear-gradient(135deg, #5b8def 0%, #3b6fd8 100%); }
.ad-thumb-tree    { background: linear-gradient(135deg, #4caf6a 0%, #2e7d4f 100%); }
.ad-thumb-dna     { background: linear-gradient(135deg, #9b6bd1 0%, #6e3fb0 100%); }
.ad-thumb-map     { background: linear-gradient(135deg, #f0b342 0%, #cf8a1a 100%); }
.ad-thumb-book    { background: linear-gradient(135deg, #d65a78 0%, #a83755 100%); }
.ad-mock-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}
.ad-mock-title {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  color: #1a3aa8;
}
.ad-mock-text {
  font-size: 12.5px;
  line-height: 1.35;
  color: #3a3a3a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-mock-url {
  font-size: 11.5px;
  color: #2c8a3a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ad-mock-cta {
  color: #1a3aa8;
  font-weight: 600;
  white-space: nowrap;
}

/* Sidebar 300x250 vertical card */
.ad-mock-300x250 {
  max-width: 300px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(20, 30, 40, 0.08);
  display: flex;
  flex-direction: column;
}
.ad-mock-300x250 .ad-mock-hero {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-mock-300x250 .ad-mock-hero-icon {
  font-size: 56px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.ad-mock-300x250 .ad-mock-body {
  padding: 10px 12px 12px;
  gap: 5px;
}
.ad-mock-300x250 .ad-mock-title { font-size: 15px; }
.ad-mock-300x250 .ad-mock-text  { font-size: 13px; -webkit-line-clamp: 2; }

/* Hide mocks in print, like the rest of the ad block already does */
@media print {
  .ad-mock { display: none !important; }
}

/* ---------- Bullets ---------- */
.bullets { padding-left: 1.1em; }
.bullets li { margin: 0 0 6px; }

/* ---------- Portal SEO block (above footer) ---------- */
.portal-seo {
  background: #fafaf7;
  border-top: 1px solid #ececec;
  padding: 22px 0;
  color: #4a4a4a;
}
.portal-seo p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #555;
}

/* ---------- Site footer ---------- */
.vgd-footer { background: #111; color: #d4cdcd; margin-top: 0; padding: 45px 0 60px; }
.vgd-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.vgd-footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 15px;
}
.vgd-footer-col { flex: 1 1 220px; min-width: 200px; box-sizing: border-box; }
.vgd-footer-col-title {
  color: #fff;
  font-size: 15px;
  text-transform: uppercase;
  margin: 0 0 10px;
  padding-top: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.vgd-footer-col-list { list-style: none; padding: 0; margin: 0; color: #d4cdcd; font-size: 14px; line-height: 1.6; }
.vgd-footer-col-list li { margin: 0 0 6px; line-height: 1.5; }
.vgd-footer a { color: #d4cdcd; text-decoration: none; }
.vgd-footer a:hover { color: #fff; text-decoration: underline; }
.vgd-footer-brand { padding: 30px 0 0; text-align: center; }
.vgd-footer-brand-img { max-width: 200px; width: 100%; height: auto; display: block; margin: 0 auto 10px; }
.vgd-footer-brand-descr { color: #d4cdcd; font-size: 14px; text-align: center; }
.vgd-footer-legal { padding-top: 18px; }
.vgd-footer-legal-line { border: 0; height: 1px; background: rgba(255,255,255,0.1); margin: 0 0 18px; }
.vgd-footer-legal-text { color: #b3aaaa; font-size: 12.5px; line-height: 1.6; text-align: center; margin: 0; }
.vgd-footer-legal-text a { color: #fff; }
.vgd-footer-legal-text a:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .vgd-footer-col { flex: 1 1 100%; }
  .vgd-footer-cols { gap: 12px; }
  .vgd-footer-col-title { padding-top: 12px; }
}

/* ---------- Exchange: category chips ---------- */
.chip-row {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--green-deep);
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
}
.chip:hover, .chip:focus { background: #e7efe9; color: var(--green-deep); }
.chip-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.chip-active:hover, .chip-active:focus { background: var(--green-deep); color: #fff; }
@media (min-width: 700px) {
  .chip { font-size: 12px; padding: 5px 11px; }
  .chip-row { gap: 8px; margin-bottom: 16px; }
}

/* ---------- Exchange: freelancer cards ---------- */
.freelancers-title {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: var(--green-deep);
  font-size: 15px;
  line-height: 1.25;
  margin: 18px 0 10px;
}
.freelancers-count {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-mute);
  margin-left: 6px;
}
@media (min-width: 700px) {
  .freelancers-title { font-size: 16px; margin: 22px 0 12px; }
  .freelancers-count { font-size: 13px; }
}

.freelancers {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 700px) {
  .freelancers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1100px) {
  .freelancers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.freelancer { margin: 0; }
.freelancer-link {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  height: 100%;
  -webkit-box-shadow: 0 1px 0 rgba(31,37,34,0.04);
  box-shadow: 0 1px 0 rgba(31,37,34,0.04);
}
.freelancer-link:hover, .freelancer-link:focus {
  border-color: var(--green);
  -webkit-box-shadow: 0 1px 0 rgba(48,88,72,0.15);
  box-shadow: 0 1px 0 rgba(48,88,72,0.15);
}
.freelancer-avatar {
  -webkit-box-flex: 0; -ms-flex: 0 0 64px; flex: 0 0 64px;
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  display: block;
}
.freelancer-avatar.avatar-fallback {
  background: var(--bg-warm) url('img/family-archive.webp') center/cover no-repeat;
}
@media (min-width: 700px) {
  .freelancer-avatar { -ms-flex: 0 0 72px; flex: 0 0 72px; width: 72px; height: 72px; }
}
.freelancer-body { min-width: 0; -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; }
.freelancer-head {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.freelancer-nick {
  font-weight: 700;
  color: var(--green-deep);
  font-size: 14px;
  word-break: break-word;
}
.freelancer-status {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #e7efe9;
  color: var(--green-deep);
}
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4a8a6f;
}
.freelancer-name {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 1px;
}
.freelancer-loc {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.freelancer-svc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 8px;
}
.freelancer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  margin: 0;
  font-size: 12px;
}
.freelancer-fields > div { margin: 0; }
.freelancer-fields dt {
  color: var(--ink-mute);
  font-size: 11px;
  margin: 0;
}
.freelancer-fields dd {
  color: var(--ink);
  margin: 0;
  font-size: 12px;
}

.freelancers-all {
  display: inline-block;
  margin-top: 4px;
}

/* ---------- Internal document-style pages (gedcom.vgd.ru-style central card)
   Reusable layout for narrow text/document pages: light-gray page background
   with a centered white card. Apply .vgd-internal-page to <body> and
   .vgd-internal-card to the page's main container.

   Sizing model mirrors gedcom.vgd.ru .maindiv:
     Desktop: content max-width 780px + padding 60px + 1px border on each side
              => visual outer width 902px. With the global box-sizing: border-box,
              we set max-width to 902px so the *outer* box is 902px while the
              content area resolves to 902 - 120 - 2 = 780px (matches reference).
     Mobile (<940px): max-width 700px, padding 40px 20px, top/bottom margin 0.

   Page-specific typography/list styles (e.g. body.stones-history-page) layer
   on top without redefining the card shell. */
body.vgd-internal-page { background: #ededed; }
.vgd-internal-card {
  max-width: 902px;
  margin: 40px auto;
  padding: 60px;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 0;
  box-shadow: none;
  color: #454545;
  font-family: Arial, Helvetica, sans-serif;
  word-break: break-word;
}
@media (max-width: 939px) {
  .vgd-internal-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 40px 20px;
  }
}

/* ---------- Stones history page (typography/list styles inside the card) -- */
body.stones-history-page .stones-history h1 {
  font-size: 22px;
  margin: 0 0 14px;
  color: var(--ink);
}
body.stones-history-page .stones-history .pebble-block { margin-bottom: 0; }
body.stones-history-page .stones-history .pebble {
  padding: 16px 0;
  border-bottom: 1px solid #e3dfd2;
  margin-top: 0;
}
body.stones-history-page .stones-history .pebble:last-child { border-bottom: 0; }
body.stones-history-page .stones-pager {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0 8px;
  flex-wrap: wrap;
}
body.stones-history-page .stones-pager a,
body.stones-history-page .stones-pager span {
  padding: 6px 10px;
  border: 1px solid #c9c5b8;
  border-radius: 4px;
  text-decoration: none;
  color: #305848;
  background: #fff;
}
body.stones-history-page .stones-pager .current {
  background: #305848;
  color: #fff;
  border-color: #305848;
}
body.stones-history-page .stones-back { margin: 0 0 14px; }
body.stones-history-page .stones-legacy {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e3dfd2;
  font-size: 0.95em;
}
body.stones-history-page .stones-legacy a { color: #305848; }
body.stones-history-page .stones-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
}
body.stones-history-page .stones-intro .pebble-avatar {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}
body.stones-history-page .stones-intro p { margin: 0; }

@media (max-width: 720px) {
  body.stones-history-page .stones-history h1 { font-size: 20px; }
}

/* ---------- Print ---------- */
@media print {
  .ad, .vgd-header-nav, .vgd-header-burger { display: none !important; }
  .hero, .privacy, .site-footer { background: #fff !important; color: #000 !important; }
  .hero h1, .privacy h2, .privacy h3 { color: #000 !important; }
}
