/* ═══════════════════════════════════════════════════════════════════════
   OMNISCIENT WEBSITE · BLOG
   Posts and the blog index, written by tools/blog.mjs from blog/_src/*.md. Tokens, buttons, header and footer come
   from base.css. Product shots inside a post (*.shot.html) keep the home page's styles (home.css), so every rule
   here that styles the article text skips anything inside .bl-shot. Square and framed, no shadows, no gradients.
   ═══════════════════════════════════════════════════════════════════════ */

.om-blog {
  --bl-read: 720px;
  --bl-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.bl-label, .bl-mono { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); }

/* ═══ Post layout: the contents on the left, the article at reading width ═══ */
.bl-post { padding: 40px 0 0; }
.bl-grid { display: grid; grid-template-columns: minmax(0, var(--bl-read)); justify-content: center; }
.bl-side { display: none; }
@media (min-width: 1080px) {
  .bl-grid { grid-template-columns: 200px minmax(0, var(--bl-read)); gap: 72px; }
  .bl-side { display: block; }
}
.bl-toc { position: sticky; top: calc(var(--header-h) + 40px); max-height: calc(100vh - var(--header-h) - 80px); overflow-y: auto; padding: 4px 2px 8px 0; }
.bl-toc ol { margin-top: 14px; border-left: 1px solid var(--line); }
.bl-toc a {
  display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 2px solid transparent;
  font-size: 13px; line-height: 1.4; color: var(--muted);
  transition: color var(--fast) var(--ease-out), border-color var(--fast) var(--ease-out);
}
.bl-toc a:hover { color: var(--ink); }
.bl-toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--ink); font-weight: 500; }

/* Head: breadcrumb, title, date and read time */
.bl-crumb ol { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.bl-crumb li + li::before { content: "/"; margin-right: 8px; color: var(--faint); }
.bl-crumb a { transition: color var(--fast) var(--ease-out); }
.bl-crumb a:hover { color: var(--ink); }
.bl-head .bl-title {
  margin: 16px 0 0; max-width: none;
  font: 600 clamp(32px, 4.2vw, 46px)/1.06 "Inter Tight", var(--font); letter-spacing: -0.035em; color: var(--ink); text-wrap: balance;
}
.bl-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.bl-cover { margin: 32px 0 40px; border: 1px solid var(--frame); }
.bl-cover svg, .bl-card__cover svg { display: block; width: 100%; height: auto; }

/* ═══ Article text (Markdown). :where() keeps these low, so the blocks below win; .bl-shot keeps its own look. ═══ */
.bl-body { font-size: 17px; overflow-wrap: break-word; }
.bl-body :where(p, li):where(:not(.bl-shot *)) { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.bl-body :where(p):where(:not(.bl-shot *)) { margin: 0 0 20px; }
.bl-body :where(h2, h3, h4):where(:not(.bl-shot *)) { color: var(--ink); text-wrap: balance; }
.bl-body :where(h2):where(:not(.bl-shot *)) { margin: 56px 0 16px; font: 600 28px/1.15 "Inter Tight", var(--font); letter-spacing: -0.03em; }
.bl-body :where(h3):where(:not(.bl-shot *)) { margin: 36px 0 12px; font: 600 20px/1.3 var(--font); letter-spacing: -0.02em; }
.bl-body :where(h4):where(:not(.bl-shot *)) { margin: 28px 0 8px; font: 600 17px/1.4 var(--font); letter-spacing: -0.01em; }
.bl-body > :where(h2, h3):first-child { margin-top: 0; }
.bl-body :where(a):where(:not(.btn, .bl-shot *)) {
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--faint);
  transition: text-decoration-color var(--fast) var(--ease-out);
}
.bl-body :where(a):where(:not(.btn, .bl-shot *)):hover { text-decoration-color: var(--ink); }
.bl-body :where(strong):where(:not(.bl-shot *)) { color: var(--ink); font-weight: 600; }
.bl-body :where(code):where(:not(.bl-shot *)) { font-size: 0.86em; padding: 1px 5px; background: var(--hover); border: 1px solid var(--line); }
.bl-body :where(hr):where(:not(.bl-shot *)) { margin: 40px 0; border-top: 1px solid var(--line); }

/* Lists: square bullets, mono numbers */
.bl-body :where(ul, ol):where(:not([class], .bl-shot *)) { margin: 0 0 24px; padding-left: 26px; }
.bl-body :where(li > ul, li > ol):where(:not([class], .bl-shot *)) { margin: 8px 0 0; }
.bl-body :where(ul, ol):where(:not([class], .bl-shot *)) > li { margin-bottom: 8px; padding-left: 2px; }
.bl-body :where(ul):where(:not([class], .bl-shot *)) > li { position: relative; }
.bl-body :where(ul):where(:not([class], .bl-shot *)) > li::before { content: ""; position: absolute; left: -20px; top: calc(0.85em - 3px); width: 6px; height: 6px; background: var(--ink); }
.bl-body :where(ul ul):where(:not([class], .bl-shot *)) > li::before { background: none; border: 1px solid var(--ink); }
.bl-body :where(ol):where(:not([class], .bl-shot *)) { list-style: decimal; }
.bl-body :where(ol):where(:not([class], .bl-shot *)) > li::marker { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.bl-body :where(li > p):where(:not(.bl-shot *)) { margin-bottom: 8px; }

.bl-body :where(blockquote):where(:not(.bl-shot *)) { margin: 32px 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--ink); }
.bl-body :where(blockquote p):where(:not(.bl-shot *)) { font-size: 19px; line-height: 1.55; letter-spacing: -0.01em; color: var(--ink); }
.bl-body :where(blockquote > :last-child):where(:not(.bl-shot *)) { margin-bottom: 0; }

.bl-code { margin: 0 0 24px; padding: 16px; border: 1px solid var(--frame); background: var(--tint); overflow-x: auto; font-size: 13px; line-height: 1.6; }
.bl-body .bl-code code { padding: 0; border: 0; background: none; font-size: inherit; }
.bl-inline-img { display: inline-block; max-height: 1.4em; width: auto; vertical-align: -0.25em; }

/* Contents on a phone and tablet */
.bl-toc-m { margin: 0 0 32px; border: 1px solid var(--frame); }
.bl-toc-m summary { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 16px; font: 500 12px/1 var(--mono); color: var(--muted); list-style: none; }
.bl-toc-m summary::after { content: "+"; font: 400 16px/1 var(--mono); color: var(--ink); }
.bl-toc-m[open] summary::after { content: "−"; }
.bl-toc-m ol { padding: 6px 16px 10px; border-top: 1px solid var(--line); }
.bl-toc-m a { display: block; padding: 7px 0; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.bl-toc-m a:hover { color: var(--ink); }
@media (min-width: 1080px) { .bl-toc-m { display: none; } }

/* ═══ Tables: framed; they scroll inside the frame on a phone ═══ */
.bl-table { margin: 28px 0 32px; max-width: 100%; border: 1px solid var(--frame); background: var(--panel); overflow-x: auto; overscroll-behavior-x: contain; }
.bl-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.bl-table th, .bl-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; color: var(--ink-2); }
.bl-table :is(th, td) + :is(th, td) { border-left: 1px solid var(--line); }
.bl-table thead th { background: var(--tint); border-bottom-color: var(--frame); font: 500 12px/1.4 var(--mono); color: var(--muted); vertical-align: bottom; }
.bl-table tbody tr:last-child > * { border-bottom: 0; }
.bl-table tbody :is(td, th):first-child { color: var(--ink); font-weight: 500; }
.bl-table a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.bl-table a:hover { text-decoration-color: var(--ink); }
.bl-table:focus-visible { outline-offset: 0; }

/* Tools: a logo tile and the name; the name column stays put while the rest scrolls */
.bl-tools table { width: 100%; min-width: 640px; }
.bl-tools tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; min-width: 168px; background: var(--panel); border-right: 1px solid var(--line); font-weight: 600; }
.bl-tools tbody th[scope="row"] + td { border-left: 0; }
.bl-tools__name { display: inline-flex; align-items: center; gap: 10px; }
.bl-tools__logo { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; }
.bl-tools__logo img { width: 18px; height: 18px; object-fit: contain; }
.bl-tools .bl-tools__name a { text-decoration: none; }
.bl-tools .bl-tools__name a:hover { text-decoration: underline; }
.bl-tools__price { min-width: 128px; }
.bl-tools a.bl-tools__see { color: var(--muted); }

