/* Shared LP blog article chrome — editorial: serif headline, warm paper.
   Scoped entirely to .blog-article; the rest of the site is untouched. */
body.blog-article {
  --paper: #faf6ee;
  --ink: #2b2620;
  --muted: #8a7f6c;
  --line: #e7ddc9;
  --card: #fffdf8;
  background: var(--paper) !important;
  color: var(--ink);
}

html[data-theme='dark'] body.blog-article {
  --paper: #1c1813;
  --ink: #f3ede1;
  --muted: #a89a84;
  --line: rgba(243, 237, 225, 0.14);
  --card: #221d16;
  background: var(--paper) !important;
}

/* The decorative gradient mesh + grain are tuned for the dark marketing
   surface; the warm paper reads as flat and quiet instead. */
body.blog-article .gradient-surface,
body.blog-article .grain {
  display: none;
}

/* The shared site-header uses cool navy translucency tuned for the
   gradient-mesh background we just hid — on warm paper it shows as a
   mismatched seam. Re-tone it warm, dark mode only (light mode's header
   already reads fine on cream). */
html[data-theme='dark'] body.blog-article {
  --header-bg: rgba(28, 24, 19, 0.82);
  --header-border: rgba(243, 237, 225, 0.1);
  --chip-bg: rgba(243, 237, 225, 0.07);
  --chip-ink: var(--ink);
  --btn-light-bg: rgba(243, 237, 225, 0.1);
  --btn-light-ink: var(--ink);
  --soft: rgba(243, 237, 225, 0.04);
}

.article-shell {
  width: min(720px, 100% - 32px);
  margin: 0 auto;
  padding: 4.5rem 0 5rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.article-meta .chip {
  font-weight: 600;
  padding: 6px 14px;
}

/* Tag color maps to which of the three series groups a post belongs to
   (same grouping as the blog index: Start here / Runtime / Billing) —
   not decorative, it tells you what kind of post this is at a glance.
   Runtime (indigo) and Billing (amber) reuse the exact colors already
   pulled from the Console UI; Start (teal) reuses the site's existing
   --ok-* "allow" tokens rather than inventing a new hue. */
.article-meta .chip--start {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: var(--ok-ink);
}

.article-meta .chip--runtime {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #6366f1;
}

html[data-theme='dark'] .article-meta .chip--runtime {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.35);
  color: #818cf8;
}

.article-meta .chip--billing {
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.28);
  color: #d97706;
}

html[data-theme='dark'] .article-meta .chip--billing {
  background: rgba(232, 163, 61, 0.16);
  border-color: rgba(232, 163, 61, 0.35);
  color: #e8a33d;
}

.article-meta .meta-date,
.article-meta .read-time {
  color: var(--muted);
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--card);
}

.article-meta .read-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
}

.article-head h1 {
  margin: 0;
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-size: clamp(2.25rem, 6vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--ink);
}

.article-head .dek {
  margin: 1.1rem 0 0;
  max-width: 34em;
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Flat paper, not a boxed card — content sits directly on the page,
   same spirit as the reference: generous whitespace, no border/shadow. */
.article-body {
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
  background: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  box-shadow: none;
}

html[data-theme='dark'] .article-body {
  box-shadow: none;
}

.article-body h2 {
  margin: 2.5rem 0 0.85rem;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 700;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin: 1.35rem 0 0.5rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-weight: 700;
}

.article-body p,
.article-body li {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.article-body p {
  margin: 0 0 1rem;
}

/* A short, hard-hitting line that needs to stand apart from body copy —
   not another pull quote, just unmistakably more important than what's
   around it. */
.article-body p.statement {
  margin: 1.75rem 0;
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.25;
  color: var(--ink);
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.article-body li {
  margin: 0.4rem 0;
}

.article-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 2px;
}

.article-body a:hover {
  text-decoration-color: var(--ink);
}

/* Shared site chrome uses blue for focus rings and the "Back to Blog"
   link; on the warm paper everything theme-colored stays ink, not blue. */
.article-shell a[href="/blog.html"] {
  color: var(--muted);
}

.article-shell a[href="/blog.html"]:hover {
  color: var(--ink);
}


.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

/* Plain sans italic, same weight as body copy — the real bug was that
   italic weight 400 was never loaded for either font, so any <em> site-wide
   was silently substituting to a bold italic face. */
.article-body em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
}

.code-snippet {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(47, 125, 255, 0.06);
  color: var(--ink);
}

.callout {
  border-radius: 12px;
  border: 1px solid var(--callout-border);
  background: var(--callout-bg);
  color: var(--callout-ink);
  padding: 1rem 1.1rem;
  margin: 1rem 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.article-faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.65rem 0;
  background: transparent;
}

.article-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.article-faq summary::-webkit-details-marker {
  display: none;
}

.article-faq summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.article-faq details p {
  margin: 0.75rem 0 0;
}

.article-cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
}

.article-cta h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.article-cta p {
  margin: 0;
  color: var(--muted);
  max-width: 28em;
  line-height: 1.5;
}

.docs-link {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.docs-link:hover {
  color: var(--ink);
}

@media (max-width: 760px) {
  .article-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Code blocks, tables and "next" link used by the Vibe series */
.blog-article .article-body pre {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}
.blog-article .article-body p code,
.blog-article .article-body li code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9em;
}
.blog-article .article-body table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.blog-article .article-body th,
.blog-article .article-body td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.blog-article .article-body p.next {
  margin-top: 2rem;
  font-weight: 600;
}

/* Prev/next pagination — reciprocal to the forward "Next" link, so the
   series reads both directions, not just forward. */
.article-pagination {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.article-pagination a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  max-width: 46%;
}

.article-pagination a:hover {
  text-decoration: underline;
  text-decoration-color: var(--line);
}

.article-pagination .pagination-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.article-pagination-next {
  margin-left: auto;
  text-align: right;
}

@media (max-width: 560px) {
  .article-pagination a {
    max-width: 100%;
  }
}

/* Language switcher (TS / Python / Go) used on code-forward posts.
   One card: a tab-bar header on top, the code flush underneath. */
.lang-switch {
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}
.lang-switch-tabs {
  display: flex;
  gap: 2px;
  padding: 0 6px;
  background: var(--chip-bg, var(--card));
  border-bottom: 1px solid var(--line);
}
.lang-switch-tab {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  padding: 10px 14px 9px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.lang-switch-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.lang-switch-tab:hover:not(.is-active) {
  color: var(--ink);
}
.lang-switch-tab:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.lang-switch-panel {
  padding: 0.25rem 0.25rem 0.5rem;
}
.lang-switch-panel pre {
  margin: 0.75rem;
  border: none;
  background: transparent;
}
.lang-switch-panel pre + pre {
  margin-top: 0;
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
}

/* Accent for a word that matters — the same amber→indigo pair the Console
   uses for "requested model → executed model", not an invented palette. */
.accent-code {
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 600;
  background-image: linear-gradient(90deg, #d97706, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme='dark'] .accent-code {
  background-image: linear-gradient(90deg, #e8a33d, #818cf8);
}

/* Placeholder box for a screenshot not yet supplied */
.screenshot-slot {
  margin: 1.25rem 0;
  padding: 2.5rem 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
}
