/* ==========================================================================
   Fincentive Insights — Ghost Theme CSS
   A bold, authoritative editorial design for UK pensions thought leadership.
   Drop-in replacement for assets/css/main.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */

:root {
  /* Brand Palette */
  --fi-navy:        #050D2E;
  --fi-navy-light:  #0A1628;
  --fi-navy-mid:    #111D3A;
  --fi-cyan:        #00BDFF;
  --fi-cyan-glow:   rgba(0, 189, 255, 0.15);
  --fi-sienna:      #E07B4F;
  --fi-emerald:     #4AA882;
  --fi-violet:      #9080F8;
  --fi-gold:        #C9A227;
  --fi-white:       #FFFFFF;
  --fi-muted:       #94A3B8;
  --fi-muted-dark:  #64748B;
  --fi-border:      rgba(148, 163, 184, 0.12);
  --fi-border-light: rgba(148, 163, 184, 0.08);

  /* Layout */
  --fi-max-width:     1280px;
  --fi-content-width: 760px;
  --fi-wide-width:    1100px;
  --fi-header-height: 72px;

  /* Spacing scale */
  --fi-space-xs:  0.25rem;
  --fi-space-sm:  0.5rem;
  --fi-space-md:  1rem;
  --fi-space-lg:  1.5rem;
  --fi-space-xl:  2rem;
  --fi-space-2xl: 3rem;
  --fi-space-3xl: 4rem;
  --fi-space-4xl: 6rem;

  /* Typography */
  --fi-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fi-line-body: 1.75;
  --fi-line-heading: 1.15;
  --fi-letter-tight: -0.02em;
  --fi-letter-wide:  0.12em;

  /* Motion */
  --fi-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fi-duration: 0.3s;
  --fi-duration-fast: 0.15s;
}


/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--fi-font);
  font-weight: 400;
  line-height: var(--fi-line-body);
  color: var(--fi-white);
  background-color: var(--fi-navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--fi-duration-fast) var(--fi-ease);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

figure {
  margin: 0;
}

::selection {
  background: var(--fi-cyan);
  color: var(--fi-navy);
}


/* --------------------------------------------------------------------------
   3. HEADER
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--fi-navy);
  border-bottom: 1px solid var(--fi-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  isolation: isolate;
  overflow: visible;
}

/* Force mobile nav invisible on desktop regardless */
@media (min-width: 768px) {
  .mobile-nav { display: none !important; }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--fi-max-width);
  margin: 0 auto;
  padding: 0 var(--fi-space-xl);
  height: var(--fi-header-height);
}

.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo img {
  height: 28px;
  width: auto;
}

.header-logo span,
.header-logo strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fi-white);
  letter-spacing: var(--fi-letter-tight);
}

/* Desktop nav — visible by default, hidden on mobile */
.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin-left: 0;
}

.nav-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Ghost {{navigation}} generates a ul.nav wrapper inside our ul.nav-list */
.nav-list ul.nav,
.header-nav ul.nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--fi-space-xl);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li a,
.header-nav ul.nav li a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fi-muted);
  letter-spacing: 0.01em;
  transition: color var(--fi-duration-fast) var(--fi-ease);
  position: relative;
}

.nav-list li a::after,
.header-nav ul.nav li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--fi-cyan);
  transition: width var(--fi-duration) var(--fi-ease);
}

.nav-list li a:hover,
.header-nav ul.nav li a:hover {
  color: var(--fi-white);
}

.nav-list li a:hover::after,
.header-nav ul.nav li a:hover::after {
  width: 100%;
}

/* CTA button */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fi-navy);
  background: var(--fi-cyan);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--fi-duration) var(--fi-ease);
  white-space: nowrap;
  text-decoration: none;
}

.header-cta:hover {
  background: var(--fi-white);
  color: var(--fi-navy);
  box-shadow: 0 0 24px var(--fi-cyan-glow), 0 0 48px rgba(0, 189, 255, 0.08);
  transform: translateY(-1px);
}

/* Burger */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fi-white);
  border-radius: 2px;
  transition: all var(--fi-duration) var(--fi-ease);
  transform-origin: center;
}

/* Burger open state */
.burger.is-open .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open .burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger.is-open .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  background: var(--fi-navy-light);
  border-bottom: 1px solid var(--fi-border);
  padding: 0 var(--fi-space-xl);
  max-height: 0;
  overflow: hidden;
}

