/* ============================================================
   SavdokuBot blog — prose layer on top of /site/styles.css.
   The landing sheet supplies the tokens (colour, radius, shadow,
   font) and the button/header primitives; this file only adds
   what an article needs. Loaded second so it can override.

   Blog pages carry NO JavaScript: the text is in the HTML, one
   URL per language, because a page that exists to be found in
   search cannot depend on a script to say what it says.
   ============================================================ */

body.blog {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

/* ---------- chrome ---------- */

.blog-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--separator);
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.blog-nav .logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  margin-right: auto;
}

.blog-nav .logo-mark {
  width: 28px;
  height: 28px;
}

/* Language switch is a set of links, not buttons: each language is its own URL. */
.blog-langs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--gray-100);
  border-radius: var(--radius-pill);
}

.blog-langs a {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1;
}

.blog-langs a[aria-current='true'] {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ---------- article ---------- */

.blog-main {
  padding: 28px 0 64px;
}

.blog-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

.crumbs {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 18px;
}

.crumbs a {
  color: var(--text-secondary);
}

.blog-title {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.blog-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--text-tertiary);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--separator);
  margin-bottom: 28px;
}

.prose {
  font-size: 17px;
  line-height: 1.7;
}

.prose h2 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}

.prose h3 {
  font-size: 18px;
  margin: 26px 0 8px;
}

.prose p {
  margin: 0 0 16px;
  color: var(--text-primary);
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose a {
  color: var(--accent-hover);
  text-underline-offset: 3px;
}

.prose strong {
  font-weight: 650;
}

/* ---------- the per-marketplace blocks ---------- */

.mp-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 22px;
  margin: 0 0 20px;
  box-shadow: var(--shadow-sm);
}

.mp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.mp-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}

.mp-card h2 {
  margin: 0;
  font-size: 21px;
}

.mp-path {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

/* The steps: numbered, and the numbers are the point — order matters in a cabinet. */
ol.steps {
  counter-reset: step;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  margin-bottom: 12px;
  line-height: 1.6;
}

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-press);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.scope {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.scope b {
  color: var(--text-primary);
}

.mp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- callout + CTA ---------- */

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 16px;
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.6;
}

.callout p:last-child {
  margin-bottom: 0;
}

.blog-cta {
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--bg-alt);
  padding: 26px;
  text-align: center;
  margin: 36px 0 0;
}

.blog-cta h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.blog-cta p {
  color: var(--text-secondary);
  margin: 0 0 16px;
}

/* ---------- index list ---------- */

.post-list {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
}

.post-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--dur-base) var(--ease-out);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
}

.post-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
}

.post-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.55;
}

.post-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-hover);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

/* ---------- footer ---------- */

.blog-footer {
  border-top: 1px solid var(--separator);
  padding: 26px 0 40px;
  font-size: 14px;
  color: var(--text-tertiary);
}

.blog-footer .blog-wrap > p {
  margin: 0 0 8px;
}

.blog-footer a {
  color: var(--text-secondary);
}

@media (prefers-color-scheme: dark) {
  .blog-langs {
    background: rgba(255, 255, 255, 0.08);
  }
}
