/* Компактная шапка. Она остаётся тёмной при любом оформлении страницы. */
:root{--site-shell-width:1332px}
.feed-layout{max-width:var(--site-shell-width)}
.site-header{height:76px}
.site-header .header-inner{display:flex;height:76px;gap:24px;max-width:var(--site-shell-width);padding:0 32px}
.site-header .brand-logo{display:flex;align-items:center;width:202px;height:50px;overflow:hidden}
.site-header .brand-logo img{width:100%;height:100%;object-fit:cover;object-position:center}
.site-header .header-tools{order:3;margin-left:auto;gap:12px}
.site-header .header-search{order:2;flex:0 1 480px;width:auto;min-width:0;max-width:480px;margin-left:auto;height:44px;padding:0 6px 0 16px;gap:5px}
.site-header .header-search input{font-size:13px}
.site-header .header-search button{flex-shrink:0;width:31px;height:31px}
.site-header .header-search .search-close{background:transparent;color:var(--subtle)}
.site-header .header-search .search-close:hover{background:var(--line);color:var(--ink)}
.site-header .search-toggle{position:relative;display:grid;place-items:center;flex-shrink:0;width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:14px;background:transparent;color:var(--muted)}
.site-header .search-toggle:hover,.site-header .search-toggle[aria-expanded=true]{background:var(--soft);color:var(--ink)}
.site-header .search-toggle.has-query::after{content:"";position:absolute;top:6px;right:6px;width:5px;height:5px;border-radius:50%;background:var(--orange)}
.site-header .login-button{font-size:12px;padding:11px 15px}
html{scroll-padding-top:100px}
.left-sidebar{top:102px}
.left-sidebar>nav[data-auth-only]:not([hidden]){margin-bottom:16px}
.left-sidebar .category-nav{margin-top:0}
.article-sidebar{top:102px}

/* Один выбор синхронизируется между колонкой, статьёй и меню телефона. */
.theme-picker{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:25px 8px 0;padding-top:21px;border-top:1px solid var(--line)}
.theme-label{font-size:11px;color:var(--muted)}
.theme-options{display:flex;gap:2px;padding:3px;background:var(--soft);border:1px solid var(--line);border-radius:14px}
.theme-picker .theme-options button{display:grid;place-items:center;width:31px;height:31px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--subtle)}
.theme-options button svg{width:17px;height:17px}
.theme-picker .theme-options button:hover{color:var(--ink)}
.theme-picker .theme-options button[aria-pressed=true]{color:var(--accent-text);background:var(--paper);box-shadow:0 1px 5px #00000012}
.article-sidebar .theme-picker{margin-inline:0}
.sidebar-bottom{margin-top:23px;padding-top:20px}
.channel-symbol,.channel-symbol.max,.channel-symbol.vc,.channel-symbol.dzen{background:transparent;width:28px;height:28px;border-radius:0}
.channel-symbol img{width:28px;height:28px;object-fit:contain;border-radius:7px}
.post-topline>img,.auth-brand{background:transparent;border-radius:0;object-fit:contain}

@media(min-width:701px){
  .site-header.search-open .header-inner{column-gap:12px}
  .site-header.search-open .header-tools{margin-left:0}
}
@media(max-width:1250px){
  .site-header .header-inner{padding-inline:24px;gap:20px}
  .site-header .brand-logo{width:192px;height:48px}
  .site-header .header-search{flex-basis:420px}
  .site-header .header-tools{gap:10px}
  .theme-picker{margin-inline:2px;gap:5px}
  .theme-picker .theme-options button{width:29px;height:30px}
}
@media(max-width:1020px){
  .feed-layout{max-width:922px}
  .site-header .header-inner{max-width:922px;gap:16px}
  .site-header .brand-logo{width:184px;height:46px}
  .site-header .header-search{flex-basis:360px}
  .site-header .login-button span{display:inline}
  .theme-picker .theme-options button{width:27px}
}
@media(max-width:700px){
  html{scroll-padding-top:88px}
  html:has(.site-header.search-open){scroll-padding-top:140px}
  .site-header{height:auto}
  .site-header .header-inner{height:auto;min-height:68px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto;gap:10px;padding:12px 16px}
  .site-header .brand-logo{width:min(174px,100%);height:42px;grid-column:1;grid-row:1}
  .site-header .header-tools{grid-column:2;grid-row:1;gap:8px}
  .site-header .header-search{grid-column:1/-1;grid-row:2;width:100%;max-width:none;height:44px;margin:0;padding-left:14px}
  .site-header .search-toggle{width:35px;height:35px;border-radius:12px}
  .site-header .search-toggle svg{width:18px;height:18px}
  .site-header .header-tools>.login-button,.site-header .header-tools>.account-menu{display:none}
  .site-header .menu-toggle{width:26px;padding:4px}
  .mobile-nav{padding:10px 20px 20px}
  .mobile-nav a{font-size:13px;padding-block:13px}
  .mobile-account-section{border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:10px}
  .mobile-nav .mobile-login{display:flex;align-items:center;gap:11px;width:100%;padding:13px 0;color:var(--ink);font-size:14px;text-align:left}
  .mobile-account-section svg{width:20px;height:20px;color:var(--blue);flex-shrink:0}
  .mobile-nav .mobile-account-menu{display:flex;flex-direction:column;align-items:stretch;gap:14px;padding:10px 0 0}
  .mobile-account-profile{display:flex;align-items:flex-start;gap:11px}
  .mobile-account-profile .account-name{display:block;max-width:none;font-size:14px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;color:var(--ink)}
  .mobile-account-menu .logout-button{align-self:flex-start;padding:10px 14px;background:var(--soft);color:var(--muted);border:1px solid var(--line);border-radius:12px;font-size:12px}
  .mobile-nav .theme-picker{margin:12px 0 0;padding-top:17px;max-width:250px}
  .mobile-nav .theme-label{font-size:13px}
  .mobile-nav .theme-options button{width:36px;height:34px}
  .article-sidebar .theme-picker{display:none}
  .article-prose h2{scroll-margin-top:92px}
}
@media(max-width:370px){
  .site-header .header-inner{padding-inline:13px;gap:7px}
  .site-header .brand-logo{width:min(158px,100%);height:40px}
  .site-header .header-tools{gap:5px}
}
