/* Blog article template — hero + reading column only
   Scope: body.blog-article-page
   Compatible with existing .pcontent / Directus body HTML

   TABLES: styles below for .table / .row / .cell are PROVISIONAL.
   Live Directus table markup is the source of truth; final table design TBD.
   Do not treat the mobile/tablet card-table rules as final until design is shared. */

@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap");

:root {
  --blog-gold: #ffb710;
  --blog-ink: rgba(255, 255, 255, 0.86);
  --blog-muted: #aebdcc;
  --blog-line: rgba(117, 128, 148, 0.16);
  --blog-surface: rgba(24, 24, 27, 0.72);
  --blog-prose: 50rem;
}

.blog-article-page {
  background: #000;
}

.blog-article-page .blog-shell {
  position: relative;
  z-index: 2;
}

/* ========== HERO ========== */
.blog-hero {
  position: relative;
  isolation: isolate;
  padding: 120px 0 48px;
  overflow: hidden;
}

/* First-version soft gold wash — wide ellipse behind breadcrumb/chip zone */
.blog-hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 920px 260px at 50% 128px, rgba(255, 183, 16, 0.24), transparent 70%),
    radial-gradient(ellipse 420px 200px at 82% 140px, rgba(87, 197, 248, 0.05), transparent 70%),
    linear-gradient(180deg, #0a0a0c 0%, #000 72%);
}

.blog-hero__atmosphere::after {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 55%;
  opacity: 0.22;
  background:
    repeating-radial-gradient(
      circle at 50% 120%,
      transparent 0,
      transparent 48px,
      rgba(255, 183, 16, 0.09) 49px,
      transparent 50px
    );
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 75%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 75%);
  pointer-events: none;
}

.blog-hero .content {
  position: relative;
  z-index: 2;
  max-width: 1228px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-hero__inner {
  max-width: var(--blog-prose);
  margin: 0 auto;
}

.blog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-family: "IBMPlexMono", monospace;
  font-size: 11px;
  letter-spacing: 0.72px;
  text-transform: uppercase;
  color: var(--blog-muted);
}

.blog-breadcrumb a {
  color: var(--blog-muted);
  text-decoration: none;
}

.blog-breadcrumb a:hover {
  color: #fff;
}

.blog-breadcrumb__sep {
  opacity: 0.45;
}

.blog-hero__title {
  margin: 0 0 20px;
  font-family: "Newsreader", "Times New Roman", serif;
  font-size: clamp(2.25rem, 4.2vw, 3.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
}

.blog-hero__deck {
  margin: 0 0 28px;
  color: var(--blog-muted);
  font-size: 1.125rem;
  line-height: 1.55;
  max-width: 36rem;
}

.blog-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-top: 4px;
  color: var(--blog-muted);
  font-family: "IBMPlexMono", monospace;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.blog-hero__meta b {
  color: #fff;
  font-weight: 500;
  font-family: inherit;
}

.blog-hero__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(174, 189, 204, 0.55);
}

/* ========== LAYOUT: TOC + PROSE ========== */
.blog-article {
  padding: 8px 0 96px;
}

.blog-article .content {
  max-width: 1228px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

@media (min-width: 1100px) {
  .blog-layout {
    grid-template-columns: 220px minmax(0, var(--blog-prose));
    justify-content: center;
    column-gap: 56px;
  }
}

/* Sticky ToC */
.blog-toc {
  display: none;
}

@media (min-width: 1100px) {
  .blog-toc {
    display: block;
    position: sticky;
    top: 104px;
    padding: 4px 0;
  }
}

.blog-toc__label {
  margin: 0 0 14px;
  font-family: "IBMPlexMono", monospace;
  font-size: 11px;
  letter-spacing: 0.72px;
  text-transform: uppercase;
  color: var(--blog-muted);
}

.blog-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--blog-line);
}

.blog-toc a {
  display: block;
  padding: 8px 0 8px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.blog-toc a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.blog-toc a.is-active {
  color: #fff;
  border-left-color: var(--blog-gold);
  background: linear-gradient(90deg, rgba(255, 183, 16, 0.12), transparent 85%);
}

/* ========== READING COLUMN ========== */
.blog-prose {
  max-width: var(--blog-prose);
  min-width: 0;
}

.blog-prose > :first-child {
  margin-top: 0;
}

.blog-prose p,
.blog-prose li {
  color: var(--blog-ink);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0 0 1.15em;
}

.blog-prose strong,
.blog-prose b {
  color: #fff;
  font-weight: 600;
}

.blog-prose a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--blog-gold);
  text-underline-offset: 3px;
  font-weight: 500;
}

