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

/* ──────────────────────────────────────────────────────────────────────────
   Insights module — "engineering dossier" editorial styling.
   Loaded only on /insights/ pages (and localized /<lang>/insights/ copies)
   in addition to main.css. Built on the site's navy + machinery-gold tokens;
   adds a monospace label voice (IBM Plex Mono) for a field-guide character.

   Layout principle: ONE reading column (--measure). The feature header band
   is full-bleed navy, but its inner content and the article body share the
   same centered measure, so the H1 and the body text line up on one left
   edge — the thing that made the first pass feel "off".
   ────────────────────────────────────────────────────────────────────────── */

.insight-page {
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --measure: 52rem;          /* ~832px reading column — wide single column */
  --rule-gold: var(--color-accent);
}

.insight-wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--space-6);
  width: 100%;
}
.insight-wrap-wide {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  width: 100%;
}

/* Shared monospace "label" voice */
.insight-eyebrow,
.insight-kicker-read,
.insight-byline,
.insight-breadcrumb,
.insight-backlink,
.insight-card-meta time,
.insight-tag {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* Gold chip badge — dark text on gold, works on both dark and light grounds */
.insight-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-bg-dark);
  background: var(--color-accent);
  border-radius: var(--radius-xs);
  padding: 0.42em 0.7em;
  line-height: 1;
}

/* ── Article feature header (full-bleed navy + blueprint texture) ─────────── */
.insight-article { display: block; }

.insight-hero {
  position: relative;
  margin-top: var(--nav-h);
  padding: var(--space-16) 0 var(--space-12);
  background: var(--color-bg-dark);
  color: #fff;
  overflow: hidden;
}
/* faint blueprint grid + a warm gold glow in the corner */
.insight-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(120% 120% at 88% -10%, rgba(242, 169, 0, 0.16), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 40px);
  pointer-events: none;
}
.insight-hero > .insight-wrap { position: relative; z-index: 1; }

.insight-breadcrumb {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-8);
}
.insight-breadcrumb a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.insight-breadcrumb a:hover { color: var(--color-accent); }
.insight-breadcrumb .sep { margin: 0 0.6em; opacity: 0.4; }

.insight-kicker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.insight-kicker-read {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.insight-kicker-read::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  vertical-align: middle;
  margin-right: var(--space-3);
}

.insight-hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 1.3rem + 3vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-6);
  max-width: 24ch;
}

.insight-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em var(--space-3);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}
.insight-byline time { color: #fff; font-weight: 500; }
.insight-byline .dot { color: var(--color-accent); }

/* Optional article image — framed as editorial context below the title band */
.insight-figure {
  margin: 0;
  padding: var(--space-8) 0 0;
  background: var(--color-bg);
}
.insight-figure .insight-wrap-wide {
  max-width: 1040px;
  padding-top: 0;
}
.insight-figure img {
  display: block;
  width: 100%;
  height: clamp(300px, 27vw, 390px);
  object-fit: cover;
  object-position: center center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}
.insight-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  padding: var(--space-3) 0 0;
  text-align: right;
}

/* ── Article body: single centered reading column ───────────────────────── */
.insight-body { padding: var(--space-12) 0 var(--space-16); }

.insight-prose {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--color-text);
}
.insight-prose > :first-child { margin-top: 0; }

.insight-prose h2 {
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: var(--space-12) 0 var(--space-4);
  scroll-margin-top: calc(var(--nav-h) + var(--space-4));
}
.insight-prose h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--rule-gold);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
}
.insight-prose h3 {
  font-size: 1.22rem;
  margin: var(--space-8) 0 var(--space-3);
  color: var(--color-primary);
}
.insight-prose p { margin: 0 0 var(--space-5); }
.insight-prose ul,
.insight-prose ol { margin: 0 0 var(--space-6); padding-left: 1.4em; }
.insight-prose li { margin: 0 0 var(--space-2); padding-left: 0.2em; }
.insight-prose ul li::marker { color: var(--color-accent); }
.insight-prose ol li::marker { color: var(--color-accent); font-family: var(--font-mono); font-weight: 600; }
.insight-prose a {
  color: var(--color-accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.insight-prose a:hover { color: var(--color-primary); }
.insight-prose strong { font-weight: 700; color: var(--color-primary); }
.insight-prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 0.1em 0.4em;
}
.insight-prose pre {
  background: var(--color-bg-dark);
  color: #e8edf6;
  border-radius: var(--radius);
  padding: var(--space-5);
  overflow-x: auto;
  margin: 0 0 var(--space-6);
}
.insight-prose pre code { background: none; border: 0; padding: 0; color: inherit; }

/* Pull-quote */
.insight-prose blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  border-left: 3px solid var(--color-accent);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--color-primary);
  font-style: italic;
}
.insight-prose blockquote p:last-child { margin-bottom: 0; }