.mobile-nav.is-open {
  display: block;
  max-height: 400px;
  padding: var(--fi-space-lg) var(--fi-space-xl);
  animation: mobileNavIn 0.35s var(--fi-ease) forwards;
}

@keyframes mobileNavIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-list,
.mobile-nav ul.nav {
  display: flex;
  flex-direction: column;
  gap: var(--fi-space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-list li a,
.mobile-nav ul.nav li a {
  display: block;
  padding: var(--fi-space-sm) 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--fi-muted);
  transition: color var(--fi-duration-fast) var(--fi-ease);
  border-bottom: 1px solid var(--fi-border-light);
}

.mobile-nav-list li:last-child a,
.mobile-nav ul.nav li:last-child a {
  border-bottom: none;
}

.mobile-nav-list li a:hover,
.mobile-nav ul.nav li a:hover {
  color: var(--fi-cyan);
}

/* Desktop: show nav, hide burger + mobile-nav */
@media (min-width: 768px) {
  .header-nav {
    display: flex;
    align-items: center;
    gap: var(--fi-space-xl);
  }

  .burger {
    display: none;
  }

  .mobile-nav,
  .mobile-nav.is-open {
    display: none !important;
  }
}


/* --------------------------------------------------------------------------
   4. SITE MAIN
   -------------------------------------------------------------------------- */

.site-main {
  min-height: calc(100vh - var(--fi-header-height));
}


/* --------------------------------------------------------------------------
   5. HOMEPAGE — HERO
   -------------------------------------------------------------------------- */

.home-hero {
  position: relative;
  padding: var(--fi-space-3xl) var(--fi-space-xl);
  text-align: center;
  overflow: hidden;
  background: var(--fi-navy);
}

/* Subtle geometric accent */
.home-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 189, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: var(--fi-cyan);
  border-radius: 2px;
}

/* Home hero title — two stacked lines */
.home-hero-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--fi-letter-wide);
  margin-bottom: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--fi-space-sm);
}

.hero-line-1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--fi-cyan);
  letter-spacing: var(--fi-letter-wide);
  font-weight: 700;
}

.hero-line-2 {
  font-size: clamp(0.8125rem, 1.5vw, 1rem);
  color: var(--fi-white);
  letter-spacing: var(--fi-letter-wide);
  font-weight: 500;
  opacity: 0.75;
}

/* .home-hero-description styled as the prominent headline */
.home-hero-description {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: var(--fi-line-heading);
  letter-spacing: var(--fi-letter-tight);
  color: var(--fi-white);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}


/* --------------------------------------------------------------------------
   6. HOMEPAGE — SECTIONS
   -------------------------------------------------------------------------- */

.featured-posts,
.latest-posts {
  max-width: var(--fi-max-width);
  margin: 0 auto;
  padding: var(--fi-space-3xl) var(--fi-space-xl);
}

.section-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--fi-letter-wide);
  color: var(--fi-muted);
  margin-bottom: var(--fi-space-xl);
  padding-left: var(--fi-space-md);
  border-left: 3px solid var(--fi-cyan);
}


/* --------------------------------------------------------------------------
   7. POST GRID
   -------------------------------------------------------------------------- */

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fi-space-xl);
}

@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* --------------------------------------------------------------------------
   8. POST CARDS
   -------------------------------------------------------------------------- */

.post-card {
  background: var(--fi-navy-light);
  border: 1px solid var(--fi-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--fi-duration) var(--fi-ease);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Tag accent: top border using the tag's inline colour */
.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--fi-duration) var(--fi-ease);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--fi-border-light);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px var(--fi-border);
}

.post-card:hover::before {
  opacity: 1;
}

/* Card image */
.post-card-image-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--fi-duration) var(--fi-ease);
}

.post-card:hover .post-card-image {
  transform: scale(1.04);
}

/* Card content */
.post-card-content {
  padding: var(--fi-space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--fi-white);
}

/* Tag label — colour set inline */
.post-card-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--fi-letter-wide);
  margin-bottom: var(--fi-space-sm);
  /* color is set inline via style="color: ..." */
}

/* Card title */
.post-card-title {
  margin-bottom: var(--fi-space-sm);
}

.post-card-title-link {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fi-navy);
  letter-spacing: var(--fi-letter-tight);
  transition: color var(--fi-duration-fast) var(--fi-ease);
}

.post-card-title-link:hover {
  color: var(--fi-cyan);
}

