/* Public blog — lives in the landing page's visual world (.lp-root supplies
   the dark terminal ground, atmosphere and fonts; everything here is scoped
   beneath it and uses its --lp-* palette).

   Layout follows the shape of a modern editorial blog: a masthead, one
   featured article, topic sections, and articles rendered as a reading column
   with an on-this-page rail beside it. The palette stays Solo's, so the blog
   reads as the same product as the landing page rather than a separate site. */

/* Prose ink. Softer than --lp-text so long-form body copy doesn't sit at full
   contrast, but themed — this file used to hardcode the dark-mode value, which
   was invisible once the blog started honouring the landing's light theme. The
   dark value is unchanged from what shipped. */
.lp-root {
  --lp-prose: #c7d0de;
}
.lp-root[data-theme="light"] {
  --lp-prose: #28352e;
}

.lp-root .blog-shell {
  position: relative;
  z-index: 1;
  max-width: 76rem;
  margin: 0 auto;
  padding: 3.5rem 2.5rem 6rem;
}

/* The article shell is as wide as the index. The reading measure is capped on
   .blog-body instead of here, so the on-this-page rail sits in the margin
   rather than eating a fifth of the shell. */
.lp-root .blog-shell--article {
  max-width: 76rem;
}

/* ---------- shared mono eyebrow ---------------------------------------- */

.lp-root .blog-eyebrow,
.lp-root .blog-card-eyebrow,
.lp-root .blog-toc-title,
.lp-root .blog-byline-label,
.lp-root .blog-badge,
.lp-root .blog-featured-stamp,
.lp-root .blog-section-count,
.lp-root .blog-back {
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- masthead ---------------------------------------------------- */

.lp-root .blog-masthead {
  padding: 1rem 0 3rem;
  max-width: 46rem;
}

.lp-root .blog-eyebrow {
  color: var(--lp-mint);
  margin: 0 0 1rem;
}

.lp-root .blog-masthead h1 {
  font-family: var(--font-display), ui-sans-serif, sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
  color: var(--lp-text);
}

.lp-root .blog-lede {
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--lp-dim);
  margin: 0;
}

.lp-root .blog-empty {
  color: var(--lp-dim);
}

/* ---------- featured ---------------------------------------------------- */

.lp-root .blog-featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--lp-panel);
  border: 1px solid var(--lp-edge);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  margin-bottom: 4rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.lp-root .blog-featured:hover {
  border-color: var(--lp-accent-border);
  transform: translateY(-2px);
}

.lp-root .blog-featured-art {
  position: relative;
  display: block;
  background: var(--lp-well);
  min-height: 15rem;
}

/* `contain`, not `cover`: the featured art is a diagram, and the card's column
   is a different shape at every breakpoint, so cropping to fill cut a
   different arbitrary slice off it each time — on a wide screen the right-hand
   third of the ListMyCar hero was simply gone. Fitting the whole image inside
   the column shows the art as drawn; the leftover space reads as a mount
   because .blog-featured-art already paints --lp-well behind it. */
.lp-root .blog-featured-art img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 24rem;
  object-fit: contain;
  object-position: center;
}

.lp-root .blog-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--lp-mint);
  color: var(--lp-btnink);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-weight: 700;
}

/* Product screenshots are light, so a text shadow alone does not carry this.
   The stamp gets its own dark plate rather than relying on the image. */
.lp-root .blog-featured-stamp {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: var(--lp-text);
  background: var(--lp-navbg);
  border: 1px solid var(--lp-edge);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  backdrop-filter: blur(6px);
}

.lp-root .blog-featured-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 2rem 2rem 1.6rem;
}

.lp-root .blog-featured-title {
  font-family: var(--font-display), ui-sans-serif, sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--lp-text);
}

.lp-root .blog-featured-excerpt {
  color: var(--lp-prose);
  line-height: 1.6;
}

.lp-root .blog-featured-foot {
  margin-top: auto;
  padding-top: 1.2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: var(--lp-dim);
  font-size: 0.9rem;
}