.insight-prose hr {
  border: 0;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-10) 0;
}
.insight-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: var(--space-6) 0;
}

/* Spec-sheet tables — the workhorse format for comparisons + GEO */
.insight-prose .table-wrap {
  margin: var(--space-8) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.insight-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}
.insight-prose thead th {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  padding: var(--space-3) var(--space-4);
}
.insight-prose tbody td {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  vertical-align: top;
}
.insight-prose tbody tr:nth-child(even) { background: var(--color-bg-alt); }
.insight-prose tbody td:first-child { font-weight: 600; color: var(--color-primary); }

/* Tags + back link */
.insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-10) 0 0;
}
.insight-tag {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.35em 0.85em;
}
.insight-tag::before { content: "#"; color: var(--color-accent); }

.insight-backlink {
  display: inline-block;
  margin-top: var(--space-10);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
}
.insight-backlink:hover { color: var(--color-accent-hover); }

/* ── FAQ — hairline accordion on a tinted band ───────────────────────────── */
.insight-faq-section {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) 0;
}
.insight-faq-title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-6);
}
.insight-faq-title::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--rule-gold);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
}
/* .faq-item is styled by main.css (boxed, horizontally padded, gold +/×) so
   it matches the homepage FAQ. We only supply the inter-item spacing that
   .faq-list normally provides on other pages. */
.insight-faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.insight-archived-note {
  background: #fff;
  border-left: 3px solid var(--color-text-muted);
  padding: var(--space-3) var(--space-5);
  margin: 0 0 var(--space-6);
  max-width: var(--measure);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ══ Listing page ════════════════════════════════════════════════════════ */
.insight-listing-hero {
  margin-top: var(--nav-h);
  padding: var(--space-16) 0 var(--space-12);
  background: var(--color-bg-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.insight-listing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(120% 130% at 90% -20%, rgba(242, 169, 0, 0.16), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 40px);
  pointer-events: none;
}
.insight-listing-hero > .insight-wrap-wide { position: relative; z-index: 1; }
.insight-eyebrow {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 var(--space-4);
}
.insight-listing-hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-4);
}
.insight-listing-hero p {
  max-width: 56ch;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  margin: 0;
}
.insight-listing-body { padding: var(--space-16) 0; }

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: var(--space-6);
}
.insight-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.insight-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--color-accent);
}
.insight-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}
.insight-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.insight-card:hover .insight-card-media img {
  transform: scale(1.025);
}
a.insight-card-media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
a.insight-card-media--placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(120% 120% at 85% -10%, rgba(242,169,0,0.2), transparent 55%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 28px);
}
a.insight-card-media--placeholder span { position: relative; z-index: 1; }
.insight-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-6);
  flex: 1;
}
.insight-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.76rem;
  color: var(--color-text-muted);
}
.insight-card-title {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0;
}
.insight-card-title a { color: var(--color-primary); text-decoration: none; }
.insight-card:hover .insight-card-title a { color: var(--color-accent-hover); }
.insight-card-summary {
  color: var(--color-text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 0;
  flex: 1;
}
.insight-card-more {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-hover);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .insight-hero, .insight-listing-hero { padding-top: var(--space-12); }
  .insight-figure {
    padding-top: var(--space-5);
  }
  .insight-figure img {
    height: auto;
  }
  .insight-prose { font-size: 1.06rem; }
  .insight-body { padding: var(--space-10) 0 var(--space-12); }
}
