/* Сайт ТОО «Saghan Soft». Строгое текстовое оформление: системные шрифты,
   никаких внешних ресурсов. Казахские буквы (ә, ғ, қ, ң, ө, ұ, ү, һ, і)
   есть во всех системных шрифтах, отдельная забота о них не нужна. */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #1d2124;
  --muted: #5d656c;
  --line: #dcdfe1;
  --accent: #1f4e79;
  --accent-ink: #ffffff;
  --measure: 46rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --surface: #1e2123;
    --ink: #e6e8ea;
    --muted: #a0a8af;
    --line: #33383c;
    --accent: #8db8e0;
    --accent-ink: #16181a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Шапка ------------------------------------------------------------ */

.top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 0.75rem;
}

.brand {
  font-weight: 650;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.langs { display: flex; gap: 0.5rem; font-size: 0.875rem; }
.langs a, .langs .current {
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-decoration: none;
}
.langs .current { background: var(--accent); color: var(--accent-ink); }

/* Меню всегда отдельной строкой: так оно одинаково на телефоне и на
   компьютере, и длинные казахские подписи не ломают шапку. */
.menu {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.95rem;
}
.menu a { color: var(--muted); text-decoration: none; padding: 0.2rem 0; }
.menu a:hover { color: var(--ink); }
.menu a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* --- Содержимое ------------------------------------------------------- */

main { flex: 1; padding-top: 2rem; padding-bottom: 3rem; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 1rem; font-weight: 650; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.25rem 0 0.75rem; font-weight: 650; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; font-weight: 650; }

.lead { padding-bottom: 0.5rem; }
.lead-text { font-size: 1.2rem; color: var(--muted); margin: 0; }

.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose li { margin-bottom: 0.35rem; }
.updated { color: var(--muted); font-size: 0.9rem; margin-top: -0.5rem; }

.requisites {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
}
.requisites th, .requisites td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.requisites th { font-weight: 500; color: var(--muted); width: 38%; }
.requisites td { overflow-wrap: anywhere; }

@media (max-width: 34rem) {
  .requisites th, .requisites td { display: block; width: auto; }
  .requisites th { border-bottom: 0; padding-bottom: 0; }
}

/* --- Подвал ----------------------------------------------------------- */

.bottom {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.25rem 0;
}
.bottom p { margin: 0 0 0.3rem; }
.bottom .legal { color: var(--ink); }
.bottom .copy { margin-top: 0.6rem; }
