/* ═══════════════════════════════════════════════════════════════════
   One post, as it reads.

   The rules behind storefront/partials/post-article — the article the blog
   editor's preview draws and the published page draws, at the size a reader
   meets it. The editor's panel loads sellwares-dashboard.css, which carries
   the same rules plus the ones that scale this down into a preview card; keep
   the two in step, or a creator arranges one thing and publishes another.
   ═══════════════════════════════════════════════════════════════════ */

/* ── the post itself ── */
.bl-post{background:var(--bl-surface);color:var(--bl-ink);min-height:100%}
/* A band, not half the page.
   16/7 of a preview this wide came out around 380px tall, so a post with no
   cover opened on an empty block with the title below the fold — the one thing
   somebody looks at this panel to check. A real picture is still shown at its
   own shape, capped; an empty one is a short strip that says "a cover goes
   here" and gets out of the way. */
.bl-cover{display:block;width:100%;aspect-ratio:16/7;max-height:220px;object-fit:cover}
.bl-cover-none{display:flex;align-items:center;justify-content:center;
               aspect-ratio:auto;height:104px;max-height:104px;
               background:var(--bl-card);color:var(--bl-muted);font-size:20px;
               border-bottom:1px solid var(--bl-line)}
.bl-body{padding:26px 28px 40px;max-width:70ch;margin:0 auto}
.bl-post h1{font-family:var(--bl-head);font-size:28px;line-height:1.2;letter-spacing:-.02em;
            margin:0 0 10px;color:var(--bl-ink)}
.bl-blurb{font-family:var(--bl-body);font-size:15px;line-height:1.6;color:var(--bl-muted);margin:0 0 14px}
.bl-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-family:var(--bl-body);
         font-size:12px;color:var(--bl-muted);margin-bottom:22px}
.bl-av{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;
       background:var(--bl-accent);color:var(--bl-surface);font-size:11px;font-weight:800}

.bl-words{font-family:var(--bl-body);font-size:15px;line-height:1.75;color:var(--bl-ink)}
.bl-words>*:first-child{margin-top:0}
.bl-words p{margin:0 0 15px}
.bl-words h2{font-family:var(--bl-head);font-size:20px;line-height:1.3;margin:26px 0 10px}
.bl-words h3{font-family:var(--bl-head);font-size:16.5px;line-height:1.35;margin:22px 0 8px}
.bl-words a{color:var(--bl-accent);text-decoration:underline;text-underline-offset:2px}
.bl-words ul,.bl-words ol{margin:0 0 15px;padding-left:22px}
.bl-words li{margin-bottom:5px}
.bl-words blockquote{margin:0 0 15px;padding:2px 0 2px 15px;border-left:3px solid var(--bl-accent);
                     color:var(--bl-muted)}
.bl-words img{max-width:100%;border-radius:10px}
.bl-words code{background:var(--bl-card);padding:1px 5px;border-radius:4px;font-size:.9em}
.bl-words pre{background:var(--bl-card);padding:12px 14px;border-radius:10px;overflow-x:auto}
.bl-words hr{border:0;border-top:1px solid var(--bl-line);margin:24px 0}
.bl-empty{color:var(--bl-muted);font-style:italic}

/* ── the address bar ──

   Above the title in the preview, drawn like a browser's own bar. The host is
   this shop's real one — see PostController::journey(). */
.bl-url{display:flex;align-items:center;gap:8px;padding:9px 14px;
        background:var(--bl-card);border-bottom:1px solid var(--bl-line)}
