/* Post bodies: the public blog, the admin preview and the editor all use this. Every class here is one the
   sanitiser allows (src/Content/Palette.php). Pixel art is only ever scaled by whole numbers. */

.post-body { font: 400 1.125rem/1.65 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #062f39; overflow-wrap: break-word; }
.post-body > * { margin-block: 0 1em; }
/* Like Pages or Google Docs: Enter goes to the next line (paragraphs have no gap between them), and Enter
   twice leaves an empty paragraph, which shows as a blank line. Headings, lists, quotes and pictures keep
   their own spacing. */
.post-body p { margin-block: 0; }
.post-body p:empty::before { content: "\00a0"; }
.post-body li > :is(ul, ol) { margin-block: 0; }
.post-body > p + :is(ul, ol, blockquote, pre, figure, .lb-figure, .slideshow, .lb-slideshow, hr) { margin-top: .6em; }
.post-title { font-family: "04B_19", "Courier New", monospace; font-weight: normal; text-transform: uppercase; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.1; margin: 0 0 .4em; }
.post-summary { font-size: 1.25rem; color: #2b4f5a; }
.post-body h2, .post-body h3, .post-body h4 { line-height: 1.2; margin: 1.6em 0 .5em; }
.post-body h2 { font-size: 1.6rem; }
.post-body h3 { font-size: 1.3rem; }
.post-body h4 { font-size: 1.1rem; }
.post-body a { color: #0b6e8a; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-body blockquote { margin-inline: 0; padding: .4em 1em; border-left: 6px solid #34cd29; background: #f1fbe9; }
.post-body pre { padding: 12px 14px; background: #062f39; color: #e9fcd9; border-radius: 4px; overflow-x: auto; font: .95rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.post-body code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; background: #e8f3ef; padding: .05em .3em; border-radius: 3px; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body hr { border: 0; height: 6px; background: repeating-linear-gradient(90deg, #34cd29 0 12px, #1f9417 12px 24px); margin: 2em 0; }
.post-body ul, .post-body ol { padding-left: 1.4em; }

/* Alignment */
.ta-center { text-align: center; }
.ta-right { text-align: right; }

/* Palette colours (from the game's sprites; all at least 4.5:1 on white) */
.tc-sky { color: #0090b4; }
.tc-grass { color: #1f9417; }
.tc-soil { color: #0b4f12; }
.tc-gold { color: #b8860b; }
.tc-orange { color: #e86101; }
.tc-red { color: #c62828; }
.tc-purple { color: #7c35cf; }
.tc-ink { color: #062f39; }

/* Text styles */
.ts-pixel { font-family: "04B_19", "Courier New", monospace; text-transform: uppercase; letter-spacing: .03em; }
.ts-big { font-size: 1.35em; }
.ts-small { font-size: .85em; }
.ts-highlight { background: #ffd84a; padding: 0 .15em; }

/* Figures */
.lb-figure { margin: 1.6em 0; }
.lb-figure img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.lb-figure figcaption, .slide figcaption { margin-top: .4em; font-size: .95rem; color: #4c6670; text-align: center; }
.lb-figure figcaption:empty { display: none; }
.fig-small { max-width: 360px; margin-inline: auto; }
.fig-wide { margin-inline: min(0px, (720px - 100vw) / 4); }
.is-pixel img, img.px { image-rendering: pixelated; image-rendering: crisp-edges; border-radius: 0; }
.is-pixel { text-align: center; }
.is-pixel img { margin-inline: auto; }

/* Slideshow: horizontal scroll-snap, works without JavaScript */
.slideshow { margin: 1.6em 0; }
.slides {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; border-radius: 4px; background: #062f39; padding: 12px;
}
.slides:focus-visible { outline: 3px solid #ffd84a; outline-offset: 2px; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.slide img { max-width: 100%; max-height: 70vh; width: auto; height: auto; }
.slide figcaption { color: #e9fcd9; }
.slide-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.slide-links a {
  min-width: 32px; padding: 4px 8px; text-align: center; text-decoration: none; font-weight: 600; color: #062f39;
  border: 2px solid #062f39; border-radius: 3px; background: #fff;
}
.slide-links a[aria-current="true"] { background: #ffd84a; }
@media (prefers-reduced-motion: reduce) { .slides { scroll-behavior: auto; } }


.post-body > .post-summary { margin-bottom: 1em; }

/* ---------- the site's look inside posts: pixel font headings, ink borders, notched corners, game colours ---------- */
.post-body { --ink: #062f39; --px: 3px;
  --notch: polygon(0 3px, 3px 3px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px),
    calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px)); }
.post-body h2, .post-body h3, .post-body h4 { font-family: "04B_19", "Courier New", monospace; font-weight: normal; text-transform: uppercase;
  letter-spacing: .03em; line-height: 1.15; color: var(--ink); text-shadow: none; }
.post-body h2 { font-size: 1.9rem; }
.post-body h3 { font-size: 1.4rem; }
.post-body h4 { font-size: 1.15rem; }

/* A section: a stretch of the game's ground. Grass, the darker stripe along the top, an ink border. */
.lb-section { position: relative; margin: 1.8em 0; padding: 30px 26px 4px;
  background: #d3efc4 linear-gradient(#9fd88c 0 8px, transparent 8px); border: var(--px) solid var(--ink); clip-path: var(--notch); }
.lb-section > h2, .lb-section > h3 { color: #fff; margin: 0 0 .5em;
  text-shadow: -3px 0 var(--ink), 3px 0 var(--ink), 0 -3px var(--ink), 0 3px var(--ink), -3px -3px var(--ink), 3px -3px var(--ink), -3px 3px var(--ink), 3px 3px var(--ink), 0 6px 0 var(--ink); }
.lb-section > p, .lb-section > ul, .lb-section > ol { color: var(--ink); }
.lb-section > p { margin-bottom: .5em; }
.lb-section > :is(p, ul, ol) + .lb-card { margin-top: 18px; }

/* A card: cloud paper, an ink border, notched corners and a hard shadow, like the bird tiles */
.lb-card { position: relative; margin: 0 0 26px; padding: 22px 24px; background: #fffdf4; border: var(--px) solid var(--ink);
  clip-path: polygon(0 3px, 3px 3px, 3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px),
    calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px));
  box-shadow: inset 0 -6px 0 rgba(6, 47, 57, .12); }
.lb-card > :first-child { margin-top: 0; }
.lb-card > :last-child { margin-bottom: 0; }
.lb-card h2, .lb-card h3, .lb-card h4 { margin: 0 0 .6em; font-size: 1.35rem; color: #0b4f12; }
.lb-card > p + p { margin-top: .8em; }
.post-body > .lb-card { background: #e9fcd9; }

/* Pictures and slideshows: square pixel framing */
.lb-figure img { border-radius: 0; border: var(--px) solid var(--ink); }
.is-pixel img, img.px { border: 0; }
.slides { background: #0090b4; border: var(--px) solid var(--ink); border-radius: 0; padding: 12px;
  box-shadow: inset 0 -6px 0 rgba(6, 47, 57, .25); }
.slide figcaption { color: #fff; }
.slide-links a { border-radius: 0; font-family: "04B_19", "Courier New", monospace; font-weight: normal; }

