/* A notification action is a real, outlined control, next to its page context. */
:root{--rw-page-width:80%;--rw-page-max:var(--responsive--aligndefault-width,800px);--rw-heading-clearance:24px;scrollbar-gutter:stable}
/* The sticky header already occupies its own height. One clearance belongs
   before the first heading, not main padding plus template-specific margins.
   Home keeps its search/hero rhythm; single posts retain their existing rule. */
body:not(.home):not(.single-post) #main{padding-top:var(--rw-heading-clearance)}
body #main>article.page,
body #main>article.page>.entry-header,
body #main>.page-header,
body #main>:is(.error-404,.no-results),
body.rw-member-grid #main>:is(.rwm-shell,.rwd-shell),
body.author #main>.rws-profile{margin-top:0}
body.author #main>.rws-profile .rws-profile-heading{align-items:flex-start}
body header#masthead{--rw-menu-top:34px;background:transparent!important;background-image:none!important}
/* All templates use the established home reading rail, including desktop/tablet. */
body header#masthead.site-header{
 width:var(--rw-page-width)!important;max-width:var(--rw-page-max)!important;
 margin-inline:auto!important;padding-inline:0!important;
}
body .content-area{padding-inline:0!important}
body .site-main>article.page{width:100%;max-width:none;margin-inline:0}
body .site-main>article>.entry-header,
body .site-main>article>.entry-content,
body .site-main>article>.entry-footer,
body .site-main>.page-header,
body .rws-profile,
body footer#colophon.site-footer{
 box-sizing:border-box;width:var(--rw-page-width);max-width:var(--rw-page-max);
 margin-inline:auto;padding-inline:0;
}
body.error404 .site-main>.error-404,
body .site-main>.no-results{width:var(--rw-page-width);max-width:var(--rw-page-max);margin-inline:auto}
body.error404 .error-404>.page-header,
body.error404 .error-404>.page-content,
body .no-results>.page-header,
body .no-results>.page-content{width:100%;max-width:none;margin-inline:0}
body .site-main>article.page>.entry-content{min-width:0;overflow-wrap:anywhere}
body :is(.no-results,.error-404) .search-form{
 display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;align-items:center;
 width:100%!important;max-width:100%;margin-inline:0;
}
body :is(.no-results,.error-404) .search-form>:is(label,.awesomplete){min-width:0;width:100%}
body :is(.no-results,.error-404) .search-field{width:100%!important;max-width:100%;min-height:44px}
body :is(.no-results,.error-404) .search-submit{
 position:static!important;inset:auto!important;transform:none!important;
 width:44px!important;min-width:44px;height:44px;margin:0!important;padding:0!important;
}
/* Keep the vote arrow in the space beside the unchanged 85% entry field. */
body.single-post #rw_widget_search_form button#submit.submit.rwcomment-submit-button{
 left:auto!important;right:0!important;width:min(60px,15%)!important;min-width:0!important;
}
/* Keep the menu on the public content rail in both closed and fullscreen states. */
body:not(.primary-navigation-open) header#masthead #site-navigation{
 position:fixed!important;
 top:var(--rw-menu-top)!important;
 right:max(10%,calc((100% - var(--responsive--aligndefault-width,800px)) / 2))!important;
}
body.primary-navigation-open header#masthead #site-navigation .menu-button-container{
 top:var(--rw-menu-top)!important;
 right:max(10%,calc((100% - var(--responsive--aligndefault-width,800px)) / 2))!important;
}
/* The menu bars end 4.5px inside their SVG viewport. Align the visible edge. */
body header#masthead #primary-mobile-menu .dropdown-icon svg{transform:translateX(4.5px)!important}
body.rw-menu-scroll-ready.lock-scrolling .site{top:var(--rw-menu-scroll-top,0px)}
/* The 24px icon sits 6px below the header inset to match the wordmark's ink center. */
@media(max-width:640px){body header#masthead{--rw-menu-top:40px}}
body #rws-notification-toggle{
 display:inline-flex;align-items:center;justify-content:center;gap:6px;
 min-height:44px;padding:10px 14px!important;margin:0;
 color:#fff!important;background:transparent!important;border:1px solid rgba(255,255,255,.75)!important;
 border-radius:0!important;box-shadow:none!important;
 font:700 11px/1.4 Arial,Helvetica,sans-serif!important;letter-spacing:.035em;text-transform:uppercase;
}
body #rws-notification-toggle:hover{background:transparent!important;text-decoration:underline;text-underline-offset:4px}
body #rws-notification-toggle:focus-visible{outline:2px solid #fff!important;outline-offset:4px}
body #rws-notification-toggle #rws-notification-badge{margin-left:0}
body .rws-notification-nav.rwc-inline-notifications{
 display:flex;align-items:center;justify-content:flex-end;width:auto;max-width:100%;margin:0 0 0 auto;
}
body .rwm-header:has(>.rwc-inline-notifications){flex-wrap:wrap}
body .rwm-header:has(>.rwc-inline-notifications)>div{min-width:0;flex:1}
body .rwd-heading{row-gap:12px}
body .rwd-heading>div:has(>.rwc-inline-notifications){flex-wrap:wrap;gap:12px 16px}
body .rwd-heading>div>.rwc-inline-notifications{margin:0}
body .rwm-shell .rwm-display-name{overflow-wrap:anywhere}
body .entry-header>.rwc-inline-notifications{margin-top:16px}
body .last-comment-info-wrapper>.rwc-inline-notifications{margin-left:0}
body .rws-tabs{row-gap:12px}
body .rws-tabs #rws-notification-toggle{margin-left:auto;font-size:11px!important}
/* Mobile: feed destinations share one row; notifications have their own row.
   Keep the established reading rail and one outline, without a duplicate rule. */
@media(max-width:640px){
 body .rws-tabs{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;column-gap:8px;row-gap:10px;
  border-bottom:0;padding-bottom:0;
 }
 body .rws-tabs:has(>a:nth-of-type(3)){grid-template-columns:repeat(3,minmax(0,1fr))}
 body .rws-tabs>a{
  display:flex;align-items:center;justify-content:center;
  min-width:0;min-height:44px;padding:4px 0;box-sizing:border-box;
  font-size:11px;font-weight:700;line-height:1.4;
  white-space:normal;text-align:center;
 }
 body .rws-tabs #rws-notification-toggle{
  grid-column:1/-1;justify-self:stretch;width:100%;max-width:100%;
  min-height:44px;margin:0!important;box-sizing:border-box;
 }
}
@media(max-width:700px){
 :root{scrollbar-gutter:stable}
 body .rwm-header:has(>.rwc-inline-notifications){row-gap:8px}
 body .rwm-header>.rwc-inline-notifications{flex-basis:100%;margin-top:0;justify-content:flex-start}
 body .rwd-heading:has(.rwc-inline-notifications)>h1{flex-basis:100%}
}
