/* Post Page Styles - Additive to css/styles.css */
/* Uses existing CSS variables from :root */

/* Override fixed header for static blog pages */
/* Fixed positioning can cause issues in iframes/webviews */
header {
  position: relative !important;
  display: block !important;
  visibility: visible !important;
}

/* Post Layout */
.post-main {
  padding-top: 0; /* No need for padding since header is now relative */
  padding-bottom: 60px;
  min-height: 100vh;
}

/* Hero Image */
.post-hero {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.post-hero-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .post-hero {
    margin-bottom: 24px;
    padding: 0 16px;
  }
  
  .post-hero-image {
    border-radius: 8px;
  }
}

/* Single Column Container */
.post-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .post-container {
    padding: 0 16px;
  }
}

.post-article {
  max-width: 100%;
  min-width: 0;
}

/* Sidebar - hidden by default, kept for backwards compatibility */
.post-sidebar {
  display: none;
}

/* Pre-banner Navigation */
.pre-banner-nav {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 24px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-gray);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1;
}

.back-link:hover {
  color: var(--primary-blue);
}

.back-link i {
  font-size: 12px;
}

/* Separator between back link and pill */
.pre-banner-nav .topic-pill {
  margin-left: 4px;
}

.topic-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  line-height: 1;
  transition: opacity 0.2s;
}

.topic-pill:hover {
  opacity: 0.85;
}

.topic-pill.pill-strategy { background: #e0f4fc; color: #0091d2; }
.topic-pill.pill-security { background: #e0f5e8; color: #059669; }
.topic-pill.pill-design { background: #e0e8fc; color: #4f46e5; }
.topic-pill.pill-roi { background: #fef3c7; color: #d97706; }
.topic-pill.pill-governance { background: #fce7f3; color: #db2777; }
.topic-pill.pill-architecture { background: #ede9fe; color: #7c3aed; }

/* Inline TOC */
.inline-toc {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0 32px;
}

.inline-toc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.inline-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.inline-toc-list li {
  margin-bottom: 8px;
}

.inline-toc-list li:last-child {
  margin-bottom: 0;
}

.inline-toc-list a {
  color: var(--text-gray);
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.inline-toc-list a:hover {
  color: var(--primary-blue);
}

.inline-toc-list a::before {
  content: "→";
  color: var(--primary-blue);
  font-size: 12px;
}

/* Post Label Pill */
.post-label {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.label-blog {
  background: var(--primary-blue);
  color: #ffffff;
}

.label-case-study {
  background: var(--primary-dark);
  color: #ffffff;
}

/* Post Header */
.post-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
}

.post-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.post-description {
  font-size: 1.15rem;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Post Meta Row */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.post-meta i {
  margin-right: 6px;
  color: var(--primary-blue);
}

.post-author,
.post-date,
.post-reading-time {
  display: inline-flex;
  align-items: center;
}

/* TLDR Card */
.tldr-card {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 32px;
  position: relative;
}

.tldr-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-blue);
  border-radius: 8px 0 0 8px;
}

.tldr-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.tldr-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tldr-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-dark);
  line-height: 1.5;
}

.tldr-list li:last-child {
  margin-bottom: 0;
}

.tldr-list li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: 600;
}

/* Mobile TOC Toggle */
.post-toc-mobile {
  display: none;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .post-toc-mobile {
    display: block;
  }
}

.toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: background 0.2s;
}

.toc-toggle:hover {
  background: var(--bg-light);
}

.toc-toggle i {
  transition: transform 0.2s;
}

.toc-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.toc-mobile-content {
  display: none;
  margin-top: 12px;
}

.toc-mobile-content.expanded {
  display: block;
}

.toc-mobile-content .post-toc {
  margin-bottom: 0;
}

/* Table of Contents */
.post-toc {
  display: block; /* Override global nav { display: flex } */
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Sticky TOC for Sidebar */
.post-toc-sticky {
  position: sticky;
  top: 120px;
  margin-bottom: 0;
}

.toc-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-list li:last-child {
  margin-bottom: 0;
}

.toc-list a {
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  display: block;
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--primary-blue);
}

.toc-list .toc-sub {
  padding-left: 16px;
}

.toc-list .toc-sub a {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Post Content */
.post-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-dark);
}

.post-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 48px;
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.post-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.post-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 32px;
  margin-bottom: 16px;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content strong {
  font-weight: 600;
  color: var(--text-dark);
}

.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content a {
  color: var(--primary-blue);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

/* Checklist */
.checklist {
  list-style: none;
  padding-left: 0;
  background: var(--bg-light);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.checklist-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-blue);
  border-radius: 4px;
  margin-top: 2px;
  position: relative;
}

.checkbox::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid var(--primary-blue);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0.3;
}

