/* The site header (templates/_header.html), the same on every page. Loaded by base.html after the page's own CSS. */
.top { position: sticky; top: 0; z-index: 5; background: rgb(250 247 242 / .94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line, #e6dfd3); font-family: var(--sans, "Manrope", system-ui, sans-serif); }
.top .wrap { position: relative; display: flex; align-items: center; gap: 10px; max-width: 1120px; margin: 0 auto;
  padding: 12px 16px; }
.top a.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink, #1f2433); text-decoration: none; }
.top a.brand img { width: 36px; height: 36px; transition: transform .4s ease; }
.top a.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.top a.brand b { font: 600 22px var(--serif, "Lora", Georgia, serif); margin: 0; }
.top .wrap > nav { display: none; gap: 24px; margin-right: 20px; font-size: 15px; }
.top .wrap > nav a { color: var(--muted, #5b6070); text-decoration: none; font: 500 15px var(--sans, "Manrope", system-ui, sans-serif); }
.top .wrap > nav a:hover, .top .wrap > nav a[aria-current] { color: var(--ink, #1f2433); }
.top .wrap > nav a[aria-current] { font-weight: 700; }
.top .btn { display: inline-block; background: var(--ink, #1f2433); color: #fff; text-decoration: none; border-radius: 8px;
  font: 700 14px var(--sans, "Manrope", system-ui, sans-serif); padding: 10px 14px; white-space: nowrap; }
.top .btn:hover { background: #343a4d; }
.top .btn:focus-visible { outline: 3px solid var(--red, #c8202b); outline-offset: 3px; }

.burger summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; align-content: center;
  justify-items: center; gap: 5px; border-radius: 8px; }
.burger summary::-webkit-details-marker { display: none; }
.burger summary:focus-visible { outline: 3px solid var(--red, #c8202b); outline-offset: 2px; }
.burger summary span { display: block; width: 22px; height: 2px; background: var(--ink, #1f2433); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease; }
.burger[open] summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[open] summary span:nth-child(2) { opacity: 0; }
.burger[open] summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.burger-panel { position: absolute; left: 0; right: 0; top: 100%; display: grid; padding: 8px 16px 16px;
  background: var(--bg, #faf7f2); border-bottom: 1px solid var(--line, #e6dfd3); box-shadow: 0 12px 24px rgb(31 36 51 / .08); }
.burger-panel a { padding: 14px 0; border-top: 1px solid var(--line, #e6dfd3); color: var(--ink, #1f2433);
  text-decoration: none; font: 600 17px var(--sans, "Manrope", system-ui, sans-serif); }
.burger-panel a:first-child { border-top: 0; }
.burger-panel a[aria-current] { color: var(--red, #c8202b); }

@media (min-width: 980px) {
  .top .wrap > nav { display: flex; }
  .burger { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .top a.brand img, .burger summary span { transition: none; }
}

/* Search: the magnifier in the header opens a window over the page (static/js/search.js) */
.top a.find { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; color: var(--ink, #1f2433); }
.top a.find:hover { background: rgb(31 36 51 / .06); }
.top a.find:focus-visible { outline: 3px solid var(--red, #c8202b); outline-offset: 2px; }
.top a.find svg, .search-box form svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.search-box { width: min(640px, calc(100% - 32px)); max-height: min(78vh, 680px); margin: 10vh auto auto; padding: 0;
  border: 1px solid var(--line, #e6dfd3); border-radius: 16px; background: var(--paper, #fff); color: var(--ink, #1f2433);
  box-shadow: 0 24px 60px rgb(31 36 51 / .25); font-family: var(--sans, "Manrope", system-ui, sans-serif); overflow: hidden; }
.search-box[open] { display: flex; flex-direction: column; }
.search-box::backdrop { background: rgb(31 36 51 / .45); backdrop-filter: blur(2px); }
.search-box form { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line, #e6dfd3); color: var(--muted, #5b6070); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink, #1f2433);
  font: 600 19px var(--sans, "Manrope", system-ui, sans-serif); padding: 6px 0; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box .sr-close { flex: none; border: 1px solid var(--line, #e6dfd3); background: var(--bg, #faf7f2); color: var(--muted, #5b6070);
  border-radius: 6px; padding: 4px 8px; font: 700 12px var(--sans, "Manrope", system-ui, sans-serif); cursor: pointer; }
.search-box .sr-close:focus-visible, .search-box a:focus-visible { outline: 3px solid var(--red, #c8202b); outline-offset: 1px; }
.sr-results { overflow-y: auto; padding: 6px 8px 14px; }
.sr-results[aria-busy] { opacity: .6; }
.sr-head { margin: 12px 10px 6px; font: 700 12px var(--sans, "Manrope", system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #5b6070); }
.sr-head span { margin-left: 4px; color: var(--red, #c8202b); }
.sr-hints { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 10px; }
.sr-hints a { padding: 7px 13px; border: 1px solid var(--line, #e6dfd3); border-radius: 999px; background: var(--bg, #faf7f2);
  color: var(--ink, #1f2433); text-decoration: none; font-size: 15px; font-weight: 600; }
.sr-hints a:hover { border-color: var(--red, #c8202b); }
.hits { list-style: none; margin: 0; padding: 0; }
.hits a { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 10px; color: var(--ink, #1f2433); text-decoration: none; }
.hits a:hover, .hits a:focus-visible { background: var(--bg, #faf7f2); }
.hits img { flex: none; width: 40px; height: 56px; object-fit: cover; object-position: top; border: 1.5px solid var(--ink, #1f2433); background: #fff; }
.hits span { display: grid; min-width: 0; }
.hits b { font: 600 16px/1.3 var(--serif, "Lora", Georgia, serif); }
.hits small { font-size: 13px; color: var(--muted, #5b6070); }
.hits.arts a { padding: 10px; }
.sr-all { display: block; margin: 6px 10px 0; padding: 11px; text-align: center; border-radius: 10px; background: var(--ink, #1f2433);
  color: #fff; font-weight: 700; text-decoration: none; }
.sr-all:hover { background: #343a4d; }
.sr-none { margin: 14px 10px 6px; color: var(--muted, #5b6070); }
.sr-none a { color: var(--ink, #1f2433); font-weight: 700; }
@media (max-width: 600px) {
  .search-box { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .search-box .sr-close { font-size: 0; width: 36px; height: 36px; position: relative; }
  .search-box .sr-close::after { content: "✕"; font-size: 16px; }
}
/* phones: badge, magnifier, button and burger don't fit next to the word «Крапочка»; the badge stays as the logo */
@media (max-width: 429px) {
  .top .wrap { gap: 6px; }
  .top a.brand b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