.bl-url-dot{width:7px;height:7px;border-radius:50%;background:var(--bl-accent);flex:none}
.bl-url-t{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
          font-size:11px;color:var(--bl-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* What the post is filed under, over the title. */
.bl-kicker{font-family:var(--bl-body);font-size:11px;font-weight:800;letter-spacing:.09em;
           text-transform:uppercase;color:var(--bl-accent);margin-bottom:9px}

/* ══════════ a card on the Write step ══════════
   Header bar, one ✦ button in it, body under. The two jobs on this step —

   one place they are styled for the dashboard preview. The published page
   styles the same names off its own tokens — see sellwares-page.css. */
.bl-words .pa-embed{position:relative;margin:0 0 15px;border-radius:12px;overflow:hidden;
                    background:var(--bl-card);aspect-ratio:16/9}
.bl-words .pa-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

.bl-words .pa-prod{display:flex;align-items:center;gap:12px;margin:0 0 15px;padding:12px 14px;
                   border:1px solid var(--bl-line);border-radius:12px;background:var(--bl-card)}
.bl-words .pa-prod-ic{display:grid;place-items:center;width:38px;height:38px;border-radius:9px;
                      background:var(--bl-surface);color:var(--bl-accent);font-size:16px;flex:none}
.bl-words .pa-prod-t{flex:1;min-width:0}
.bl-words .pa-prod-t b{display:block;font-size:13.5px;line-height:1.3}
.bl-words .pa-prod-t span{font-size:11.5px;color:var(--bl-muted)}
.bl-words .pa-prod-go{flex:none;padding:8px 14px;border-radius:9px;background:var(--bl-accent);
                      color:var(--bl-surface);font-size:12px;font-weight:700;text-decoration:none}

.bl-words .pa-cta{margin:0 0 15px}
.bl-words .pa-cta-go{display:inline-block;padding:11px 20px;border-radius:10px;
                     background:var(--bl-accent);color:var(--bl-surface);
                     font-size:13.5px;font-weight:700;text-decoration:none}

.bl-words .pa-note{margin:0 0 15px;padding:13px 16px;border-left:3px solid var(--bl-accent);
                   border-radius:0 10px 10px 0;background:var(--bl-card)}
.bl-words .pa-note p{margin:0}
.bl-words .pa-note p+p{margin-top:8px}

.bl-words .pa-gallery{display:grid;gap:8px;margin:0 0 15px}
.bl-words .pa-gallery-2{grid-template-columns:repeat(2,1fr)}
.bl-words .pa-gallery-3{grid-template-columns:repeat(3,1fr)}
.bl-words .pa-gallery-4{grid-template-columns:repeat(2,1fr)}
.bl-words .pa-gallery img{width:100%;height:100%;object-fit:cover;aspect-ratio:4/3;margin:0}

.bl-words .pa-signup{margin:0 0 15px;padding:16px;border-radius:12px;
                     background:var(--bl-card);border:1px solid var(--bl-line)}
.bl-words .pa-signup b{display:block;font-family:var(--bl-head);font-size:15px;margin-bottom:10px}
.bl-words .pa-signup-f{display:flex;gap:8px;flex-wrap:wrap}
.bl-words .pa-signup-f input{flex:1;min-width:150px;padding:10px 12px;border-radius:9px;
                             border:1px solid var(--bl-line);background:var(--bl-surface);
                             color:var(--bl-ink);font:inherit;font-size:13px}
.bl-words .pa-signup-f button{padding:10px 18px;border:0;border-radius:9px;background:var(--bl-accent);
                              color:var(--bl-surface);font:inherit;font-size:13px;font-weight:700;cursor:pointer}

/* Said to whoever is editing and to nobody else — a reader never sees one. */
.bl-words .pa-cannot{margin:0 0 15px;padding:10px 13px;border-radius:9px;
                     background:#FCF2E2;color:#8A5108;font-size:12.5px;font-style:normal}

/* A video the host has not finished with. In the player's own place and at the
   player's own shape, so the page does not jump when it is swapped for one. */
.bl-words .pa-wait{display:flex;flex-direction:column;align-items:center;justify-content:center;
                   gap:5px;text-align:center;margin:0 0 15px;padding:20px 24px;
                   aspect-ratio:16/9;max-height:220px;border-radius:12px;
                   background:var(--bl-card);border:1px dashed var(--bl-line);font-style:normal}
.bl-words .pa-wait b{font-size:13px;color:var(--bl-ink)}
.bl-words .pa-wait span{font-size:11.5px;line-height:1.5;color:var(--bl-muted);max-width:44ch}
.bl-words .pa-wait.is-bad{background:#FCF2E2;border-color:#E8CFA2}
.bl-words .pa-wait.is-bad b{color:#8A5108}
.bl-words .pa-wait.is-bad span{color:#8A5108}


/* ══════════ the post preview: the head, in four cover styles ══════════ */
.bl-head{position:relative}
.bl-head-t{max-width:70ch;margin:0 auto;padding:26px 28px 0}
.bl-post .bl-body{padding-top:0}

/* Wide, above the title — the cover as a band, which is the default.

   Not a full-bleed strip. `.bl-cover` asks for 16/7 and caps the height at
   220px, and on a desktop those two fight: the band is as wide as the window,
   16/7 of that is 700-odd pixels tall, the cap cuts it to 220 and `cover`
   throws away everything above and below the middle. A drawn cover — which
   has the post's own title set into the picture — came out as a letterbox
   through the middle of its own words.

   So the picture is held to the measure the words are read at and kept at
   16/9, which is the shape every cover this platform draws is made in. It
   fills that box without being stretched, and nothing is cut off it.

   `img.bl-cover`, not `.bl-cover`: the empty-state placeholder wears the same
   class and is a <div>, and it keeps its own short strip. */
.bl-post.is-cover-wide img.bl-cover{max-width:calc(70ch + 56px);margin:0 auto;
                                    aspect-ratio:16/9;max-height:none;
                                    object-fit:cover;object-position:center;
                                    border-radius:14px}

/* Behind the title — the words over the picture, on a dark wash. */
.bl-post.is-cover-behind .bl-head{display:flex;flex-direction:column;justify-content:flex-end;
                                  min-height:250px;isolation:isolate;background:var(--bl-card)}
.bl-post.is-cover-behind .bl-head .bl-cover{position:absolute;inset:0;z-index:-2;width:100%;height:100%;
                                            max-height:none;aspect-ratio:auto;border:0}
.bl-post.is-cover-behind .bl-head::before{content:"";position:absolute;inset:0;z-index:-1;
                                          background:linear-gradient(180deg,rgba(0,0,0,.06) 15%,rgba(0,0,0,.66))}
.bl-post.is-cover-behind .bl-head-t{width:100%;padding-bottom:20px}
.bl-post.is-cover-behind .bl-head-t h1,
.bl-post.is-cover-behind .bl-head-t .bl-blurb,
.bl-post.is-cover-behind .bl-head-t .bl-meta,
.bl-post.is-cover-behind .bl-head-t .bl-kicker{color:#fff}
.bl-post.is-cover-behind .bl-head-t .bl-meta{margin-bottom:0}
.bl-post.is-cover-behind .bl-body{padding-top:22px}

/* Small, beside the title. */
.bl-post.is-cover-beside .bl-head{display:grid;grid-template-columns:minmax(0,1fr) 34%;gap:18px;
                                  align-items:start;max-width:calc(70ch + 56px);margin:0 auto;padding:26px 28px 0}
.bl-post.is-cover-beside .bl-head .bl-cover{grid-column:2;grid-row:1;height:auto;max-height:none;
                                            aspect-ratio:4/3;border-radius:10px;border:0}
.bl-post.is-cover-beside .bl-head-t{grid-column:1;grid-row:1;max-width:none;margin:0;padding:0}
.cj-scr.is-mobile .bl-post.is-cover-beside .bl-head{grid-template-columns:1fr}
.cj-scr.is-mobile .bl-post.is-cover-beside .bl-head .bl-cover{grid-column:1;grid-row:1;aspect-ratio:16/10}
.cj-scr.is-mobile .bl-post.is-cover-beside .bl-head-t{grid-row:2}

/* None. */
.bl-post.is-cover-none .bl-head .bl-cover{display:none}
