/* The Blogs list beside a post on a dock host (server/dock.go; George, Nov 27, 2026: "the same sidebar on the right
   but instead of "Pages" call it "Blogs""). Loaded after dock.css (Heart Player's, pinned by HEARTPLAYER.lock), which
   has the player, the tabs and the two columns; these are the rules for the list of pages in the sidebar, which Vi.ki
   keeps in its own app.css (the Nov 22, 2026 sidebar: bigger thumbnails, the All link, the pager, a row shaded on
   hover), and the few that fit a blog post into Vi.ki's columns. app.css here is an older copy of Vi.ki's stylesheet
   that every MGN site shares, so the newer rules live in this file, only on the pages that use them. */

/* --- a post in Vi.ki's columns ---------------------------------------------------------------- */
/* The text keeps Vi.ki's reading column and starts at its left edge, not centered in it. */
body.mgn-dock .mgn-article, body.mgn-dock .comments-area { max-width: none; margin-left: 0; margin-right: 0; }
/* A post with no video: the list alone, wide enough for a 16rem thumbnail and its title. */
@media (min-width: 60.01rem) {
  body.mgn-dock:not(.has-dock) .with-aside { grid-template-columns: minmax(0, var(--max)) minmax(0, 31.7rem); }
  body.mgn-dock:not(.has-dock).wide { --shell: 82rem; }
}

/* --- the video grows with the window -----------------------------------------------------------
   George, Nov 27, 2026: "let the video grow in size if space allows currently it doesn't grow". Vi.ki's own rule
   (its app.css, "two columns while the sidebar's tabs show"): from 92rem the page fills the window, the text and the
   video share its width, and the text keeps its measure at the right of its column, beside the video. dock.css
   then sizes the video to its column and the window's height (--hb-fit). */
@media (min-width: 92rem) {
  body.mgn-dock.has-dock.dock-side.side-tabs-on { --shell: 100%; }
  body.mgn-dock.has-dock.dock-side.side-tabs-on .with-aside {
    grid-template-columns: minmax(0, 1fr) minmax(33.5rem, 1fr);
    container-type: inline-size;
  }
  body.mgn-dock.has-dock.dock-side.side-tabs-on .page-main {
    grid-column: 1;
    padding-left: max(0px, calc((100cqw - 2.5rem) / 2 - var(--max)));
  }
  body.mgn-dock.has-dock.dock-side.side-tabs-on .rails { display: flex; grid-column: 2; }
  body.mgn-dock.has-dock.dock-side.side-tabs-on .related { grid-column: auto; padding-left: 0; }
}

/* --- the line under the video ------------------------------------------------------------------
   Links never gain an underline on hover (George's rule for every site); Vi.ki's app.css colors them instead. */
.hb-about-title:hover, .hb-about-title:focus-visible { text-decoration: none; color: var(--link); }
.hb-about-channel:hover .hb-about-name, .hb-about-channel:focus-visible .hb-about-name { text-decoration: none; color: var(--link); }

/* --- the Settings gear ------------------------------------------------------------------------- */
/* The menu's rows and its card are app.css's (Vi.ki's Settings menu); the overlap list shows only with YouTube's
   controls, and neither video list while the video is hidden. */
:root[data-controls-site] #settings-overlap { display: none; }
:root[data-video="off"] #settings-controls, :root[data-video="off"] #settings-overlap { display: none; }
.mgn-nav .settings-box { margin-left: -.3rem; }