/* Callouts */
.callout {
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
  position: relative;
}

.callout::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 8px 0 0 8px;
}

.callout p {
  margin: 0;
}

.callout-why {
  background: var(--bg-light);
}

.callout-why::before {
  background: var(--primary-blue);
}

.callout-risk {
  background: var(--bg-light);
}

.callout-risk::before {
  background: var(--text-gray);
}

.callout-mitigation {
  background: var(--bg-light);
}

.callout-mitigation::before {
  background: var(--primary-dark);
}

/* Framework Grid */
.framework-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

@media (max-width: 600px) {
  .framework-grid {
    grid-template-columns: 1fr;
  }
}

.framework-card {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--border-light);
}

.framework-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.framework-text {
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin: 0;
}

/* Code blocks */
.post-content pre {
  background: var(--text-dark);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.post-content code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.9rem;
}

.post-content p code {
  background: var(--bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--text-dark);
}

.post-content pre code {
  background: none;
  padding: 0;
  color: var(--bg-light);
}

/* Responsive */
@media (max-width: 768px) {
  .post-title {
    font-size: 1.8rem;
  }
  
  .post-content h2 {
    font-size: 1.4rem;
  }
  
  .post-content h3 {
    font-size: 1.15rem;
  }
  
  .post-container {
    padding: 0 16px;
  }
  
  .post-meta {
    gap: 12px;
    font-size: 0.85rem;
  }
}

/* Accessibility - visually hidden but available to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Contained Width Utilities for Detail Pages (cw-*)
   Reversible: delete this block to revert
   ======================================== */

.cw-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .cw-detail {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
  
  /* When using cw-detail, show sidebar below content instead of hiding */
  .cw-detail .post-sidebar {
    display: block;
    order: 2;
    margin-top: 32px;
  }
}

.cw-article {
  max-width: 760px;
}

/* ========================================
   Section Breaks (invisible for case studies)
   ======================================== */
.section-break {
  height: 0;
  border: 0;
  margin: 40px 0;
  visibility: hidden;
}

/* ========================================
   Diagram Card (Mermaid wrapper)
   ======================================== */
.diagram-card {
  background: #ffffff;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  overflow-x: auto;
}

.diagram-card .mermaid {
  background: transparent;
  display: flex;
  justify-content: center;
}

.diagram-card .mermaid svg {
  max-width: 100%;
  height: auto;
}

/* ========================================
   Lottie Embeds
   ======================================== */