/* Excerpt */
.post-card-excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fi-muted-dark);
  margin-bottom: var(--fi-space-md);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta */
.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--fi-space-sm);
  font-size: 0.75rem;
  color: var(--fi-muted-dark);
  padding-top: var(--fi-space-md);
  border-top: 1px solid rgba(5, 13, 46, 0.08);
  margin-top: auto;
}

.post-card-date,
.post-card-read {
  font-weight: 500;
}

.post-card-meta span:not(.post-card-date):not(.post-card-read) {
  /* separator dot */
  opacity: 0.4;
}


/* --------------------------------------------------------------------------
   9. ARTICLE PAGE
   -------------------------------------------------------------------------- */

.post {
  background: var(--fi-white);
  color: var(--fi-navy);
}

/* Article header */
.post-header {
  max-width: var(--fi-content-width);
  margin: 0 auto;
  padding: var(--fi-space-3xl) var(--fi-space-xl) var(--fi-space-xl);
  text-align: center;
}

/* Tag on article page — colour set inline. 
   We let currentColor cascade to the standfirst border. */
.post-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--fi-letter-wide);
  margin-bottom: var(--fi-space-lg);
  /* color is set inline via style="color: ..." */
}

/* Article title */
.post-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: var(--fi-line-heading);
  letter-spacing: var(--fi-letter-tight);
  color: var(--fi-navy);
  margin-bottom: var(--fi-space-lg);
}

/* Standfirst — distinct design element */
.post-standfirst {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--fi-muted-dark);
  max-width: 640px;
  margin: 0 auto var(--fi-space-lg);
  padding-bottom: var(--fi-space-lg);
  border-bottom: 3px solid currentColor;
  text-align: left;
}

/* 
   The tag's inline color sits on .post-tag. The standfirst needs to inherit it
   for border-bottom-color via currentColor. We achieve this by setting the
   standfirst's color to inherit from a wrapper, or by using a sibling approach.
   Since .post-tag and .post-standfirst are siblings inside .post-header, we
   use a CSS trick: the .post-header inherits the inline color set on .post-tag,
   which then flows to .post-standfirst's border via currentColor.
   
   However, since inline styles only apply to the element itself, we use a 
   different strategy: we set the standfirst's border-color to inherit and
   the .post-tag's color will influence via CSS custom property.
   
   Practical approach: The border uses the tag color via a JS-set custom prop,
   OR we use this cascade trick where the standfirst border inherits. Since the
   inline color is only on .post-tag, we need JS or template support.
   
   Fallback: Use a subtle grey border, and if the template passes the accent
   colour as a CSS variable on the header wrapper, it will work.
   
   Best CSS-only approach: Use .post-tag's color to set a custom property
   via the 'color' property, and use currentColor for the border on a pseudo-
   element positioned under the standfirst.
   
   ACTUAL SOLUTION: We style .post-header to use color: inherit, and the
   template can pass the accent to .post-header's style. But per the brief,
   the inline color is only on .post-tag.
   
   PRAGMATIC SOLUTION: Since .post-tag has inline color, and .post-standfirst
   is a sibling, we cannot inherit via CSS alone across siblings. Instead:
   - Default border: var(--fi-cyan) as a tasteful fallback
   - If the template author adds style="color: X" to .post-header or 
     .post-standfirst directly, currentColor will pick it up automatically.
   - We document this for the theme developer.
*/

/* The standfirst border uses currentColor. For the tag colour to flow in,
   add style="color: {{accent_color}}" to .post-standfirst in the template,
   or wrap both in a container with the inline color. Fallback is cyan. */
.post-standfirst {
  color: var(--fi-muted-dark);
  border-bottom-color: var(--fi-cyan);
}

/* If .post-standfirst has an inline color set, currentColor will be used */
.post-standfirst[style*="color"] {
  border-bottom-color: currentColor;
}

/* Alternative: if the tag colour is set on a parent wrapper */
.post-header[style*="color"] .post-standfirst {
  border-bottom-color: currentColor;
}

/* Post meta */
.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--fi-space-sm);
  font-size: 0.8125rem;
  color: var(--fi-muted-dark);
  font-weight: 500;
}

/* Feature image */
.post-feature-image {
  max-width: var(--fi-wide-width);
  margin: 0 auto var(--fi-space-2xl);
  padding: 0 var(--fi-space-xl);
}

.post-feature-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(5, 13, 46, 0.08);
}


