/* Balance Legal Site — minimal readable theme */
:root {
  --fg: #1f2328;
  --fg-muted: #59636e;
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --border: #d1d9e0;
  --accent: #0969da;
  --accent-hover: #0860c7;
  --code-bg: #eff1f3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6edf3;
    --fg-muted: #9198a1;
    --bg: #0d1117;
    --bg-alt: #151b23;
    --border: #3d444d;
    --accent: #4493f8;
    --accent-hover: #58a6ff;
    --code-bg: #151b23;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
               Helvetica, Arial, sans-serif, "Apple Color Emoji",
               "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.site-header .container {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.site-header .brand {
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: var(--fg);
}
.site-header nav a {
  color: var(--fg-muted);
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
}
.site-header nav a:hover { color: var(--accent); }

/* language switcher */
.lang-switch {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 24px 0;
  font-size: 13px;
  letter-spacing: .04em;
}
.lang-switch a { color: var(--accent); text-decoration: none; margin: 0 4px; }
.lang-switch a:hover { text-decoration: underline; }
.lang-switch .lang-active { color: var(--fg); font-weight: 700; margin: 0 4px; }

.crumb {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 16px;
}
.crumb a { color: var(--accent); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

article h1, article h2, article h3, article h4, article h5, article h6 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  line-height: 1.25;
  font-weight: 600;
}
article h1 { font-size: 2em;     border-bottom: 1px solid var(--border); padding-bottom: .3em; margin-top: 0; }
article h2 { font-size: 1.5em;   border-bottom: 1px solid var(--border); padding-bottom: .3em; }
article h3 { font-size: 1.25em; }
article h4 { font-size: 1em; }
article h5 { font-size: .9em; color: var(--fg-muted); }
article h6 { font-size: .85em; color: var(--fg-muted); }

article p, article ul, article ol, article blockquote, article table {
  margin-top: 0;
  margin-bottom: 16px;
}

article a { color: var(--accent); text-decoration: none; }
article a:hover { text-decoration: underline; }

article ul, article ol { padding-left: 2em; }
article li + li { margin-top: .25em; }

article blockquote {
  padding: 0 1em;
  color: var(--fg-muted);
  border-left: .25em solid var(--border);
}

article code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 85%;
  padding: .2em .4em;
  background: var(--code-bg);
  border-radius: 6px;
}
article pre {
  background: var(--code-bg);
  padding: 16px;
  border-radius: 6px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
}
article pre code { padding: 0; background: transparent; }

article table {
  border-collapse: collapse;
  display: block;
  width: max-content;
  max-width: 100%;
  overflow: auto;
}
article table th, article table td {
  padding: 8px 13px;
  border: 1px solid var(--border);
  vertical-align: top;
}
article table th {
  background: var(--bg-alt);
  font-weight: 600;
  text-align: left;
}
article table tr:nth-child(2n) td { background: var(--bg-alt); }

article hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

article strong { font-weight: 600; }

/* ---- index / landing ---- */
.lead {
  font-size: 18px;
  color: var(--fg-muted);
  margin-top: -8px;
  margin-bottom: 32px;
}
.doc-group {
  margin: 24px 0 40px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt);
}
.doc-group h2 {
  margin-top: 0 !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  font-size: 1.15em !important;
}
.doc-group p.group-note {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 4px 0 14px;
}
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.doc-list li {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.doc-list li:first-child { border-top: none; }
.doc-list a {
  display: inline-block;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.doc-list .desc {
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 2px;
}
.doc-list .meta {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
}

/* annex list inside privacy / children */
.annex-block {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}
.annex-block h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}
.annex-block p {
  color: var(--fg-muted);
}
.annex-grid {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
}
.annex-grid li { margin: 0; padding: 0; }
.annex-grid a { font-size: 15px; }

/* contact block */
.contact {
  margin-top: 48px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt);
}
.contact h3 { margin-top: 0; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 4px 0; font-size: 14px; }
.contact-hint { font-size: 12px; color: var(--fg-muted); margin: 12px 0 0; }

/* contact images (anti-scrape) */
.contact-img {
  height: 1.05em;
  width: auto;
  vertical-align: -0.16em;
  margin-left: 2px;
}

/* no-copy contact spans (literal text lives only here, in CSS) */
.cmask {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  white-space: nowrap;
}
.cm-privacy::after { content: "privacy@babayagaprogram.com"; }
.cm-safety::after  { content: "safety@babayagaprogram.com"; }
.cm-support::after { content: "support@babayagaprogram.com"; }
.cm-phone::after   { content: "+7 777 396 2418"; }
.cm-name::after    { content: "Iurii Babain"; }

/* delete-account custom page */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps li {
  position: relative;
  padding: 16px 16px 16px 56px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.steps li strong { display: block; margin-bottom: 4px; }

/* footer */
.site-footer {
  margin-top: 64px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.site-footer .container {
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 13px;
  color: var(--fg-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}
.site-footer a { color: var(--fg-muted); }

/* responsive tweaks */
@media (max-width: 600px) {
  .container { padding: 20px 16px 64px; }
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .site-header nav a { margin-left: 0; margin-right: 16px; }
  article h1 { font-size: 1.6em; }
  article h2 { font-size: 1.3em; }
}