.lottie-embed {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

.lottie-embed lottie-player {
  max-width: 100%;
}

/* ========================================
   Full-Page Background Gradient (A/B Test)
   ======================================== */
body.case-study.bg-full {
  background: linear-gradient(
    to bottom,
    #f8fafc 0%,
    #fafbfc 15%,
    #fcfcfd 35%,
    #fefefe 55%,
    #ffffff 75%,
    #ffffff 100%
  );
  background-attachment: fixed;
}

body.case-study.bg-full .top-band {
  background: transparent;
}

body.case-study.bg-full .top-band::after {
  display: none;
}

body.case-study.bg-full .post-container {
  background: transparent;
}

body.case-study.bg-full .post-article {
  background: transparent;
}

body.case-study.bg-full .tldr-card,
body.case-study.bg-full .module-exec-summary,
body.case-study.bg-full .module-what-transfers,
body.case-study.bg-full .module-operating-model,
body.case-study.bg-full .module-failure-modes,
body.case-study.bg-full .module-outcomes,
body.case-study.bg-full .module-architecture {
  background: var(--bg-white, #ffffff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ========================================
   Top Band (hero tint extension) - Default
   ======================================== */
.top-band {
  background: var(--bg-light, #f8fafc);
  position: relative;
}

.top-band::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-white, #ffffff) 100%);
  pointer-events: none;
}

.top-band-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.top-band-content .tldr-card {
  background: var(--bg-white, #ffffff);
}

.top-band-content .module-exec-summary {
  background: var(--bg-white, #ffffff);
}

@media (max-width: 768px) {
  .top-band-content {
    padding: 0 16px 48px;
  }
  
  .top-band::after {
    height: 60px;
  }
}

/* ========================================
   Case Study Hero - Simplified (text-only)
   ======================================== */
.case-study-hero-simple {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 24px;
}

.case-study-hero-simple .back-link {
  margin-bottom: 12px;
}

.case-study-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin: 0 0 12px 0;
}

.case-study-subhead {
  font-size: 1.1rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .case-study-hero-simple {
    padding: 24px 16px 20px;
  }
  
  .case-study-title {
    font-size: 1.75rem;
  }
  
  .case-study-subhead {
    font-size: 1rem;
  }
}

/* ========================================
   Blog Hero - Unified with Case Study
   ======================================== */
.blog-hero-simple {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 24px;
}

.blog-hero-simple .back-link {
  margin-bottom: 12px;
}

.blog-hero-simple .post-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin: 0 0 12px 0;
}

.post-subhead {
  font-size: 1.1rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin: 0;
}

.blog-hero-image-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

.blog-hero-image-container .post-hero-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .blog-hero-simple {
    padding: 24px 16px 20px;
  }
  
  .blog-hero-simple .post-title {
    font-size: 1.75rem;
  }
  
  .post-subhead {
    font-size: 1rem;
  }
  
  .blog-hero-image-container {
    padding: 0 16px 20px;
  }
  
  .blog-hero-image-container .post-hero-image {
    border-radius: 8px;
  }
}

/* ========================================
   Skim Strip (metadata pills)
   ======================================== */
.skim-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.skim-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-light);
  color: var(--text-gray);
  border: 1px solid var(--border-light);
}

.skim-pill i {
  font-size: 0.75rem;
}

.skim-category {
  background: #e0f4fc;
  color: #0091d2;
  border-color: #b3e5fc;
}

.skim-tier {
  background: #ede9fe;
  color: #7c3aed;
  border-color: #ddd6fe;
}

.skim-confidence {
  background: #e0f5e8;
  color: #059669;
  border-color: #a7f3d0;
}

.skim-timeline {
  background: #fef3c7;
  color: #d97706;
  border-color: #fde68a;
}

.skim-demo {
  background: #fce7f3;
  color: #db2777;
  border-color: #fbcfe8;
}

.skim-scope {
  background: var(--bg-light);
  color: var(--text-gray);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skim-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.skim-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-gray);
}