/* --------------------------------------------------------------------------
   10. ARTICLE CONTENT — .gh-content
   -------------------------------------------------------------------------- */

.post-content,
.gh-content {
  max-width: var(--fi-content-width);
  margin: 0 auto;
  padding: 0 var(--fi-space-xl) var(--fi-space-3xl);
  font-size: 1.0625rem;
  line-height: var(--fi-line-body);
  color: var(--fi-navy);
}

.gh-content > * + * {
  margin-top: var(--fi-space-lg);
}

/* Headings in content */
.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4 {
  font-weight: 800;
  line-height: var(--fi-line-heading);
  letter-spacing: var(--fi-letter-tight);
  color: var(--fi-navy);
}

.gh-content h1 { font-size: 2rem; }
.gh-content h2 {
  font-size: 1.625rem;
  margin-top: var(--fi-space-2xl);
  padding-top: var(--fi-space-xl);
  border-top: 1px solid rgba(5, 13, 46, 0.08);
}
.gh-content h3 { font-size: 1.3125rem; margin-top: var(--fi-space-xl); }
.gh-content h4 { font-size: 1.125rem; margin-top: var(--fi-space-xl); }

/* Paragraphs */
.gh-content p {
  color: #1E293B;
}

/* Links */
.gh-content a {
  color: var(--fi-cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0, 189, 255, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--fi-duration-fast) var(--fi-ease);
}

.gh-content a:hover {
  text-decoration-color: var(--fi-cyan);
}

/* Strong / emphasis */
.gh-content strong {
  font-weight: 700;
  color: var(--fi-navy);
}

.gh-content em {
  font-style: italic;
}

/* Blockquotes */
.gh-content blockquote {
  margin: var(--fi-space-xl) 0;
  padding: var(--fi-space-lg) var(--fi-space-xl);
  border-left: 4px solid var(--fi-cyan);
  background: rgba(5, 13, 46, 0.035);
  border-radius: 0 8px 8px 0;
  font-size: 1.125rem;
  font-style: italic;
  color: var(--fi-navy-mid);
  line-height: 1.7;
}

/* Sources section — styled via JS targeting bold paragraph "Sources" */
.gh-content p.fi-sources-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fi-muted-dark);
  border-top: 1px solid rgba(5, 13, 46, 0.08);
  padding-top: var(--fi-space-xl);
  margin-top: var(--fi-space-2xl);
}

.gh-content p.fi-sources-item {
  font-size: 0.8125rem;
  color: var(--fi-muted-dark);
  line-height: 1.6;
}

.gh-content blockquote p {
  color: inherit;
}

/* Lists */
.gh-content ul,
.gh-content ol {
  padding-left: var(--fi-space-xl);
}

.gh-content ul {
  list-style: disc;
}

.gh-content ol {
  list-style: decimal;
}

.gh-content li {
  margin-top: var(--fi-space-sm);
  padding-left: var(--fi-space-xs);
}

.gh-content li::marker {
  color: var(--fi-cyan);
}

/* Horizontal rule */
.gh-content hr {
  border: none;
  height: 1px;
  background: rgba(5, 13, 46, 0.1);
  margin: var(--fi-space-2xl) 0;
}

/* Code */
.gh-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background: rgba(5, 13, 46, 0.05);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.gh-content pre {
  margin: var(--fi-space-xl) 0;
  padding: var(--fi-space-lg);
  background: var(--fi-navy);
  color: var(--fi-muted);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.gh-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Tables */
.gh-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--fi-space-xl) 0;
  font-size: 0.9375rem;
}

.gh-content th {
  text-align: left;
  font-weight: 700;
  padding: var(--fi-space-sm) var(--fi-space-md);
  border-bottom: 2px solid var(--fi-navy);
  color: var(--fi-navy);
}

.gh-content td {
  padding: var(--fi-space-sm) var(--fi-space-md);
  border-bottom: 1px solid rgba(5, 13, 46, 0.08);
}

/* Figures & captions */
.gh-content figure {
  margin: var(--fi-space-xl) 0;
}

.gh-content figcaption {
  margin-top: var(--fi-space-sm);
  font-size: 0.8125rem;
  color: var(--fi-muted-dark);
  text-align: center;
  font-style: italic;
}


/* --------------------------------------------------------------------------
   11. GHOST CARD WIDTHS
   -------------------------------------------------------------------------- */

.gh-content .kg-width-wide {
  max-width: var(--fi-wide-width);
  margin-left: calc(50% - var(--fi-wide-width) / 2);
  margin-right: calc(50% - var(--fi-wide-width) / 2);
}

