/*
 * Blog styles — faithful restore of the live Webflow blog template's classes
 * that were purged from public/webflow/thundercompute.css during extraction.
 * Rules copied verbatim from the live site (thundercompute.com) so the rebuild
 * renders identically; they consume the same Webflow CSS vars that still live
 * in thundercompute.css. Only PURGED selectors are redefined here — the classes
 * visual, hero, container, feature and blog_details-wrap survived the purge and
 * are left to the Webflow stylesheet.
 */

/* ---- Listing: grid + cards ------------------------------------------- */
.blog_grid {
  gap: 0rem;
  border-right: 0.5px solid var(--border-color--border-primary);
  border-left: 0.5px solid var(--border-color--border-primary);
  grid-template-rows: auto;
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-columns: 1fr;
  width: 100%;
  display: grid;
}

.blog_card {
  gap: 0rem;
  border: 0.5px solid var(--border-color--border-primary);
  background-color: var(--background-color--background-secondary);
  flex-flow: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  display: flex;
  position: relative;
}

.blog_tag {
  border: 1px solid var(--border-color--border-primary);
  background-color: var(--background-color--background-primary);
  border-radius: 0.125rem;
  padding: 0.375rem 0.675rem 0.3rem;
  display: inline-flex;
}

.blog_tag.is-featured {
  background-color: var(--background-color--background-secondary);
  border-width: 0px;
  position: relative;
}

.blog_visual {
  z-index: 1;
  gap: 1.5svw 1.5svw;
  border: 1px solid var(--base-color-neutral--4);
  flex-flow: column;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 10rem;
  padding: 0.875rem 1rem 1rem;
  display: flex;
  position: relative;
  /* Query container so the ASCII cover fallback can size to the card width. */
  container-type: inline-size;
}

.blog_visual.main {
  aspect-ratio: 2 / 1;
  border-top-width: 0px;
  border-bottom-width: 0px;
  padding: 2rem;
}

.blog_visual.is-featured {
  min-height: 15rem;
}

.blog_details {
  gap: 0.25rem;
  color: var(--text-color--text-secondary);
  justify-content: space-between;
  align-items: flex-start;
  padding-right: 0.1rem;
  display: flex;
}

.blog_overlay {
  background-image: linear-gradient(
    90deg,
    var(--base-color-neutral--6) 38%,
    #07070acc 62%,
    var(--base-color-neutral--0) 82%
  );
  position: absolute;
  inset: 0%;
}

/* Cover fallback for posts with no og.image: the brand ASCII art fills the
   visual (behind .blog_overlay), centred and clipped like an object-fit cover. */
