/* =====================================================
   i4US Premium Editorial Article Styles — v3 (Stable Chain)
   Targets the OLD build's Tailwind prose container:
     .prose.prose-lg.prose-invert   (client-side React render)
     .i4us-article-prose            (SSR crawler content)

   SAFE: CSS-only override. No JS bundle changes. No rebuild.
   Loaded via <link> in index.html after the Vite CSS bundle.
   Created: 2026-08-17 (re-targeted for stable build)
   ===================================================== */

/* === Scope both selectors with a shared mixin approach === */

/* ---------- Reading Column ---------- */
.prose.prose-lg.prose-invert,
.i4us-article-prose {
  font-family: 'Satoshi', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.82;
  color: #b0bec5;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- Lead / Intro Paragraph ---------- */
.prose.prose-lg.prose-invert > p:first-of-type,
.i4us-article-prose > p:first-of-type {
  font-size: 1.1875rem;
  line-height: 1.75;
  color: #cbd5e1;
  letter-spacing: 0.005em;
}

/* Drop cap on first paragraph */
.prose.prose-lg.prose-invert > p:first-of-type::first-letter,
.i4us-article-prose > p:first-of-type::first-letter {
  float: left;
  font-family: 'Clash Display', 'Georgia', serif;
  font-size: 3.5em;
  line-height: 0.8;
  font-weight: 700;
  color: #60a5fa;
  padding-right: 0.08em;
  padding-top: 0.06em;
  margin-bottom: -0.1em;
}

/* ---------- Paragraph Spacing ---------- */
.prose.prose-lg.prose-invert p,
.i4us-article-prose p {
  margin-top: 0;
  margin-bottom: 1.6em;
}

.prose.prose-lg.prose-invert p:last-child,
.i4us-article-prose p:last-child {
  margin-bottom: 0;
}

/* ---------- Headings ---------- */
.prose.prose-lg.prose-invert h2,
.i4us-article-prose h2 {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-top: 3.25em;
  margin-bottom: 1em;
  padding-top: 1.75em;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  scroll-margin-top: 6rem;
  position: relative;
}

.prose.prose-lg.prose-invert h2::after,
.i4us-article-prose h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 0.6em;
  border-radius: 2px;
  background: linear-gradient(90deg, #3b82f6 0%, #34d399 100%);
}

.prose.prose-lg.prose-invert h2:first-child,
.i4us-article-prose h2:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.prose.prose-lg.prose-invert h3,
.i4us-article-prose h3 {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 1.3125rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-top: 2.5em;
  margin-bottom: 0.7em;
  padding-left: 1em;
  border-left: 3px solid rgba(59, 130, 246, 0.4);
  scroll-margin-top: 6rem;
}

.prose.prose-lg.prose-invert h4,
.i4us-article-prose h4 {
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

/* ---------- Links ---------- */
.prose.prose-lg.prose-invert a,
.i4us-article-prose a {
  color: #60a5fa;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.2s ease, background-size 0.2s ease;
  background-image: linear-gradient(rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.2));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}

.prose.prose-lg.prose-invert a:hover,
.i4us-article-prose a:hover {
  color: #93c5fd;
  background-image: linear-gradient(rgba(96, 165, 250, 0.4), rgba(96, 165, 250, 0.4));
  background-size: 100% 2px;
}

/* ---------- Strong / Emphasis ---------- */
.prose.prose-lg.prose-invert strong,
.i4us-article-prose strong {
  color: #e2e8f0;
  font-weight: 600;
}

.prose.prose-lg.prose-invert em,
.i4us-article-prose em {
  color: #b0bec5;
  font-style: italic;
}

/* ---------- Unordered Lists ---------- */
.prose.prose-lg.prose-invert ul,
.i4us-article-prose ul {
  list-style: none;
  padding-left: 0;
  margin-top: 1.25em;
  margin-bottom: 1.75em;
}

.prose.prose-lg.prose-invert ul > li,
.i4us-article-prose ul > li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: 0.7em;
  line-height: 1.72;
}

.prose.prose-lg.prose-invert ul > li::before,
.i4us-article-prose ul > li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
}