.blog-prose a:hover {
  color: var(--blog-gold);
}

.blog-prose h2 {
  margin: 2.6em 0 0.7em;
  padding-top: 0.35em;
  font-family: "Newsreader", "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #fff;
  scroll-margin-top: 96px;
}

.blog-prose h3 {
  margin: 2em 0 0.55em;
  font-family: "Newsreader", "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  scroll-margin-top: 96px;
}

.blog-prose ul,
.blog-prose ol {
  margin: 0 0 1.35em;
  padding-left: 1.25em;
}

.blog-prose li + li {
  margin-top: 0.35em;
}
.blog-prose img { max-width: 100%; height: auto; display: block; }
/* ========== TL;DR (collapsed by default) ========== */
.blog-tldr {
  margin: 0 0 2.25em;
  border-left: 2px solid var(--blog-gold);
  background: linear-gradient(90deg, rgba(255, 183, 16, 0.08), transparent 70%);
}

.blog-tldr__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.blog-tldr__summary::-webkit-details-marker {
  display: none;
}

.blog-tldr__summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 1.5px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.55);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.blog-tldr[open] .blog-tldr__summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.blog-tldr__label {
  margin: 0;
  font-family: "IBMPlexMono", monospace;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--blog-gold);
}

.blog-tldr__hint {
  margin-right: auto;
  font-family: "IBMPlexMono", monospace;
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--blog-muted);
}

.blog-tldr__body {
  padding: 0 18px 18px;
}

.blog-tldr__lead {
  margin: 0 0 14px !important;
  color: #fff !important;
  font-size: 1.05rem !important;
  line-height: 1.55 !important;
  font-weight: 500;
}

.blog-tldr ul {
  margin: 0 !important;
  padding-left: 1.15em !important;
}

.blog-tldr li {
  margin: 0 0 0.55em !important;
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 0.98rem !important;
  line-height: 1.55 !important;
}

.blog-tldr li:last-child {
  margin-bottom: 0 !important;
}

/* Key takeaway / summary callout */
.blog-callout {
  margin: 1.75em 0 2em;
  padding: 20px 22px;
  border: 1px solid rgba(255, 183, 16, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 183, 16, 0.08), transparent 55%),
    rgba(24, 24, 27, 0.85);
}

.blog-callout__label {
  margin: 0 0 12px;
  font-family: "IBMPlexMono", monospace;
  font-size: 11px;
  letter-spacing: 0.72px;
  text-transform: uppercase;
  color: var(--blog-gold);
}

.blog-callout ul {
  margin: 0;
  padding-left: 1.1em;
}

.blog-callout li {
  margin: 0 0 0.45em;
  font-size: 0.98rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.blog-callout a {
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 183, 16, 0.45);
}

.blog-callout a:hover {
  border-bottom-color: var(--blog-gold);
}

/* Pull quote */
.blog-prose blockquote {
  margin: 2em 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, #feffff, #ffe454, #ffb710) 1;
  font-family: "Newsreader", "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: #fff;
}

.blog-prose blockquote p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Tables inside prose */
.blog-prose figure,
.blog-prose .table_holder {
  margin: 1.75em 0 2em;
}

.blog-prose .table {
  display: grid;
  gap: 0;
  border: 1px solid var(--blog-line);
  border-radius: 12px;
  overflow: hidden;
  background: #121214;
}

.blog-prose .table .row {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.3fr 1.5fr;
}

.blog-prose .table .cell {
  padding: 12px 14px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--blog-line);
  border-right: 1px solid var(--blog-line);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.blog-prose .table .cell:last-child {
  border-right: none;
}

.blog-prose .table .row:last-child .cell {
  border-bottom: none;
}

.blog-prose .table .cell.th {
  background: rgba(255, 183, 16, 0.05);
  color: #fff;
  font-family: "IBMPlexMono", monospace;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.blog-prose figcaption {
  margin-top: 10px;
  color: var(--blog-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* Tablet + mobile: stacked labeled cards (not cramped 4-col / unlabeled dump) */
@media (max-width: 1100px) {
  .blog-prose .table {
    border: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    gap: 12px;
  }

  .blog-prose .table .row:first-child {
    display: none;
  }

  .blog-prose .table .row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--blog-line);
    border-radius: 12px;
    background: #121214;
    overflow: hidden;
  }

  .blog-prose .table .row .cell {
    display: grid;
    grid-template-columns: 6.75rem minmax(0, 1fr);
    gap: 10px 12px;
    align-items: start;
    border-right: none;
    border-bottom: 1px solid var(--blog-line);
    padding: 12px 14px;
  }

  .blog-prose .table .row .cell:last-child {
    border-bottom: none;
  }

  .blog-prose .table .row .cell:first-child {
    background: rgba(255, 183, 16, 0.05);
    color: #fff;
    font-weight: 500;
  }

  .blog-prose .table .row .cell::before {
    content: attr(data-label);
    font-family: "IBMPlexMono", monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--blog-muted);
    line-height: 1.4;
    padding-top: 1px;
  }
}