/* ---------- sections and cards ------------------------------------------ */

.lp-root .blog-section-title {
  font-family: var(--font-display), ui-sans-serif, sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--lp-text);
  margin: 0 0 1.4rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.lp-root .blog-section-count {
  color: var(--lp-dim);
  font-weight: 400;
}

.lp-root .blog-topics,
.lp-root .blog-more {
  margin-bottom: 3.5rem;
  scroll-margin-top: 2rem;
}

.lp-root .blog-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.lp-root .blog-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  height: 100%;
  background: var(--lp-panel);
  border: 1px solid var(--lp-edge);
  border-radius: 14px;
  padding: 1.3rem 1.4rem 1.2rem;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.lp-root .blog-card:hover {
  border-color: var(--lp-accent-border);
  transform: translateY(-2px);
}

.lp-root .blog-card-eyebrow {
  color: var(--lp-mint);
}

.lp-root .blog-card-title {
  font-family: var(--font-display), ui-sans-serif, sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--lp-text);
}

.lp-root .blog-card-excerpt {
  color: var(--lp-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}

.lp-root .blog-card-cta {
  margin-top: auto;
  padding-top: 0.7rem;
  color: var(--lp-mint);
  font-size: 0.88rem;
}

.lp-root .blog-foot {
  margin: 2rem 0 0;
}

.lp-root .blog-foot a,
.lp-root .blog-back {
  color: var(--lp-mint);
  text-decoration: none;
}

.lp-root .blog-back {
  display: inline-block;
  margin-bottom: 1.6rem;
}

.lp-root .blog-foot a:hover,
.lp-root .blog-back:hover {
  text-decoration: underline;
}

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

.lp-root .blog-hero {
  border: 1px solid var(--lp-edge);
  border-radius: 16px;
  overflow: hidden;
  background: var(--lp-well);
  margin-bottom: 2.5rem;
}

/* A fixed max-height crops by a different amount at every width, because the
   box gets wider while the ceiling stays put — so how much of a hero was lost
   depended on the reader's monitor. A fixed ratio makes the frame the same
   shape everywhere, which means art can be captured to fit it exactly. */
.lp-root .blog-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: top left;
}

/* Matches .blog-body's measure — the title sits directly above the prose, so
   a narrower cap here reads as a misalignment. */
.lp-root .blog-head {
  max-width: 56rem;
}

.lp-root .blog-head h1 {
  font-family: var(--font-display), ui-sans-serif, sans-serif;
  font-weight: 800;
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  color: var(--lp-text);
}

.lp-root .blog-deck {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--lp-dim);
  margin: 0 0 1.8rem;
}

.lp-root .blog-byline {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding: 1.1rem 0;
  border-top: 1px solid var(--lp-edge);
  border-bottom: 1px solid var(--lp-edge);
  margin-bottom: 2.5rem;
}

.lp-root .blog-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--lp-accent-soft);
  border: 1px solid var(--lp-accent-border);
  color: var(--lp-mint);
  font-family: var(--font-mono), ui-monospace, monospace;
  font-weight: 700;
}

.lp-root .blog-byline-who {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  margin-right: 0.4rem;
}

.lp-root .blog-byline-who strong {
  color: var(--lp-text);
  font-size: 0.95rem;
}

.lp-root .blog-byline-who span {
  color: var(--lp-dim);
  font-size: 0.82rem;
}

.lp-root .blog-byline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.3;
  color: var(--lp-text);
  font-size: 0.9rem;
  padding-left: 1.4rem;
  border-left: 1px solid var(--lp-edge);
}

.lp-root .blog-byline-label {
  color: var(--lp-dim);
}

/* ---------- article body + rail ----------------------------------------- */

/* Body takes the flexible column, rail is fixed at what it actually needs.
   The previous `46rem 1fr` pinned the prose to 46rem and handed the leftover
   ~19rem to a rail that only ever fills 15, so wide screens went unused. */