.prose.prose-lg.prose-invert ul ul,
.i4us-article-prose ul ul {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose.prose-lg.prose-invert ul ul > li::before,
.i4us-article-prose ul ul > li::before {
  background: transparent;
  border: 1.5px solid #64748b;
  box-shadow: none;
  width: 5px;
  height: 5px;
}

/* ---------- Ordered Lists ---------- */
.prose.prose-lg.prose-invert ol,
.i4us-article-prose ol {
  list-style: none;
  counter-reset: ol-counter;
  padding-left: 0;
  margin-top: 1.25em;
  margin-bottom: 1.75em;
}

.prose.prose-lg.prose-invert ol > li,
.i4us-article-prose ol > li {
  counter-increment: ol-counter;
  position: relative;
  padding-left: 2.5em;
  margin-bottom: 0.85em;
  line-height: 1.72;
}

.prose.prose-lg.prose-invert ol > li::before,
.i4us-article-prose ol > li::before {
  content: counter(ol-counter);
  position: absolute;
  top: 0.12em;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.08);
  border: 1.5px solid rgba(59, 130, 246, 0.25);
}

/* ---------- Blockquotes / Pull Quotes ---------- */
.prose.prose-lg.prose-invert blockquote,
.i4us-article-prose blockquote {
  position: relative;
  margin: 2.5em 0;
  padding: 1.75em 2em 1.75em 2em;
  background: rgba(59, 130, 246, 0.04);
  border-left: 3px solid #3b82f6;
  border-radius: 0 1rem 1rem 0;
  font-style: italic;
  color: #cbd5e1;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose.prose-lg.prose-invert blockquote::before,
.i4us-article-prose blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.15em;
  left: 0.5em;
  font-family: 'Georgia', serif;
  font-size: 3.5em;
  line-height: 1;
  color: rgba(59, 130, 246, 0.15);
  font-style: normal;
}

.prose.prose-lg.prose-invert blockquote p,
.i4us-article-prose blockquote p {
  margin-bottom: 0.5em;
}

.prose.prose-lg.prose-invert blockquote p:last-child,
.i4us-article-prose blockquote p:last-child {
  margin-bottom: 0;
}

/* ---------- Tables ---------- */
.prose.prose-lg.prose-invert > table,
.prose.prose-lg.prose-invert > div > table,
.i4us-article-prose > table,
.i4us-article-prose > div > table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prose.prose-lg.prose-invert table,
.i4us-article-prose table {
  width: 100%;
  margin: 2em 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  overflow: hidden;
}

.prose.prose-lg.prose-invert thead,
.prose.prose-lg.prose-invert tbody,
.i4us-article-prose thead,
.i4us-article-prose tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.prose.prose-lg.prose-invert th,
.i4us-article-prose th {
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 2px solid rgba(59, 130, 246, 0.2);
  padding: 0.85em 1.1em;
  white-space: nowrap;
}

.prose.prose-lg.prose-invert th:first-child,
.i4us-article-prose th:first-child {
  border-radius: 0.75rem 0 0 0;
}

.prose.prose-lg.prose-invert th:last-child,
.i4us-article-prose th:last-child {
  border-radius: 0 0.75rem 0 0;
}

.prose.prose-lg.prose-invert td,
.i4us-article-prose td {
  color: #cbd5e1;
  padding: 0.8em 1.1em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
}

.prose.prose-lg.prose-invert tbody tr:last-child td,
.i4us-article-prose tbody tr:last-child td {
  border-bottom: none;
}

.prose.prose-lg.prose-invert tbody tr:nth-child(even) td,
.i4us-article-prose tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.prose.prose-lg.prose-invert tbody tr:hover td,
.i4us-article-prose tbody tr:hover td {
  background: rgba(59, 130, 246, 0.04);
  transition: background 0.2s ease;
}