.blog_ascii {
  position: absolute;
  inset: 0%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Sized in container-query width units against .blog_visual: the 203-char-wide
   art (~0.6em/char in monospace) fits the card at ~0.8cqw, so it scales with the
   card and is correct on first paint — no JS measuring, no hydration flash. */
.blog_ascii_art {
  width: 100%;
  margin: 0;
  /* A global `pre { overflow: auto }` rule otherwise shows a scrollbar here. */
  overflow: hidden;
  font-family: var(--font-mono, monospace);
  white-space: pre;
  font-size: 0.8cqw;
  line-height: 0.62em;
  color: var(--border-color--border-secondary);
  user-select: none;
}

.text-style-wrap-balance {
  text-wrap: balance;
}

/* ---- Listing: featured card ------------------------------------------ */
.featured-blog_card {
  gap: 2rem;
  border: 0.5px solid var(--border-color--border-primary);
  background-color: var(--background-color--background-secondary);
  flex-flow: row;
  grid-template-rows: auto;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  height: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem;
  display: grid;
  position: relative;
}

.featured-blog_details {
  flex-flow: column;
  justify-content: space-between;
  height: 100%;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  display: flex;
}

.feature-inner {
  gap: 0.25rem;
  background-color: var(--background-color--background-secondary);
  background-image: linear-gradient(
    90deg,
    var(--background-color--background-secondary),
    var(--background-color--background-primary)
  );
  color: var(--text-color--text-primary);
  border-radius: 0.12rem;
  justify-content: center;
  align-items: center;
  padding: 0.4rem 0.675rem;
  display: inline-flex;
  position: relative;
  overflow: hidden;
}

/* ---- Listing: category filter pills (Finsweet fs-list) --------------- */
/* Recovered verbatim from the live stylesheet; the pill is a .filter_item
 * label with an absolutely-positioned .filter_button background behind the
 * .w-form-label text. Selected state adds .w--redirected-checked. */
.filters_wrap {
  margin-bottom: 2rem;
}

.filters {
  gap: 0.5rem;
  flex-flow: wrap;
  justify-content: center;
  align-items: center;
  display: flex;
}

.filter_item {
  color: var(--text-color--text-secondary);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  display: inline-flex;
  position: relative;
  /* button reset (live uses a <label>; we use a <button> for interactivity) */
  background: none;
  border: none;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
}

.filter_button {
  border: 1px solid var(--border-color--border-primary);
  border-radius: 0.15rem;
  width: 100%;
  height: 100%;
  margin-top: 0px;
  margin-left: 0px;
  position: absolute;
  inset: 0%;
}

.filter_button.w--redirected-checked {
  border-width: 1px;
  border-color: var(--base-color-brand--tertiary);
  background-color: var(--background-color--background-secondary);
  opacity: 1;
}

/* ---- Post body: rich text -------------------------------------------- */
.text-rich-text {
  word-break: normal;
  font-style: normal;
}
.text-rich-text h1 { margin-top: 2rem; margin-bottom: 1rem; }
.text-rich-text h2 {
  text-wrap: wrap;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
}
.text-rich-text h3 {
  letter-spacing: -0.02rem;
  margin-top: 1.75rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 500;
}
.text-rich-text h4 { margin-top: 1.5rem; margin-bottom: 1rem; }
.text-rich-text h5,
.text-rich-text h6 { margin-top: 1.25rem; margin-bottom: 1rem; }
.text-rich-text p { margin-bottom: 1rem; line-height: 1.5; }
.text-rich-text a {
  text-underline-offset: 0.25rem;
  text-decoration-line: underline;
  text-decoration-color: var(--text-color--text-secondary);
  text-decoration-thickness: 0.075rem;
  transition: color 0.25s, text-decoration-color 0.25s;
}
.text-rich-text a:hover { color: var(--base-color-brand--primary); }
.text-rich-text figcaption {
  border-left: 2px solid var(--text-color--text-primary);
  text-align: left;
  margin-top: 0.5rem;
  padding-left: 0.5rem;
  font-size: 0.875rem;
}

/*
 * Supplement: the live blog body uses Webflow widgets for tables/code, but our
 * markdown emits plain HTML, so style those raw elements to fit the theme.
 */
.text-rich-text ul,
.text-rich-text ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.text-rich-text li { margin-bottom: 0.375rem; line-height: 1.5; }
.text-rich-text img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border-color--border-primary);
  border-radius: 0.25rem;
  margin: 1.25rem 0;
}
.text-rich-text code {
  font-family: var(--font-mono, monospace);
  font-size: 0.875em;
  background-color: var(--base-color-neutral--4);
  border: 1px solid var(--border-color--border-primary);
  border-radius: 0.25rem;
  padding: 0.1em 0.35em;
}
.text-rich-text pre {
  background-color: var(--background-color--background-secondary);
  border: 1px solid var(--border-color--border-primary);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.text-rich-text pre code { background: none; border: none; padding: 0; font-size: 0.875rem; }
.text-rich-text blockquote {
  border-left: 3px solid var(--base-color-brand--tertiary);
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--text-color--text-secondary);
}
.text-rich-text hr {
  border: none;
  border-top: 1px solid var(--border-color--border-primary);
  margin: 2rem 0;
}
.text-rich-text table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  /* Keep the default `display: table` — `display: block` (added for mobile
     scroll) breaks table-layout so columns no longer size/align together,
     which live never does. width:100% already constrains it to the container. */
}
.text-rich-text th,
.text-rich-text td {
  border: 1px solid var(--border-color--border-primary);
  padding: 0.625rem 0.875rem;
  text-align: left;
  vertical-align: top;
}
.text-rich-text th {
  background-color: var(--background-color--background-secondary);
  color: var(--text-color--text-primary);
  font-weight: 500;
}

/* ---- Responsive (blog-only overrides mirrored from live) ------------- */
@media screen and (max-width: 991px) {
  .blog_grid { grid-template-columns: 1fr; }
  .blog_card {
    border-top: 0.3px solid var(--border-color--border-primary);
    border-bottom: 0.3px solid var(--border-color--border-primary);
    padding: 1.25rem;
  }
  .blog_visual { gap: 0svw 0svw; aspect-ratio: 2 / 1; height: auto; }
  .blog_visual.main { padding: 1.375rem; }
  .blog_visual.is-featured { aspect-ratio: auto; min-height: 13rem; }
  .featured-blog_card {
    border-top: 0.3px solid var(--border-color--border-primary);
    border-bottom: 0.3px solid var(--border-color--border-primary);
    padding: 1.25rem;
  }
  .text-rich-text h2 { font-size: 2rem; }
  .text-rich-text h3 { font-size: 1.5rem; }
}

@media screen and (max-width: 767px) {
  .blog_card { padding: 1.125rem; }
  .blog_visual.main { padding: 1rem; }
  .blog_visual.is-featured { aspect-ratio: 2 / 1; min-height: auto; }
  .featured-blog_card { gap: 1rem; flex-flow: column-reverse; padding: 1.125rem; display: flex; }
  .text-rich-text h2 { letter-spacing: -0.05rem; font-size: 1.75rem; }
  .text-rich-text h3 { font-size: 1.375rem; }
}

@media screen and (max-width: 479px) {
  .blog_card { padding: 0.75rem; }
  .blog_tag { padding: 0.25rem 0.5rem 0.2rem; }
  .blog_visual.main { padding: 0.75rem; }
  .blogs_tab-menu { justify-content: flex-start; align-items: center; margin-bottom: 1.5rem; }
  .blog_tab-link { font-size: 0.875rem; }
  .featured-blog_card { padding: 0.75rem; }
  .text-rich-text { font-size: 0.875rem; }
  .text-rich-text h2 { font-size: 1.375rem; }
  .text-rich-text h3 { font-size: 1.125rem; }
}
