/* Rules that belong to every WordPress-backed body, in a file this app owns.
 *
 * The section stylesheets under /assets/css/ are the designer's -- a drop
 * replaces them wholesale, and anything we add there has to be re-applied by
 * hand every time (that is what the deviations ledger is for). What is here is
 * not styling: it is the small set of corrections that follow from the content
 * coming out of WordPress rather than out of a mockup.
 *
 * Loaded from the root layout, so it applies to every section. Most of it is
 * scoped to .cms_body -- the class the detail routes put on the element that
 * holds post_content -- so it cannot reach the designer's own figures. A rule
 * outside that scope has to earn it by naming a class only this app renders
 * (see the 記事送り rule at the bottom). */

/* WordPress writes width and height ATTRIBUTES on every image an editor
 * inserts. The section CSS constrains the width (max-width:100% globally,
 * width:100% inside a news figure) and nothing released the height, so the
 * attribute won: a 595x595 image rendered 500x595 on desktop and 145x595 on a
 * phone -- four times too tall. Editors insert arbitrary ratios, so the height
 * has to follow the width rather than the attribute.
 *
 * /labo/ escaped this because labo.css says the same thing for its own body
 * (task99). This is that rule, moved to where every section gets it. */
.cms_body img {
  height: auto;
}

/* 記事送り with only one neighbour: draw no divider (task199).
 *
 * .news_detail_nav / .event_detail_nav centre their links and hang the divider
 * off the CONTAINER at left:50%. With both links that lands between them, which
 * is the design. With one it lands on the single link's own edge -- the last
 * お知らせ shipped 「| 次に進む」, a rule dividing nothing.
 *
 * The mockup has no such state: its two links are both href="#", so "an article
 * with a neighbour on one side" never existed on paper. It exists in the data --
 * the newest and the oldest entry of every section are always in it.
 *
 * Here rather than in news.css/event.css because those are the designer's: a
 * drop replaces them wholesale and this would have to be re-applied by hand
 * every time. The selectors name markup only this app emits, so living in the
 * app's own stylesheet costs no reach.
 *
 * The class is REPEATED to buy specificity, not by accident. news.css nests its
 * rule inside .news_detail_area, so the cascade sees .news_detail_area
 * .news_detail_nav::before -- two classes -- and a single-class override loses
 * however late it is loaded. Measured: written once, /event/001/ lost its
 * divider and /news/030/ kept it, because event.css happens to declare the same
 * block at the top level. Repeating the class rather than naming .news_detail_area
 * keeps this working when a drop renames the wrapper; that rename would
 * otherwise put the stray divider back with nothing failing. */
.news_detail_nav.news_detail_nav:not(:has(a + a))::before,
.event_detail_nav.event_detail_nav:not(:has(a + a))::before {
  content: none;
}