/* ---------- Code ---------- */
.prose.prose-lg.prose-invert code,
.i4us-article-prose code {
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 0.875em;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 0.3rem;
  padding: 0.15em 0.45em;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.prose.prose-lg.prose-invert pre,
.i4us-article-prose pre {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 1.35em 1.5em;
  margin: 2em 0;
  overflow-x: auto;
}

.prose.prose-lg.prose-invert pre code,
.i4us-article-prose pre code {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

/* ---------- Horizontal Rules / Section Dividers ---------- */
.prose.prose-lg.prose-invert hr,
.i4us-article-prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.08) 80%, transparent);
  margin: 3em 0;
}

/* ---------- Images ---------- */
.prose.prose-lg.prose-invert img,
.i4us-article-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2em 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Figure / Figcaption ---------- */
.prose.prose-lg.prose-invert figure,
.i4us-article-prose figure {
  margin: 2.5em 0;
}

.prose.prose-lg.prose-invert figure img,
.i4us-article-prose figure img {
  margin-bottom: 0.75em;
}

.prose.prose-lg.prose-invert figcaption,
.i4us-article-prose figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ---------- In-Content Callout Box ---------- */
.prose.prose-lg.prose-invert .callout,
.prose.prose-lg.prose-invert .tip-box,
.prose.prose-lg.prose-invert .note,
.i4us-article-prose .callout,
.i4us-article-prose .tip-box,
.i4us-article-prose .note {
  margin: 2em 0;
  padding: 1.5em 1.75em;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ---------- Prevent horizontal overflow ---------- */
.prose.prose-lg.prose-invert *,
.i4us-article-prose * {
  max-width: 100%;
  box-sizing: border-box;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .prose.prose-lg.prose-invert,
  .i4us-article-prose {
    font-size: 1rem;
    line-height: 1.78;
  }

  .prose.prose-lg.prose-invert > p:first-of-type,
  .i4us-article-prose > p:first-of-type {
    font-size: 1.0625rem;
  }

  .prose.prose-lg.prose-invert > p:first-of-type::first-letter,
  .i4us-article-prose > p:first-of-type::first-letter {
    font-size: 3em;
  }

  .prose.prose-lg.prose-invert h2,
  .i4us-article-prose h2 {
    font-size: 1.5rem;
    margin-top: 2.5em;
    padding-top: 1.25em;
  }

  .prose.prose-lg.prose-invert h3,
  .i4us-article-prose h3 {
    font-size: 1.1875rem;
    margin-top: 2em;
  }

  .prose.prose-lg.prose-invert table,
  .i4us-article-prose table {
    display: block;
    overflow-x: auto;
    min-width: 0;
  }

  .prose.prose-lg.prose-invert thead,
  .prose.prose-lg.prose-invert tbody,
  .i4us-article-prose thead,
  .i4us-article-prose tbody {
    display: table;
    width: 100%;
  }

  .prose.prose-lg.prose-invert blockquote,
  .i4us-article-prose blockquote {
    padding: 1.25em 1.25em 1.25em 1.25em;
    margin: 1.75em 0;
  }

  .prose.prose-lg.prose-invert blockquote::before,
  .i4us-article-prose blockquote::before {
    font-size: 2.5em;
    top: -0.1em;
    left: 0.35em;
  }
}

@media (max-width: 480px) {
  .prose.prose-lg.prose-invert > p:first-of-type::first-letter,
  .i4us-article-prose > p:first-of-type::first-letter {
    font-size: 2.75em;
  }

  .prose.prose-lg.prose-invert h2,
  .i4us-article-prose h2 {
    font-size: 1.375rem;
  }

  .prose.prose-lg.prose-invert h3,
  .i4us-article-prose h3 {
    font-size: 1.125rem;
  }
}

/* ---------- SSR Article Styling (crawler-visible) ---------- */
.ssr-article-editorial {
  max-width: 780px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: 'Satoshi', system-ui, sans-serif;
  color: #b0bec5;
  line-height: 1.82;
}

.ssr-article-editorial header {
  margin-bottom: 2em;
}

.ssr-article-editorial h1 {
  font-family: 'Clash Display', system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 1em;
}

.ssr-article-editorial .article-meta {
  font-size: 0.875rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em;
  align-items: center;
}

.ssr-article-editorial .article-meta .category-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 9999px;
  padding: 0.2em 0.75em;
}

.ssr-article-editorial .hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2em;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
