/* Wheels Easy — shared blog styles, applied via <link> in every post.
   Picks up the design tokens from designs_render_wheels-easy/blog-tire-size.html
   and gently overrides the per-post inline styles. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;500;600;700&display=swap');

:root {
  --blog-read: 720px;
  --blog-maxw: 1180px;
  --serif: 'Fraunces', Georgia, serif;
}

/* Reading-progress bar */
.blog-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--green), #45c9d6);
  z-index: 200; transition: width .12s linear;
}

/* Wrap any blog post in <article class="blog-post"> to opt into these
   typographic rules. Without it, raw inline styles still work. */
article.blog-post,
.blog-article,
body.blog-page main,
body.blog-page article {
  max-width: var(--blog-read);
  margin: 0 auto;
  padding: 48px 28px 80px;
  font-family: var(--sans, 'Instrument Sans', sans-serif);
  line-height: 1.78;
  color: #cdd3e6;
}

/* Headline pill: a green chip above the h1 — `<div class="blog-eyebrow">…</div>` */
.blog-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--green, #22d68a);
  background: rgba(34,214,138,.08);
  border: 1px solid rgba(34,214,138,.22);
  padding: 5px 12px; border-radius: 999px;
  margin-bottom: 22px;
}
.blog-eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green, #22d68a);
  box-shadow: 0 0 0 3px rgba(34,214,138,.16);
}

/* Serif headline */
article.blog-post h1,
.blog-article h1,
body.blog-page h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.07;
  letter-spacing: -.02em;
  color: #fff;
  text-wrap: balance;
  margin: 0 0 18px;
}

article.blog-post h2,
.blog-article h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: -.015em;
  color: #fff;
  margin: 52px 0 8px;
  scroll-margin-top: 90px;
}

article.blog-post h3,
.blog-article h3 {
  font-size: 1.18rem;
  font-weight: 600;
  color: #fff;
  margin: 30px 0 4px;
}

/* Standfirst — the deck below the h1 */
.blog-standfirst {
  font-size: 1.18rem;
  color: var(--text-dim, #9aa1ba);
  margin-top: 14px;
  line-height: 1.6;
  max-width: 36em;
}

/* Author + meta strip below the standfirst */
.blog-meta {
  display: flex; align-items: center; gap: 14px;
  margin-top: 26px; padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap; font-size: 13.5px;
  color: var(--text-faint, #6b7290);
}
.blog-meta .blog-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green, #22d68a), var(--blue, #4e9fff));
  flex: none;
}
.blog-meta b { color: var(--text, #e4e7f0); font-weight: 600; font-size: 14px; }
.blog-meta .blog-dotsep {
  width: 3px; height: 3px; border-radius: 50%; background: currentColor;
  display: inline-block; vertical-align: middle;
}

/* Body prose */
article.blog-post p,
.blog-article p {
  margin: 18px 0;
  font-size: 1.05rem;
}

/* Drop-cap on the first paragraph — opt in with <p class="blog-lede"> */
p.blog-lede {
  font-size: 1.22rem;
  line-height: 1.6;
  color: var(--text-dim, #9aa1ba);
}
p.blog-lede::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.7rem;
  line-height: .82;
  font-weight: 600;
  color: var(--green, #22d68a);
  padding: 6px 12px 0 0;
}

/* Inline links pop */
article.blog-post a,
.blog-article a {
  color: var(--green, #22d68a);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(34,214,138,.45);
  text-decoration-thickness: 1px;
}

article.blog-post strong,
.blog-article strong { color: #fff; font-weight: 600; }

/* Tables get a clean frame + green caps */
article.blog-post table,
.blog-article table {
  width: 100%; border-collapse: collapse;
  font-size: 14.5px;
  margin: 28px 0;
  background: var(--bg2, #0f1320);
  border: 1px solid var(--border, #252b42);
  border-radius: 13px;
  overflow: hidden;
}
article.blog-post thead th,
.blog-article thead th {
  background: var(--bg3, #141829);
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--green, #22d68a);
  text-align: left; padding: 13px 16px;
  border-bottom: 1px solid var(--border, #252b42);
}
article.blog-post tbody td,
.blog-article tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #252b42);
  color: var(--text-dim, #9aa1ba);
}
article.blog-post tbody tr:last-child td,
.blog-article tbody tr:last-child td { border-bottom: 0; }
article.blog-post tbody tr:nth-child(even),
.blog-article tbody tr:nth-child(even) { background: rgba(255,255,255,.014); }
article.blog-post tbody td:first-child,
.blog-article tbody td:first-child {
  color: var(--text, #e4e7f0); font-weight: 600;
  font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 13px;
}

/* Code / inline pre */
article.blog-post code,
.blog-article code {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: .9em;
  background: var(--bg3, #141829);
  border: 1px solid var(--border, #252b42);
  padding: 1px 7px; border-radius: 5px;
  color: var(--green, #22d68a);
}

/* Tag/chip used in summary lists */
.blog-chip {
  display: inline-block;
  padding: 3px 9px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11px; letter-spacing: .05em;
  background: rgba(34,214,138,.08);
  border: 1px solid rgba(34,214,138,.22);
  color: var(--green, #22d68a);
  border-radius: 6px;
}

/* End-of-post CTA card */
.blog-cta {
  margin-top: 56px;
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(34,214,138,.08), rgba(78,159,255,.06));
  border: 1px solid rgba(34,214,138,.32);
  border-radius: 16px;
}
.blog-cta h3 {
  font-family: var(--serif);
  font-size: 1.4rem; line-height: 1.2;
  color: #fff; margin: 0 0 10px;
}
.blog-cta p { color: var(--text-dim, #9aa1ba); font-size: .96rem; margin: 0 0 16px; }
.blog-cta .blog-cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.blog-cta a {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 9px;
  background: var(--green, #22d68a); color: #04120a;
  font-weight: 600; text-decoration: none;
  font-family: var(--sans, 'Instrument Sans', sans-serif);
  font-size: 14px;
}
.blog-cta a.ghost {
  background: none; color: var(--text, #e4e7f0);
  border: 1px solid var(--border, #252b42);
}

/* Optional 3-column layout for a sticky TOC — opt in by wrapping article + aside in .blog-shell */
.blog-shell {
  max-width: var(--blog-maxw);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr minmax(0, var(--blog-read)) 1fr;
  gap: 40px;
  align-items: start;
}
.blog-shell > article.blog-post,
.blog-shell > .blog-article { grid-column: 2; padding-inline: 0; }
.blog-toc {
  position: sticky; top: 96px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 12px; line-height: 1.6;
  justify-self: end; width: 200px;
  padding-top: 48px;
}
.blog-toc-h {
  font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint, #6b7290);
  margin-bottom: 14px;
}
.blog-toc a {
  display: block;
  color: var(--text-dim, #9aa1ba);
  text-decoration: none;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--border, #252b42);
  transition: color .2s, border-color .2s;
}
.blog-toc a:hover {
  color: var(--text, #e4e7f0);
  border-color: var(--text-dim, #9aa1ba);
}
.blog-toc a.active {
  color: var(--green, #22d68a);
  border-color: var(--green, #22d68a);
}

@media (max-width: 900px) {
  .blog-shell { grid-template-columns: 1fr; gap: 0; padding: 0 28px; }
  .blog-shell > article.blog-post,
  .blog-shell > .blog-article { grid-column: 1; max-width: var(--blog-read); margin: 0 auto; }
  .blog-toc { display: none; }
}
