/* Story Series Styles - Self-contained CSS for story functionality */

/* ============================================================================
   GLOBAL OVERFLOW PREVENTION - Prevent horizontal scrolling
   ============================================================================ */

html {
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
}

/* Prevent any element from causing horizontal overflow */
* {
  max-width: 100%;
}

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* ============================================================================
   FREIGHT SANS PRO FONT FACE DECLARATIONS
   ============================================================================ */

/* Light (300) */
@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProLight-Regular.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProLight-Italic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

/* Book/Regular (400) */
@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProBook-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProBook-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Medium (500) */
@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProMedium-Regular.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProMedium-Italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

/* Semibold (600) */
@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProSemibold-Regular.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProSemibold-Italic.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* Bold (700) */
@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProBold-Regular.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProBold-Italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Black (900) */
@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProBlack-Regular.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Freight Sans Pro';
  src: url('../fonts/FreightSansProBlack-Italic.woff2') format('woff2');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/* ============================================================================
   SITE NAVIGATION MENU
   ============================================================================ */
.site-navigation {
  background: var(--body-bg, #fff);
  border-bottom: 1px solid var(--border-color, #eee);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 10000 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  pointer-events: auto !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Override any story-mode rules that set z-index to -1 */
.story-mode .site-navigation {
  z-index: 10000 !important;
  position: sticky !important;
}

.site-navigation * {
  pointer-events: auto !important;
}

/* Styles for Ghost's {{navigation}} helper output (uses .nav class) */
.site-navigation ul.nav,
.site-navigation .nav,
.nav-container ul.nav,
ul.nav {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 2rem;
  align-items: center;
  pointer-events: auto !important;
}

.site-navigation .nav li,
.nav-container .nav li,
ul.nav li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  list-style-type: none !important;
  display: inline-block;
  pointer-events: auto !important;
}

.site-navigation .nav a,
ul.nav a {
  color: var(--text-color, #333);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative;
  z-index: 10001;
}

.site-navigation .nav a:hover,
ul.nav a:hover {
  color: var(--accent-color, #4fb1ba);
  border-bottom-color: var(--accent-color, #4fb1ba);
  text-decoration: none;
}

/* Ensure navigation links are always clickable */
.site-navigation a,
.nav-container a,
ul.nav a {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 10001 !important;
  position: relative !important;
}

/* Exclude badge from nav link hover effects */
.not-by-ai-badge {
  border-bottom: none !important;
}

.not-by-ai-badge:hover {
  border-bottom: none !important;
  color: inherit !important;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 10001 !important;
  position: relative;
}

.nav-logo:hover {
  opacity: 0.8;
}

.site-logo {
  max-height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.site-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading-color, #333);
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  transition: color 0.2s ease;
}

.nav-logo:hover .site-logo-text {
  color: var(--accent-color, #4fb1ba);
}

/* Not By AI Badge */
.not-by-ai-badge {
  display: flex;
  align-items: center;
  text-decoration: none !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 10001 !important;
  position: relative;
  margin-left: 1rem;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.not-by-ai-badge:hover {
  opacity: 0.8;
}

.not-by-ai-badge svg {
  height: 40px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  align-items: center;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a,
.nav-menu .nav-link {
  color: var(--text-color, #333);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  pointer-events: auto !important;
  cursor: pointer !important;
  display: inline-block;
  position: relative;
  z-index: 1001;
}

.nav-menu a:hover {
  color: var(--accent-color, #4fb1ba);
  border-bottom-color: var(--accent-color, #4fb1ba);
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .nav-menu-wrapper {
    flex: 1 1 auto;
    min-width: 0;
  }
  
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .not-by-ai-badge {
    flex-shrink: 0;
    margin-left: 0.5rem;
  }
}

/* ============================================================================
   RSS ICON STYLES
   ============================================================================ */
/* RSS Icon Component */
.rss-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* RSS Icon in view toggle (main story index) */
.view-rss {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: var(--text-color, #333);
}

.view-rss:hover {
  background-color: var(--hover-bg, rgba(0, 0, 0, 0.1));
  transform: scale(1.05);
}

/* RSS Icon in story header (individual story pages) */
.story-header {
  position: relative;
}

.story-header-rss {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
}

.story-rss-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  text-decoration: none;
}

.story-rss-link:hover {
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
}

.story-rss-link .rss-icon {
  width: 20px;
  height: 20px;
  color: #f26522; /* Standard RSS orange color */
}

/* Dark mode support for RSS icon in header */
@media (prefers-color-scheme: dark) {
  .story-rss-link {
    background-color: rgba(0, 0, 0, 0.8);
  }
  
  .story-rss-link:hover {
    background-color: rgba(0, 0, 0, 0.9);
  }
  
  .story-rss-link .rss-icon {
    color: #ff6b35; /* Brighter orange for dark mode */
  }
}

/* ============================================================================
   STORY MODE LAYOUT - Full width content with hidden sidebar
   ============================================================================ */

/* Completely disable and remove sidebar and related elements for story mode */
.story-mode #_drawer,
.story-mode hy-drawer,
.story-mode .sidebar,
.story-mode .sidebar-bg,
.story-mode .sidebar-sticky {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
  z-index: -1 !important;
}

/* Ensure no phantom sidebar elements are blocking clicks */
.story-mode {
  position: relative !important;
}

.story-mode .story-content {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  width: 100% !important;
  padding: 1rem !important;
  padding-bottom: 8rem !important; /* Ensure content doesn't get cut off and footer doesn't overlap */
  min-height: calc(100vh - 100px); /* Push footer down */
  position: relative !important;
  z-index: 1 !important;
}

/* Ensure all story content is clickable */
.story-mode .story-content * {
  pointer-events: auto !important;
}

/* Reset any fixed positioning that might interfere */
.story-mode hy-push-state {
  position: static !important;
}

/* Make sure main content takes full width and is clickable */
.story-mode #_main {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  position: relative !important;
  z-index: 1 !important;
  box-sizing: border-box !important;
}

/* Ensure main element is always constrained */
main#_main,
main.content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Remove any drawer overlay or scrim elements */
.story-mode .hy-drawer-scrim,
.story-mode .drawer-scrim,
.story-mode [class*="scrim"],
.story-mode [class*="overlay"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Ensure body and html don't have conflicting styles in story mode */
.story-mode body,
.story-mode html {
  overflow-x: hidden !important;
  margin-left: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Remove any transforms or transitions that might interfere */
.story-mode * {
  transform: none !important;
}

/* Debug mode - uncomment the following to see click-blocking elements */
/*
.story-mode * {
  outline: 1px solid red !important;
  background: rgba(255, 0, 0, 0.1) !important;
}
.story-mode *:hover {
  background: rgba(0, 255, 0, 0.3) !important;
}
*/

/* 
JAVASCRIPT DEBUG SNIPPET - Add this to browser console to identify click blockers:
document.addEventListener('click', function(e) {
  e.preventDefault();
  console.log('Clicked element:', e.target);
  console.log('Element classes:', e.target.className);
  console.log('Element styles:', window.getComputedStyle(e.target));
  console.log('All elements at click point:', document.elementsFromPoint(e.clientX, e.clientY));
});
*/

/* Force remove any potential click-blocking pseudo-elements */
.story-mode *::before,
.story-mode *::after {
  display: none !important;
  content: none !important;
}

/* EXCEPT for navigation - ensure navigation pseudo-elements don't block */
.story-mode .site-navigation::before,
.story-mode .site-navigation::after,
.story-mode .nav-container::before,
.story-mode .nav-container::after,
.story-mode .nav-menu::before,
.story-mode .nav-menu::after {
  display: none !important;
  pointer-events: none !important;
}

/* Ensure no fixed or absolute positioned elements interfere */
.story-mode [style*="position: fixed"],
.story-mode [style*="position: absolute"],
.story-mode .fixed,
.story-mode .absolute {
  position: static !important;
}

/* Remove any z-index stacking that might block clicks */
/* EXCLUDE navigation from this rule - it needs to be on top */
.story-mode > *:not(.story-content):not(#_main):not(.site-navigation):not(nav) {
  z-index: -1 !important;
}

/* Ensure navigation is always clickable - highest priority */
.site-navigation,
.site-navigation *,
.nav-container,
.nav-container *,
.nav-menu,
.nav-menu *,
.nav-menu li,
.nav-menu a,
.nav-link,
.nav-logo,
.nav-logo * {
  pointer-events: auto !important;
  z-index: 10000 !important;
  position: relative;
  cursor: pointer !important;
}

/* Override any story-mode rules that might block navigation */
.story-mode .site-navigation,
.story-mode .site-navigation *,
.story-mode .nav-container,
.story-mode .nav-container *,
.story-mode .nav-menu,
.story-mode .nav-menu *,
.story-mode .nav-link,
.story-mode .nav-logo {
  pointer-events: auto !important;
  z-index: 10000 !important;
  position: relative !important;
}

/* Responsive padding adjustments */
@media (max-width: 768px) {
  .story-mode .story-content {
    padding: 1.5rem 1.5rem !important;
  }
}

@media (max-width: 480px) {
  .story-mode .story-content {
    padding: 1rem 1rem !important;
  }
}

/* ============================================================================
   HOME NAVIGATION BUTTON
   ============================================================================ */

/* Old home button styles - now in view-toggle panel
.story-home-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  padding: 12px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.story-home-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  transform: scale(1.05);
  text-decoration: none;
}

.story-home-btn svg {
  width: 24px;
  height: 24px;
}
*/

/* ============================================================================
   BLOG-INSPIRED TYPOGRAPHY AND CONTENT STYLES
   ============================================================================ */

/* Typography matching blog styles */
.story-content {
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.75;
  color: var(--body-color, #333);
  background: var(--body-bg, #fff);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.story-content h1,
.story-content h2,
.story-content h3,
.story-content h4,
.story-content h5,
.story-content h6 {
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--heading-color, #333);
  margin: 2rem 0 1rem 0;
}

.story-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.story-content h2 {
  font-size: 2rem;
  margin-top: 3rem;
}

.story-content h3 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
}

.story-content p {
  margin: 0 0 1.5rem 0;
  font-size: 1.1rem;
}

.story-content blockquote {
  margin: 2rem 0;
  padding: 1rem 2rem;
  border-left: 4px solid var(--accent-color, #4fb1ba);
  background: var(--gray-bg, rgba(0,0,0,.025));
  font-style: italic;
}

/* ============================================================================
   STORY INDEX PAGE STYLES
   ============================================================================ */

.story-index {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header with controls layout */
.story-header-with-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 2rem;
}

.story-title-section {
  flex: 1;
}

/* View toggle buttons - darker design */
.view-toggle {
  display: flex;
  gap: 0.25rem;
  background: #2a2a2a;
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
  border: 1px solid #444;
}

.view-btn {
  padding: 0.75rem;
  border: none;
  background: transparent;
  color: #999;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  text-decoration: none;
}

.view-btn:hover {
  background: #3a3a3a;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.view-btn.active {
  background: #3c9199; /* Darker shade of blog button blue */
  color: white;
  box-shadow: 0 2px 8px rgba(60, 145, 153, 0.4);
}

/* Divider between view toggle and home button */
.view-toggle-divider {
  width: 1px;
  height: 32px;
  background: #444;
  margin: 6px 8px;
}

/* Home button specific styling */
.view-btn.view-home {
  border-left: 1px solid #444;
  margin-left: 8px;
  padding-left: 1rem;
}

/* Remove any arrow icons from home button - just show home icon */
.view-btn.view-home .nav-arrow {
  display: none;
}

/* Override external link styling for home button */
.view-btn.view-home::after {
  content: none !important;
  display: none !important;
}

/* Ensure home button SVG is visible */
.view-btn.view-home svg {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Story Navigation Buttons - remove external link icons */
.story-nav-btn::after {
  content: none !important;
  display: none !important;
}

.story-nav-btn .nav-arrow {
  display: none !important;
}

.chapter-link.no-push-state::after {
  content: none !important;
  display: none !important;
}

.story-post-nav a.no-push-state::after {
  content: none !important;
  display: none !important;
}

.view-btn svg {
  transition: all 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .story-header-with-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .view-toggle {
    align-self: flex-end;
    margin-top: 1rem;
  }
}

.stories-container {
  margin-top: 2rem;
  margin-bottom: 4rem; /* Add bottom margin to separate from footer */
}

/* Grid view */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.story-tile {
  border-radius: 8px;
  overflow: hidden;
  background: var(--background, #fff);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  height: fit-content; /* Allow natural height based on content */
  display: flex;
  flex-direction: column;
}

.story-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.story-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.story-image {
  min-height: 180px;
  max-height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-bg, rgba(0, 0, 0, 0.025));
  border-radius: 8px 8px 0 0;
}

.story-image img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  object-position: center;
}

.story-content {
  padding: 1rem 1.5rem 0.75rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.story-content > *:last-child {
  margin-top: auto;
}

.story-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
  color: var(--accent-color, #4fb1ba);
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.story-description {
  margin: 0 0 0.3rem 0;
  color: var(--text-muted, #666);
  line-height: 1.4;
}

.story-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted, #666);
  margin-top: 0.15rem;
}

.post-count {
  font-weight: 500;
}

/* List view */
.stories-list {
  max-width: 100%;
  margin: 0 auto;
}

.story-list-item {
  border-bottom: 1px solid var(--border-color, #eee);
  padding: 1.5rem 0;
}

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

.story-list-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.story-list-link:hover .story-list-title {
  color: var(--accent-color, #4fb1ba);
}

.story-list-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  transition: color 0.2s;
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.story-list-description {
  margin: 0 0 0.75rem 0;
  color: var(--text-muted, #666);
  line-height: 1.5;
}

.story-list-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted, #666);
}

/* ============================================================================
   STORY TITLE PAGE STYLES
   ============================================================================ */

.story-title {
  max-width: 1000px;
  margin: 0 auto;
}

.story-breadcrumb {
  margin-bottom: 1rem;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--accent-color, #4fb1ba);
  font-size: 0.9rem;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.story-hero-image {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-bg, rgba(0, 0, 0, 0.025));
}

.story-hero-image img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.story-title-content {
  text-align: center;
  margin: 2rem 0;
}

.story-title-content .story-title {
  font-size: 2.5rem;
  margin: 0 0 1rem 0;
  color: var(--accent-color, #4fb1ba);
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.story-description {
  font-size: 1.1rem;
  color: var(--text-muted, #666);
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.6;
}

.story-metadata {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.story-author,
.story-genre {
  color: var(--text-muted, #666);
}

.story-status {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-ongoing {
  background: #e3f2fd;
  color: #1976d2;
}

.status-complete {
  background: #e8f5e8;
  color: #388e3c;
}

.status-paused {
  background: #fff3e0;
  color: #f57c00;
}

.story-intro {
  margin: 3rem 0;
  font-size: 1.1rem;
  line-height: 1.7;
}

.story-posts {
  margin: 3rem 0;
}

.posts-title {
  font-size: 1.8rem;
  margin: 0 0 2rem 0;
  text-align: center;
  color: var(--accent-color, #4fb1ba);
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.post-tile {
  border-radius: 6px;
  overflow: hidden;
  background: var(--background, #fff);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.post-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-image {
  height: 150px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-date {
  color: var(--text-muted, #aaa9a9);
  text-decoration: none;
  font-size: 0.7rem;
}

.post-content {
  padding: 1.25rem;
}

.post-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--accent-color, #4fb1ba);
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.post-excerpt {
  margin: 0 0 0.75rem 0;
  color: var(--text-muted, #aaa9a9);
  font-size: 0.9rem;
  line-height: 1.4;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted, #666);
}

.chapter-number {
  font-weight: 500;
}

.story-footer {
  margin: 3rem 0 0 0;
  text-align: center;
  padding: 2rem 0;
  margin-top: auto; /* Push footer to bottom */
}

.story-nav-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
  border: 2px solid #3c9199;
}

.btn-outline {
  color: #3c9199; /* Darker shade of blog button blue */
  background: transparent;
}

.btn-outline:hover {
  background: #3c9199; /* Darker shade of blog button blue */
  color: white;
}

.btn-primary {
  background: #3c9199; /* Darker shade of blog button blue */
  color: white;
}

.btn-primary:hover {
  background: #3fa0a9; /* Darker shade of blog blue */
  border-color: #3fa0a9;
}

/* ============================================================================
   STORY POST PAGE STYLES
   ============================================================================ */

/* Post and Page container - wider on desktop with nice margins */
/* Using high specificity selectors to ensure they apply */
.story-post,
.story-page,
article.page.story-post,
article.page.story-page,
.story-mode article.story-post,
.story-mode article.story-page {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 0 4rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Large Desktop - wider content with comfortable margins */
@media (min-width: 1400px) {
  .story-post,
  .story-page,
  article.page.story-post,
  article.page.story-page {
    max-width: 1100px !important;
    padding: 0 4rem !important;
  }
}

/* Desktop */
@media (min-width: 1201px) and (max-width: 1399px) {
  .story-post,
  .story-page,
  article.page.story-post,
  article.page.story-page {
    max-width: 1000px !important;
    padding: 0 4rem !important;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1200px) {
  .story-post,
  .story-page,
  article.page.story-post,
  article.page.story-page {
    max-width: 95% !important;
    padding: 0 3rem !important;
  }
}

/* Phone */
@media (max-width: 768px) {
  .story-post,
  .story-page,
  article.page.story-post,
  article.page.story-page {
    max-width: 100% !important;
    padding: 0 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 480px) {
  .story-post,
  .story-page,
  article.page.story-post,
  article.page.story-page {
    padding: 0 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
}

/* ============================================================================
   MOBILE WARNING BOX - Urges users to view on larger screen
   ============================================================================ */

.mobile-warning-box {
  display: none;
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem auto;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  color: #856404;
  font-size: 0.95rem;
  line-height: 1.5;
}

.mobile-warning-box p {
  margin: 0;
  font-weight: 500;
}

/* Show only on mobile devices */
@media (max-width: 768px) {
  .mobile-warning-box {
    display: block;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .mobile-warning-box {
    background: #664d03;
    border-color: #ffc107;
    color: #ffc107;
  }
}

/* ============================================================================
   PAGE STYLES - Static pages (About, etc.)
   ============================================================================ */

.story-page-header {
  text-align: center;
  margin: 2rem 0;
}

.story-page-title {
  font-size: 2.2rem;
  margin: 0 0 0.5rem 0;
  color: var(--accent-color, #4fb1ba);
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.story-page-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted, #666);
  font-style: italic;
  margin: 0 0 1.5rem 0;
}

.story-page-image {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.story-page-image img {
  width: 100%;
  height: auto;
  display: block;
}

.story-page-content {
  margin: 2rem 0;
  font-size: 1.1rem;
  line-height: 1.7;
}

.story-page-content h2 {
  color: var(--accent-color, #4fb1ba);
  margin: 2rem 0 1rem 0;
}

.story-page-content p {
  margin: 0 0 1.5rem 0;
}

/* ============================================================================
   POST STYLES
   ============================================================================ */

.story-breadcrumbs {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted, #666);
}

.breadcrumb-separator {
  margin: 0 0.5rem;
}

.chapter-navigation-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 2rem 0;
  padding: 1rem;
  background: var(--gray-bg, rgba(0,0,0,.025));
  border-radius: 6px;
}

/* Navigation groups to keep arrows and links close together */
.nav-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-prev-group {
  justify-content: flex-start;
}

.nav-next-group {
  justify-content: flex-end;
}

/* Navigation sections with arrows outside links */
.chapter-navigation-top .nav-arrow {
  display: flex;
  align-items: center;
  font-weight: bold;
  color: var(--accent-color, #4fb1ba);
}

/* Ensure arrows outside links are properly styled */
.chapter-navigation-top span.nav-arrow {
  text-decoration: none !important;
  font-weight: bold;
  color: var(--accent-color, #4fb1ba);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--accent-color, #4fb1ba);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background: #3c9199;
  color: white;
}

.nav-arrow {
  font-weight: bold;
  text-decoration: none !important;
}

/* Ensure header navigation arrows are not underlined */
.chapter-navigation-top .nav-arrow {
  text-decoration: none !important;
}

.chapter-navigation-top .nav-link .nav-arrow {
  text-decoration: none !important;
}

.chapter-info {
  text-align: center;
  color: var(--text-muted, #666);
  font-size: 0.85rem;
}

.chapter-number {
  font-weight: 500;
  color: var(--accent-color, #4fb1ba);
}

.chapter-progress {
  display: block;
  margin-top: 0.25rem;
}

.story-post-title-section {
  text-align: center;
  margin: 2rem 0;
}

.story-post-title {
  font-size: 2.2rem;
  margin: 0 0 0.5rem 0;
  color: var(--accent-color, #4fb1ba);
  font-family: 'Freight Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.story-post-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted, #d5d5d5);
  font-style: italic;
  margin: 0 0 1.5rem 0;
}

.story-post-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted, #666);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: orange;
}

.chapter-meta {
  font-weight: 500;
  color: var(--accent-color, #4fb1ba);
}

/* Feature image styling - using Ghost's standard feature_image */
.story-post-feature-image {
  width: 100%;
  margin: 2rem 0;
}

.story-post-feature-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Responsive adjustments for feature image */
@media (max-width: 768px) {
  .story-post-feature-image {
    margin: 1.5rem 0;
  }
}

.story-post-content {
  margin: 3rem 0;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Horizontal rules in story content */
.story-post-content hr {
  width: 100% !important;
  max-width: 100% !important;
  margin: 2rem 0 !important;
  border: 0 !important;
  border-top: 1px solid #ccc !important;
  background: transparent !important;
  height: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  box-sizing: border-box !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Remove any pseudo-elements from main site */
.story-post-content hr::before,
.story-post-content hr::after {
  display: none !important;
  content: none !important;
}

.story-post-content hr.subtle {
  border-top: 0.5px solid #abaaaa !important;
  margin: 1.5rem auto !important;
  width: 80% !important;
  max-width: 80% !important;
}

.story-post-content hr.green {
  border-top: 2px solid #4fb1ba !important;
  margin: 1.5rem 0 !important;
}

/* Ensure story mode overrides any container constraints */
.story-mode .story-post-content hr {
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
}

.story-post-content h2 {
  color: var(--accent-color, #4fb1ba);
  margin: 2rem 0 1rem 0;
}

.story-post-content p {
  margin: 0 0 1.5rem 0;
}

.story-post-footer {
  margin: 4rem 0 2rem 0;
  border-top: 1px solid var(--border-color, #eee);
  padding-top: 2rem;
  padding-bottom: 6rem; /* Add extra space to prevent overlap */
  text-align: center; /* Center the footer content */
}

.story-nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.nav-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-group.chapter-nav .btn-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  min-width: 200px;
  border: 1px solid;
}

.nav-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-label {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.8;
}

.nav-title {
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.btn-secondary {
  background: var(--gray-bg, rgba(0,0,0,.025));
  color: var(--text-color, #333);
  border-color: var(--border-color, #eee);
}

.btn-secondary:hover {
  background: #3c9199; /* Darker shade of blog button blue */
  color: white;
}

.btn-primary {
  background: #3c9199; /* Darker shade of blog button blue */
  color: white;
  border-color: #3c9199;
}

.btn-primary:hover {
  background: #3fa0a9; /* Darker shade of blog blue */
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
}

.chapter-list-details {
  margin-top: 2rem;
  border: 1px solid var(--border-color, #eee);
  border-radius: 6px;
}

.chapter-list-toggle {
  padding: 1rem;
  background: var(--gray-bg, rgba(0,0,0,.025));
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  border: none;
  width: 100%;
  text-align: left;
}

.chapter-list-toggle:hover {
  background: #3c9199;
  color: white;
}

.chapter-list {
  padding: 1rem;
}

.chapter-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color, #eee);
}

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

.chapter-item.current {
  background: var(--gray-bg, rgba(0,0,0,.025));
  padding: 0.5rem;
  border-radius: 4px;
}

.chapter-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.chapter-link:not(.current):hover {
  color: var(--accent-color, #4fb1ba);
}

.chapter-link.current {
  color: var(--accent-color, #4fb1ba);
  font-weight: 500;
}

.chapter-number {
  font-size: 0.8rem;
  opacity: 0.7;
  min-width: 3rem;
}

.chapter-title {
  flex: 1;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  .story-home-btn {
    top: 15px;
    left: 15px;
    width: 44px;
    height: 44px;
    padding: 10px;
  }
  
  .story-home-btn svg {
    width: 20px;
    height: 20px;
  }

  .story-index .stories-grid {
    grid-template-columns: 1fr;
  }

  .story-title .story-title-content .story-title {
    font-size: 2rem;
  }

  .story-title .posts-grid {
    grid-template-columns: 1fr;
  }

  .story-title .story-footer .story-nav-buttons {
    flex-direction: column;
    align-items: center;
  }

  .story-post .chapter-navigation-top {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .story-post .story-post-title-section .story-post-title {
    font-size: 1.8rem;
  }

  .story-nav-buttons .nav-group {
    flex-direction: column;
    align-items: center;
  }

  .nav-group.chapter-nav .btn-nav {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .story-home-btn {
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    padding: 8px;
  }
  
  .story-home-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* ============================================================================
   DARK MODE SUPPORT
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  .story-content {
    color: #e2e8f0;
    background: #1a202c;
  }

  .story-content h1,
  .story-content h2,
  .story-content h3,
  .story-content h4,
  .story-content h5,
  .story-content h6 {
    color: #f7fafc;
  }

  .story-tile,
  .post-tile {
    background: #2d3748;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }

  .story-tile:hover,
  .post-tile:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
  }

  .chapter-navigation-top,
  .chapter-list-toggle {
    background: #2d3748;
  }

  .chapter-list-details {
    border-color: #4a5568;
  }

  .btn-secondary {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
  }
}

/* ============================================================================
   STORY DIRECTION STYLES
   ============================================================================ */

/* Direction entry - only visible on mobile devices */
.story-direction {
  display: none; /* Hidden by default */
  margin: 1rem 0;
  text-align: center;
}

.direction-text {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #ff6b35, #f7931e); /* Day-glo orange gradient */
  border: 2px solid #ff8c42; /* Bright orange border */
  border-radius: 12px; /* More rounded corners */
  font-size: 0.85rem;
  color: #000; /* Black text for maximum contrast on bright background */
  font-weight: 700; /* Extra bold for visibility */
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4), 0 0 20px rgba(255, 107, 53, 0.3); /* Glowing shadow effect */
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8); /* White text shadow for pop */
  line-height: 1.4; /* Better line spacing for multiple lines */
  white-space: normal; /* Allow text wrapping */
  animation: pulse-glow 2s ease-in-out infinite alternate; /* Subtle pulsing animation */
}

/* Day-glo pulsing animation */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4), 0 0 20px rgba(255, 107, 53, 0.3);
  }
  100% {
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.6), 0 0 25px rgba(255, 107, 53, 0.5);
  }
}

/* Show direction only on mobile devices (phones) */
@media (max-width: 768px) {
  .story-direction {
    display: block;
  }
}

/* Dark mode support for direction - keep day-glo effect */
@media (prefers-color-scheme: dark) {
  .direction-text {
    background: linear-gradient(135deg, #ff6b35, #f7931e); /* Keep the same day-glo gradient */
    border: 2px solid #ff8c42; /* Keep bright orange border */
    color: #000; /* Keep black text for contrast */
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.5), 0 0 25px rgba(255, 107, 53, 0.4); /* Enhanced glow in dark mode */
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9); /* Stronger white text shadow */
  }
}

/* ============================================================================
   STORY CONTENT LINK STYLES - Bright and Distinctive
   ============================================================================ */

/* General links in story content - bright and visible */
.story-content a {
  color: #2563eb !important; /* Bright blue for high visibility */
  text-decoration: underline;
  text-decoration-color: #60a5fa; /* Light blue underline */
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.story-content a:hover {
  color: #1e40af !important; /* Darker blue on hover */
  text-decoration-color: #3b82f6;
  text-decoration-thickness: 2.5px;
}

/* Navigation button text - white and easy to read */
.story-mode .nav-label a.btn,
.story-content .nav-label a.btn,
.nav-label a.btn {
  color: #ffffff !important; /* White text */
  text-decoration: none !important; /* No underline */
}

.story-mode .nav-label a.btn:hover,
.story-content .nav-label a.btn:hover,
.nav-label a.btn:hover {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Dark mode support for content links - even brighter */
@media (prefers-color-scheme: dark) {
  .story-content a {
    color: #60a5fa !important; /* Bright light blue for dark backgrounds */
    text-decoration-color: #93c5fd; /* Even lighter blue underline */
  }
  
  .story-content a:hover {
    color: #93c5fd !important; /* Very bright blue on hover */
    text-decoration-color: #bfdbfe;
  }
  
  /* Navigation button text remains white in dark mode */
  .story-mode .nav-label a.btn,
  .story-content .nav-label a.btn,
  .nav-label a.btn {
    color: #ffffff !important;
    text-decoration: none !important;
  }
  
  .story-mode .nav-label a.btn:hover,
  .story-content .nav-label a.btn:hover,
  .nav-label a.btn:hover {
    color: #ffffff !important;
    text-decoration: none !important;
  }

  /* In the footer, we want the labels to show white on nav buttons */
  .story-post-footer a.btn {
    color: white !important;
  }

  .story-post-footer a.btn:hover {
    color: orange !important;
  }

}

/* ============================================================================
   STORY FIGCAPTION LINK STYLES
   ============================================================================ */

/* Style links inside figcaptions within story content */
.story-content figure figcaption a {
  color: #2563eb !important; /* Bright blue matching content links */
  text-decoration: underline;
  text-decoration-color: #60a5fa;
  transition: color 0.2s ease;
}

.story-content figure figcaption a:hover {
  color: #1e40af !important; /* Darker blue on hover */
  text-decoration-color: #3b82f6;
}

/* Dark mode support for figcaption links */
@media (prefers-color-scheme: dark) {
  .story-content figure figcaption a {
    color: #60a5fa !important; /* Bright light blue for dark mode */
    text-decoration-color: #93c5fd;
  }
  
  .story-content figure figcaption a:hover {
    color: #93c5fd !important; /* Very bright blue on hover */
    text-decoration-color: #bfdbfe;
  }
}

/* ============================================================================
   RECAP COMPONENT STYLES
   ============================================================================ */

/* Base recap component styling */
blockquote.custom-recap {
  all: unset !important;
  display: block !important;
  margin: 2.5rem 1.5rem !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  position: relative !important;
  font-family: 'Georgia', 'Times New Roman', serif !important; /* Different font for distinction */
  font-size: 1rem !important;
  line-height: 1.7 !important;
  color: var(--body-color, #333) !important;
}

.recap-badge {
  position: absolute !important;
  top: -0.75rem !important;
  left: 1rem !important;
  background: #6b7280 !important; /* Simple gray background instead of gradient */
  color: white !important;
  padding: 0.25rem 0.4rem !important; /* Reduced vertical padding by 1/3 */
  border-radius: 0.5rem !important;
  font-size: 0.65rem !important; /* Smaller font */
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3) !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important; /* Slightly smaller gap */
}

.recap-icon {
  font-size: 0.9rem !important; /* Smaller icon to match smaller badge */
  opacity: 1 !important;
  filter: none !important; /* Remove any blur filters */
  text-shadow: none !important;
}

.recap-title {
  font-weight: 600 !important;
  letter-spacing: 0.025em !important;
}

.recap-body {
  background: #f9fafb !important; /* Simple light gray background */
  border: 1px solid #d1d5db !important; /* Subtle border */
  border-radius: 0.75rem !important;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem !important;
  margin-top: 0.5rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  position: relative !important;
}

/* Remove the colored sidebar */
.recap-body::before {
  display: none !important;
}

.recap-body p {
  margin: 0 0 1rem 0 !important;
  color: var(--text-color, #374151) !important;
  font-style: italic !important; /* Italic text for distinction */
}

.recap-body p:last-child {
  margin-bottom: 0 !important;
}

/* Error state for recap */
.custom-recap-error .recap-badge {
  background: #ef4444 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

.custom-recap-error .recap-body {
  border-color: #fecaca !important;
  background: #fef2f2 !important;
}

/* ============================================================================
   SUMMARY COMPONENT STYLES
   ============================================================================ */

/* Base summary component styling */
blockquote.custom-summary {
  all: unset !important;
  display: block !important;
  margin: 2.5rem 1.5rem !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  position: relative !important;
  font-family: 'Georgia', 'Times New Roman', serif !important; /* Match recap font */
  font-size: 1rem !important;
  line-height: 1.7 !important;
  color: var(--body-color, #333) !important;
}

.summary-badge {
  position: absolute !important;
  top: -0.75rem !important;
  left: 1rem !important;
  background: #059669 !important; /* Default green theme */
  color: white !important;
  padding: 0.25rem 0.4rem !important; /* Match recap sizing */
  border-radius: 0.5rem !important;
  font-size: 0.65rem !important; /* Match recap font size */
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3) !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important; /* Match recap gap */
}

.summary-icon {
  font-size: 0.9rem !important; /* Match recap icon size */
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
}

.summary-title {
  font-weight: 600 !important;
  letter-spacing: 0.025em !important;
}

.summary-body {
  background: #f9fafb !important; /* Default light background */
  border: 1px solid #d1d5db !important; /* Default border */
  border-radius: 0.75rem !important;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem !important;
  margin-top: 0.5rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  position: relative !important;
}

/* Remove the colored sidebar */
.summary-body::before {
  display: none !important;
}

.summary-body p {
  margin: 0 0 1rem 0 !important;
  color: var(--text-color, #374151) !important;
  font-style: italic !important; /* Match recap italic styling */
}

.summary-body p:last-child {
  margin-bottom: 0 !important;
}

/* Image styling within summaries */
/* Base styles - only apply max-width: 100% if not using blog-image size classes */
blockquote.custom-summary .summary-body img:not([class*="blog-image-"]):not(.blog-image-full),
blockquote.custom-summary img:not([class*="blog-image-"]):not(.blog-image-full) {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 1rem auto !important;
  border-radius: 4px !important;
}

/* Blog-image base styles within summaries */
blockquote.custom-summary .summary-body img.blog-image,
blockquote.custom-summary img.blog-image {
  display: block !important;
  margin: 1rem auto !important;
  border-radius: 8px !important;
  border: 2px dotted #f39c12 !important;
  padding: 10px !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
  height: auto !important;
}

/* Blog-image size classes within summaries - must override the base max-width */
blockquote.custom-summary .summary-body img.blog-image-50,
blockquote.custom-summary img.blog-image-50 {
  max-width: 50px !important;
}

blockquote.custom-summary .summary-body img.blog-image-100,
blockquote.custom-summary img.blog-image-100 {
  max-width: 100px !important;
}

blockquote.custom-summary .summary-body img.blog-image-200,
blockquote.custom-summary img.blog-image-200 {
  max-width: 200px !important;
}

blockquote.custom-summary .summary-body img.blog-image-250,
blockquote.custom-summary img.blog-image-250 {
  max-width: 250px !important;
}

blockquote.custom-summary .summary-body img.blog-image-300,
blockquote.custom-summary img.blog-image-300 {
  max-width: 300px !important;
}

blockquote.custom-summary .summary-body img.blog-image-400,
blockquote.custom-summary img.blog-image-400 {
  max-width: 400px !important;
}

blockquote.custom-summary .summary-body img.blog-image-450,
blockquote.custom-summary img.blog-image-450 {
  max-width: 450px !important;
}

blockquote.custom-summary .summary-body img.blog-image-500,
blockquote.custom-summary img.blog-image-500 {
  max-width: 500px !important;
}

blockquote.custom-summary .summary-body img.blog-image-600,
blockquote.custom-summary img.blog-image-600 {
  max-width: 600px !important;
}

blockquote.custom-summary .summary-body img.blog-image-full,
blockquote.custom-summary img.blog-image-full {
  max-width: 100% !important;
}

/* Blog-image color variants within summaries */
blockquote.custom-summary .summary-body img.blog-image-yellow,
blockquote.custom-summary img.blog-image-yellow {
  border-color: #f39c12 !important;
  background-color: rgba(254, 249, 231, 0.4) !important;
}

blockquote.custom-summary .summary-body img.blog-image-dark,
blockquote.custom-summary img.blog-image-dark {
  border-color: #34495e !important;
  background-color: rgba(44, 62, 80, 0.4) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Responsive images in summaries */
@media (max-width: 768px) {
  blockquote.custom-summary .summary-body img:not([class*="blog-image-"]):not(.blog-image-full),
  blockquote.custom-summary img:not([class*="blog-image-"]):not(.blog-image-full) {
    margin: 0.75rem auto !important;
  }
  
  blockquote.custom-summary .summary-body img.blog-image,
  blockquote.custom-summary img.blog-image {
    margin: 0.75rem auto !important;
  }
}

/* Theme variations */
.custom-summary-green .summary-body {
  background: #dcfce7 !important; /* Darker green tint */
  border: 1px solid #86efac !important; /* Darker green border */
}

.custom-summary-green .summary-badge {
  background: #059669 !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3) !important;
}

.custom-summary-blue .summary-badge {
  background: #2563eb !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

.custom-summary-blue .summary-body {
  background: #dbeafe !important; /* Darker blue tint */
  border: 1px solid #93c5fd !important; /* Darker blue border */
}

.custom-summary-gray .summary-badge {
  background: #6b7280 !important; /* Medium gray for good contrast */
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3) !important;
}

.custom-summary-gray .summary-body {
  background: #f3f4f6 !important; /* Light gray background */
  border: 1px solid #d1d5db !important; /* Medium gray border */
}

.custom-summary-purple .summary-badge {
  background: #6b46c1 !important; /* Eggplant purple */
  box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3) !important;
}

.custom-summary-purple .summary-body {
  background: #f3e8ff !important; /* Darker eggplant tint */
  border: 1px solid #c4b5fd !important; /* Darker eggplant border */
}

.custom-summary-orange .summary-badge {
  background: #ea580c !important;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3) !important;
}

.custom-summary-orange .summary-body {
  background: #fed7aa !important; /* Darker orange tint */
  border: 1px solid #fdba74 !important; /* Darker orange border */
}

.custom-summary-red .summary-badge {
  background: #dc2626 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3) !important;
}

.custom-summary-red .summary-body {
  background: #fecaca !important; /* Darker red tint */
  border: 1px solid #fca5a5 !important; /* Darker red border */
}

/* Error state for summary */
.custom-summary-error .summary-badge {
  background: #ef4444 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

.custom-summary-error .summary-body {
  border: 1px solid #fecaca !important;
  background: #fef2f2 !important;
}

/* ============================================================================
   DARK MODE SUPPORT FOR RECAP AND SUMMARY COMPONENTS
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  /* Recap dark mode */
  .recap-body {
    background: #374151 !important; /* Simple dark gray background */
    border-color: #4b5563 !important;
    color: #e2e8f0 !important;
  }

  .recap-body p {
    color: #d1d5db !important;
  }

  /* Summary dark mode - theme variations */
  .custom-summary-green .summary-body {
    background: #064e3b !important; /* Dark green tint */
    border-color: #047857 !important;
    color: #e2e8f0 !important;
  }

  .custom-summary-blue .summary-body {
    background: #1e3a8a !important; /* Dark blue tint */
    border-color: #2563eb !important;
    color: #e2e8f0 !important;
  }

  .custom-summary-gray .summary-badge {
    background: #9ca3af !important; /* Lighter gray for dark mode */
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.3) !important;
  }

  .custom-summary-gray .summary-body {
    background: #374151 !important; /* Dark gray background */
    border-color: #6b7280 !important; /* Medium gray border */
    color: #e2e8f0 !important;
  }

  .custom-summary-purple .summary-body {
    background: #581c87 !important; /* Dark eggplant tint */
    border-color: #6b46c1 !important;
    color: #e2e8f0 !important;
  }

  .custom-summary-orange .summary-body {
    background: #9a3412 !important; /* Dark orange tint */
    border-color: #ea580c !important;
    color: #e2e8f0 !important;
  }

  .custom-summary-red .summary-body {
    background: #991b1b !important; /* Dark red tint */
    border-color: #dc2626 !important;
    color: #e2e8f0 !important;
  }

  .summary-body p {
    color: #d1d5db !important; /* Match recap dark text color */
  }

  /* Error states in dark mode */
  .custom-recap-error .recap-body {
    background: #7f1d1d !important;
    border-color: #dc2626 !important;
  }

  .custom-summary-error .summary-body {
    background: #7f1d1d !important;
    border-color: #dc2626 !important;
  }
}

/* ============================================================================
   NAVIGATION LINKS FOR RECAP AND SUMMARY COMPONENTS
   ============================================================================ */

/* Recap navigation link styling */
.recap-nav-link {
  color: inherit !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(255, 255, 255, 0.6) !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 2px !important;
  transition: all 0.2s ease !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.recap-nav-link:hover {
  color: inherit !important;
  text-decoration-color: rgba(255, 255, 255, 0.9) !important;
  text-decoration-thickness: 1.5px !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.recap-nav-link:visited {
  color: inherit !important;
  text-decoration-color: rgba(255, 255, 255, 0.6) !important;
}

/* Summary navigation link styling */
.summary-nav-link {
  color: inherit !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(255, 255, 255, 0.6) !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 2px !important;
  transition: all 0.2s ease !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.summary-nav-link:hover {
  color: inherit !important;
  text-decoration-color: rgba(255, 255, 255, 0.9) !important;
  text-decoration-thickness: 1.5px !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.summary-nav-link:visited {
  color: inherit !important;
  text-decoration-color: rgba(255, 255, 255, 0.6) !important;
}

/* Dark mode support for navigation links */
@media (prefers-color-scheme: dark) {
  .recap-nav-link,
  .summary-nav-link {
    text-decoration-color: rgba(255, 255, 255, 0.4) !important;
  }
  
  .recap-nav-link:hover,
  .summary-nav-link:hover {
    text-decoration-color: rgba(255, 255, 255, 0.7) !important;
  }
}

/* ============================================================================
   CUSTOM DIVIDER CLASSES FOR RECAP AND SUMMARY COMPONENTS
   ============================================================================ */

/* Recap divider with diamond center */
.recap-divider {
  border: none !important;
  height: 1px !important;
  background: linear-gradient(90deg, 
    transparent 0%, 
    transparent 35%, 
    #d1d5db 40%, 
    #9ca3af 50%, 
    #d1d5db 60%, 
    transparent 65%, 
    transparent 100%) !important;
  margin: 2.5rem 0 !important;
  opacity: 0.7 !important;
  position: relative !important;
}

/* Diamond shape in center */
.recap-divider::before {
  content: '◆' !important;
  position: absolute !important;
  top: -10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  color: #6b7280 !important;
  font-size: 14px !important;
  background: var(--body-bg, #fff) !important;
  padding: 0 10px !important;
  opacity: 1 !important;
  font-weight: bold !important;
  z-index: 10 !important;
}

/* Summary divider with diamond center */
.summary-divider {
  border: none !important;
  height: 1px !important;
  background: linear-gradient(90deg, 
    transparent 0%, 
    transparent 35%, 
    #d1d5db 40%, 
    #9ca3af 50%, 
    #d1d5db 60%, 
    transparent 65%, 
    transparent 100%) !important;
  margin: 2.5rem 0 !important;
  opacity: 0.7 !important;
  position: relative !important;
}

/* Diamond shape in center */
.summary-divider::before {
  content: '◆' !important;
  position: absolute !important;
  top: -10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  color: #6b7280 !important;
  font-size: 14px !important;
  background: var(--body-bg, #fff) !important;
  padding: 0 10px !important;
  opacity: 1 !important;
  font-weight: bold !important;
  z-index: 10 !important;
}

/* Dark mode support for custom dividers */
@media (prefers-color-scheme: dark) {
  .recap-divider,
  .summary-divider {
    background: linear-gradient(90deg, 
      transparent 0%, 
      transparent 35%, 
      #6b7280 40%, 
      #9ca3af 50%, 
      #6b7280 60%, 
      transparent 65%, 
      transparent 100%) !important;
    opacity: 0.6 !important;
  }
  
  .recap-divider::before,
  .summary-divider::before {
    color: #9ca3af !important;
    background: var(--body-bg, #1a202c) !important;
    opacity: 1 !important;
  }
}

/* ============================================================================
   HORIZONTAL RULES FOR RECAP AND SUMMARY COMPONENTS
   ============================================================================ */

/* Old-timey dramatic hr styling for recap and summary components */
.custom-recap hr,
.custom-summary hr {
  border: none !important;
  height: 2px !important;
  width: 80% !important;
  max-width: 600px !important;
  margin: 2.5rem auto !important;
  background: linear-gradient(90deg, 
    transparent 0%, 
    transparent 20%, 
    #d1d5db 30%, 
    #9ca3af 50%, 
    #d1d5db 70%, 
    transparent 80%, 
    transparent 100%) !important;
  opacity: 0.8 !important;
  position: relative !important;
}

/* Add subtle shadow for depth */
.custom-recap hr::before,
.custom-summary hr::before {
  content: '' !important;
  position: absolute !important;
  top: 1px !important;
  left: 0 !important;
  right: 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg, 
    transparent 0%, 
    transparent 20%, 
    rgba(255, 255, 255, 0.3) 30%, 
    rgba(255, 255, 255, 0.5) 50%, 
    rgba(255, 255, 255, 0.3) 70%, 
    transparent 80%, 
    transparent 100%) !important;
  opacity: 0.6 !important;
}

/* Dark mode support for hr elements */
@media (prefers-color-scheme: dark) {
  .custom-recap hr,
  .custom-summary hr {
    background: linear-gradient(90deg, 
      transparent 0%, 
      transparent 20%, 
      #6b7280 30%, 
      #9ca3af 50%, 
      #6b7280 70%, 
      transparent 80%, 
      transparent 100%) !important;
    opacity: 0.6 !important;
  }
  
  .custom-recap hr::before,
  .custom-summary hr::before {
    background: linear-gradient(90deg, 
      transparent 0%, 
      transparent 20%, 
      rgba(0, 0, 0, 0.2) 30%, 
      rgba(0, 0, 0, 0.3) 50%, 
      rgba(0, 0, 0, 0.2) 70%, 
      transparent 80%, 
      transparent 100%) !important;
  }
}

/* ============================================================================
   RESPONSIVE DESIGN FOR RECAP AND SUMMARY COMPONENTS
   ============================================================================ */

@media (max-width: 768px) {
  blockquote.custom-recap,
  blockquote.custom-summary {
    margin: 2rem 0.8rem !important;
    font-size: 0.9rem !important;
  }
  
  .recap-badge,
  .summary-badge {
    top: -0.5rem !important;
    left: 0.8rem !important;
    padding: 0.3rem 0.6rem !important;
    font-size: 0.8rem !important;
  }
  
  .recap-body,
  .summary-body {
    padding: 1.25rem 1.25rem 1.25rem 1.25rem !important;
  }
}

@media (max-width: 480px) {
  blockquote.custom-recap,
  blockquote.custom-summary {
    margin: 1.5rem 0.5rem !important;
  }
  
  .recap-badge,
  .summary-badge {
    left: 0.5rem !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
  }
  
  .recap-body,
  .summary-body {
    padding: 1rem 1rem 1rem 1rem !important;
  }
}

/* ============================================================================
   HIGHLIGHT STYLES - Custom <hl> tag support matching Jekyll theme
   ============================================================================ */

/* Base highlight style - matching Jekyll's ragged highlighter look */
hl {
  margin: 0;
  padding: 0.1em 0.4em;
  border-radius: 0.8em 0.3em;
  background: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: inherit;
  display: inline;
  white-space: normal;
  word-wrap: normal;
  position: relative;
}

/* Hand-drawn noise effect using pseudo-element */
hl::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: inherit;
  opacity: 0.8;
  z-index: -1;
  box-shadow: 
    0.02em 0.02em 0 rgba(0,0,0,0.02),
    -0.02em 0.02em 0 rgba(0,0,0,0.02),
    0.04em 0.01em 0 rgba(0,0,0,0.015),
    -0.04em 0.01em 0 rgba(0,0,0,0.015),
    0.06em 0.03em 0 rgba(0,0,0,0.01),
    -0.06em 0.03em 0 rgba(0,0,0,0.01);
}

/* Color variations - gradient for faded edges like real highlighter */
hl[color="green"] {
  background-image: linear-gradient(
    to right,
    rgba(144, 238, 144, 0.03),
    rgba(144, 238, 144, 0.35) 4%,
    rgba(144, 238, 144, 0.35) 96%,
    rgba(144, 238, 144, 0.1)
  );
}

hl[color="red"] {
  background-image: linear-gradient(
    to right,
    rgba(255, 99, 71, 0.03),
    rgba(255, 99, 71, 0.40) 4%,
    rgba(255, 99, 71, 0.40) 96%,
    rgba(255, 99, 71, 0.1)
  );
}

hl[color="purple"] {
  background-image: linear-gradient(
    to right,
    rgba(221, 160, 221, 0.03),
    rgba(221, 160, 221, 0.40) 4%,
    rgba(221, 160, 221, 0.40) 96%,
    rgba(221, 160, 221, 0.1)
  );
}

hl[color="orange"] {
  background-image: linear-gradient(
    to right,
    rgba(255, 165, 0, 0.03),
    rgba(255, 165, 0, 0.35) 4%,
    rgba(255, 165, 0, 0.35) 96%,
    rgba(255, 165, 0, 0.1)
  );
}

hl[color="blue"] {
  background-image: linear-gradient(
    to right,
    rgba(135, 206, 250, 0.03),
    rgba(135, 206, 250, 0.40) 4%,
    rgba(135, 206, 250, 0.40) 96%,
    rgba(135, 206, 250, 0.1)
  );
}

hl[color="yellow"] {
  background-image: linear-gradient(
    to right,
    rgba(255, 225, 0, 0.03),
    rgba(255, 225, 0, 0.35) 4%,
    rgba(255, 225, 0, 0.35) 96%,
    rgba(255, 225, 0, 0.1)
  );
}

/* Default yellow for hl without color */
hl:not([color]) {
  background-image: linear-gradient(
    to right,
    rgba(255, 225, 0, 0.03),
    rgba(255, 225, 0, 0.35) 4%,
    rgba(255, 225, 0, 0.35) 96%,
    rgba(255, 225, 0, 0.1)
  );
}

/* Dark mode support for highlights - slightly brighter */
@media (prefers-color-scheme: dark) {
  hl[color="green"] {
    background-image: linear-gradient(
      to right,
      rgba(144, 238, 144, 0.05),
      rgba(144, 238, 144, 0.40) 4%,
      rgba(144, 238, 144, 0.40) 96%,
      rgba(144, 238, 144, 0.15)
    );
  }

  hl[color="red"] {
    background-image: linear-gradient(
      to right,
      rgba(255, 99, 71, 0.05),
      rgba(255, 99, 71, 0.45) 4%,
      rgba(255, 99, 71, 0.45) 96%,
      rgba(255, 99, 71, 0.15)
    );
  }

  hl[color="purple"] {
    background-image: linear-gradient(
      to right,
      rgba(221, 160, 221, 0.05),
      rgba(221, 160, 221, 0.45) 4%,
      rgba(221, 160, 221, 0.45) 96%,
      rgba(221, 160, 221, 0.15)
    );
  }

  hl[color="orange"] {
    background-image: linear-gradient(
      to right,
      rgba(255, 165, 0, 0.05),
      rgba(255, 165, 0, 0.40) 4%,
      rgba(255, 165, 0, 0.40) 96%,
      rgba(255, 165, 0, 0.15)
    );
  }

  hl[color="blue"] {
    background-image: linear-gradient(
      to right,
      rgba(135, 206, 250, 0.05),
      rgba(135, 206, 250, 0.45) 4%,
      rgba(135, 206, 250, 0.45) 96%,
      rgba(135, 206, 250, 0.15)
    );
  }

  hl[color="yellow"] {
    background-image: linear-gradient(
      to right,
      rgba(255, 225, 0, 0.05),
      rgba(255, 225, 0, 0.40) 4%,
      rgba(255, 225, 0, 0.40) 96%,
      rgba(255, 225, 0, 0.15)
    );
  }

  hl:not([color]) {
    background-image: linear-gradient(
      to right,
      rgba(255, 225, 0, 0.05),
      rgba(255, 225, 0, 0.40) 4%,
      rgba(255, 225, 0, 0.40) 96%,
      rgba(255, 225, 0, 0.15)
    );
  }
}

/* ============================================================================
   PULLQUOTE STYLES - Simple CSS-only pull quotes
   Based on https://css-tricks.com/getting-creative-with-quotes/
   Usage: <blockquote class="pullquote"><p>Quote text</p></blockquote>
   ============================================================================ */

/* Base pullquote - just add class="pullquote" to any blockquote */
blockquote.pullquote {
  position: relative !important;
  margin: 3rem auto !important;
  padding: 4rem 3rem 2rem 5rem !important;
  max-width: 66% !important;
  background: linear-gradient(135deg, rgba(79, 177, 186, 0.08) 0%, rgba(52, 73, 94, 0.06) 100%) !important;
  border-left: 5px solid #4fb1ba !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  font-style: italic !important;
  font-size: 2.75rem !important;
  line-height: 1.6 !important;
  color: #2c3e50 !important;
  font-family: Georgia, 'Times New Roman', serif !important;
}

/* Decorative opening quote mark using ::before pseudo-element with font character */
blockquote.pullquote::before {
  content: "\201C" !important;
  display: block !important;
  position: absolute !important;
  top: 0.5rem !important;
  left: 1rem !important;
  font-size: 6rem !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-weight: bold !important;
  opacity: 0.7 !important;
  line-height: 0.8 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  width: auto !important;
  height: auto !important;
}

/* Horizontal line after quote using ::after */
blockquote.pullquote::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent-color, #4fb1ba);
  margin-top: 1.5rem;
  opacity: 0.6;
}

/* Quote text */
blockquote.pullquote p {
  margin: 0 0 0.5rem 0;
  position: relative;
  font-size: 1.75rem !important;
  line-height: 1.6 !important;
  z-index: 1;
}

blockquote.pullquote p:last-of-type {
  margin-bottom: 0;
}

/* Strong/bold text in pullquotes */
blockquote.pullquote strong,
blockquote.pullquote b {
  color: var(--accent-color, #4fb1ba);
  font-weight: 700;
}

/* Links in pullquotes */
blockquote.pullquote a {
  color: var(--accent-color, #4fb1ba);
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 177, 186, 0.3);
  transition: border-bottom-color 0.2s ease;
}

blockquote.pullquote a:hover {
  border-bottom-color: var(--accent-color, #4fb1ba);
}

/* Attribution footer - use <footer> inside blockquote */
blockquote.pullquote footer {
  margin-top: 1.5rem;
  font-style: normal;
  font-size: 0.95rem;
  color: var(--text-muted, #5d6d7e);
  font-family: 'Freight Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

blockquote.pullquote footer::before {
  content: "— ";
  color: var(--accent-color, #4fb1ba);
}

/* Cite element for source title */
blockquote.pullquote cite {
  font-style: italic;
  color: var(--text-muted, #5d6d7e);
}

blockquote.pullquote cite a {
  color: var(--accent-color, #4fb1ba);
  border-bottom: 1px solid rgba(79, 177, 186, 0.3);
}

/* Alignment variations */
blockquote.pullquote.text-center {
  text-align: center;
  padding-left: 3rem;
}

blockquote.pullquote.text-center::before {
  left: 50%;
  transform: translateX(-50%);
  top: -0.5rem;
}

blockquote.pullquote.text-center::after {
  margin-left: auto;
  margin-right: auto;
}

blockquote.pullquote.text-left {
  margin-left: 0;
  margin-right: auto;
}

blockquote.pullquote.text-right {
  margin-left: auto;
  margin-right: 0;
  text-align: right;
}

/* No decorative line variation */
blockquote.pullquote.no-line::after {
  display: none;
}

/* Dark mode for pullquotes */
@media (prefers-color-scheme: dark) {
  blockquote.pullquote {
    background: linear-gradient(135deg, rgba(79, 177, 186, 0.15) 0%, rgba(52, 73, 94, 0.2) 100%) !important;
    color: #ecf0f1 !important;
    border-left-color: #5fc5ce !important;
  }
  
  blockquote.pullquote::before {
    color: #5fc5ce !important;
    opacity: 0.5 !important;
  }
  
  blockquote.pullquote::after {
    background-color: #5fc5ce;
  }
  
  blockquote.pullquote strong,
  blockquote.pullquote b {
    color: #5fc5ce;
  }
  
  blockquote.pullquote a {
    color: #5fc5ce;
  }
  
  blockquote.pullquote footer {
    color: #bdc3c7;
  }
  
  blockquote.pullquote footer::before {
    color: #5fc5ce;
  }
  
  blockquote.pullquote cite {
    color: #bdc3c7;
  }
  
  blockquote.pullquote cite a {
    color: #5fc5ce;
  }
}

/* Tablet responsive for pullquotes */
@media (max-width: 968px) {
  blockquote.pullquote {
    max-width: 80%;
  }
}

/* Mobile responsive for pullquotes */
@media (max-width: 768px) {
  blockquote.pullquote {
    max-width: 90% !important;
    margin: 2rem auto !important;
    padding: 3rem 1.5rem 1.5rem 4rem !important;
    font-size: 1.4rem !important;
    line-height: 1.5 !important;
  }
  
  blockquote.pullquote::before {
    font-size: 7rem !important;
    left: 0.25rem !important;
    top: -0.5rem !important;
  }
  
  blockquote.pullquote.text-center {
    padding-left: 1.5rem !important;
  }
  
  blockquote.pullquote footer {
    font-size: 0.9rem !important;
  }
}

/* Extra small mobile for pullquotes */
@media (max-width: 480px) {
  blockquote.pullquote {
    padding: 2.5rem 1rem 1.25rem 3rem !important;
    font-size: 1.2rem !important;
  }
  
  blockquote.pullquote::before {
    font-size: 5rem !important;
    left: 0.1rem !important;
    top: -0.25rem !important;
  }
  
  blockquote.pullquote::after {
    width: 40px !important;
  }
}

/* ============================================================================
   BLOG IMAGE STYLES - Rounded dashed border images matching Jekyll theme
   ============================================================================ */

/* Base blog image styling - rounded corners with dotted border */
.blog-image {
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
  border: 2px dotted #f39c12;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  max-width: 100%;
  height: auto;
}

.blog-image:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Yellow variant (default) */
.blog-image-yellow {
  border-color: #f39c12;
  background-color: rgba(254, 249, 231, 0.4);
}

/* Dark variant */
.blog-image-dark {
  border-color: #34495e;
  background-color: rgba(44, 62, 80, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.blog-image-dark:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Size variants - using !important to override theme's .content img rule */
.blog-image-50 {
  max-width: 50px !important;
}

.blog-image-100 {
  max-width: 100px !important;
}

.blog-image-200 {
  max-width: 200px !important;
}

.blog-image-250 {
  max-width: 250px !important;
}

.blog-image-300 {
  max-width: 300px !important;
}

.blog-image-400 {
  max-width: 400px !important;
}

.blog-image-450 {
  max-width: 450px !important;
}

.blog-image-500 {
  max-width: 500px !important;
}

.blog-image-600 {
  max-width: 600px !important;
}

.blog-image-full {
  max-width: 100% !important;
}

/* Float variants for text wrapping */
.blog-image-left {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
  display: block;
}

.blog-image-right {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
  display: block;
}

/* Clear float helper */
.clear-float {
  clear: both;
}

/* Apply blog-image styles to images within figures */
.story-post-content figure img,
.story-content figure img {
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
  border: 2px dotted #f39c12;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  max-width: 100%;
  height: auto;
}

.story-post-content figure img:hover,
.story-content figure img:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Clickable images - images wrapped in links */
.story-post-content figure a,
.story-content figure a {
  display: block;
  text-decoration: none;
  transition: all 0.3s ease;
}

.story-post-content figure a:hover img,
.story-content figure a:hover img {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
  opacity: 0.95;
}

/* Standalone clickable images (not in figure) */
.story-post-content a > img,
.story-content a > img {
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
  border: 2px dotted #f39c12;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  max-width: 100%;
  height: auto;
}

.story-post-content a:hover > img,
.story-content a:hover > img {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
  opacity: 0.95;
}

/* Figure caption styling with links - ensure centering */
.story-post-content figure figcaption,
.story-content figure figcaption,
.story-post-content figure.kg-image-card figcaption,
.story-content figure.kg-image-card figcaption,
.story-post-content .kg-image-card figcaption,
.story-content .kg-image-card figcaption {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
  margin-top: 0.5rem;
  padding: 0 1rem;
  line-height: 1.4;
  text-align: center !important;
  display: block;
  width: 100%;
}

.story-post-content figure figcaption a,
.story-content figure figcaption a,
.story-post-content figure.kg-image-card figcaption a,
.story-content figure.kg-image-card figcaption a,
.story-post-content .kg-image-card figcaption a,
.story-content .kg-image-card figcaption a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-color: #60a5fa;
  text-decoration-thickness: 1px;
  transition: all 0.2s ease;
  display: inline;
  text-align: center;
}

.story-post-content figure figcaption a:hover,
.story-content figure figcaption a:hover {
  color: #1e40af;
  text-decoration-color: #3b82f6;
  text-decoration-thickness: 2px;
}

/* Responsive adjustments for images */
@media (max-width: 768px) {
  .blog-image {
    margin: 1rem auto;
    border-radius: 6px;
    padding: 3px;
  }
  
  /* Keep smaller sizes the same on mobile */
  .blog-image-50 {
    max-width: 50px !important;
  }
  
  .blog-image-100 {
    max-width: 100px !important;
  }
  
  .blog-image-200 {
    max-width: 200px !important;
  }
  
  .blog-image-250 {
    max-width: 250px !important;
  }
  
  /* Scale down larger sizes on mobile */
  .blog-image-300 {
    max-width: 250px !important;
  }
  
  .blog-image-400 {
    max-width: 300px !important;
  }
  
  .blog-image-450,
  .blog-image-500,
  .blog-image-600,
  .blog-image-full {
    max-width: 100% !important;
  }
  
  /* On mobile, floated images become full width and centered */
  .blog-image-left,
  .blog-image-right {
    float: none;
    display: block;
    margin: 1rem auto;
    max-width: 100%;
  }
}

/* Dark mode support for blog images */
@media (prefers-color-scheme: dark) {
  .blog-image {
    border-color: #f39c12;
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .blog-image-yellow {
    border-color: #f39c12;
    background-color: rgba(254, 249, 231, 0.2);
  }
  
  .blog-image-dark {
    border-color: #5a6c7d;
    background-color: rgba(44, 62, 80, 0.6);
  }
  
  .story-post-content figure img,
  .story-content figure img {
    border-color: #f39c12;
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  /* Dark mode for clickable images */
  .story-post-content figure a:hover img,
  .story-content figure a:hover img,
  .story-post-content a:hover > img,
  .story-content a:hover > img {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  }
  
  /* Dark mode for caption links */
  .story-post-content figure figcaption {
    color: #aaa;
  }
  
  .story-post-content figure figcaption a,
  .story-content figure figcaption a {
    color: #60a5fa;
    text-decoration-color: #93c5fd;
  }
  
  .story-post-content figure figcaption a:hover,
  .story-content figure figcaption a:hover {
    color: #93c5fd;
    text-decoration-color: #bfdbfe;
  }
}

/* ============================================================================
   GHOST REQUIRED WIDTH CLASSES - Required for theme activation
   ============================================================================ */

/* Required by Ghost for card width styling */
.kg-width-wide {
  position: relative;
  width: 85%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.kg-width-full {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  left: 0;
  right: 0;
}

/* Responsive adjustments for width classes */
@media (max-width: 768px) {
  .kg-width-wide {
    width: 100%;
    max-width: 100%;
  }
  
  .kg-width-full {
    width: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
    position: relative;
  }
}

/* ============================================================================
   YOUTUBE EMBED STYLES - Responsive video embeds with start/end times
   ============================================================================ */

.youtube-embed-wrapper {
  margin: 2rem auto;
  max-width: 100%;
  width: 100%;
}

.youtube-embed-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.youtube-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Error styling for missing video ID */
.youtube-embed-error {
  margin: 2rem auto;
  max-width: 100%;
  padding: 1rem;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  color: #721c24;
}

.youtube-embed-error p {
  margin: 0;
}

.youtube-embed-error code {
  background-color: #f1b0b7;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .youtube-embed-wrapper {
    margin: 1.5rem auto;
  }
  
  .youtube-embed-container {
    border-radius: 4px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .youtube-embed-container {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }
  
  .youtube-embed-error {
    background-color: #4a1f1f;
    border-color: #6b2a2a;
    color: #f8d7da;
  }
  
  .youtube-embed-error code {
    background-color: #6b2a2a;
  }
}

/* ============================================================================
   SIDENOTE COMPONENT - CSS-only callout boxes matching Jekyll theme
   ============================================================================ */

/* Base sidenote styling - blockquote-based */
/* Works with both HTML structure and Ghost's native markdown blockquotes */
blockquote.custom-sidenote {
  all: unset !important;
  display: block !important;
  margin: 2.5rem 1.5rem !important;
  padding: 0 !important;
  position: relative !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  clear: both !important;
  border: none !important;
  border-left: none !important;
  background: none !important;
  font-style: normal !important;
  quotes: none !important;
}

/* Support for Ghost's native markdown blockquotes (without sidenote-body wrapper) */
/* Use data-icon and data-title attributes for badge content */
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) {
  padding: 1.5rem 1.5rem 1.2rem 1.5rem !important;
  border-radius: 8px !important;
  border: 2px dotted #999 !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
  margin-top: 1rem !important;
}

blockquote.custom-sidenote[data-title]:not(.sidenote-has-body)::before {
  content: attr(data-icon) " " attr(data-title);
  position: absolute !important;
  top: -0.6rem !important;
  left: 1rem !important;
  display: flex !important;
  align-items: center !important;
  padding: 0.3rem 0.8rem !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  border-radius: 12px !important;
  z-index: 10 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  white-space: nowrap !important;
}

blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) p:first-child {
  margin-top: 0 !important;
}

blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) p:last-child {
  margin-bottom: 0 !important;
}

/* Floating badge positioned on top-left edge */
blockquote.custom-sidenote .sidenote-badge {
  position: absolute !important;
  top: -0.6rem !important;
  left: 1rem !important;
  display: flex !important;
  align-items: center !important;
  padding: 0.3rem 0.8rem !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  border-radius: 12px !important;
  z-index: 10 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

blockquote.custom-sidenote .sidenote-icon {
  margin-right: 0.4rem !important;
  font-size: 1em !important;
}

blockquote.custom-sidenote .sidenote-title {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
}

blockquote.custom-sidenote .sidenote-anchor {
  color: inherit !important;
  text-decoration: none !important;
  opacity: 0.3 !important;
  margin-right: 0.3rem !important;
  transition: opacity 0.2s ease !important;
}

blockquote.custom-sidenote .sidenote-anchor:hover {
  opacity: 1 !important;
}

/* Main content area with dotted border */
blockquote.custom-sidenote .sidenote-body {
  display: block !important;
  padding: 1.5rem 1.5rem 1.2rem 1.5rem !important;
  border-radius: 8px !important;
  border: 2px dotted #999 !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
  font-style: normal !important;
}

blockquote.custom-sidenote .sidenote-body p:first-child {
  margin-top: 0 !important;
}

blockquote.custom-sidenote .sidenote-body p:last-child {
  margin-bottom: 0 !important;
}

blockquote.custom-sidenote .sidenote-body ul,
blockquote.custom-sidenote .sidenote-body ol {
  margin: 0.5rem 0 !important;
  padding-left: 1.5rem !important;
}

blockquote.custom-sidenote .sidenote-body code {
  font-size: 0.9em !important;
  padding: 2px 4px !important;
  border-radius: 3px !important;
  background-color: rgba(0, 0, 0, 0.05) !important;
}

blockquote.custom-sidenote .sidenote-body a {
  color: #2563eb !important;
  text-decoration: underline !important;
}

blockquote.custom-sidenote .sidenote-body a:hover {
  color: #1e40af !important;
}

/* Image styling within sidenotes */
/* Base styles - only apply max-width: 100% if not using blog-image size classes */
blockquote.custom-sidenote .sidenote-body img:not([class*="blog-image-"]):not(.blog-image-full),
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img:not([class*="blog-image-"]):not(.blog-image-full),
blockquote.custom-sidenote img:not([class*="blog-image-"]):not(.blog-image-full) {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 1rem auto !important;
  border-radius: 4px !important;
}

/* Blog-image base styles within sidenotes */
blockquote.custom-sidenote .sidenote-body img.blog-image,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image,
blockquote.custom-sidenote img.blog-image {
  display: block !important;
  margin: 1rem auto !important;
  border-radius: 8px !important;
  border: 2px dotted #f39c12 !important;
  padding: 10px !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
  height: auto !important;
}

/* Blog-image size classes within sidenotes - must override the base max-width */
blockquote.custom-sidenote .sidenote-body img.blog-image-50,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-50,
blockquote.custom-sidenote img.blog-image-50 {
  max-width: 50px !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-100,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-100,
blockquote.custom-sidenote img.blog-image-100 {
  max-width: 100px !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-200,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-200,
blockquote.custom-sidenote img.blog-image-200 {
  max-width: 200px !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-250,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-250,
blockquote.custom-sidenote img.blog-image-250 {
  max-width: 250px !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-300,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-300,
blockquote.custom-sidenote img.blog-image-300 {
  max-width: 300px !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-400,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-400,
blockquote.custom-sidenote img.blog-image-400 {
  max-width: 400px !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-450,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-450,
blockquote.custom-sidenote img.blog-image-450 {
  max-width: 450px !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-500,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-500,
blockquote.custom-sidenote img.blog-image-500 {
  max-width: 500px !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-600,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-600,
blockquote.custom-sidenote img.blog-image-600 {
  max-width: 600px !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-full,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-full,
blockquote.custom-sidenote img.blog-image-full {
  max-width: 100% !important;
}

/* Blog-image color variants within sidenotes */
blockquote.custom-sidenote .sidenote-body img.blog-image-yellow,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-yellow,
blockquote.custom-sidenote img.blog-image-yellow {
  border-color: #f39c12 !important;
  background-color: rgba(254, 249, 231, 0.4) !important;
}

blockquote.custom-sidenote .sidenote-body img.blog-image-dark,
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image-dark,
blockquote.custom-sidenote img.blog-image-dark {
  border-color: #34495e !important;
  background-color: rgba(44, 62, 80, 0.4) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Images in markdown-friendly sidenotes (within paragraphs) */
blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) p img {
  margin: 1rem 0 !important;
}

/* Responsive images in sidenotes */
@media (max-width: 768px) {
  blockquote.custom-sidenote .sidenote-body img:not([class*="blog-image-"]):not(.blog-image-full),
  blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img:not([class*="blog-image-"]):not(.blog-image-full),
  blockquote.custom-sidenote img:not([class*="blog-image-"]):not(.blog-image-full) {
    margin: 0.75rem auto !important;
  }
  
  blockquote.custom-sidenote .sidenote-body img.blog-image,
  blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) img.blog-image,
  blockquote.custom-sidenote img.blog-image {
    margin: 0.75rem auto !important;
  }
}

/* Info style (blue) - Light theme */
blockquote.custom-sidenote-info .sidenote-badge,
blockquote.custom-sidenote-info[data-title]:not(.sidenote-has-body)::before {
  background-color: #3498db !important;
  color: white !important;
}

blockquote.custom-sidenote-info .sidenote-body,
blockquote.custom-sidenote-info[data-title]:not(.sidenote-has-body) {
  border-color: #3498db !important;
  background-color: #e3f2fd !important;
  color: #333 !important;
}

blockquote.custom-sidenote-info .sidenote-body code {
  background-color: rgba(52, 152, 219, 0.1) !important;
  color: #2980b9 !important;
}

blockquote.custom-sidenote-info .sidenote-body a {
  color: #2980b9 !important;
}

blockquote.custom-sidenote-info .sidenote-body a:hover {
  color: #1f5f8b !important;
}

/* Warning style (orange) - Light theme */
blockquote.custom-sidenote-warning .sidenote-badge,
blockquote.custom-sidenote-warning[data-title]:not(.sidenote-has-body)::before {
  background-color: #f39c12 !important;
  color: white !important;
}

blockquote.custom-sidenote-warning .sidenote-body,
blockquote.custom-sidenote-warning[data-title]:not(.sidenote-has-body) {
  border-color: #f39c12 !important;
  background-color: #fef5e7 !important;
  color: #333 !important;
}

blockquote.custom-sidenote-warning .sidenote-body code {
  background-color: rgba(243, 156, 18, 0.1) !important;
  color: #d68910 !important;
}

blockquote.custom-sidenote-warning .sidenote-body a {
  color: #d68910 !important;
}

blockquote.custom-sidenote-warning .sidenote-body a:hover {
  color: #b9770e !important;
}

/* Tip style (green) - Light theme */
blockquote.custom-sidenote-tip .sidenote-badge,
blockquote.custom-sidenote-tip[data-title]:not(.sidenote-has-body)::before {
  background-color: #27ae60 !important;
  color: white !important;
}

blockquote.custom-sidenote-tip .sidenote-body,
blockquote.custom-sidenote-tip[data-title]:not(.sidenote-has-body) {
  border-color: #27ae60 !important;
  background-color: #eafaf1 !important;
  color: #333 !important;
}

blockquote.custom-sidenote-tip .sidenote-body code {
  background-color: rgba(39, 174, 96, 0.1) !important;
  color: #229954 !important;
}

blockquote.custom-sidenote-tip .sidenote-body a {
  color: #229954 !important;
}

blockquote.custom-sidenote-tip .sidenote-body a:hover {
  color: #1e8449 !important;
}

/* Important style (red) - Light theme */
blockquote.custom-sidenote-important .sidenote-badge,
blockquote.custom-sidenote-important[data-title]:not(.sidenote-has-body)::before {
  background-color: #e74c3c !important;
  color: white !important;
}

blockquote.custom-sidenote-important .sidenote-body,
blockquote.custom-sidenote-important[data-title]:not(.sidenote-has-body) {
  border-color: #e74c3c !important;
  background-color: #fdedec !important;
  color: #333 !important;
}

blockquote.custom-sidenote-important .sidenote-body code {
  background-color: rgba(231, 76, 60, 0.1) !important;
  color: #c0392b !important;
}

blockquote.custom-sidenote-important .sidenote-body a {
  color: #c0392b !important;
}

blockquote.custom-sidenote-important .sidenote-body a:hover {
  color: #a93226 !important;
}

/* TL;DR style (purple) - Light theme */
blockquote.custom-sidenote-tldr .sidenote-badge,
blockquote.custom-sidenote-tldr[data-title]:not(.sidenote-has-body)::before {
  background-color: #8e44ad !important;
  color: white !important;
}

blockquote.custom-sidenote-tldr .sidenote-body,
blockquote.custom-sidenote-tldr[data-title]:not(.sidenote-has-body) {
  border-color: #8e44ad !important;
  background-color: #f4ecf7 !important;
  color: #333 !important;
}

blockquote.custom-sidenote-tldr .sidenote-body code {
  background-color: rgba(142, 68, 173, 0.1) !important;
  color: #7d3c98 !important;
}

blockquote.custom-sidenote-tldr .sidenote-body a {
  color: #7d3c98 !important;
}

blockquote.custom-sidenote-tldr .sidenote-body a:hover {
  color: #6c3483 !important;
}

/* Context style (gray) - Light theme */
blockquote.custom-sidenote-context .sidenote-badge,
blockquote.custom-sidenote-context[data-title]:not(.sidenote-has-body)::before {
  background-color: #7f8c8d !important;
  color: white !important;
}

blockquote.custom-sidenote-context .sidenote-body,
blockquote.custom-sidenote-context[data-title]:not(.sidenote-has-body) {
  border-color: #7f8c8d !important;
  background-color: #f8f9fa !important;
  color: #333 !important;
}

blockquote.custom-sidenote-context .sidenote-body code {
  background-color: rgba(127, 140, 141, 0.1) !important;
  color: #5d6d7e !important;
}

blockquote.custom-sidenote-context .sidenote-body a {
  color: #5d6d7e !important;
}

blockquote.custom-sidenote-context .sidenote-body a:hover {
  color: #34495e !important;
}

/* Error style - Light theme */
blockquote.custom-sidenote-error .sidenote-badge,
blockquote.custom-sidenote-error[data-title]:not(.sidenote-has-body)::before {
  background-color: #e74c3c !important;
  color: white !important;
}

blockquote.custom-sidenote-error .sidenote-body,
blockquote.custom-sidenote-error[data-title]:not(.sidenote-has-body) {
  border-color: #e74c3c !important;
  background-color: #fdedec !important;
  color: #333 !important;
}

blockquote.custom-sidenote-error .sidenote-body code {
  background-color: rgba(231, 76, 60, 0.1) !important;
  color: #c0392b !important;
  font-family: 'Courier New', monospace !important;
}

blockquote.custom-sidenote-error .sidenote-body a {
  color: #c0392b !important;
}

blockquote.custom-sidenote-error .sidenote-body a:hover {
  color: #a93226 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  blockquote.custom-sidenote {
    margin: 2rem 0.8rem !important;
    font-size: 0.9rem !important;
  }
  
  blockquote.custom-sidenote .sidenote-badge,
  blockquote.custom-sidenote[data-title]:not(.sidenote-has-body)::before {
    top: -0.5rem !important;
    left: 0.8rem !important;
    padding: 0.25rem 0.6rem !important;
    font-size: 0.75rem !important;
  }
  
  blockquote.custom-sidenote .sidenote-title {
    font-size: 0.75rem !important;
  }
  
  blockquote.custom-sidenote .sidenote-anchor {
    margin-right: 0.2rem !important;
  }
  
  blockquote.custom-sidenote .sidenote-body,
  blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) {
    padding: 1.25rem 1.25rem 1rem 1.25rem !important;
  }
}

@media (max-width: 480px) {
  blockquote.custom-sidenote {
    margin: 1.5rem 0.5rem !important;
  }
  
  blockquote.custom-sidenote .sidenote-badge,
  blockquote.custom-sidenote[data-title]:not(.sidenote-has-body)::before {
    left: 0.5rem !important;
    padding: 0.2rem 0.5rem !important;
    font-size: 0.7rem !important;
  }
  
  blockquote.custom-sidenote .sidenote-title {
    font-size: 0.7rem !important;
  }
  
  blockquote.custom-sidenote .sidenote-body,
  blockquote.custom-sidenote[data-title]:not(.sidenote-has-body) {
    padding: 1rem 0.8rem 0.8rem 0.8rem !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  blockquote.custom-sidenote .sidenote-body {
    background-color: #2c3e50 !important;
    border-color: #7f8c8d !important;
    color: #ecf0f1 !important;
  }
  
  blockquote.custom-sidenote .sidenote-body code {
    background-color: #34495e !important;
    border: 1px solid #5d6d7e !important;
  }
  
  blockquote.custom-sidenote .sidenote-body a {
    color: #85c1e9 !important;
  }
  
  blockquote.custom-sidenote .sidenote-body a:hover {
    color: #aed6f1 !important;
  }
  
  /* Info - Dark theme */
  blockquote.custom-sidenote-info .sidenote-body,
  blockquote.custom-sidenote-info[data-title]:not(.sidenote-has-body) {
    border-color: #3498db !important;
    background-color: #2c3e50 !important;
    color: #ecf0f1 !important;
  }
  
  blockquote.custom-sidenote-info .sidenote-body code {
    background-color: #34495e !important;
    color: #85c1e9 !important;
  }
  
  blockquote.custom-sidenote-info .sidenote-body a {
    color: #85c1e9 !important;
  }
  
  blockquote.custom-sidenote-info .sidenote-body a:hover {
    color: #aed6f1 !important;
  }
  
  /* Warning - Dark theme */
  blockquote.custom-sidenote-warning .sidenote-body,
  blockquote.custom-sidenote-warning[data-title]:not(.sidenote-has-body) {
    border-color: #f39c12 !important;
    background-color: #2c3e50 !important;
    color: #ecf0f1 !important;
  }
  
  blockquote.custom-sidenote-warning .sidenote-body code {
    background-color: #34495e !important;
    color: #f7dc6f !important;
  }
  
  blockquote.custom-sidenote-warning .sidenote-body a {
    color: #f7dc6f !important;
  }
  
  blockquote.custom-sidenote-warning .sidenote-body a:hover {
    color: #fcf3cf !important;
  }
  
  /* Tip - Dark theme */
  blockquote.custom-sidenote-tip .sidenote-body,
  blockquote.custom-sidenote-tip[data-title]:not(.sidenote-has-body) {
    border-color: #27ae60 !important;
    background-color: #2c3e50 !important;
    color: #ecf0f1 !important;
  }
  
  blockquote.custom-sidenote-tip .sidenote-body code {
    background-color: #34495e !important;
    color: #82e0aa !important;
  }
  
  blockquote.custom-sidenote-tip .sidenote-body a {
    color: #82e0aa !important;
  }
  
  blockquote.custom-sidenote-tip .sidenote-body a:hover {
    color: #abebc6 !important;
  }
  
  /* Important - Dark theme */
  blockquote.custom-sidenote-important .sidenote-body,
  blockquote.custom-sidenote-important[data-title]:not(.sidenote-has-body) {
    border-color: #e74c3c !important;
    background-color: #2c3e50 !important;
    color: #ecf0f1 !important;
  }
  
  blockquote.custom-sidenote-important .sidenote-body code {
    background-color: #34495e !important;
    color: #f1948a !important;
  }
  
  blockquote.custom-sidenote-important .sidenote-body a {
    color: #f1948a !important;
  }
  
  blockquote.custom-sidenote-important .sidenote-body a:hover {
    color: #fadbd8 !important;
  }
  
  /* TL;DR - Dark theme */
  blockquote.custom-sidenote-tldr .sidenote-body,
  blockquote.custom-sidenote-tldr[data-title]:not(.sidenote-has-body) {
    border-color: #34495e !important;
    background-color: #2c3e50 !important;
    color: #ecf0f1 !important;
  }
  
  blockquote.custom-sidenote-tldr .sidenote-body code {
    background-color: #34495e !important;
    color: #f39c12 !important;
  }
  
  blockquote.custom-sidenote-tldr .sidenote-body a {
    color: #3498db !important;
  }
  
  blockquote.custom-sidenote-tldr .sidenote-body a:hover {
    color: #5dade2 !important;
  }
  
  /* Context - Dark theme */
  blockquote.custom-sidenote-context .sidenote-body,
  blockquote.custom-sidenote-context[data-title]:not(.sidenote-has-body) {
    border-color: #7f8c8d !important;
    background-color: #2c3e50 !important;
    color: #ecf0f1 !important;
  }
  
  blockquote.custom-sidenote-context .sidenote-body code {
    background-color: #34495e !important;
    color: #bdc3c7 !important;
  }
  
  blockquote.custom-sidenote-context .sidenote-body a {
    color: #bdc3c7 !important;
  }
  
  blockquote.custom-sidenote-context .sidenote-body a:hover {
    color: #d5dbdb !important;
  }
  
  /* Error - Dark theme */
  blockquote.custom-sidenote-error .sidenote-body,
  blockquote.custom-sidenote-error[data-title]:not(.sidenote-has-body) {
    border-color: #e74c3c !important;
    background-color: #2c3e50 !important;
    color: #ecf0f1 !important;
  }
  
  blockquote.custom-sidenote-error .sidenote-body code {
    background-color: #34495e !important;
    color: #f1948a !important;
  }
  
  blockquote.custom-sidenote-error .sidenote-body a {
    color: #f1948a !important;
  }
  
  blockquote.custom-sidenote-error .sidenote-body a:hover {
    color: #fadbd8 !important;
  }
}

/* ============================================================================
   MARKDOWN TABLE STYLES - Matching Jekyll theme table styling
   ============================================================================ */

/* Base table styling - matching Jekyll theme */
.story-post-content table:not(.rouge-table),
.story-content table:not(.rouge-table),
.story-post-content table,
.story-content table {
  border-collapse: collapse;
  border-radius: 0 !important;
  display: table;
  margin: 1.5rem 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.story-post-content table td,
.story-content table td,
.story-post-content table th,
.story-content table th {
  padding: 0.5em 0.75em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.story-post-content table td:first-child,
.story-content table td:first-child,
.story-post-content table th:first-child,
.story-content table th:first-child {
  padding-left: 1rem;
  border-left: 1px solid var(--border-color, #e0e0e0);
}

.story-post-content table td:last-child,
.story-content table td:last-child,
.story-post-content table th:last-child,
.story-content table th:last-child {
  padding-right: 1rem;
  border-right: 1px solid var(--border-color, #e0e0e0);
}

.story-post-content table > *:first-child,
.story-content table > *:first-child {
  border-top: 1px solid var(--border-color, #e0e0e0);
}

.story-post-content table > *:last-child,
.story-content table > *:last-child {
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

/* Table header styling */
.story-post-content table thead,
.story-content table thead {
  background-color: var(--body-bg, #ffffff);
  transition: background-color 0.2s ease;
}

.story-post-content table thead th,
.story-content table thead th {
  font-weight: 600;
  text-align: left;
}

/* Table body styling with striping */
.story-post-content table thead + tbody,
.story-content table thead + tbody,
.story-post-content table tbody + tbody,
.story-content table tbody + tbody,
.story-post-content table tfoot,
.story-content table tfoot {
  border-top: 1px solid var(--border-color, #e0e0e0);
  transition: border-color 0.2s ease;
}

/* Even rows - white/body background */
.story-post-content table tbody tr:nth-child(even) td,
.story-content table tbody tr:nth-child(even) td,
.story-post-content table tbody tr:nth-child(even) th,
.story-content table tbody tr:nth-child(even) th {
  background-color: var(--body-bg, #ffffff);
  transition: background-color 0.2s ease;
}

/* Odd rows - gray background for striping */
.story-post-content table tbody tr:nth-child(odd) td,
.story-content table tbody tr:nth-child(odd) td,
.story-post-content table tbody tr:nth-child(odd) th,
.story-content table tbody tr:nth-child(odd) th {
  background-color: var(--gray-bg, rgba(0,0,0,.025));
  transition: background-color 0.2s ease;
}

/* Table cell borders */
.story-post-content table td,
.story-content table td,
.story-post-content table th,
.story-content table th {
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

/* Responsive table adjustments */
@media (max-width: 768px) {
  .story-post-content table,
  .story-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
  }
  
  .story-post-content table td,
  .story-content table td,
  .story-post-content table th,
  .story-content table th {
    padding: 0.4em 0.5em;
    font-size: 0.9rem;
  }
  
  .story-post-content table td:first-child,
  .story-content table td:first-child,
  .story-post-content table th:first-child,
  .story-content table th:first-child {
    padding-left: 0.75rem;
  }
  
  .story-post-content table td:last-child,
  .story-content table td:last-child,
  .story-post-content table th:last-child,
  .story-content table th:last-child {
    padding-right: 0.75rem;
  }
}

/* Dark mode support for tables */
@media (prefers-color-scheme: dark) {
  .story-post-content table thead,
  .story-content table thead {
    background-color: var(--body-bg, #1a1a1a);
  }
  
  .story-post-content table tbody tr:nth-child(even) td,
  .story-content table tbody tr:nth-child(even) td,
  .story-post-content table tbody tr:nth-child(even) th,
  .story-content table tbody tr:nth-child(even) th {
    background-color: var(--body-bg, #1a1a1a);
  }
  
  .story-post-content table tbody tr:nth-child(odd) td,
  .story-content table tbody tr:nth-child(odd) td,
  .story-post-content table tbody tr:nth-child(odd) th,
  .story-content table tbody tr:nth-child(odd) th {
    background-color: var(--gray-bg, rgba(255,255,255,.05));
  }
  
  .story-post-content table td,
  .story-content table td,
  .story-post-content table th,
  .story-content table th {
    border-color: var(--border-color, #333333);
  }
}

/* ============================================================================
   Responsive Table Wrapper
   ============================================================================ */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0;
}

@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.9rem;
  }
  
  .table-responsive table {
    min-width: 600px; /* Ensure table doesn't get too compressed */
  }
}

/* ============================================================================
   Responsive Image Table Component
   ============================================================================ */

.responsive-image-table {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.responsive-image-table[data-columns="1"] { 
  grid-template-columns: 1fr; 
}

.responsive-image-table[data-columns="2"] { 
  grid-template-columns: repeat(2, 1fr); 
}

.responsive-image-table[data-columns="3"] { 
  grid-template-columns: repeat(3, 1fr); 
}

.responsive-image-table[data-columns="4"] { 
  grid-template-columns: repeat(4, 1fr); 
}

.responsive-image-table[data-columns="5"] { 
  grid-template-columns: repeat(5, 1fr); 
}

.responsive-image-table[data-columns="6"] { 
  grid-template-columns: repeat(6, 1fr); 
}

.image-table-cell {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 0.25rem;
}

.responsive-image-table[data-borders="true"] .image-table-cell {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.image-table-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.responsive-image-table[data-fill-images="true"] .image-table-img {
  object-fit: contain;
}

.responsive-image-table[data-modal-enabled="true"] .image-table-img {
  cursor: pointer;
}

.responsive-image-table[data-modal-enabled="true"] .image-table-img:hover {
  transform: scale(1.05);
}

.image-table-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

.image-table-caption p {
  margin: 0;
}

.image-table-empty {
  background: rgba(0, 0, 0, 0.02);
}

/* Modal styles - only needed if modal_enabled is used */
.image-table-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.image-table-modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.85) !important;
  cursor: pointer !important;
  z-index: 9999 !important;
}

.image-table-modal-content {
  position: relative !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
  background: transparent !important;
  border-radius: 0.5rem !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10000 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.image-table-modal-close {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  color: white !important;
  background: rgba(0, 0, 0, 0.7) !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  cursor: pointer !important;
  z-index: 10001 !important;
  transition: background 0.2s ease !important;
  line-height: 1 !important;
}

.image-table-modal-close:hover {
  background: rgba(0, 0, 0, 0.9) !important;
}

.image-table-modal-img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
  object-fit: contain !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

/* Responsive adjustments for image tables */
@media (max-width: 768px) {
  .responsive-image-table[data-columns="4"] { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .responsive-image-table[data-columns="5"] { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .responsive-image-table[data-columns="6"] { 
    grid-template-columns: repeat(2, 1fr); 
  }
}

@media (max-width: 480px) {
  .responsive-image-table[data-columns="3"] { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .responsive-image-table[data-columns="4"] { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .responsive-image-table[data-columns="5"] { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .responsive-image-table[data-columns="6"] { 
    grid-template-columns: repeat(2, 1fr); 
  }
}