/* ═══ Blocks ═══ */
.bl-callout { position: relative; margin: 28px 0; padding: 18px 20px 18px 44px; border: 1px solid var(--frame); background: var(--tint); }
.bl-callout::before { content: ""; position: absolute; left: 20px; top: 27px; width: 8px; height: 8px; background: var(--signal); }
.bl-body .bl-callout p { margin: 0 0 8px; font-size: 16px; line-height: 1.6; color: var(--ink); }
.bl-body .bl-callout > :last-child { margin-bottom: 0; }

.bl-cta { position: relative; margin: 40px 0; padding: 40px 32px; border: 1px solid var(--frame); background: #f5f5f5; overflow: hidden; }
.bl-cta::before, .bl-band::before { content: ""; position: absolute; inset: 0; background-image: var(--bl-grain); mix-blend-mode: multiply; opacity: .32; pointer-events: none; }
.bl-cta > *, .bl-band > * { position: relative; }
.bl-body .bl-cta__text { max-width: 560px; margin: 0 0 20px; font: 600 24px/1.2 "Inter Tight", var(--font); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.bl-cta__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.bl-faq { margin: 24px 0 32px; border-bottom: 1px solid var(--frame); }
.bl-faq details { border-top: 1px solid var(--frame); }
.bl-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-size: 17px; line-height: 1.4; font-weight: 600; color: var(--ink); list-style: none; }
.bl-faq summary::after { content: "+"; flex: none; font: 400 18px/1.3 var(--mono); color: var(--muted); }
.bl-faq details[open] summary::after { content: "−"; }
.bl-faq__a { padding: 0 0 18px; }
.bl-body .bl-faq__a p { font-size: 16px; }
.bl-body .bl-faq__a > :last-child { margin-bottom: 0; }

.bl-steps { margin: 28px 0 32px; border: 1px solid var(--frame); }
.bl-steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); }
.bl-steps li + li { border-top: 1px solid var(--line); }
.bl-steps__n { display: flex; justify-content: center; padding-top: 17px; border-right: 1px solid var(--line); font: 500 13px/1.6 var(--mono); color: var(--muted); }
.bl-steps li > div { padding: 16px 20px; }
.bl-steps__title { display: block; margin-bottom: 4px; font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--ink); }
.bl-body .bl-steps p { margin: 0; font-size: 16px; line-height: 1.6; }

