/* Layout */
.container{
     /* body is a column flexbox (reset.css) so this grows to push the footer down instead
        of leaving it floating right under a short page's content */
     flex:1;
     max-width:var(--max);
     margin:0 auto;
     padding-top:0;
     padding-left:var(--container-pad);
     padding-right:var(--container-pad);
     padding-bottom:12px; /* halved together with .footer-inner's padding-top (taxo.css) to keep the container/footer gap tight */
     display:grid;
     grid-template-columns:300px 1fr;
     gap:24px;
}
/* Homepage: transparent columns, with spacing supplied by each column's content. */
.container:not(.no-sidebar){position:relative;padding-top:10px;gap:0;}
@media(max-width:1024px){
  .container{grid-template-columns:1fr;}
  .sidebar{order:2;}
  .main{order:1;}
  .container:not(.no-sidebar){padding-top:2px;}
  .container:not(.no-sidebar) .sidebar{padding-right:0;padding-top:16px;}
}
@media(max-width:768px){
  .container:not(.no-sidebar) .sidebar{padding-top:12px;}
}

 .container.no-sidebar{
  /* Capped + centered like .site-header/.header-inner, so single-post/archive/tags/about/
     categories pages line up with the navbar the same way the home page's .container does. */
  max-width:var(--max);
  margin:0 auto;
  width:100%;
  grid-template-columns:1fr;
  /* Keep the first bordered box inside (.article, .toc-sidebar) clear of the header. */
  padding-top:10px;
}
.container.no-sidebar .main{
  max-width:none;
  width:100%;
  margin:0;
}

/* Standalone heroes and their content start at the navbar's brand edge. */
.container.no-sidebar:has(> .main > .hero){
  padding-inline:calc(var(--header-frame-inset) + var(--header-content-inset));
}
