/* Of Pine Wood website: only what the toolkit does not cover (requirements §5). */
/* Accent: "Forest", sampled from the pine forest profile picture; warnings stay red (--pw-danger). */
:root { --pw-accent: #2D553C; }
/* Layout: three equal columns with one gutter on wide screens. Blocks span 3, 2 + 1 or 1 + 1 + 1 of them,
   and images inside a wider block are one column wide, so the columns line up down the page. */
:root { --site-gutter: 40px; }
@media (min-width: 761px) {
  .pw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--site-gutter); }
}
.site-intro { margin-top: 26px; }
/* An image on its own line in the text of a page or post floats right, one column wide; the text after it wraps around it. */
.pw-prose:not(.site-retro-body) { display: flow-root; }
.pw-prose:not(.site-retro-body) > p:has(> .pw-embed:only-child) { clear: right; float: right; width: calc((100% - 2 * var(--site-gutter)) / 3); margin: 4px 0 12px var(--site-gutter); }
.pw-prose:not(.site-retro-body) > p:has(> .pw-embed:only-child) .pw-embed { width: auto; margin: 0; }
.pw-prose:not(.site-retro-body) > p:has(> .pw-embed:only-child) img { display: block; width: 100%; }
@media (max-width: 560px) {
  .pw-prose:not(.site-retro-body) > p:has(> .pw-embed:only-child) { float: none; width: auto; margin: 0 0 16px; }
}
.site-byline { margin: 0 0 22px; }
/* Retro Computing block on the home page (FR-20): the last changed system over two columns, a featured entry in the third. */
/* The RetroWeb logo badge in the block's heading, in place of a text link (the toolkit puts badges first, as in the top bar). */
.pw-head:has(> .site-retro-links) { flex-wrap: wrap; gap: 10px 20px; }
/* The badge with a text link below it, like "All posts »" in the other headings. */
.site-retro-links { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; align-self: flex-end; margin-left: auto; }
.pw-head .site-retro-badge { order: 0; }
.site-retro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--site-gutter); padding-top: 22px; }
.site-retro > * { min-width: 0; }
.site-retro-item .pw-img { height: 300px; }
.site-retro-item .pw-img img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.site-retro-item h3 { font: 24px/1.05 var(--pw-display); text-transform: uppercase; margin: 6px 0 8px; }
.site-retro-item .pw-kicker { display: block; }
.site-retro-item .pw-spec { border: 0; padding: 0; margin: 0 0 12px; }
/* The text of the system and the entry (their RetroWeb pages, plain text): smaller prose, its headings below the item's h3. */
.pw-prose.site-retro-body { margin-bottom: 14px; font-size: 14px; line-height: 1.55; }
.site-retro-body p, .site-retro-body ul, .site-retro-body ol { margin-bottom: 10px; }
.site-retro-body h4 { margin: 18px 0 6px; font-size: 16px; }
.site-retro-body h5 { margin: 12px 0 4px; color: var(--pw-accent); font: 11px var(--pw-serif); text-transform: uppercase; letter-spacing: 1px; }
.site-retro-foot { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 12px; }
/* The system (first of two, over two columns), or a single item (all three): the photo floats right of the text,
   below the title, one column wide. The rule between the system and the entry sits in the middle of the gutter. */
.site-retro-item:first-child:not(:only-child) { position: relative; grid-column: span 2; }
.site-retro-item:first-child:not(:only-child)::after { content: ""; position: absolute; top: 0; bottom: 0; right: calc(var(--site-gutter) / -2); border-right: 1px solid var(--pw-rule); }
.site-retro-item:is(:first-child:not(:only-child), :only-child) h3 { font-size: 34px; }
@media (min-width: 761px) {
  .site-retro-item:is(:first-child:not(:only-child), :only-child) .site-retro-fig { float: right; margin: 0 0 12px var(--site-gutter); }
  .site-retro-item:first-child:not(:only-child) .site-retro-fig { width: calc((100% - var(--site-gutter)) / 2); }
  .site-retro-item:only-child .site-retro-fig { width: calc((100% - 2 * var(--site-gutter)) / 3); }
  .site-retro-item:is(:first-child:not(:only-child), :only-child) .site-retro-foot { clear: both; }
}
/* The featured entry (narrow column), and every item on narrow screens: the photo after the text. */
.site-retro-item:last-child:not(:only-child) .site-retro-main { display: flex; flex-direction: column; }
.site-retro-fig { order: 1; margin-top: 16px; }
.site-retro > :only-child { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .site-retro { grid-template-columns: 1fr; }
  .site-retro-item:first-child:not(:only-child) { grid-column: auto; padding: 0 0 20px; margin-bottom: 8px; border-bottom: 1px solid var(--pw-rule); }
  .site-retro-item:first-child:not(:only-child)::after { content: none; }
  .site-retro-main { display: flex; flex-direction: column; }
  .site-retro-item .pw-img { height: 240px; }
}
