/* fof.lol blog (/blog/, /blog/<post>/): post list, article column and comic strips. Loaded after bench.css.

   Comics: <figure class="comic" style="--n: <panels per row>; --fs: <bubble font, % of panel width>">, each
   <div class="panel"> holds an inline SVG (the art: tool logos with faces from the page's #eo/#m* symbols)
   and HTML bubbles positioned in % of the panel, so the text wraps, translates (data-tx) and stays selectable.
   The comics are black and white (ink, screen tones), drawn by og-src/blog/build.py from the cast in og-src/blog/cast.svg;
   they stay "printed paper" in the dark theme too: a picture, like a photo. */

/* ---------- blog index ---------- */
.posts { display: grid; gap: 18px; margin: 0 0 56px; }
.post-card { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 0; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.post-card:hover { transform: translateY(-2px); }
.post-card:focus-visible { outline-offset: 4px; border-radius: 24px; }
.post-card .cover { background: #fff; border-right: 3px solid #16181d; display: block; overflow: hidden; border-radius: 23px 0 0 23px; }
.post-card .cover svg { display: block; width: 100%; height: 100%; min-height: 180px; }
.post-card .body { padding: 24px 28px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.post-card h2 { font-family: var(--display); font-weight: 600; font-size: clamp(19px, 2.4vw, 24px); letter-spacing: -.03em; }
.post-card p { color: var(--ink-2); max-width: 62ch; }
.post-card .more { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.post-card .more::after { content: ' →'; }
.post-meta { font-size: 13.5px; color: var(--muted); }
.tag { display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--marker-ink); background: color-mix(in srgb, var(--marker) 28%, transparent); padding: 2px 8px; border-radius: 6px; margin-right: 8px; }
@media (max-width: 700px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card .cover { border-right: 0; border-bottom: 3px solid #16181d; border-radius: 23px 23px 0 0; aspect-ratio: 300 / 190; }
  .post-card .body { padding: 20px; }
}

/* ---------- article ---------- */
.post { max-width: 860px; margin: 0 auto 20px; }
.post.prose { padding: 36px 48px; }
.post.prose section + section { margin-top: 34px; padding-top: 30px; }
.post.prose p, .post.prose li { font-size: 17px; line-height: 1.65; }
.post.prose h2 { font-size: clamp(20px, 2.6vw, 25px); margin-bottom: 14px; }
.post.prose h2 .n { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 12px; vertical-align: 3px; border-radius: 50%; background: var(--marker); color: #16181d; font-size: 13px; font-weight: 700; }
.post .aside { margin: 14px 0; padding: 14px 18px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); font-size: 15.5px; max-width: 72ch; }
.post .aside strong { color: var(--ink); }
.post-head { max-width: 860px; margin: 0 auto; }
.post-head .lead { max-width: 64ch; }
.post-end { max-width: 860px; margin: 0 auto 56px; }
@media (max-width: 640px) {
  .post.prose { padding: 22px 18px; }
  .post.prose p, .post.prose li { font-size: 16px; }
}

/* ---------- comics ---------- */
.comic { --ink-c: #16181d; margin: 22px 0 26px; }
.comic.solo { max-width: 460px; margin-inline: auto; }
.comic .strip { display: grid; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); gap: 10px; }
.comic figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }
.panel {
  position: relative; container-type: inline-size; overflow: hidden;
  border: 3px solid var(--ink-c); border-radius: 4px; background: #fff;
  box-shadow: 4px 4px 0 var(--ink-c);
}
.panel svg { display: block; width: 100%; height: auto; }
@media (max-width: 640px) { .comic .strip { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
/* speech bubbles, captions and sound effects: left/top/width come from the style attribute (% of the panel) */
.comic .panel p { position: absolute; margin: 0; max-width: none; color: var(--ink-c); font-size: max(10.5px, calc(var(--fs, 5) * 1cqw)); line-height: 1.22; }
.comic .panel .bb {
  background: #fff; color: var(--ink-c); border: 2px solid var(--ink-c); border-radius: 1.1em;
  padding: .45em .7em; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; text-align: center; text-wrap: balance;
}
/* the tail: a dark triangle (::before) under a white one (::after); .tl/.tr/.tc = at the bottom left/right/centre,
   .up = at the top instead */
.bb::before, .bb::after { content: ''; position: absolute; width: 0; height: 0; border-style: solid; }
.bb::before { border-width: .9em .45em 0; border-color: var(--ink-c) transparent transparent; top: 100%; }
.bb::after { border-width: .62em .3em 0; border-color: #fff transparent transparent; top: calc(100% - 1px); }
.bb.tl::before { left: 18%; transform: skewX(18deg); } .bb.tl::after { left: calc(18% + .15em); transform: skewX(18deg); }
.bb.tr::before { right: 18%; transform: skewX(-18deg); } .bb.tr::after { right: calc(18% + .15em); transform: skewX(-18deg); }
.bb.tc::before { left: calc(50% - .45em); } .bb.tc::after { left: calc(50% - .3em); }
.bb.up::before { top: auto; bottom: 100%; border-width: 0 .45em .9em; border-color: transparent transparent var(--ink-c); }
.bb.up::after { top: auto; bottom: calc(100% - 1px); border-width: 0 .3em .62em; border-color: transparent transparent #fff; }
.bb.no::before, .bb.no::after { display: none; }
/* a thought or a whisper: dashed outline */
.bb.soft { border-style: dashed; }
.comic .panel .cap {
  background: var(--ink-c); color: #fff; border: 2px solid var(--ink-c); border-radius: 2px; text-transform: uppercase;
  padding: .3em .6em; font-family: var(--mono); font-weight: 600; font-size: max(10px, calc(var(--fs, 5) * .82cqw));
  letter-spacing: .04em;
}
.comic .panel .sfx {
  font-family: var(--display); font-weight: 700; letter-spacing: -.03em; color: #fff;
  -webkit-text-stroke: .09em var(--ink-c); paint-order: stroke fill; text-shadow: .08em .08em 0 var(--ink-c);
  font-size: max(15px, calc(var(--fs, 5) * 1.45cqw)); white-space: nowrap; transform: rotate(-8deg); pointer-events: none;
}
@media print {
  .panel { box-shadow: none; break-inside: avoid; }
}
/* a wide panel (.panel.wide) on a narrow screen: the bubbles would cover the art, so they line up above it */
.comic { container: comic / inline-size; }
@container comic (max-width: 560px) {
  .panel.wide { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 8px 8px 0; background: #fff; }
  .panel.wide svg { flex: 0 0 calc(100% + 16px); order: 1; margin: 6px -8px 0; width: calc(100% + 16px); }
  .comic .panel.wide p.bb { position: static; flex: 1 1 0; min-width: 0; width: auto !important; font-size: 10px; padding: .45em .35em; overflow-wrap: anywhere; }
}
.comic .nw { white-space: nowrap; }
