/* ═══════════════════════════════════════════════════════════
   emerce blog (/blog, /blog/{slug}). Loads after app.css and
   start.css and reuses their tokens (--st-*): light, calm, one
   accent. All classes prefixed .bl-. Mobile first.
   ═══════════════════════════════════════════════════════════ */

.bl-main {
  padding: 32px 0 72px;
}

.bl-wrap {
  width: 100%;
  max-width: calc(70ch + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── List ── */
.bl-list-head {
  margin-bottom: 32px;
}

.bl-list-title,
.bl-title {
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.bl-list-lead {
  margin-top: 12px;
  color: var(--st-muted);
  font-size: 1.08rem;
}

.bl-list {
  list-style: none;
  display: grid;
  gap: 16px;
}

.bl-card {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 22px 24px;
}

.bl-card-title {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 6px 0 8px;
}

.bl-card-title a {
  color: inherit;
  text-decoration: none;
}

.bl-card-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--st-accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.bl-card-text,
.bl-empty {
  color: var(--st-muted);
}

.bl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--st-muted);
}

.bl-category {
  background: var(--st-accent-soft);
  color: var(--st-ink);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
}

.bl-draft {
  border: 1px dashed var(--st-muted);
  border-radius: 999px;
  padding: 1px 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

/* ── Article ── */
.bl-breadcrumb {
  font-size: 0.88rem;
  color: var(--st-muted);
  margin-bottom: 20px;
}

.bl-breadcrumb a {
  color: inherit;
}

.bl-article-head .bl-title {
  margin: 10px 0 12px;
}

.bl-byline {
  font-size: 0.92rem;
  color: var(--st-muted);
}

.bl-author {
  color: var(--st-ink);
  font-weight: 600;
}

.bl-cover {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 28px;
  border-radius: var(--st-radius);
}

.bl-tldr {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-left: 5px solid var(--st-accent);
  border-radius: 12px;
}

.bl-tldr-label,
.bl-toc-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-muted);
  margin-bottom: 6px;
}

.bl-toc {
  margin: 0 0 28px;
  padding: 16px 22px;
  background: var(--st-bg-alt);
  border-radius: 12px;
}

.bl-toc ol {
  padding-left: 20px;
}

.bl-toc li + li {
  margin-top: 4px;
}

.bl-toc a {
  color: var(--st-ink);
}

/* Reading typography for rendered Markdown. */
.bl-content {
  font-size: 1.08rem;
  line-height: 1.75;
}

.bl-content > * + * {
  margin-top: 1.1em;
}

.bl-content h2,
.bl-faq h2,
.bl-cta h2,
.bl-related h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.bl-content h2 {
  margin-top: 2em;
  scroll-margin-top: 84px;
}

.bl-content h3 {
  font-size: 1.2rem;
  margin-top: 1.6em;
  scroll-margin-top: 84px;
}

.bl-content a {
  color: var(--st-ink);
  text-decoration-color: var(--st-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.bl-content ul,
.bl-content ol {
  padding-left: 1.4em;
}

.bl-content li + li {
  margin-top: 0.35em;
}

.bl-content blockquote {
  border-left: 4px solid var(--st-line);
  padding-left: 16px;
  color: var(--st-muted);
}

.bl-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.bl-content code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--st-bg-alt);
  border-radius: 4px;
  padding: 1px 5px;
}

.bl-content pre {
  overflow-x: auto;
  background: var(--st-bg-alt);
  border-radius: 12px;
  padding: 14px 16px;
}

.bl-content pre code {
  background: none;
  padding: 0;
}

.bl-content table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.bl-content th,
.bl-content td {
  border: 1px solid var(--st-line);
  padding: 8px 12px;
  text-align: left;
}

.bl-faq {
  margin-top: 48px;
}

.bl-faq-item {
  margin-top: 18px;
}

.bl-faq-item h3 {
  font-size: 1.08rem;
}

.bl-faq-item p {
  margin-top: 4px;
  color: var(--st-muted);
}

.bl-cta {
  margin-top: 48px;
  padding: 28px 24px;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  box-shadow: var(--st-shadow);
}

.bl-cta p {
  margin: 10px 0 20px;
  color: var(--st-muted);
}

.bl-related {
  margin-top: 48px;
}

.bl-related ul {
  list-style: none;
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.bl-related li {
  border-top: 1px solid var(--st-line);
  padding-top: 14px;
}

.bl-related a {
  color: var(--st-ink);
  font-weight: 600;
}

.bl-related p {
  margin-top: 4px;
  font-size: 0.95rem;
  color: var(--st-muted);
}

@media (min-width: 768px) {
  .bl-main {
    padding: 56px 0 96px;
  }

  .bl-cta {
    padding: 36px 40px;
  }
}
