/* Nelson's log (the WordPress port): loaded after weblog.css (flourish.toml's
   `stylesheet`). Simpler than the weblog, after nelsonslog.wordpress.com: one
   column, no sidebar, no yellow. The posts are white; everything else (page,
   header, footer) is one very light grey, #f8f8f8, with the weblog's tile in the
   page (Nelson, 2026-11-30):
   tools/background/tiles/stile-pale.svg, lines #f2f2f2, contrast ratio 1.05,
   from `stile_svg.py --bg '#f8f8f8' --line '#f2f2f2'`. Earlier tiles: #e8e8e8 on
   #f0f0f0 (tiles/stile-light.svg), white posts on #f3f3f3-on-white
   (tiles/stile-white.svg), and before that #dbdbdb on #e6e6e6 (img/stile-grey.svg).
   A new tile gets a new file name: theme images are cached
   for two days with no ?v= hash. */

body {
  background-color: #f8f8f8;
  background-image: url(img/stile-pale.svg);
}
div.bbox, article.bbox { background-color: #ffffff; }   /* the posts: white, on the tiled #f8f8f8 (Nelson, 2026-11-30) */

/* the header: the masthead on the left, Archives / search / Feed on the right */
header.title {
  background-color: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 8px 16px 6px 16px;
  text-align: left;
}
header.title img { top: 2px; }
header.title p.pagenote { flex-basis: 100%; padding: 0; }   /* its own line, under the masthead */

nav.headnav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}
.head-search input {
  width: 8.5em;                 /* so the header fits the 680px column on one line */
  font: inherit;
  padding: 2px 6px;
  border: 1px solid #bbbbbb;
  border-radius: 3px;
  background: #ffffff;
}

main { width: 680px; }
/* the page as wide as the posts: the header's links wrap rather than widen it */
.page { width: 680px; }

/* Justified and hyphenated as the weblog (weblog.css's div.bentry). */
div.bentry {
  overflow-wrap: break-word;    /* a long bare URL breaks rather than widening a phone's page */
}
/* Black, white and greys only (Nelson, 2026-11-30): links stay the browser's blue,
   and what posts themselves show is left alone. These undo weblog.css's colours. */
div.comment { background-color: #f0f0f0; border-left-color: #c8c8c8; }   /* weblog.css: warm #f4f4f0, #ddd */
div.comment.by-author { border-left-color: #555555; }  /* olive #996 */
div.autocorrect { color: #555555; }                     /* the 404 page's "did you mean": maroon */
a.autocorrect { color: revert; }                        /* a link: blue, like the others */

/* WordPress's tables sit in a <figure class="wp-block-table">: a wide one scrolls
   sideways in it on a phone, as on WordPress. */
figure.wp-block-table { overflow-x: auto; margin-left: 0; margin-right: 0; }

/* Gutenberg's columns and media-and-text blocks side by side, as on WordPress;
   stacked on a phone. A column with its own flex-basis keeps it. */
div.wp-block-columns { display: flex; gap: 1.5em; align-items: flex-start; margin: .7em 0; }
div.wp-block-columns.are-vertically-aligned-center { align-items: center; }
div.wp-block-column { flex: 1 1 0; min-width: 0; }
div.wp-block-column[style*="flex-basis"] { flex-grow: 0; }
div.wp-block-column > :first-child { margin-top: 0; }
div.wp-block-column > :last-child { margin-bottom: 0; }
div.wp-block-media-text {
  display: grid;
  grid-template-columns: 50% 1fr;
  gap: 1.5em;
  align-items: center;
  margin: .7em 0;
}
div.wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr 50%; }
div.wp-block-media-text.has-media-on-the-right > .wp-block-media-text__media { grid-column: 2; grid-row: 1; }
.wp-block-media-text__media { margin: 0; }
.wp-block-media-text__media img { display: block; width: 100%; height: auto; }

.footer { background-color: #f8f8f8; }
.search-form button, .search-more { background: #e2e2e2; }
.search-excerpt mark { background: #dadada; }         /* the search words, in grey, not yellow */

@media screen and (max-width: 720px) {
  .page { width: auto; }
  main { width: 100%; }
  header.title { padding: 8px 10px 6px 10px; }
  .head-search input { width: 7em; }
}
@media screen and (max-width: 600px) {
  div.wp-block-columns { flex-direction: column; }
  div.wp-block-column, div.wp-block-column[style*="flex-basis"] { flex-basis: auto !important; width: 100%; }
  div.wp-block-media-text, div.wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr; }
  div.wp-block-media-text.has-media-on-the-right > .wp-block-media-text__media { grid-column: 1; }
}