.gh-content .kg-width-full {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Wide/full width within constrained content */
@media (max-width: 1140px) {
  .gh-content .kg-width-wide {
    max-width: calc(100vw - var(--fi-space-xl) * 2);
    margin-left: calc(50% - 50vw + var(--fi-space-xl));
    margin-right: calc(50% - 50vw + var(--fi-space-xl));
  }
}


/* --------------------------------------------------------------------------
   12. GHOST CONTENT CARDS
   -------------------------------------------------------------------------- */

/* Image cards */
.kg-image-card {
  margin: var(--fi-space-xl) 0;
}

.kg-image-card img {
  border-radius: 8px;
}

.kg-image-card.kg-width-wide img,
.kg-image-card.kg-width-full img {
  border-radius: 0;
}

/* Gallery cards */
.kg-gallery-card {
  margin: var(--fi-space-xl) 0;
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: var(--fi-space-sm);
}

.kg-gallery-row {
  display: flex;
  gap: var(--fi-space-sm);
}

.kg-gallery-row img {
  flex: 1;
  height: auto;
  border-radius: 4px;
}

/* Bookmark cards */
.kg-bookmark-card {
  margin: var(--fi-space-xl) 0;
}

.kg-bookmark-container {
  display: flex;
  border: 1px solid rgba(5, 13, 46, 0.1);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--fi-duration-fast) var(--fi-ease);
}

.kg-bookmark-container:hover {
  border-color: rgba(5, 13, 46, 0.2);
}

.kg-bookmark-content {
  flex: 1;
  padding: var(--fi-space-lg);
  display: flex;
  flex-direction: column;
}

.kg-bookmark-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fi-navy);
  line-height: 1.4;
  margin-bottom: var(--fi-space-xs);
}

.kg-bookmark-description {
  font-size: 0.8125rem;
  color: var(--fi-muted-dark);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--fi-space-sm);
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: var(--fi-space-sm);
  font-size: 0.75rem;
  color: var(--fi-muted-dark);
}

.kg-bookmark-icon {
  width: 16px;
  height: 16px;
}

.kg-bookmark-publisher {
  font-weight: 600;
}

.kg-bookmark-thumbnail {
  width: 200px;
  min-height: 160px;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .kg-bookmark-container {
    flex-direction: column-reverse;
  }

  .kg-bookmark-thumbnail {
    width: 100%;
    min-height: 120px;
  }
}

/* Embed / video cards */
.kg-embed-card {
  margin: var(--fi-space-xl) 0;
}

.kg-embed-card iframe {
  width: 100%;
  border-radius: 8px;
}

/* Button cards */
.kg-button-card {
  margin: var(--fi-space-xl) 0;
  text-align: center;
}

.kg-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 100px;
  transition: all var(--fi-duration) var(--fi-ease);
}

.kg-btn-accent {
  background: var(--fi-cyan);
  color: var(--fi-navy);
}

.kg-btn-accent:hover {
  background: var(--fi-white);
  box-shadow: 0 0 24px var(--fi-cyan-glow);
}

/* Callout cards */
.kg-callout-card {
  margin: var(--fi-space-xl) 0;
  padding: var(--fi-space-lg);
  border-radius: 8px;
  display: flex;
  gap: var(--fi-space-md);
}

.kg-callout-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.kg-callout-text {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Toggle cards */
.kg-toggle-card {
  margin: var(--fi-space-xl) 0;
  border: 1px solid rgba(5, 13, 46, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.kg-toggle-heading {
  padding: var(--fi-space-md) var(--fi-space-lg);
  cursor: pointer;
  font-weight: 700;
}

.kg-toggle-content {
  padding: 0 var(--fi-space-lg) var(--fi-space-md);
  font-size: 0.9375rem;
}


/* --------------------------------------------------------------------------
   13. AUTHOR CARD
   -------------------------------------------------------------------------- */

.post-footer {
  max-width: var(--fi-content-width);
  margin: var(--fi-space-xl) auto 0;
  padding: var(--fi-space-xl) var(--fi-space-xl) var(--fi-space-3xl);
  border-top: 1px solid rgba(5, 13, 46, 0.1);
}

.author-card {
  display: flex;
  align-items: flex-start;
  gap: var(--fi-space-lg);
  padding: var(--fi-space-xl);
  background: rgba(5, 13, 46, 0.03);
  border: 1px solid rgba(5, 13, 46, 0.06);
  border-radius: 12px;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fi-navy);
  margin-bottom: var(--fi-space-xs);
}

.author-bio {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fi-muted-dark);
  margin-bottom: var(--fi-space-sm);
}

.author-links {
  display: flex;
  gap: var(--fi-space-md);
}

.author-links a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fi-cyan);
  transition: color var(--fi-duration-fast) var(--fi-ease);
}

