/* Blog post (content/blog.py). One text column (--col) in the middle; the schemes and the videos are wider and centred,
   so they stick out equally on both sides (owner 2026-10-28). A scheme shows what goes into a neural network (.ins),
   the network (.model) and what comes out (.out); static/js/post.js draws the dashed wires between them. */
/* --card: the one background of every scheme card, media slot and framed picture: the near-white the pictures and
   videos are drawn on (owner 2026-10-28: «почему фон то белый то желтый … главное что бы был одинаковый») */
.post { --col: 680px; --wide: 960px; --line: rgba(43, 29, 20, .22); --card: #f0f1ef;
  max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(28px, 5vw, 60px) var(--gutter) 72px;
  display: flex; flex-direction: column; gap: 56px; }
.post p { margin-block: 0; }
.post section { display: flex; flex-direction: column; gap: 18px; }
.post > header, .post > hr, .post > .post-back, .post section > * { width: 100%; max-width: var(--col); margin-inline: auto; }
.post section > figure.flow { max-width: 860px; }
.post section > figure.flow.sheets, .post section > figure.flow.vert, .post section > .split { max-width: var(--wide); }
/* a sub-heading inside a section (owner 2026-10-29: «Да, верни 4.3», «давай тогда Косяки генераций листами вернём»):
   smaller than h2, set off from the text above */
.post section > h3 { font-size: 1.15rem; margin-block: 18px 0; }