.lp-root .blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 4rem;
  align-items: start;
}

/* The reading measure. Capped for legibility, but 56rem instead of 46rem —
   which is what gives the screenshots room to stay readable. Also applies
   when there is no rail, so a short article never runs the full 76rem. */
.lp-root .blog-body {
  max-width: 56rem;
}

.lp-root .blog-toc-inner {
  position: sticky;
  top: 2rem;
  padding-top: 0.3rem;
}

.lp-root .blog-toc-title {
  color: var(--lp-dim);
  margin: 0 0 0.9rem;
}

.lp-root .blog-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  border-left: 1px solid var(--lp-edge);
}

.lp-root .blog-toc li {
  margin: 0;
}

.lp-root .blog-toc a {
  display: block;
  padding: 0.1rem 0 0.1rem 0.9rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--lp-dim);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.45;
}

.lp-root .blog-toc a:hover {
  color: var(--lp-text);
  border-left-color: var(--lp-mint);
}

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

.lp-root .blog-body {
  font-size: 1.04rem;
  line-height: 1.75;
}

.lp-root .blog-body h2 {
  font-family: var(--font-display), ui-sans-serif, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--lp-text);
  margin: 2.6rem 0 0.9rem;
  scroll-margin-top: 1.5rem;
}

.lp-root .blog-body h3 {
  font-family: var(--font-display), ui-sans-serif, sans-serif;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--lp-text);
  margin: 2rem 0 0.6rem;
}

.lp-root .blog-body p,
.lp-root .blog-body li {
  color: var(--lp-prose);
}

/* Tailwind preflight zeroes paragraph margins and strips list markers;
   restore both for rendered markdown. */
.lp-root .blog-body p {
  margin: 0 0 1.15rem;
}

.lp-root .blog-body ul,
.lp-root .blog-body ol {
  margin: 0 0 1.3rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.lp-root .blog-body ol {
  list-style: decimal;
}

.lp-root .blog-body li {
  margin: 0.45rem 0;
}

.lp-root .blog-body li::marker {
  color: var(--lp-mint);
}

.lp-root .blog-body strong {
  color: var(--lp-text);
  font-weight: 700;
}

.lp-root .blog-body a {
  color: var(--lp-mint);
  text-underline-offset: 0.2em;
}

.lp-root .blog-body code {
  background: var(--lp-panel2);
  border: 1px solid var(--lp-edge);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  font-size: 0.88em;
}

.lp-root .blog-body pre {
  background: var(--lp-panel);
  border: 1px solid var(--lp-edge);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 0 0 1.3rem;
}

.lp-root .blog-body pre code {
  background: none;
  border: none;
  padding: 0;
}

/* The pull-quote / CTA treatment: a tinted panel with a mint spine, which is
   what the closing call-to-action in each article renders as. */
.lp-root .blog-body blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 3px solid var(--lp-mint);
  border-radius: 0 12px 12px 0;
  background: var(--lp-accent-soft);
}

.lp-root .blog-body blockquote p {
  color: var(--lp-text);
}

.lp-root .blog-body blockquote p:last-child {
  margin-bottom: 0;
}

.lp-root .blog-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.6rem 0;
  font-size: 0.92rem;
}

.lp-root .blog-body th,
.lp-root .blog-body td {
  border: 1px solid var(--lp-edge);
  padding: 0.55rem 0.75rem;
  text-align: left;
}

.lp-root .blog-body th {
  background: var(--lp-panel);
  color: var(--lp-text);
}

/* Screenshots and GIFs. Authored as markdown images with the title as the
   caption; app/blog/[slug]/page.tsx maps <img> onto this span pair, which is
   why these are display:block spans rather than a <figure>. */
.lp-root .blog-body .blog-figure {
  display: block;
  margin: 2rem 0;
}