.skim-meta-item i {
  font-size: 0.8rem;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .skim-strip {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .skim-meta {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* ========================================
   Action Chips Row (scope-derived)
   ======================================== */
.action-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ========================================
   CTA Module (bottom of case study)
   ======================================== */
.cta-module {
  margin-top: 48px;
  padding: 32px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e8f4fc 50%, #f5fafd 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.cta-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 12px 0;
}

.cta-body {
  font-size: 1rem;
  color: var(--text-gray);
  line-height: 1.6;
  margin: 0 0 20px 0;
  max-width: 600px;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.cta-btn:hover {
  transform: translateY(-2px);
}

.cta-btn-primary,
.post-content .cta-btn-primary {
  background: var(--primary-blue);
  color: #ffffff;
}

.cta-btn-primary:hover,
.post-content .cta-btn-primary:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

.cta-btn-secondary {
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid #e2e8f0;
}

.cta-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

@media (max-width: 768px) {
  .cta-module {
    padding: 24px 20px;
    margin-top: 32px;
  }
  
  .cta-title {
    font-size: 1.1rem;
  }
  
  .cta-body {
    font-size: 0.95rem;
  }
  
  .cta-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* ========================================
   Title Row with Icon Badge
   ======================================== */
.case-study-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hero-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-blue);
  color: #ffffff;
  border-radius: 8px;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .hero-icon-badge {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    margin-top: 2px;
  }
}

/* ========================================
   Flow Pills Strip
   ======================================== */
.flow-pills-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.flow-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background: linear-gradient(135deg, #e0f4fc 0%, #f0f9ff 100%);
  color: #0077b6;
  border: 1px solid #b3e5fc;
  white-space: nowrap;
}

.flow-arrow {
  display: inline-flex;
  align-items: center;
  color: var(--text-light);
  font-size: 0.6rem;
}

@media (max-width: 768px) {
  .flow-pills-strip {
    gap: 4px;
    margin-top: 12px;
  }
  
  .flow-pill {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 10px;
  }
  
  .flow-arrow {
    font-size: 0.5rem;
  }
}

/* ========================================
   Workflow Card (with diagram stage)
   ======================================== */
.workflow-card {
  background: var(--bg-white, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.workflow-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.diagram-stage {
  background: #f7f9fc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
}

.diagram-stage .diagram-card {
  margin: 0;
  border: none;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.diagram-stage .mermaid {
  display: flex;
  justify-content: center;
}

.diagram-stage .mermaid svg {
  max-width: 100%;
  height: auto;
}

.workflow-caption {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  font-style: normal;
}

@media (max-width: 768px) {
  .workflow-card {
    padding: 16px 18px;
    margin-bottom: 20px;
  }
  
  .workflow-card-title {
    font-size: 0.9rem;
  }
  
  .diagram-stage {
    padding: 14px;
  }
  
  .workflow-caption {
    font-size: 0.75rem;
  }
}

/* ========================================
   Teaser Card (high-attention metric hero)
   ======================================== */
.card--teaser {
  background: linear-gradient(135deg, #f0f9ff 0%, #e8f4fc 50%, #f5fafd 100%);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 145, 210, 0.06);
}

.card--teaser::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary-blue) 0%, #0077b6 100%);
  border-radius: 12px 0 0 12px;
}

.teaser-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.teaser-helper {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0 0 16px 0;
  font-style: normal;
}

.teaser-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-white, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
}

.teaser-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-white, #ffffff);
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.teaser-item:last-child {
  border-bottom: none;
}

.teaser-item:nth-child(odd) {
  background: var(--bg-light, #f8fafc);
}

.teaser-metric-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.teaser-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 145, 210, 0.1);
  color: var(--primary-blue);
  border-radius: 6px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.teaser-metric {
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
  line-height: 1.3;
}

.teaser-estimate {
  font-size: 1.1rem;
  color: var(--primary-blue);
  font-weight: 700;
  background: rgba(0, 145, 210, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .card--teaser {
    padding: 16px 18px;
  }
  
  .teaser-item {
    padding: 10px 12px;
  }
  
  .teaser-icon {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
  
  .teaser-metric {
    font-size: 0.85rem;
  }
  
  .teaser-estimate {
    font-size: 0.95rem;
    padding: 5px 10px;
  }
}

/* ========================================
   Module Cards (v2a)
   ======================================== */
.module-exec-summary,
.module-what-transfers,
.module-operating-model,
.module-failure-modes,
.module-outcomes,
.module-architecture {
  background: var(--bg-white, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

.module-exec-summary {
  border-left: 4px solid var(--primary-blue);
}

.module-what-transfers {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid var(--primary-blue);
  position: relative;
}

.module-what-transfers::before {
  content: "Key Insight";
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--primary-blue);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 10px;
}

.module-what-transfers h4:first-of-type {
  margin-top: 8px;
}

.module-operating-model {
  background: var(--bg-light);
}

.post-content .module-operating-model table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.post-content .module-operating-model th,
.post-content .module-operating-model td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.post-content .module-operating-model th {
  background: var(--bg-white);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-gray);
}

.post-content .module-operating-model td {
  font-size: 0.95rem;
}

.post-content .module-operating-model tr:last-child td {
  border-bottom: none;
}

.module-failure-modes {
  background: #fef2f2;
  border-color: #fecaca;
  border-left: 4px solid #ef4444;
}

.module-failure-modes h4:first-of-type {
  color: #dc2626;
}

.module-failure-modes ul {
  margin: 0;
  padding-left: 20px;
}

.module-failure-modes li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.module-outcomes {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.post-content .module-outcomes table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.post-content .module-outcomes th,
.post-content .module-outcomes td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #86efac;
}

.post-content .module-outcomes th {
  background: #dcfce7;
  font-weight: 600;
  font-size: 0.85rem;
  color: #166534;
}

.post-content .module-outcomes td {
  font-size: 0.95rem;
}

.post-content .module-outcomes tr:last-child td {
  border-bottom: none;
}

.module-architecture {
  background: var(--bg-light);
}

.module-architecture .diagram-card {
  margin: 16px 0 0;
}

/* Responsive module adjustments */
@media (max-width: 768px) {
  .module-exec-summary,
  .module-what-transfers,
  .module-operating-model,
  .module-failure-modes,
  .module-outcomes,
  .module-architecture {
    padding: 16px;
    margin: 24px 0;
  }
  
  .module-operating-model th,
  .module-operating-model td,
  .module-outcomes th,
  .module-outcomes td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* ========================================
   Table Readability Styles
   ======================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

.post-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  background: var(--bg-white, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
}

.post-content th,
.post-content td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.post-content th {
  background: var(--bg-light, #f8fafc);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-gray, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.post-content tbody tr:nth-child(even) {
  background: var(--bg-light, #f8fafc);
}

.post-content tbody tr:last-child td {
  border-bottom: none;
}

.post-content td {
  color: var(--text-dark, #1e293b);
}

@media (max-width: 768px) {
  .post-content th,
  .post-content td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .post-content th {
    font-size: 0.75rem;
  }
}

/* ========================================
   Diagram Modal (Click-to-Zoom)
   ======================================== */
.diagram-card svg,
.diagram-stage svg {
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.diagram-card svg:hover,
.diagram-stage svg:hover {
  opacity: 0.9;
}

.diagram-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 20px;
  box-sizing: border-box;
}

.diagram-modal--open {
  opacity: 1;
  visibility: visible;
}

.diagram-modal__content {
  position: relative;
  width: 90vw;
  max-width: 1200px;
  max-height: 90vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 48px 32px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.diagram-modal__content svg {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 85vh;
}

.diagram-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #64748b;
  font-size: 16px;
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 10;
}

.diagram-modal__close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.diagram-modal__close:focus {
  outline: 2px solid var(--primary-blue, #0091d2);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .diagram-modal {
    padding: 12px;
  }
  
  .diagram-modal__content {
    padding: 16px;
    border-radius: 8px;
  }
  
  .diagram-modal__close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* Blog post meta footer - date and reading time at bottom */
.post-meta-footer {
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light, #e2e8f0);
}

/* ========================================
   Format Pill (Deep Dive / Post)
   ======================================== */
.format-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.format-deep-dive {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
}

.format-tactical {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  color: white;
}

.format-opinion {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: white;
}

.format-infographic {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
}

.format-post {
  background: #f1f5f9;
  color: #64748b;
}

/* Category chip outline style (secondary visual hierarchy) */
.chip-category-outline {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #64748b;
  white-space: nowrap;
}

/* ========================================
   Longform Callouts
   ======================================== */
.callout-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 4px solid var(--primary-blue, #0091d2);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.callout-panel p {
  margin: 0;
}

.callout-panel p:first-child::first-line {
  font-weight: 600;
}

/* ========================================
   Pull Quote
   ======================================== */
.pullquote {
  position: relative;
  margin: 32px 0;
  padding: 24px 32px;
  border: none;
  background: transparent;
}

.pullquote::before {
  content: open-quote;
  position: absolute;
  top: -8px;
  left: 0;
  font-size: 4rem;
  font-family: Georgia, serif;
  color: var(--primary-blue, #0091d2);
  opacity: 0.3;
  line-height: 1;
}

.pullquote p {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-dark, #1e293b);
  margin: 0;
  font-style: italic;
}

/* ========================================
   Table Wrap (mobile scrolling)
   ======================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table-wrap th,
.table-wrap td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.table-wrap th {
  background: var(--bg-light, #f8fafc);
  font-weight: 600;
  color: var(--text-dark, #1e293b);
  white-space: nowrap;
}

.table-wrap tr:hover td {
  background: rgba(0, 145, 210, 0.03);
}

@media (max-width: 768px) {
  .pullquote {
    padding: 16px 20px;
    margin: 24px 0;
  }
  
  .pullquote::before {
    font-size: 3rem;
    top: -4px;
  }
  
  .pullquote p {
    font-size: 1.1rem;
  }
  
  .callout-panel {
    padding: 16px 20px;
    margin: 20px 0;
  }
  
  .table-wrap th,
  .table-wrap td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* ========================================
   Tile Grid (GRID:2 / GRID:3 blocks)
   ======================================== */
.tile-grid {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.tile-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.tile-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.tile {
  background: var(--bg-light, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  padding: 16px 20px;
  line-height: 1.6;
}

.tile-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark, #1e293b);
  margin: 0 0 6px 0;
}

.tile-body {
  font-size: 0.9rem;
  color: var(--text-secondary, #475569);
  margin: 0;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .tile-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tile-grid.cols-2,
  .tile-grid.cols-3 {
    grid-template-columns: 1fr;
  }
  
  .tile {
    padding: 14px 16px;
  }
}

/* ========================================
   Widget Mount & Widget Card
   ======================================== */
.widget-mount {
  margin: 32px 0;
}

.widget-card {
  background: var(--bg-light, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  padding: 24px;
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark, #1e293b);
  margin: 0 0 8px 0;
}

.widget-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary, #64748b);
  margin: 0 0 20px 0;
}

.widget-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.widget-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.widget-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark, #1e293b);
}

.widget-field input {
  padding: 10px 12px;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.widget-field input:focus {
  outline: none;
  border-color: var(--primary-blue, #0091d2);
  box-shadow: 0 0 0 3px rgba(0, 145, 210, 0.1);
}

.widget-field input::placeholder {
  color: var(--text-muted, #94a3b8);
}

.widget-pair-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-pair-inputs input {
  flex: 1;
}

.widget-arrow {
  color: var(--text-secondary, #64748b);
  font-size: 1.1rem;
}

.widget-sequence-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.widget-sequence-row {
  display: flex;
  gap: 8px;
}

.widget-sequence-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
}

.widget-sequence-row input:focus {
  outline: none;
  border-color: var(--primary-blue, #0091d2);
  box-shadow: 0 0 0 3px rgba(0, 145, 210, 0.1);
}

.widget-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.widget-btn-remove {
  width: 36px;
  height: 36px;
  padding: 0;
  background: white;
  border: 1px solid var(--border-light, #e2e8f0);
  color: var(--text-secondary, #64748b);
  font-size: 1.2rem;
  line-height: 1;
}

.widget-btn-remove:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.widget-btn-add {
  background: white;
  border: 1px dashed var(--border-light, #e2e8f0);
  color: var(--text-secondary, #64748b);
  align-self: flex-start;
}

.widget-btn-add:hover {
  border-color: var(--primary-blue, #0091d2);
  color: var(--primary-blue, #0091d2);
}

.widget-output {
  background: white;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.widget-output-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary, #64748b);
  margin-bottom: 8px;
}

.widget-output-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-dark, #1e293b);
  min-height: 48px;
}

.widget-actions {
  display: flex;
  gap: 12px;
}

.widget-btn-primary {
  background: var(--primary-blue, #0091d2);
  border: 1px solid var(--primary-blue, #0091d2);
  color: white;
}

.widget-btn-primary:hover {
  background: #0082bd;
}

.widget-btn-secondary {
  background: white;
  border: 1px solid var(--border-light, #e2e8f0);
  color: var(--text-secondary, #64748b);
}

.widget-btn-secondary:hover {
  background: var(--bg-light, #f8fafc);
}

@media (max-width: 600px) {
  .widget-card {
    padding: 16px;
  }
  
  .widget-pair-inputs {
    flex-direction: column;
    align-items: stretch;
  }
  
  .widget-arrow {
    text-align: center;
    transform: rotate(90deg);
    margin: 4px 0;
  }
  
  .widget-actions {
    flex-direction: column;
  }
  
  .widget-btn {
    width: 100%;
    text-align: center;
  }
}

/* ========================================
   Footer Styles for Static Pages
   Matches styles.css footer + adds social link icon
   ======================================== */

.site-footer {
  background: #0a2540;
  color: white;
  padding: 60px 0 30px;
  border-top: none;
  text-align: left;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: white;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: white;
}

.footer-col p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-follow-btn {
  display: inline-block;
  background: var(--primary-blue, #0091d2);
  color: white;
  padding: 10px 24px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.footer-follow-btn:hover {
  background: var(--primary-dark, #0082bd);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-blue, #0091d2);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  font-size: 18px;
  transition: background 0.2s, transform 0.2s;
}

.footer-social-link:hover {
  background: var(--primary-dark, #0082bd);
  transform: scale(1.05);
}

.footer-social-link i {
  display: block;
}

.footer-bottom {
  border-top: 1px solid #1e3a5f;
  padding-top: 24px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}
