/* Masthead and menu (2026-11-16, Max's layouts). Loaded after every other stylesheet.

   Masthead: the wordmark, the mark and the menu sign share one top edge at the same distance from the top of the window
   (the wordmark is trimmed to the height of its small letters, the mark and the sign have no air above them), and the
   wordmark is set larger than the mark, as in Max's picture. */
:root { --head-top: 24px; --head-word: 31px; --head-mark: 26px; }
.site-chrome.is-scrolled { --head-top: 14px; --head-word: 22px; --head-mark: 20px; }
@media (max-width: 760px) {
  :root, .site-chrome.is-scrolled { --head-top: 14px; --head-word: 18px; --head-mark: 14px; }
}
html body .site-chrome .site-header,
html[data-margin] body .site-chrome:not(.is-scrolled) .site-header,
html[data-margin] body .site-chrome.is-scrolled .site-header {
  padding-block: var(--head-top) 12px; min-height: 0; align-items: start;
}
html body .site-chrome .site-header .wordmark,
html body .site-chrome.is-scrolled .site-header .wordmark { font-size: var(--head-word) !important; line-height: .86 !important; text-box: trim-both ex alphabetic; display: block; }
html body .site-header .brand { align-self: start; }
html:root[data-mark] body .site-header .masthead-mark { align-self: start; align-items: flex-start; min-height: 0; height: auto; }
html body .site-header .masthead-mark svg[data-mark-variant=bridge],
html body .site-chrome.is-scrolled .masthead-mark svg[data-mark-variant=bridge] { height: var(--head-mark); display: block; }
html body .site-header .header-actions { align-self: start; align-items: flex-start; }
html body .site-header .nav-toggle { min-height: 0; align-items: flex-start; padding: 12px 0 12px 12px; margin: -12px 0 -12px -12px; }
html body .site-header .nav-toggle > .menu-symbol { width: calc(var(--head-mark) * 1.15); height: calc(var(--head-mark) * .8); }
html body .site-header .menu-symbol i { height: 1.5px; }

/* Menu: one sheet over the whole window (Max, 2026-11-16 evening: «раньше навигация была на весь экран, было лучше»);
   the page under it is blurred and darkened (what blurs goes to dark, in every theme). */
html:root body .navigator.menu {
  margin: 0; padding: 0; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; border: 0; border-radius: 0;
  box-shadow: none; background: var(--paper); color: var(--text); overflow: auto; overscroll-behavior: contain;
}
html:root body .navigator.menu::backdrop {
  background: rgba(12, 13, 14, .45);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
/* the same width and edges as the masthead of the site */
.menu-sheet { min-height: 100dvh; display: flex; flex-direction: column; width: min(100%, var(--page, 1440px)); margin-inline: auto; padding: var(--head-top) var(--margin, 16px) 24px; box-sizing: border-box; }
/* the head repeats the masthead: same edge, same sizes */
.menu-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 24px; }
.menu-wordmark { justify-self: start; font: 400 var(--head-word)/.86 'ONY Lavr', Arial, sans-serif; text-box: trim-both ex alphabetic; color: var(--text); text-decoration: none; }
.menu .menu-mark { display: block; justify-self: center; color: var(--text); }
.menu .menu-mark svg { display: none; width: auto; height: var(--head-mark); fill: currentColor; }
.menu .menu-mark svg[data-mark-variant=bridge] { display: block; }
.menu-actions { justify-self: end; display: flex; align-items: center; gap: clamp(20px, 2.4vw, 44px); margin-top: -2px; }
.menu-login { display: inline-flex; align-items: center; gap: 8px; font: 400 14px/20px 'ONY One', Arial, sans-serif; color: var(--text); text-decoration: none; }
.menu-login:hover { text-decoration: underline; text-underline-offset: 4px; }
.menu-close { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; margin: -4px -2px 0 0; background: none; border: 0; color: var(--text); cursor: pointer; }
.menu-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.menu-ico { width: 1.05em; height: 1.05em; flex: none; }

/* Sections on the left, the story of the section from the middle of the page. The type starts large (the L of
   «Вид и вёрстка», whatever size the reader chose) and keeps growing on wide screens. Hover changes colour only:
   every story is stacked in one cell, so the panel keeps the height of the tallest and nothing moves. */
.menu-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; padding-block: clamp(28px, 6dvh, 96px); }
.menu-sections { display: grid; gap: clamp(12px, 3.6dvh, 56px); justify-items: start; }
.menu-sections a {
  font: 400 clamp(48px, min(5.4vw, 10dvh), 150px)/1 'ONY Lavr', Arial, sans-serif; letter-spacing: -.01em;
  color: var(--text); text-decoration: none; transition: color .25s ease;
}
.menu-sections a.is-shown, .menu-sections a:hover, .menu-sections a:focus-visible { color: var(--accent-text, var(--accent)); }
.menu-preview { align-self: center; display: grid; }
.menu-story { grid-area: 1 / 1; display: grid; justify-items: start; align-content: start; gap: 10px; color: var(--text); text-decoration: none; animation: te-light-fade .35s ease both; }
.menu-preview .menu-story[hidden] { display: grid !important; visibility: hidden; animation: none; }
.menu-story img { width: clamp(300px, 33vw, 860px); max-width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block; margin-bottom: 8px; }
.menu-story-section { font: 400 clamp(15px, 1.05vw, 26px)/1.3 'ONY One', Arial, sans-serif; color: var(--secondary); }
.menu-story-title { font: 400 clamp(22px, 1.9vw, 48px)/1.15 'ONY Lavr', Arial, sans-serif; max-width: 22em; }
.menu-story .menu-story-title { text-decoration: underline transparent; text-decoration-thickness: 1px; text-underline-offset: .15em; transition: text-decoration-color .25s ease; }
.menu-story:hover .menu-story-title { text-decoration-color: currentColor; }

/* one row of links along the bottom */
.menu-links { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.menu-links :is(a, button) {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; background: none; border: 0; cursor: pointer;
  font: 400 clamp(14px, .95vw, 22px)/1.4 'ONY One', Arial, sans-serif; color: var(--text); text-decoration: underline transparent; text-underline-offset: 4px;
}
.menu-links :is(a, button):hover { text-decoration-color: currentColor; }

@media (max-width: 900px) {
  .menu-body { grid-template-columns: 1fr; align-items: start; }
  .menu-preview { display: none; }
  .menu-sections a { font-size: clamp(44px, 13vw, 76px); }
  .menu-links { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; }
}
@media (max-width: 760px) { .menu-head { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .menu-story { animation: none; } .menu-sections a { transition: none; } }
/* The type of the menu is always the grotesque (editors, 16 November 2026: story titles in the menu are not set in
   Spectral, whichever type the reader chose); the theme comes through the page colours. */