.post .head { display: flex; flex-direction: column; gap: 12px; }
.post .eyebrow { font: 600 .9rem/1.2 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--rust-dark); }
.post h1 { font-size: clamp(2rem, 5.2vw, 3.2rem); margin-block: 0; }
.post h2 { font-size: clamp(1.4rem, 3.2vw, 1.95rem); margin-block: 0; }
.post .lead { font-size: 1.2rem; color: var(--ink-soft); }
.post .cap, .post figcaption { font-size: .95rem; color: var(--ink-soft); }
.post hr { border: 0; border-top: 2px dashed #cdb68c; }
.post .post-back { font: 600 1rem var(--head); text-transform: uppercase; letter-spacing: .05em; }

.post figure { margin-block: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.post figure > img, .post figure > video { width: 100%; height: auto; display: block; background: var(--card);
  border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.post .split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 22px; align-items: start; }

.post .tbl { overflow-x: auto; }
.post table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.post th, .post td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.post th { font: 600 .85rem var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.post td.n { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* schemes */
.post .flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 2fr); gap: 56px; align-items: center; position: relative; }
.post .flow svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.post .flow svg.wires path { fill: none; stroke: var(--rust); stroke-width: 2; stroke-dasharray: 5 5; opacity: .75; }
.post .flow .ins { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.post .flow .node { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(43, 29, 20, .85); padding: 10px; display: flex; flex-direction: column; gap: 8px;
  position: relative; z-index: 1; min-width: 0; }
.post .flow .tag { font: 600 .78rem/1.2 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.post .flow .media { background: var(--card); border-radius: 8px; position: relative; overflow: hidden; aspect-ratio: 3 / 4; }
.post .flow .media > img, .post .flow .media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.post .flow .media > img { padding: 6% 8%; }
.post .flow .model { z-index: 1; background: var(--night); color: var(--cream); border-radius: 99px; padding: 9px 16px;
  font: 500 .92rem/1 var(--head); letter-spacing: .04em; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.post .flow .model::after { content: "→"; }
.post .flow .spin { position: absolute; right: 10px; bottom: 10px; z-index: 2; pointer-events: none; font: 500 .8rem/1 var(--head);
  background: var(--night); color: var(--cream); padding: 6px 9px; border-radius: 99px; }

/* the 3D model and the skeleton next to it */
.post #v3d, .post #v3d-in { position: absolute; inset: 0; }
.post #v3d { touch-action: none; }
.post #v3d canvas, .post #v3d-in canvas { display: block; width: 100%; height: 100%; }
.post .mv-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 2px; }
.post .mv-bar button { font: 500 .85rem/1 var(--head); letter-spacing: .04em; text-transform: uppercase; padding: 8px 12px;
  border-radius: 99px; border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.post .mv-bar button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--cream); }
.post .mv-bar button:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.post .mv-bar .msg { margin-left: auto; font-size: .9rem; color: var(--ink-soft); }

/* a sheet in, a sheet and its animation out */
.post .flow.sheets { grid-template-columns: minmax(0, 1.15fr) auto minmax(0, 1.5fr); }
.post .flow.sheets .outs { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.post .flow.sheets .node.small { width: 56%; }
.post .flow.sheets .ins .node.small { align-self: flex-end; }
.post .flow.sheets .outs .node.small { align-self: flex-start; }
.post .flow .media.sheet { aspect-ratio: 3 / 2; }
.post .flow .media.sheet > img { padding: 2%; }

/* inputs on top, several networks below */
.post .flow.vert { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.post .flow.vert .ins { flex-direction: row; justify-content: center; gap: 18px; }
.post .flow.vert .ins .node { width: 168px; }
.post .flow.vert .ins .tag { font-size: .7rem; letter-spacing: .04em; }
.post .flow.vert .outs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; width: 100%; }
.post .flow.vert .col { display: flex; flex-direction: column; align-items: center; gap: 28px; min-width: 0; }
.post .flow.vert .col .node { width: 100%; }
.post .flow.vert .model::after { content: "↓"; }
.post .flow .media.tall { aspect-ratio: 9 / 16; }
.post .flow .media.tall > img, .post .flow .media.tall > video { object-fit: cover; padding: 0; }

/* the post about designing Bo (2026-10-29): a card with words instead of a picture (an idea typed to the network),
   one, three or four inputs, two small schemes side by side (.duo of .flow.col: input on top, answer below),
   before/after pairs and a four-step chain */
.post section > figure.flow.four, .post section > .duo, .post section > .chain { max-width: 860px; }
.post section > figure.ref { max-width: 440px; }
.post section > .pair { max-width: 520px; }
.post .flow .media.word { aspect-ratio: auto; min-height: 120px; display: flex; flex-direction: column; justify-content: center;
  padding: 16px 18px; background: #e7e3d8; }
.post .flow .media.word p { font-size: 1.05rem; line-height: 1.4; font-weight: 600; color: var(--ink); }
.post .flow .media.sq { aspect-ratio: 1; }
.post .flow.one { grid-template-columns: minmax(0, 1fr) 170px minmax(0, 2fr); }
.post .flow.one .model { justify-self: center; }
.post .flow.three .ins { gap: 12px; }
.post .flow.three .ins .media:not(.word) { aspect-ratio: 4 / 3; }
.post .flow.three .ins .media > img { padding: 4%; }
.post .flow.four { grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1.6fr); }
.post .flow.four .ins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.post .duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.post .flow.col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.post .flow.col .ins { width: 56%; }
.post .flow.col .node.out { width: 100%; }
.post .flow.col .model::after { content: "↓"; }
.post .flow.col figcaption { align-self: stretch; }
.post .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post .pair img, .post .chain img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; padding: 5%; background: var(--card);
  border: 2px solid var(--ink); border-radius: var(--radius); display: block; }
.post .pair.sq img { aspect-ratio: 1; padding: 0; object-fit: cover; }
.post .chain { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.post .chain figcaption b { font-family: var(--head); color: var(--rust-dark); margin-right: 6px; }
.post tr.sum td { font-weight: 700; border-bottom: 0; }

/* the post about the first game (2026-10-29): wide model sheets and a sound as the network's answer (a waveform and a
   player), a pasted prompt, a callout with one big figure, two columns of playthrough frames, text with a small loop beside it */
.post section > figure.wide, .post section > .grid2,
.post section > figure.flow:has(.media.wide), .post section > figure.flow:has(.media.audio) { max-width: var(--wide); }
.post .flow.one:has(.media.wide), .post .flow.one:has(.media.audio) { grid-template-columns: minmax(0, 1.35fr) 150px minmax(0, 2fr); }
.post .flow .media.wide { aspect-ratio: 16 / 9; }
.post .flow .media.wide > img { padding: 2%; }
.post .flow .media.audio { aspect-ratio: auto; min-height: 150px; display: flex; flex-direction: column; justify-content: center;
  gap: 12px; padding: 18px 16px; background: #e7e3d8; }
.post .flow .media.audio .wave { width: 100%; height: 56px; display: block; fill: var(--teal); }
.post .flow .media.audio audio { width: 100%; display: block; }
.post .flow .media small { font: 600 .74rem/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.post .prompt { font: .95rem/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--card);
  border: 2px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .prompt .note { display: block; margin-bottom: 8px; font: 600 .78rem/1.2 var(--head); letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft);
  background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; transform: none; }   /* not the site's sticky .note */
.post .callout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 22px; align-items: center;
  background: var(--card); border: 2px solid var(--ink); border-left-width: 8px; border-left-color: var(--rust);
  border-radius: var(--radius); box-shadow: 3px 3px 0 rgba(43, 29, 20, .85); padding: 16px 20px; }
.post .callout .big { font: 600 clamp(1.8rem, 4vw, 2.4rem)/1 var(--head); color: var(--rust-dark); white-space: nowrap; }
.post .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; align-items: start; }
.post .side { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; align-items: center; }
.post .side figure > img { padding: 4%; }
.post .grid2 > figure, .post .side > figure { margin-inline: 0; }   /* the browser's 40px figure margins */
.post .flow .media.word small { margin-top: 8px; }

@media (max-width: 760px) { .post .split { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .post .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .post { gap: 44px; }
  .post .flow { grid-template-columns: 1fr; gap: 14px; }
  .post .flow svg.wires { display: none; }
  .post .flow .ins { flex-direction: row; }
  .post .flow .ins .node { flex: 1; }
  .post .flow .model { justify-self: center; }
  .post .flow .model::after { content: "↓"; }
  .post .flow.sheets { grid-template-columns: 1fr; }
  .post .flow.sheets .ins { flex-direction: column; }
  .post .flow.sheets .node.small { width: 62%; align-self: center; }
  .post .flow.vert .outs { gap: 8px; }
  .post .flow.vert .ins .node { width: 120px; flex: none; }
  .post .flow.vert .model { font-size: .7rem; padding: 6px 9px; white-space: normal; text-align: center; }
  .post .flow.one, .post .flow.four { grid-template-columns: 1fr; }
  .post .duo { grid-template-columns: 1fr; gap: 36px; }
  .post .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post .flow.one:has(.media.wide), .post .flow.one:has(.media.audio) { grid-template-columns: 1fr; }
  .post .callout, .post .side { grid-template-columns: 1fr; }
  .post .side figure { max-width: 220px; }
}