.author-links a:hover {
  color: var(--fi-navy);
}

@media (max-width: 480px) {
  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-links {
    justify-content: center;
  }
}


/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--fi-navy);
  border-top: 1px solid var(--fi-border);
  padding: var(--fi-space-2xl) var(--fi-space-xl);
}

.footer-inner {
  max-width: var(--fi-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--fi-space-md);
  font-size: 0.8125rem;
  color: var(--fi-muted-dark);
}

.footer-logo img {
  height: 24px;
  width: auto;
  opacity: 0.8;
  transition: opacity var(--fi-duration-fast) var(--fi-ease);
}

.footer-logo:hover img {
  opacity: 1;
}

.footer-logo span {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--fi-muted);
}

.footer-tagline {
  color: var(--fi-muted-dark);
  font-size: 0.8125rem;
}

.footer-copy {
  color: var(--fi-muted-dark);
  font-size: 0.8125rem;
}

.footer-inner a {
  color: var(--fi-muted);
  transition: color var(--fi-duration-fast) var(--fi-ease);
}

.footer-inner a:hover {
  color: var(--fi-cyan);
}


/* --------------------------------------------------------------------------
   15. PAGINATION
   -------------------------------------------------------------------------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--fi-space-lg);
  padding: var(--fi-space-2xl) var(--fi-space-xl);
  max-width: var(--fi-max-width);
  margin: 0 auto;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  gap: var(--fi-space-xs);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fi-cyan);
  transition: color var(--fi-duration-fast) var(--fi-ease);
}

.pagination a:hover {
  color: var(--fi-white);
}

.page-number {
  font-size: 0.8125rem;
  color: var(--fi-muted-dark);
}


/* --------------------------------------------------------------------------
   16. STATIC / CUSTOM PAGES
   -------------------------------------------------------------------------- */

.page .post-header {
  padding-top: var(--fi-space-4xl);
}

.page .post-title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
}


/* --------------------------------------------------------------------------
   17. TAG / AUTHOR ARCHIVE PAGES
   -------------------------------------------------------------------------- */

.tag-header,
.author-header {
  text-align: center;
  padding: var(--fi-space-3xl) var(--fi-space-xl) var(--fi-space-xl);
  max-width: var(--fi-max-width);
  margin: 0 auto;
}

.tag-header h1,
.author-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--fi-white);
  margin-bottom: var(--fi-space-md);
}

.tag-header p,
.author-header p {
  font-size: 1rem;
  color: var(--fi-muted);
  max-width: 600px;
  margin: 0 auto;
}


/* --------------------------------------------------------------------------
   18. ERROR PAGES
   -------------------------------------------------------------------------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: var(--fi-space-3xl) var(--fi-space-xl);
}

.error-code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 900;
  color: var(--fi-cyan);
  line-height: 1;
  letter-spacing: var(--fi-letter-tight);
}

.error-message {
  font-size: 1.125rem;
  color: var(--fi-muted);
  margin-top: var(--fi-space-md);
}

.error-link {
  display: inline-flex;
  margin-top: var(--fi-space-xl);
  padding: 0.75rem 2rem;
  background: var(--fi-cyan);
  color: var(--fi-navy);
  font-weight: 600;
  border-radius: 100px;
  font-size: 0.9375rem;
  transition: all var(--fi-duration) var(--fi-ease);
}

.error-link:hover {
  background: var(--fi-white);
}


/* --------------------------------------------------------------------------
   19. RESPONSIVE — MOBILE REFINEMENTS
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  .header-inner {
    padding: 0 var(--fi-space-md);
  }

  .home-hero {
    padding: var(--fi-space-2xl) var(--fi-space-md);
  }

  .featured-posts,
  .latest-posts {
    padding: var(--fi-space-xl) var(--fi-space-md);
  }

  .post-header {
    padding: var(--fi-space-xl) var(--fi-space-md) var(--fi-space-md);
  }

  .post-content,
  .gh-content {
    padding: 0 var(--fi-space-md) var(--fi-space-xl);
  }

  .post-feature-image {
    padding: 0 var(--fi-space-md);
  }

  .post-footer {
    padding: var(--fi-space-xl) var(--fi-space-md);
  }

  .site-footer {
    padding: var(--fi-space-xl) var(--fi-space-md);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .header-nav,
  .header-actions {
    display: none !important;
  }

  .burger {
    display: flex !important;
  }

  .post-title {
    text-align: left;
  }

  .post-header {
    text-align: left;
  }

  .post-meta {
    justify-content: flex-start;
  }
}


/* --------------------------------------------------------------------------
   20. PRINT STYLES
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .post-footer {
    display: none;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .post {
    background: white;
    color: black;
  }

  .post-title {
    color: black;
  }

  .gh-content a {
    color: black;
    text-decoration: underline;
  }

  .gh-content a::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
  }
}


/* --------------------------------------------------------------------------
   21. UTILITY CLASSES
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Fade in animation for page loads */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-main {
  animation: fadeIn 0.5s var(--fi-ease) forwards;
}

