/* Layout only: ranking type, row rhythm, motion and voting remain owned by the existing renderer. */
body.rw-ranking-grid{
 --rw-ranking-rule:rgba(255,255,255,.5);
}
body.rw-ranking-grid .site-main>article.post{
 margin-top:36px;
}
/* The feed tabs already have their own spacing above the first home title. */
body.home.rw-ranking-grid .site-main>article.post:first-of-type{
 margin-top:12px;padding-top:0;
}
body.rw-ranking-grid .site-main>article.post>.entry-header{
 margin-block:0;padding-block:0;border:0;
}
body.rw-ranking-grid .entry-header>div.entry-title{column-gap:24px;align-items:center}
body.rw-ranking-grid .entry-header>div.entry-title>div:first-child{min-width:0}
body.rw-ranking-grid .entry-header>div.entry-title>div:first-child>.entry-title,
body.rw-ranking-grid .entry-header .rwt-title-group>.entry-title{
 width:100%;max-width:100%;margin:0;padding:0;
}
body.rw-ranking-grid .comment-count-info-wrapper:not(:empty){margin-top:8px}
body.rw-ranking-grid .site-main>article.post>.entry-content{margin-block:24px 0}
body.rw-ranking-grid article.post .comment-list{margin-inline:0;padding-inline:0}
body.rw-ranking-grid article.post .comment-list>li.comment{margin-inline:0;padding-inline:0}
/* The legacy global ::after margin (-2rem) must not shorten these clearers. */
body.rw-ranking-grid .site-main>article.post>.entry-content::after,
body.rw-ranking-grid .site-main>article.post>.entry-footer::after{margin-top:0}
/* Metadata and actions get separate lines and a predictable breathing space. */
body.rw-ranking-grid .last-comment-info-wrapper{
 display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px 24px;
 margin:24px 0 0;padding:0;
}
body.rw-ranking-grid .last-comment-info{
 margin:0;font-size:11px;line-height:1.6;font-weight:400;letter-spacing:.02em;
}
body.rw-ranking-grid .site-main>article.post>.entry-footer{
 display:flex;align-items:baseline;flex-wrap:wrap;gap:16px 24px;
 margin-block:0;padding-block:0 28px;
 border:0;border-bottom:1px solid var(--rw-ranking-rule);
}
/* Older saved infinite-scroll fragments may omit the legacy .post class. */
body.home.rw-ranking-grid .site-main>article.type-post>.entry-footer{border-top:0;border-bottom:1px solid var(--rw-ranking-rule)}
body.rw-ranking-grid .entry-footer .posted-on{display:block;align-self:flex-start;font-size:11px;line-height:1.6;font-weight:400}
body.rw-ranking-grid .rws-ranking-actions{gap:12px 28px;margin:0;font-size:11px}
body.rw-ranking-grid .rws-ranking-actions>a{position:relative;display:inline-flex;align-items:center;min-height:44px;border:0;text-decoration:none}
body.rw-ranking-grid .rws-ranking-actions>a::after{content:"";position:absolute;inset-inline:0;top:calc(50% + 10px);height:1px;margin:0;background:currentColor}
body.rw-ranking-grid .rws-ranking-actions>a :is(span,svg){text-decoration:none}
/* Touching a ranking keeps the existing white type and highlight colors. */
body.rw-ranking-grid .entry-title a:is(:hover,:active,:focus){color:inherit!important;background:transparent;-webkit-tap-highlight-color:transparent}
body.rw-ranking-grid .entry-title a{-webkit-tap-highlight-color:transparent}
/* Keep the feed tabs and native search behavior, with lighter typographic framing. */
body.rw-ranking-grid .rws-tabs a[aria-current]{border:0;text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
body.rw-ranking-grid .rwis-load-more{min-height:44px;border-width:1px;background:transparent;color:#fff}
/* On the detail page, the vote entry and discussion share the article's grid. */
/* Empty count markup must not pull the metadata into the title with legacy margins. */
body.rw-ranking-grid.single-post .entry-header>div.entry-title{margin-bottom:0}
body.rw-ranking-grid.single-post .entry-header>.comment-count-info-wrapper{margin-block:0}
body.rw-ranking-grid.single-post .entry-header>.comment-count-info-wrapper:has(>.comment-count-info){margin-top:8px}
body.rw-ranking-grid.single-post .site-main>article.post>.entry-header{
 padding-bottom:24px;border-bottom:1px solid var(--rw-ranking-rule);
}
body.rw-ranking-grid.single-post .rws-discussion{
 margin-top:24px!important;margin-bottom:32px!important;padding-top:16px;
 border-top:1px solid var(--rw-ranking-rule);
}
/* The single template nests its metadata inside the voting content. */
body.rw-ranking-grid.single-post article.post .entry-footer{margin-bottom:0}
body.rw-ranking-grid.single-post .site-main{padding-bottom:0}
/* The sticky header already reserves its height. Use one 16px step before
   detail titles instead of stacking main padding and archive-card spacing. */
body.rw-ranking-grid.single-post .site-main{padding-top:0}
body.rw-ranking-grid.single-post .site-main>article.post:first-of-type{margin-top:16px}
/* One strong boundary for discovery, quieter rules within the footer. */
body.rw-ranking-grid.single-post .rwpd-discovery{margin-top:32px;padding-top:24px;padding-bottom:0}
body.rw-ranking-grid.single-post .rwpd-discovery::before{height:1px;background:var(--rw-ranking-rule)}
body.rw-ranking-grid.single-post .rwpd-discovery::after{display:none}
body.rw-ranking-grid.single-post footer#colophon{margin-top:24px}
body.rw-ranking-grid.single-post footer#colophon .footer-navigation{margin-top:0;margin-bottom:16px}
body.rw-ranking-grid.single-post .site-footer>.site-info{border-top:2px solid #fff;padding-top:20px;margin-top:20px}
body.rw-ranking-grid.single-post .rws-section-heading{gap:16px;flex-wrap:wrap}
body.rw-ranking-grid.single-post .rws-section-heading h2{font-size:18px;line-height:1.4}
body.rw-ranking-grid.single-post :is(.rws-note,.rws-empty){font-size:13px;line-height:1.7;text-transform:none}
body.rw-ranking-grid.single-post :is(#rws-body,.rws-submit){background:transparent!important;box-shadow:none}
body.rw-ranking-grid .site-main>article.post :is(a,button,input,textarea):focus-visible{outline:2px solid #fff;outline-offset:4px}
@media(max-width:600px){
 body.rw-ranking-grid .site-main>article.post{margin-top:28px}
 body.rw-ranking-grid .entry-header>div.entry-title{column-gap:16px}
 body.rw-ranking-grid .site-main>article.post>.entry-content{margin-top:20px}
 body.rw-ranking-grid .site-main>article.post>.entry-footer{display:block;padding-bottom:24px}
 body.rw-ranking-grid .rws-ranking-actions{gap:12px 24px;margin-top:8px}
 body.rw-ranking-grid .last-comment-info-wrapper{gap:12px 20px}
}
