/*
  Site chrome: header (.topbar) and footer (.footer), shared verbatim by
  every page on kodexbg.com.

  Source of truth: the header/footer built for
  books/chudovishtoto-bez-ushi-offer-v2.html. That page is the reference
  implementation — every other page must look and measure identically,
  regardless of that page's own body theme/colors. Edit only here; do
  not re-implement header/footer rules in a page-specific stylesheet.

  Markup contract:
  <div class="page"><div class="shell">
    <header class="topbar" aria-label="Основна навигация">
      <a class="brand" href="..." aria-label="Kodex Publishing начало">
        <img class="brand-mark" src=".../kodex-icon.svg" alt="Икона Kodex Publishing" />
        <span><span class="brand-name">Kodex</span><span class="brand-note">Publishing House</span></span>
      </a>
      <nav class="nav" aria-label="Секции"> ... <a class="nav-cta" href="...">Запитвания</a></nav>
    </header>
    ... page content ...
    <footer class="footer">
      <span>Kodex Publishing • kodexbg.com • 2026</span>
      <span class="footer-links"> ... </span>
    </footer>
  </div></div>
*/

:root {
  --max: 1120px;
  --ink: #18211f;
  --ink-soft: #39423f;
  --muted: #6e7067;
  --line: rgba(24, 33, 31, 0.16);
  --chrome-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
}

/* Reset the default 8px body margin every browser ships with, so the
   page background always reaches the true viewport edge regardless of
   which page-specific stylesheet is also loaded. */
body {
  margin: 0;
}

.page {
  min-height: 100vh;
}

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  font-family: var(--chrome-font);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(43, 37, 33, 0.2));
}

.brand-name {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.brand-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 600;
}

.nav a {
  color: inherit;
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--ink-soft);
  border-radius: 999px;
  padding: 10px 20px;
  color: var(--ink-soft) !important;
  font-weight: 700;
}

.nav a,
.nav-cta {
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(24, 33, 31, 0.14);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--chrome-font);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, var(--max));
  }

  .topbar {
    align-items: flex-start;
    gap: 14px;
    padding-top: 18px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    font-size: 13px;
  }

  .brand-note {
    display: none;
  }

  .nav {
    gap: 14px;
    justify-content: flex-end;
    font-size: 13px;
  }

  .nav-cta {
    padding: 8px 14px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