/* Accent colour utilities — for use with tag-based colouring */
.accent-sienna   { color: var(--fi-sienna); }
.accent-emerald  { color: var(--fi-emerald); }
.accent-violet   { color: var(--fi-violet); }
.accent-gold     { color: var(--fi-gold); }
.accent-cyan     { color: var(--fi-cyan); }

/* ── Sharing bar ─────────────────────────────────────────────────────────── */
.share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--fi-space-lg) 0;
  border-top: 1px solid rgba(5, 13, 46, 0.1);
  border-bottom: 1px solid rgba(5, 13, 46, 0.1);
  margin-bottom: var(--fi-space-xl);
}

.share-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fi-muted-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.share-actions {
  display: flex;
  gap: var(--fi-space-sm);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease;
}

.share-btn:hover {
  opacity: 0.85;
}

.share-btn--linkedin {
  background: #0A66C2;
  color: #ffffff;
}

.share-btn--copy {
  background: rgba(5, 13, 46, 0.06);
  color: var(--fi-navy);
}

/* ── Author link icons ───────────────────────────────────────────────────── */
.author-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  color: var(--fi-cyan);
  text-decoration: none;
  margin-right: var(--fi-space-md);
}

.author-link:hover {
  opacity: 0.8;
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  max-width: 1100px;
  margin: 0 auto var(--fi-space-xl);
  padding: 0 var(--fi-space-lg);
}

.filter-buttons {
  display: flex;
  gap: var(--fi-space-sm);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--fi-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--fi-cyan);
  color: var(--fi-cyan);
}

.filter-btn.active {
  background: var(--fi-cyan);
  border-color: var(--fi-cyan);
  color: var(--fi-navy);
}

/* ── Founding series section ─────────────────────────────────────────────── */
.founding-series {
  max-width: 1100px;
  margin: 0 auto var(--fi-space-xxl);
  padding: 0 var(--fi-space-lg);
}

.series-description {
  color: var(--fi-muted);
  font-size: 0.9375rem;
  margin-top: -8px;
  margin-bottom: var(--fi-space-xl);
}


/* ── Series grid — DEFINITIVE (single block, no overrides) ──────────────── */
.series-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) 1.6fr;
  gap: 12px;
  align-items: stretch;
}

.series-card {
  display: flex;
  gap: 10px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  align-items: flex-start;
  box-sizing: border-box;
}

.series-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
}

.series-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: #00BDFF;
  line-height: 1;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.series-card-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.series-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Signup card */
.series-card--signup {
  background: rgba(0, 189, 255, 0.06);
  border-color: rgba(0, 189, 255, 0.2);
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  cursor: default;
}

.series-card--signup:hover {
  background: rgba(0, 189, 255, 0.09);
  border-color: rgba(0, 189, 255, 0.3);
}

.series-signup-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.series-signup-heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.series-signup-sub {
  font-size: 0.75rem;
  color: var(--fi-muted);
  margin: 0 0 6px 0;
}

