: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; left: -999px; top: 0;
}
.skip-link:focus { left: 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);
}
.site-header .logo { font-weight: 700; color: var(--accent); text-decoration: none; font-size: 1.1rem; }
.site-nav a { margin-left: 1.25rem; color: var(--fg); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

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: left; 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); }
