:root {
  --accent: #2b6cb0;
  --bg: #ffffff;
  --fg: #1a202c;
  --muted: #6b7280;
  --border: #e2e8f0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-width: 46rem;
}

/* Per-domain accent — same layout, different tone of voice via color only */
html[data-site="ru"]  { --accent: #a83232; }
html[data-site="org"] { --accent: #2b6cb0; }
html[data-site="net"] { --accent: #2f855a; }
html[data-site="com"] { --accent: #4a5568; }

@media (prefers-color-scheme: dark) {
  :root { --bg: #14161a; --fg: #e8e8ea; --muted: #9aa0a6; --border: #2a2d33; }
}
:root[data-theme="dark"] { --bg: #14161a; --fg: #e8e8ea; --muted: #9aa0a6; --border: #2a2d33; }
:root[data-theme="light"] { --bg: #ffffff; --fg: #1a202c; --muted: #6b7280; --border: #e2e8f0; }

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}
.skip-link {
  position: absolute; inset-inline-start: -999px; top: 0;
}
.skip-link:focus { inset-inline-start: 1rem; top: 1rem; z-index: 10; background: var(--bg); padding: .5rem 1rem; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: .75rem;
}
.site-header .logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--accent); text-decoration: none; font-size: 1.1rem; }
.site-header .logo-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; }
.site-nav a { margin-inline-start: 1.25rem; color: var(--fg); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

.lang-switcher { display: flex; gap: .5rem; margin-inline-start: 1.25rem; }
.lang-switcher a, .lang-switcher span {
  font-size: .8rem; padding: .15rem .5rem; border: 1px solid var(--border); border-radius: .3rem;
  color: var(--muted); text-decoration: none;
}
.lang-switcher a:hover { color: var(--accent); border-color: var(--accent); }
.lang-switcher [aria-current="true"] { color: var(--fg); border-color: var(--fg); font-weight: 600; }

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
main h1 { font-size: 2rem; margin-bottom: .25rem; }
main h1 + p { color: var(--muted); margin-top: 0; }
main h2 { margin-top: 2.5rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }
main a { color: var(--accent); }
main table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
main th, main td { text-align: start; padding: .5rem .75rem; border-bottom: 1px solid var(--border); }
main th { color: var(--muted); font-weight: 600; }

/* Solemn tone (e.g. inherited-archive content on .net) — deliberately
   quieter than the rest of the site: no accent color, tighter measure,
   no decorative flourishes. */
body.tone-solemn { --accent: #4a5568; }
body.tone-solemn main { max-width: 40rem; }
body.tone-solemn main h1 { font-weight: 500; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem; text-align: center; color: var(--muted); font-size: .875rem;
}
.site-footer a { color: var(--muted); }