.series-signup-form {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.series-signup-input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #ffffff;
  font-size: 0.75rem;
  outline: none;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.series-signup-input::placeholder { color: var(--fi-muted); }
.series-signup-input:focus { border-color: #00BDFF; }

.series-signup-btn {
  padding: 8px 14px;
  border-radius: 5px;
  border: none;
  background: #00BDFF;
  color: #050D2E;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.series-signup-btn:hover { opacity: 0.85; }

.series-signup-success {
  font-size: 0.75rem;
  color: #00BDFF;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1100px) {
  .series-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .series-card--signup {
    grid-column: span 3;
  }
}

@media (max-width: 640px) {
  .series-grid {
    grid-template-columns: 1fr;
  }
  .series-card--signup {
    grid-column: span 1;
  }
}

/* ── Tag colours ─────────────────────────────────────────────────────────── */
.series-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.industry-tag   { color: #C9A227; }
.regulatory-tag { color: #E07B4F; }
.outcomes-tag   { color: #4AA882; }
.data-tag       { color: #9080F8; }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--fi-space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--fi-space-xl);
}

.filter-buttons {
  display: flex;
  gap: var(--fi-space-sm);
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--fi-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover            { border-color: #00BDFF; color: #00BDFF; }
.filter-btn.active           { background: #00BDFF; border-color: #00BDFF; color: #050D2E; }

.filter-btn--industry:hover  { border-color: #C9A227; color: #C9A227; }
.filter-btn--industry.active { background: #C9A227; border-color: #C9A227; color: #050D2E; }

.filter-btn--regulatory:hover  { border-color: #E07B4F; color: #E07B4F; }
.filter-btn--regulatory.active { background: #E07B4F; border-color: #E07B4F; color: #050D2E; }

.filter-btn--outcomes:hover  { border-color: #4AA882; color: #4AA882; }
.filter-btn--outcomes.active { background: #4AA882; border-color: #4AA882; color: #050D2E; }

.filter-btn--data:hover  { border-color: #9080F8; color: #9080F8; }
.filter-btn--data.active { background: #9080F8; border-color: #9080F8; color: #050D2E; }

/* ── Search button ───────────────────────────────────────────────────────── */
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--fi-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.search-btn:hover { border-color: #00BDFF; color: #00BDFF; }

/* ── Founding series section ─────────────────────────────────────────────── */
.founding-series {
  max-width: 1100px;
  margin: 0 auto var(--fi-space-xxl);
  padding: 0 var(--fi-space-lg);
}

.section-label--white { color: #ffffff; }

.series-description { margin-bottom: var(--fi-space-xl); }

.series-description-highlight {
  color: #00BDFF;
  font-weight: 600;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.home-hero { border-bottom: none !important; }
.home-hero::after { display: none !important; }

/* ── v31 — match founding series width to page container ─────────────────── */
.founding-series {
  max-width: var(--fi-max-width) !important;
  padding: 0 var(--fi-space-xl) var(--fi-space-xxl) !important;
}

/* ── v32 — align founding series to page container ───────────────────────── */
.founding-series {
  max-width: var(--fi-max-width) !important;
  margin: 0 auto var(--fi-space-xxl) !important;
  padding: 0 var(--fi-space-xl) !important;
}

/* ── v33 — In The Press section ──────────────────────────────────────────── */
.filter-btn--press:hover,
.filter-btn--press.active {
  background: #00BDFF;
  color: #050D2E;
  border-color: #00BDFF;
}

.in-the-press {
  max-width: var(--fi-max-width) !important;
  margin: 0 auto var(--fi-space-xxl) !important;
  padding: 0 var(--fi-space-xl) !important;
}
.section-label--press { color: #00BDFF; }

.in-the-press {
  max-width: var(--fi-max-width) !important;
  margin: 0 auto var(--fi-space-xxl) !important;
  padding: 0 var(--fi-space-xl) !important;
}

/* ── v33 fixes ───────────────────────────────────────────────────────────── */
/* Remove any underline/border on search button */
.search-btn { border-bottom: none !important; text-decoration: none !important; }
/* Remove cyan underline from filter bar */
.filter-bar { border-bottom: none !important; }
.filter-buttons { border-bottom: none !important; }
/* Press section label */
.section-label--press { color: #00BDFF; }
.in-the-press {
  max-width: var(--fi-max-width) !important;
  margin: 0 auto var(--fi-space-xxl) !important;
  padding: 0 var(--fi-space-xl) !important;
}

/* ── Sodo Search override — remove cyan underline ────────────────────────── */
.filter-buttons .search-btn::after,
.filter-buttons .search-btn::before,
button.search-btn::after,
button.search-btn::before {
  display: none !important;
  content: none !important;
}
.search-btn {
  border-bottom: none !important;
  text-decoration: none !important;
  position: relative;
}