/* --- the tabs' panels -------------------------------------------------------------------------- */
/* The tab already names the list, so its heading is kept for screen readers (the aside is labeled by it) only. */
.related.tabbed[data-tab] > .side-more > h2 {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.related h2 { font-size: .8rem; margin: .3rem 0 .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 500; }
/* "All N blogs" heads the list, the pager right after it. */
.related .side-all { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 .6rem; }
.related .side-all .autoplay-pill { margin-left: auto; }
.related .side-all-link {
  display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .35rem; margin-left: -.35rem; border-radius: 6px;
  color: var(--link); font-weight: 500; font-size: .93rem; transition: background .12s; text-decoration: none;
}
.related .side-all-link:hover, .related .side-all-link:focus-visible { background: var(--tint); text-decoration: none; }
.related .side-all-icon { width: 20px; height: 20px; flex: none; border-radius: 4px; object-fit: cover; }
.related .side-all-glyph { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; border-radius: 0; }
/* The panel reaches .35rem past the column on both sides, so a row's shading has room inside it (no scrollbar), and
   takes only the width it needs: a 16rem image and its title, however wide the video's column is. */
.related .side-more { margin-inline: -.35rem; padding-inline: .35rem; max-width: calc(31rem + .7rem); }
.related.tabbed[data-tab] > .side-panel { overflow-x: hidden; }
/* The sidebar's column runs on beside the footer, so what sticks in it never scrolls up at the page's foot, and the
   footer's words keep clear of it (side.js sets --foot-h and --side-room only while the sidebar is beside the text). */
.related.tabbed[data-tab] { margin-bottom: calc(-1 * var(--foot-h, 0px)); }
body.side-tabs-on footer.site { padding-right: max(1rem, var(--side-room, 0px)); }
/* Prev and Next page through the rows that fit (side.js). */
.related .side-pager { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.related .side-pager[hidden] { display: none; }
/* The same pair at the list's foot (side.js), at its left (George, Nov 28, 2026: "move the foot Prev Next buttons to
   the left instead of the right in all sidebars"). */
.related .side-pager-foot { display: flex; justify-content: flex-start; margin: .5rem 0 0; }
.related .side-pager button {
  font: inherit; font-size: .82rem; font-weight: 500; padding: .25rem .6rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--link); transition: background .12s;
}
.related .side-pager button:hover:not(:disabled) { background: var(--tint); }
.related .side-pager button:disabled { color: var(--muted); cursor: default; opacity: .6; }
.related .side-page-n { font-size: .78rem; color: var(--muted); white-space: nowrap; }
/* No scrollbar on the list: side.js hides the rows that do not fit the window. */
@media (min-width: 60.01rem) {
  .related.tabbed[data-tab] > .side-more { overflow: hidden; }
}

/* --- the rows ---------------------------------------------------------------------------------- */
.related .pages { list-style: none; margin: 0 0 .9rem; padding: 0; }
.related .pages li { padding: .42rem 0; }
.related .pages li[hidden] { display: none; }
.related .pages li a { color: var(--ink); display: block; text-decoration: none; }
.related .pages li a:hover { color: var(--link); text-decoration: none; }
.related .side-panel .pages li { padding: .2rem 0; }
/* Every row is shaded on hover, so it is clear the whole row opens its post. */
.related .side-panel .pages li a { padding: .35rem; margin: 0 -.35rem; border-radius: 8px; transition: background .12s; }
.related .side-panel .pages li a:hover, .related .side-panel .pages li a:focus-visible { background: var(--tint); color: var(--link); }
.related .kind { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: .1rem; }
/* A row is two columns: the image, then the title beside it. A post with no image keeps the image's space. */
.related .pages li a:has(.side-viki-pic) { display: grid; grid-template-columns: 16rem 1fr; gap: .8rem; align-items: start; }
.viki-card-pic { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); }
.viki-card-img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg); }
.related .side-viki-pic { border-radius: 6px; background: var(--tint); }
.pg-text { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
/* A narrow window: the list sits under the text, its images smaller beside their titles. */
@media (max-width: 34rem) {
  .related .pages li a:has(.side-viki-pic) { grid-template-columns: 9rem 1fr; }
}

/* --- a post's Moments list while its video is docked (server/dock.go) ----------------------------
   The line beside each time is .moment-words there, not .moment-desc (which Heart Player leaves out of the words it
   lists under the video); it looks the same (mgn.css, app.css). */
.mgn-moments .moment-words { display: block; margin: 0; font-size: .95rem; color: var(--ink); }

/* "More to read" after an article (single.html, moreHosts in dock.go; George, Nov 28, 2026): cards of the posts
   most like this one, at most two in a row (as the vikis' Related; George, Nov 28, 2026: "make it max two per row"), each image in a 16:9 box whether the post has one or not, so the
   titles line up; the image plays the post's video on hover (cards.js) unless Autoplay video is off. */
.mgn-more { margin: 2.2rem 0 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.mgn-more h2 { font-size: 1.15rem; margin: 0 0 .9rem; }
.mgn-more-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(max(min(100%, 14rem), calc((100% - 1rem) / 2)), 1fr)); }
.mgn-more-grid li { min-width: 0; }
.mgn-more-grid a { display: block; color: var(--ink); text-decoration: none; padding: .35rem; margin: -.35rem; border-radius: 10px; transition: background .12s; }
.mgn-more-grid a:hover, .mgn-more-grid a:focus-visible { background: var(--tint); color: var(--link); text-decoration: none; }
.mgn-more-pic { border-radius: 8px; background: var(--tint); margin-bottom: .5rem; }
.mgn-more-pic .viki-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mgn-more-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: .95rem; line-height: 1.35; }
.mgn-more .kind { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: .2rem; }