/* Prose stays at its measure, but the figures are product screenshots whose
   detail dies at column width — so once there is room in the gutters, let
   them break out of the reading column. This is where the extra screen space
   on a wide display actually goes.

   The 2rem bleed is deliberately smaller than both the shell's 2.5rem padding
   and the layout's 4rem gap, so it can never push a horizontal scrollbar. */
@media (min-width: 64rem) {
  .lp-root .blog-body .blog-figure {
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
  }
}

.lp-root .blog-body .blog-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--lp-edge);
  border-radius: 10px;
  background: var(--lp-panel);
}

.lp-root .blog-body .blog-figcaption {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--lp-dim);
  text-align: center;
}

.lp-root .blog-more {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--lp-edge);
}

/* ---------- responsive --------------------------------------------------- */

/* Large displays: widen the shell and the rail so the prose column and its
   breaking-out figures both get more room. Beyond this the page stays
   centred — a reading column that tracks a 34-inch monitor is unreadable. */
@media (min-width: 100rem) {
  .lp-root .blog-shell {
    max-width: 86rem;
  }

  .lp-root .blog-layout {
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: 5rem;
  }

  .lp-root .blog-body,
  .lp-root .blog-head {
    max-width: 62rem;
  }
}

@media (max-width: 60rem) {
  .lp-root .blog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* The rail becomes a lead-in above the article rather than a sidebar. */
  .lp-root .blog-toc {
    order: -1;
    margin-bottom: 2rem;
  }

  .lp-root .blog-toc-inner {
    position: static;
  }

  .lp-root .blog-featured {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Stacked, the art is no longer sharing a row height with the body, so the
     15rem floor is the only thing setting its height — and since the image is
     fitted rather than cropped, that floor is just empty mount below it. Let
     the box hug the art instead. */
  .lp-root .blog-featured-art {
    min-height: 0;
  }
}

@media (max-width: 40rem) {
  .lp-root .blog-shell {
    padding: 2.5rem 1.1rem 4rem;
  }

  .lp-root .blog-byline {
    gap: 1rem;
  }

  .lp-root .blog-byline-meta {
    padding-left: 1rem;
  }

  .lp-root .blog-featured-body {
    padding: 1.5rem 1.4rem 1.3rem;
  }
}

/* ---------- the founder series ------------------------------------------ */

/* The lead sequence on the index. Rendered as a numbered list rather than the
   card grid used elsewhere, because these are meant to be read in order and a
   grid implies they are interchangeable. */
.lp-root .blog-series {
  margin-bottom: 4rem;
  padding: 1.9rem 1.9rem 1.4rem;
  background: linear-gradient(
    180deg,
    var(--lp-accent-soft) 0%,
    rgba(0, 0, 0, 0) 55%
  );
  border: 1px solid var(--lp-edge);
  border-radius: 16px;
}

.lp-root .blog-series-head {
  max-width: 44rem;
  margin-bottom: 1.6rem;
}

.lp-root .blog-series .blog-section-title {
  margin-bottom: 0.6rem;
}

.lp-root .blog-series-blurb {
  color: var(--lp-dim);
  line-height: 1.6;
  margin: 0;
}

.lp-root .blog-series-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lp-root .blog-series-list li {
  border-top: 1px solid var(--lp-edge);
}

.lp-root .blog-step {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0.6rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.lp-root .blog-step:hover {
  background: var(--lp-panel);
}

.lp-root .blog-step-n {
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--lp-mint);
}

.lp-root .blog-step-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.lp-root .blog-step-title {
  font-family: var(--font-display), ui-sans-serif, sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--lp-text);
}

.lp-root .blog-step-excerpt {
  color: var(--lp-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}

.lp-root .blog-step-meta {
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-dim);
  white-space: nowrap;
}

@media (max-width: 40rem) {
  .lp-root .blog-series {
    padding: 1.4rem 1.1rem 1rem;
  }

  /* The minute count drops rather than squeezing the title into two words. */
  .lp-root .blog-step {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: 0.7rem;
  }

  .lp-root .blog-step-meta {
    display: none;
  }
}