@media (max-width: 640px) {
  .blog-prose .table .row .cell {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 14px;
  }

  .blog-prose .table .row .cell::before {
    padding-top: 0;
  }
}

/* ========== INLINE MID CTA ========== */
.blog-inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  margin: 2.75em 0;
  padding: 28px 32px;
  background-color: #18181b;
  background-image: linear-gradient(118deg, rgba(255, 183, 16, 0.08), transparent 48%);
  border: 1px solid rgba(117, 128, 148, 0.12);
  box-shadow: 0 20px 30px #131111;
  transition: border-color 0.2s ease;
}

.blog-inline-cta:hover {
  border-color: rgba(255, 183, 16, 0.36);
}

.blog-inline-cta__copy {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 34rem;
}

.blog-inline-cta__eyebrow {
  margin: 0 0 10px;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 140%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffb710;
}

.blog-inline-cta__title {
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-family: "Inter", sans-serif !important;
  font-size: 24px !important;
  font-weight: 500;
  line-height: 133% !important;
  letter-spacing: 0.36px;
  color: #fff;
}

.blog-inline-cta__text {
  margin: 0 !important;
  font-family: "Inter", sans-serif !important;
  font-size: 16px !important;
  line-height: 150% !important;
  letter-spacing: 0.16px;
  color: #aebdcc !important;
}

.blog-inline-cta .defb {
  flex-shrink: 0;
  min-width: 160px;
  height: 42px;
  text-decoration: none;
  color: #1b1e24;
}

.blog-inline-cta .defb:hover {
  color: #1b1e24;
}

@media (max-width: 700px) {
  .blog-inline-cta {
    padding: 24px 20px;
    gap: 20px;
  }

  .blog-inline-cta__title {
    font-size: 20px !important;
  }

  .blog-inline-cta .defb {
    width: 100%;
  }
}

/* ========== FAQ (Directus faq[]) ========== */
.blog-article-page .blog-faq {
  padding: 24px 0 40px;
}

.blog-article-page .blog-faq .content {
  max-width: 1124px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-article-page .blog-faq .title {
  margin: 0 auto;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 599;
  letter-spacing: 0.48px;
  color: #fff;
  text-align: center;
  width: 100%;
  max-width: none;
}

.blog-article-page .blog-faq .spoilers {
  display: flex;
  gap: 12px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding-top: 20px;
}

.blog-article-page .blog-faq .spoilers > div {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 700px) {
  .blog-article-page .blog-faq {
    padding: 8px 0 24px;
  }

  .blog-article-page .blog-faq .spoilers {
    flex-direction: column;
    gap: 0;
  }
}

/* ========== RELATED ARTICLES ========== */
.blog-related {
  padding: 24px 0 88px;
}

.blog-related .content {
  max-width: 1228px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-related__head {
  margin: 0 0 28px;
}

.blog-related__head h2 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 599;
  letter-spacing: 0.48px;
}

.blog-related__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.blog-related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--blog-line);
  border-radius: 14px;
  background: #121214;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.blog-related-card:hover {
  border-color: rgba(255, 183, 16, 0.45);
  background: #17171b;
}

.blog-related-card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.blog-related-card__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0b0b0c;
}

.blog-related-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-related-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
}

.blog-related-card__date {
  font-family: "IBMPlexMono", monospace;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--blog-muted);
}

.blog-related-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
}

.blog-related-card__excerpt {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Compact related cards — tablet + mobile */
@media (max-width: 1100px) {
  .blog-related {
    padding: 16px 0 64px;
  }

  .blog-related__head {
    margin: 0 0 16px;
  }

  .blog-related__head h2 {
    font-size: 1.35rem;
  }

  .blog-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .blog-related-card {
    border-radius: 10px;
  }

  .blog-related-card__body {
    gap: 4px;
    padding: 10px 10px 12px;
  }

  .blog-related-card__date {
    font-size: 10px;
  }

  .blog-related-card__title {
    font-size: 0.8125rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .blog-related-card__excerpt {
    display: none;
  }
}

@media (max-width: 640px) {
  .blog-related__grid {
    gap: 8px;
  }

  .blog-related-card {
    border-radius: 8px;
  }

  .blog-related-card__body {
    padding: 8px 8px 10px;
  }

  .blog-related-card__title {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
  }
}