/* Figures: images and product shots sit in the gray grain band the product pages use */
.bl-fig { margin: 32px 0 36px; }
.bl-band { position: relative; padding: 28px; border: 1px solid var(--frame); background: #f5f5f5; overflow: hidden; }
.bl-band img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.bl-band img[src$=".svg"] { width: 100%; }
.bl-fig figcaption { margin-top: 10px; font: 400 12px/1.5 var(--mono); color: var(--muted); }
.bl-shot { font-size: 12.5px; line-height: 1.5; color: var(--ink); }
.bl-body .bl-shot .band { padding: 28px; }
.bl-body .bl-shot .app { min-height: 0; }

/* ═══ Cards: the index and related posts ═══ */
.bl-cards { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .bl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bl-card { display: flex; flex-direction: column; border: 1px solid var(--frame); background: var(--panel); }
.bl-card[hidden] { display: none; }
.bl-card__cover { overflow: hidden; border-bottom: 1px solid var(--frame); }
.bl-card__cover svg { transition: transform var(--slow) var(--ease-out); }
.bl-card:hover .bl-card__cover svg { transform: scale(1.02); }
.bl-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 18px 20px 22px; transition: background-color var(--fast) var(--ease-out); }
.bl-card:hover .bl-card__body { background: var(--hover); }
.bl-card__meta { display: flex; align-items: center; gap: 12px; font: 400 12px/1 var(--mono); color: var(--muted); }
.bl-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 1px solid currentColor; background: var(--hover); font: 500 11.5px/1 var(--font); color: var(--ink-2); }
.bl-card .bl-card__title { margin: 2px 0 0; font: 600 19px/1.25 "Inter Tight", var(--font); letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.bl-card:hover .bl-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bl-card__sum { font-size: 14px; line-height: 1.55; color: var(--muted); }

.bl-related { padding-top: 112px; }
.bl-related .bl-related__title { margin: 0 0 28px; font: 600 clamp(26px, 3vw, 36px)/1.1 "Inter Tight", var(--font); letter-spacing: -0.035em; color: var(--ink); }
.bl-related__title .two, .bl-hero__title .two { color: var(--faint); }

/* ═══ Index ═══ */
.bl-hero { padding-top: 72px; padding-bottom: 40px; }
.bl-hero .bl-hero__title { margin-top: 16px; max-width: 920px; font: 600 clamp(36px, 5.2vw, 64px)/1.02 "Inter Tight", var(--font); letter-spacing: -0.045em; color: var(--ink); text-wrap: balance; }
.bl-filter { display: inline-flex; flex-wrap: wrap; max-width: 100%; margin-bottom: 32px; border: 1px solid var(--frame); }
.bl-filter__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; background: var(--panel);
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: background-color var(--fast) var(--ease-out), color var(--fast) var(--ease-out);
}
.bl-filter__btn + .bl-filter__btn { border-left: 1px solid var(--frame); }
.bl-filter__btn span { font: 400 12px/1 var(--mono); color: var(--faint); }
.bl-filter__btn:hover { background: var(--hover); }
.bl-filter__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.bl-empty { padding: 48px 0; color: var(--muted); }

/* Room at the bottom of blog pages, before the footer */
.bl-post, .bl-index { padding-bottom: 120px; }

/* ═══ Phone ═══ */
@media (max-width: 640px) {
  .bl-post { padding-top: 24px; }
  .bl-cover { margin: 24px 0 32px; }
  .bl-body, .bl-body :where(p, li):where(:not(.bl-shot *)) { font-size: 16px; }
  .bl-body :where(h2):where(:not(.bl-shot *)) { margin-top: 44px; font-size: 24px; }
  .bl-body :where(h3):where(:not(.bl-shot *)) { font-size: 19px; }
  .bl-band, .bl-body .bl-shot .band { padding: 12px; }
  .bl-band--wide { overflow-x: auto; overscroll-behavior-x: contain; }
  .bl-band--wide img[src$=".svg"] { width: 560px; max-width: none; margin-inline: 0; }
  .bl-cta { padding: 28px 20px; }
  .bl-body .bl-cta__text { font-size: 21px; }
  .bl-steps li { grid-template-columns: 44px minmax(0, 1fr); }
  .bl-steps li > div { padding: 14px 16px; }
  .bl-tools tbody th[scope="row"] { min-width: 136px; }
  .bl-hero { padding-top: 48px; padding-bottom: 28px; }
  .bl-related { padding-top: 80px; }
  .bl-post, .bl-index { padding-bottom: 80px; }
}
