/* ==========================================================================
   GLYSIMI CMS - WEBDESIGN PROPOSAL STYLESHEET
   Complete CSS architecture following existing structure and naming conventions
   ========================================================================== */

/* ==========================================================================
   IMPORTS AND FONTS
   ========================================================================== */

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   CSS VARIABLES - Design tokens and brand foundation
   ========================================================================== */

:root {
  /* Brand Colors - Updated Teal Palette */
  --glysimi-teal: #13808f;
  --glysimi-teal-dark: #0f6b77;
  --glysimi-light-teal: #e6f3f5;
  --glysimi-teal-light: #1a9aab;
  --glysimi-teal-lighter: #e6f3f5;

  /* Complementary warm colors */
  --warm-orange: #e67e49;
  --warm-orange-light: #fdf2ed;
  --warm-gold: #d4a574;
  --warm-gold-light: #fbf7f0;

  /* Cool supporting colors */
  --cool-blue: #5a9bd4;
  --cool-blue-light: #eff7fc;
  --sage-green: #7bb3a0;
  --sage-green-light: #f0f8f6;

  /* Background & Surface Colors */
  --background-soft: #fafbfc;
  --background-white: #FFFFFF;
  --background-warm: #FDFDFD;

  /* Text Colors - Improved contrast for readability */
  --text-primary: #1a202c;        /* Darker for better contrast */
  --text-secondary: #4a5568;      /* Darker secondary text */
  --text-muted: #718096;          /* Slightly darker muted text */
  --text-accent: var(--glysimi-teal);

  /* Border & Surface */
  --border-color: #E2E8F0;
  --border-light: #F1F5F9;
  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

  /* Enhanced Shadows */
  --shadow-elevated: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-brand: 0 8px 25px -8px rgba(19, 128, 143, 0.6);

  /* Border Radius */
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;

  /* Typography Scale */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.0625rem;
  --font-size-xl: 1.125rem;
  --font-size-2xl: 1.25rem;
  --font-size-3xl: 1.5rem;
  --font-size-4xl: 1.875rem;
  --font-size-5xl: 2.25rem;

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 1.75;

  /* Spacing Scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1rem;
  --spacing-xl: 1.25rem;
  --spacing-2xl: 1.5rem;
  --spacing-3xl: 1.75rem;
  --spacing-4xl: 2rem;
  --spacing-5xl: 2.5rem;
  --spacing-6xl: 3rem;

  /* Content Widths */
  --content-width: 65ch;
  --content-width-wide: 75ch;
  --content-width-narrow: 55ch;

  /* Enhanced spacing for better readability */
  --content-line-height: 1.7;
  --content-paragraph-spacing: 1.5rem;

  /* Icon sizing consistency */
  --icon-size-sm: 1rem;
  --icon-size-md: 1.25rem;
  --icon-size-lg: 1.5rem;

  /* Enhanced gradients - more visible */
  --gradient-hero: linear-gradient(135deg,
    #e6f3f5 0%,
    #f5f8f9 25%,
    rgba(255, 255, 255, 0.9) 50%,
    #ffffff 100%
  );

  /* ==========================================================================
     TAILWIND CONFIGURATION AS CSS VARIABLES
     Replaces embedded JavaScript Tailwind config in HTML files
     ========================================================================== */

  /* Font Family Configuration */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Extended Tailwind Color Palette */
  --tw-color-brand-teal: #13808f;
  --tw-color-brand-teal-dark: #0f6b77;
  --tw-color-brand-teal-light: #1a9aab;
  --tw-color-brand-teal-lighter: #e6f3f5;

  /* Complementary warm colors */
  --tw-color-warm-orange: #e67e49;
  --tw-color-warm-orange-light: #fdf2ed;
  --tw-color-warm-gold: #d4a574;
  --tw-color-warm-gold-light: #fbf7f0;

  /* Cool supporting colors */
  --tw-color-cool-blue: #5a9bd4;
  --tw-color-cool-blue-light: #eff7fc;
  --tw-color-sage-green: #7bb3a0;
  --tw-color-sage-green-light: #f0f8f6;

  /* Neutral palette */
  --tw-color-warm-gray: #f8f9fa;
  --tw-color-text-primary: #1e293b;
  --tw-color-text-secondary: #64748b;
  --tw-color-text-muted: #94a3b8;

  /* Background colors */
  --tw-color-background-soft: #fafbfc;
}

/* ==========================================================================
   GLOBAL BASE STYLES
   ========================================================================== */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--text-primary);
  background: var(--background-soft);
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus styles */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: 2px solid var(--glysimi-teal);
  outline-offset: 2px;
  border-radius: var(--border-radius);
}

/* ==========================================================================
   UNIVERSAL ICON COLOR SYSTEM
   ========================================================================== */

/* Universal icon color rule - applies to all contexts */
.icon,
[data-lucide],
.meta-icon,
.content-icon svg,
.card-action-icon,
.feature-icon,
svg:not(.logo) {
  color: var(--glysimi-teal);
}

/* ==========================================================================
   TYPOGRAPHY SYSTEM - Headings and base text
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-xl);    /* Reduced from 3xl to xl for closer content */
  margin-top: var(--spacing-4xl);     /* Reduced from 5xl to 4xl */
  color: var(--glysimi-teal);
  letter-spacing: -0.02em;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child {
  margin-top: 0;
}

h1 {
  font-size: var(--font-size-4xl);
  line-height: var(--line-height-tight);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-snug);
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-3xl);
  margin-top: var(--spacing-6xl);
}

/* h3, h4, h5, h6 share font-weight: 600 */
h3, h4, h5, h6 {
  font-weight: 600;
}

h3 {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-snug);
  margin-bottom: var(--spacing-2xl);
  margin-top: var(--spacing-5xl);
}

h4 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-normal);
  margin-bottom: var(--spacing-xl);
  margin-top: var(--spacing-4xl);
}

h5 {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-normal);
  margin-bottom: var(--spacing-lg);
  margin-top: var(--spacing-3xl);
}

h6 {
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  margin-bottom: var(--spacing-lg);
  margin-top: var(--spacing-3xl);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

p {
  margin-bottom: var(--spacing-2xl);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
  max-width: var(--content-width);
}

/* Typography enhancements - brand color accents */
/* These are now redundant since global headers use teal color */

/* Better text body readability - handled by prose system below */

/* ==========================================================================
   NAVIGATION SYSTEM
   ========================================================================== */

.nav-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(19, 128, 143, 0.1);
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--glysimi-teal);
}

.nav-link-active {
  color: var(--glysimi-teal);
  font-weight: 600;
}

/* ==========================================================================
   DROPDOWN SYSTEM - Navigation dropdowns for Resources, Search, Language
   ========================================================================== */

/* Dropdown containers */
.dropdown,
.search-dropdown,
.language-dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown triggers */
.dropdown-trigger,
.search-trigger,
.language-trigger {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

.dropdown-trigger:hover,
.search-trigger:hover,
.language-trigger:hover {
  color: var(--glysimi-teal);
  background-color: var(--glysimi-light-teal);
}

/* Dropdown menus */
.dropdown-menu,
.search-dropdown-menu,
.language-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 200px;
  margin-top: 0.5rem;
  background: var(--background-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

/* Show dropdown when active */
.dropdown.active .dropdown-menu,
.search-dropdown.active .search-dropdown-menu,
.language-dropdown.active .language-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown items */
.dropdown-item,
.language-option {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-light);
}

.dropdown-item:last-child,
.language-option:last-child {
  border-bottom: none;
}

.dropdown-item:hover,
.language-option:hover {
  background-color: var(--glysimi-light-teal);
  color: var(--glysimi-teal);
}

/* Search dropdown specific styling */
.search-dropdown-menu {
  min-width: 300px;
  padding: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--glysimi-teal);
  box-shadow: 0 0 0 2px var(--glysimi-light-teal);
}

/* Language dropdown specific styling */
.language-dropdown-menu {
  min-width: 150px;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-sm);
}

/* Chevron icon animation */
.dropdown-trigger .chevron-icon {
  transition: transform 0.2s ease;
}

.dropdown.active .dropdown-trigger .chevron-icon {
  transform: rotate(180deg);
}

/* Mobile dropdown adjustments */
@media (max-width: 768px) {
  .dropdown-menu,
  .search-dropdown-menu,
  .language-dropdown-menu {
    position: fixed;
    top: auto;
    left: 1rem;
    right: 1rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
  }
}

/* ==========================================================================
   BUTTON SYSTEM
   ========================================================================== */

.btn-capsule {
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--glysimi-teal);
  color: white;
  border: 2px solid var(--glysimi-teal);
}

.btn-primary:hover {
  background-color: var(--glysimi-teal-dark);
  border-color: var(--glysimi-teal-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

.btn-secondary {
  background-color: transparent;
  color: var(--glysimi-teal);
  border: 2px solid var(--glysimi-teal);
}

.btn-secondary:hover {
  background-color: var(--glysimi-teal);
  color: white;
  border-color: var(--glysimi-teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

/* ==========================================================================
   LINK STYLING SYSTEM - Internal, external, broken links
   ========================================================================== */

.internal-link {
  color: var(--text-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
}

.internal-link:hover {
  border-bottom-color: var(--text-accent);
  color: var(--glysimi-teal-dark);
}

.unpublished-link {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 400;
  cursor: help;
}

.broken-link {
/*  color: var(--text-muted);  */
  font-style: italic;
  opacity: 0.8;
  cursor: help;
  position: relative;
  display: inline-block;
}

.draft-link {
  color: var(--text-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
}

.draft-link:hover {
  border-bottom-color: var(--text-accent);
  color: var(--glysimi-teal-dark);
}

.external-link::after {
  content: "↗";
  display: inline-block;
  margin-left: var(--spacing-xs);
  font-size: 0.8em;
  line-height: 1;
  opacity: 0.7;
  vertical-align: super;
  transition: opacity 0.2s ease;
}

.external-link:hover::after {
  opacity: 1;
}

.read-more-link {
  color: var(--glysimi-teal);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.read-more-link:hover {
  color: var(--glysimi-teal-dark);
}

/* Label styles */
.draft-label,
.draft-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: var(--spacing-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.broken-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: var(--spacing-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  background-color: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

/* ==========================================================================
   CMS-REQUIRED CLASSES - Critical for CMS functionality
   These classes are automatically generated by GlysimiCMS and MUST be styled
   ========================================================================== */

/* Callout System - Obsidian-style callouts */
.callout {
  margin: var(--spacing-4xl) 0;
  border-radius: var(--border-radius);
  max-width: var(--content-width);
  border-left: 4px solid;
  background: var(--background-white);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.callout-header {
  display: flex;
  align-items: center;
  padding: var(--spacing-lg) var(--spacing-xl);
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: var(--spacing-sm);
  flex-shrink: 0;
}

.callout-title {
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout-content {
  padding: 0 var(--spacing-xl) var(--spacing-xl);
}

.callout-content > *:last-child {
  margin-bottom: 0;
}

/* Callout type variants */
.callout-note {
  border-color: var(--glysimi-teal);
  background-color: var(--glysimi-light-teal);
}

.callout-note .callout-header {
  background-color: var(--glysimi-light-teal);
  color: var(--glysimi-teal);
}

.callout-warning {
  border-color: var(--warm-gold);
  background-color: var(--warm-gold-light);
}

.callout-warning .callout-header {
  background-color: var(--warm-gold-light);
  color: var(--warm-gold);
}

.callout-success {
  border-color: var(--sage-green);
  background-color: var(--sage-green-light);
}

.callout-success .callout-header {
  background-color: var(--sage-green-light);
  color: var(--sage-green);
}

.callout-info {
  border-color: var(--cool-blue);
  background-color: var(--cool-blue-light);
}

.callout-info .callout-header {
  background-color: var(--cool-blue-light);
  color: var(--cool-blue);
}

.callout-danger {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.callout-danger .callout-header {
  background-color: #fef2f2;
  color: #dc2626;
}

/* ==========================================================================
   CALLOUT TYPE-SPECIFIC STYLES - Extended variants with distinct colors
   ========================================================================== */

/* Informational Group - Abstract (lighter sky blue) */
.callout-abstract {
  border-color: #38bdf8;                    /* sky-400 - lighter */
  background-color: #f0f9ff;                /* sky-50 */
}
.callout-abstract .callout-header {
  background-color: #f0f9ff;
  color: #0369a1;                           /* sky-700 */
}

/* Informational Group - Summary (medium sky blue) */
.callout-summary {
  border-color: #0ea5e9;                    /* sky-500 - medium */
  background-color: #e0f2fe;                /* sky-100 - slightly darker bg */
}
.callout-summary .callout-header {
  background-color: #e0f2fe;
  color: #075985;                           /* sky-800 */
}

/* Informational Group - TLDR (darker sky blue) */
.callout-tldr {
  border-color: #0284c7;                    /* sky-600 - darker */
  background-color: #f0f9ff;                /* sky-50 */
  border-width: 3px;                        /* Slightly bolder for emphasis */
}
.callout-tldr .callout-header {
  background-color: #f0f9ff;
  color: #0c4a6e;                           /* sky-900 */
  font-weight: 700;                         /* Bolder for TL;DR */
}

/* Informational Group - Todo (teal with checkmark emphasis) */
.callout-todo {
  border-color: var(--glysimi-teal-dark);
  background-color: #f0fdf4;                /* green-50 with teal tint */
  border-style: dashed;                     /* Dashed for "to do" feeling */
}
.callout-todo .callout-header {
  background-color: #f0fdf4;
  color: var(--glysimi-teal-dark);
}

/* Informational Group - Example (purple/indigo) */
.callout-example {
  border-color: #8b5cf6;                    /* purple-500 */
  background-color: #f5f3ff;                /* purple-50 */
  border-left-width: 6px;                   /* Thicker border for examples */
}
.callout-example .callout-header {
  background-color: #f5f3ff;
  color: #6b21a8;                           /* purple-800 */
}

/* Positive/Helpful Group - Tip (warm orange) */
.callout-tip {
  border-color: #f97316;                    /* orange-500 */
  background-color: #ffedd5;                /* orange-100 */
}
.callout-tip .callout-header {
  background-color: #ffedd5;
  color: #c2410c;                           /* orange-800 */
}

/* Positive/Helpful Group - Hint (lighter orange) */
.callout-hint {
  border-color: var(--warm-orange);         /* #e67e49 */
  background-color: var(--warm-orange-light); /* #fdf2ed */
}
.callout-hint .callout-header {
  background-color: var(--warm-orange-light);
  color: #9a3412;                           /* orange-900 */
}

/* Positive/Helpful Group - Important (red-orange) */
.callout-important {
  border-color: #ea580c;                    /* orange-600 - stronger */
  background-color: #fff7ed;                /* orange-50 */
  border-width: 3px;                        /* Thicker for importance */
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.1); /* Subtle glow */
}
.callout-important .callout-header {
  background-color: #fff7ed;
  color: #7c2d12;                           /* orange-950 */
  font-weight: 700;                         /* Bold for importance */
}

/* Questioning Group - Question (bright purple) */
.callout-question {
  border-color: #a855f7;                    /* purple-500 */
  background-color: #faf5ff;                /* purple-50 */
}
.callout-question .callout-header {
  background-color: #faf5ff;
  color: #6b21a8;                           /* purple-800 */
}

/* Questioning Group - Help (medium purple) */
.callout-help {
  border-color: #9333ea;                    /* purple-600 */
  background-color: #f3e8ff;                /* purple-100 */
}
.callout-help .callout-header {
  background-color: #f3e8ff;
  color: #581c87;                           /* purple-900 */
}

/* Questioning Group - FAQ (indigo blend) */
.callout-faq {
  border-color: #7c3aed;                    /* violet-600 */
  background-color: #ede9fe;                /* violet-100 */
}
.callout-faq .callout-header {
  background-color: #ede9fe;
  color: #4c1d95;                           /* violet-900 */
}

/* Cautionary Group - Caution (light amber) */
.callout-caution {
  border-color: #fbbf24;                    /* amber-400 */
  background-color: #fefce8;                /* yellow-50 */
}
.callout-caution .callout-header {
  background-color: #fefce8;
  color: #a16207;                           /* yellow-800 */
}

/* Cautionary Group - Attention (strong amber) */
.callout-attention {
  border-color: #f59e0b;                    /* amber-500 */
  background-color: #fffbeb;                /* amber-50 */
  border-width: 3px;                        /* Thicker for attention */
}
.callout-attention .callout-header {
  background-color: #fffbeb;
  color: #92400e;                           /* amber-900 */
  font-weight: 700;                         /* Bold for attention */
}

/* Negative/Error Group - Failure (light rose) */
.callout-failure {
  border-color: #fb7185;                    /* rose-400 */
  background-color: #fff1f2;                /* rose-50 */
}
.callout-failure .callout-header {
  background-color: #fff1f2;
  color: #be123c;                           /* rose-700 */
}

/* Negative/Error Group - Fail (medium rose) */
.callout-fail {
  border-color: #f43f5e;                    /* rose-500 */
  background-color: #ffe4e6;                /* rose-100 */
}
.callout-fail .callout-header {
  background-color: #ffe4e6;
  color: #9f1239;                           /* rose-800 */
}

/* Negative/Error Group - Missing (pink tint) */
.callout-missing {
  border-color: #ec4899;                    /* pink-500 */
  background-color: #fdf2f8;                /* pink-50 */
  border-style: dashed;                     /* Dashed for "missing" */
}
.callout-missing .callout-header {
  background-color: #fdf2f8;
  color: #831843;                           /* pink-900 */
}

/* Negative/Error Group - Error (strong red) */
.callout-error {
  border-color: #dc2626;                    /* red-600 */
  background-color: #fef2f2;                /* red-50 */
  border-width: 3px;                        /* Thicker for errors */
}
.callout-error .callout-header {
  background-color: #fef2f2;
  color: #7f1d1d;                           /* red-900 */
  font-weight: 700;                         /* Bold for errors */
}

/* Negative/Error Group - Bug (darker red) */
.callout-bug {
  border-color: #b91c1c;                    /* red-700 - darker */
  background-color: #fee2e2;                /* red-100 - slightly darker bg */
  border-left-width: 6px;                   /* Thicker left border */
}
.callout-bug .callout-header {
  background-color: #fee2e2;
  color: #7f1d1d;                           /* red-900 */
}

/* Citation/Quote Group - Cite (SPECIAL MINIMAL STYLING) */
.callout-cite {
  border-color: var(--border-color);
  background-color: #fafafa;
  border-left-width: 2px;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  box-shadow: none;
  border-radius: var(--border-radius);
}

.callout-cite .callout-header {
  background-color: transparent;
  color: var(--text-muted);
  padding: 0.25rem 0;
  font-size: 0.6875rem;                     /* 11px - very small */
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;                         /* Lighter weight */
  opacity: 0.8;                             /* Slightly faded */
}

.callout-cite .callout-icon {
  width: 0.75rem;                           /* 12px - very small */
  height: 0.75rem;
  opacity: 0.25;                            /* Very muted appearance */
  margin-right: 0.25rem;                    /* Closer to title */
}

.callout-cite .callout-icon svg {
  width: 0.75rem !important;                /* Override Tailwind w-5 h-5 classes */
  height: 0.75rem !important;
}

.callout-cite .callout-content {
  padding: 0.25rem 0 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.callout-cite .callout-content p {
  margin-bottom: 0.25rem;
}

.callout-cite .callout-content p:last-child {
  margin-bottom: 0;
}

/* Additional CMS Features */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--glysimi-teal);
  transition: width 0.3s ease;
  z-index: 1000;
  width: 0%;
}

.skip-to-main {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-to-main:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--background-white);
  color: var(--text-primary);
  text-decoration: none;
  border: 2px solid var(--glysimi-teal);
  border-radius: var(--border-radius);
  z-index: 9999;
  font-weight: 600;
}

/* Form message styling */
.form-message {
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--spacing-lg);
}

.form-message-success {
  background-color: var(--sage-green-light);
  color: var(--sage-green);
  border: 1px solid var(--sage-green);
}

.form-message-error {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.form-message-info {
  background-color: var(--cool-blue-light);
  color: var(--cool-blue);
  border: 1px solid var(--cool-blue);
}

/* Navigation scroll effects */
.nav-hidden {
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.scrolled {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
}

/* Search functionality */
.search-active {
  box-shadow: 0 0 0 2px var(--glysimi-teal);
  border-radius: var(--border-radius);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--background-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: var(--background-soft);
}

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

/* Keyboard navigation selected state */
.search-result-selected {
  background-color: var(--glysimi-light-teal) !important;
  border-left: 3px solid var(--glysimi-teal);
  outline: 2px solid var(--glysimi-teal);
  outline-offset: -2px;
  transition: all 0.2s ease;
}

/* Mobile menu styles */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background-white);
  z-index: 9999;
  padding: var(--spacing-4xl) var(--spacing-2xl);
  overflow-y: auto;
}

.mobile-menu.hidden,
.mobile-menu-hidden {
  display: none;
}

/* ==========================================================================
   MOBILE MENU ENHANCEMENTS - Touch-friendly tap targets
   ========================================================================== */

/* Mobile-specific tap target improvements */
@media (max-width: 768px) {
  /* Ensure minimum 44px tap targets for mobile menu links */
  #mobile-menu .nav-link,
  #mobile-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Touch feedback - highlight color for tap */
  #mobile-menu a {
    -webkit-tap-highlight-color: rgba(19, 128, 143, 0.1);
    tap-highlight-color: rgba(19, 128, 143, 0.1);
  }

  /* Active/pressed state for touch devices */
  #mobile-menu a:active {
    background-color: rgba(19, 128, 143, 0.05);
    transform: scale(0.98);
    transition: all 0.1s ease;
  }

  /* Section dividers */
  #mobile-menu .border-t {
    border-color: rgba(19, 128, 143, 0.08);
  }

  /* Language section label */
  #mobile-menu .text-xs.uppercase {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
  }

  /* Current language highlight */
  #mobile-menu a[aria-current="page"] {
    background-color: var(--glysimi-light-teal);
    color: var(--glysimi-teal);
    font-weight: 600;
  }

  /* Ensure icons are properly sized in mobile menu */
  #mobile-menu svg,
  #mobile-menu [data-lucide] {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Error states for form inputs */
input.error,
textarea.error,
select.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px #dc2626;
}

/* ==========================================================================
   PROSE SYSTEM - Critical for article content formatting
   ========================================================================== */

.prose {
  max-width: var(--content-width-wide);
  margin: 0 auto;
  color: var(--text-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
}

/* Remove centering when prose is used in grid layouts */
.grid .prose {
  margin: 0;
}

/* Remove max-width constraints on prose elements when inside grid */
.grid .prose p,
.grid .prose ul,
.grid .prose ol,
.grid .prose blockquote {
  max-width: none;
}

/* ==========================================================================
   EXPLICIT GRID LAYOUT - Override Tailwind if needed
   ========================================================================== */

/* Force grid layout for article pages */
@media (min-width: 1024px) {
  .grid.lg\:grid-cols-4 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3rem !important;
  }

  .lg\:col-span-3 {
    grid-column: span 3 / span 3 !important;
  }

  .lg\:col-span-1 {
    grid-column: span 1 / span 1 !important;
  }

  /* Ensure grid items don't have conflicting display properties */
  .grid > .lg\:col-span-3,
  .grid > .lg\:col-span-1 {
    display: block !important;
    width: auto !important;
    max-width: none !important;
  }

  /* Specific fix for sidebar positioning */
  .grid > aside.lg\:col-span-1 {
    align-self: start !important;
  }
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: var(--glysimi-teal);
  font-weight: 700;
  margin-top: var(--spacing-4xl);
  margin-bottom: var(--spacing-xl);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  scroll-margin-top: var(--spacing-4xl);
}

.prose h1:first-child,
.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose h1 {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  margin-bottom: var(--spacing-4xl);
}

.prose h2 {
  font-size: var(--font-size-3xl);
  margin-top: var(--spacing-4xl);
}

.prose h3 {
  font-size: var(--font-size-2xl);
  margin-top: var(--spacing-3xl);
}

.prose h4 {
  font-size: var(--font-size-xl);
  margin-top: var(--spacing-4xl);
}

.prose a {
  color: var(--text-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
  word-break: break-word;
}

.prose a:hover {
  color: var(--glysimi-teal-dark);
  border-bottom-color: var(--text-accent);
}

.prose a:focus {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 700;
}

h1 strong,
h1 b {
  color: var(--glysimi-teal);
  font-style: bold;
}

.prose em {
  font-style: italic;
  color: var(--text-primary);
}

.prose p {
  margin-bottom: var(--spacing-2xl);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  max-width: var(--content-width);
}

.prose ul,
.prose ol {
  margin-bottom: var(--spacing-2xl);
  margin-top: var(--spacing-sm);
  padding-left: var(--spacing-3xl);
  max-width: var(--content-width);
}

/* Nested list styling for visual hierarchy */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0;  /* No gap between parent item and first nested item */
  margin-bottom: var(--spacing-md);  /* Small space after nested list */
  padding-left: var(--spacing-2xl);  /* Slightly less indentation for nested lists */
}

/* Ensure first nested list in a list item has no extra space */
.prose li > ul:first-child,
.prose li > ol:first-child {
  margin-top: 0;
}

.prose ul {
  list-style: none;
  position: relative;
}

.prose ul li {
  position: relative;
  padding-left: var(--spacing-lg);
  margin-bottom: var(--spacing-xs);    /* Reduced from sm to xs for tighter spacing */
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
  color: var(--text-primary);
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.8125em;
  width: 8px;
  height: 8px;
  background: var(--glysimi-teal);
  border-radius: 50%;
  transform: translateY(-50%);
}

.prose ol li {
  margin-bottom: var(--spacing-xs);    /* Reduced from sm to xs for tighter spacing */
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
  color: var(--text-primary);
}

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

.prose ol {
  list-style-type: decimal !important;
}

.prose ol li::marker {
  color: var(--text-accent);
  font-weight: 600;
}

.prose blockquote {
  border-left: 4px solid var(--glysimi-teal);
  background: var(--background-soft);
  padding: var(--spacing-2xl) var(--spacing-3xl);
  margin: var(--spacing-4xl) 0;
  max-width: var(--content-width);
  position: relative;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  box-shadow: var(--shadow-subtle);
}

.prose blockquote p {
  color: var(--text-primary);
  font-weight: 500;
  margin: 0;
  font-style: italic;
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

/* ==========================================================================
   CARD COMPONENTS - Content cards used across templates
   ========================================================================== */

.card,
.sidebar-card,
.card-enhanced,
.article-card {
  background-color: white;
  border: 1px solid rgba(19, 128, 143, 0.08);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card:hover,
.card-enhanced:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
  border-color: rgba(19, 128, 143, 0.15);
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.1), 0 6px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(19, 128, 143, 0.15);
}

.card-content {
  padding: 1rem;
}

@media (min-width: 768px) {
  .card-content {
    padding: 1.25rem;
  }
}

/* Meta information styling */
.meta-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.meta-item {
  display: flex;
  align-items: center;
}

.meta-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.25rem;
}

.meta-emphasis {
  font-weight: 600;
}

/* Card footer styling */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-action {
  margin-left: 1rem;
  flex-shrink: 0;
}

.card-action-link {
  display: inline-flex;
  align-items: center;
  color: #0f766e;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.card-action-link:hover {
  color: #134e4a;
}

.card-action-icon {
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
}

/* Fallback to ensure all SVGs in cards are properly sized */
.card svg,
.meta-item svg,
.card-action svg {
  width: 1rem;
  height: 1rem;
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  line-height: var(--line-height-tight);
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.card-title a:hover {
  color: var(--glysimi-teal);
}

.card-excerpt {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2xl);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
}

/* ==========================================================================
   BADGE AND TAG SYSTEM - Multi-tag support with visual distinctions
   ========================================================================== */

/* Content tags - main topic tags */
.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  margin: 0.125rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--glysimi-light-teal);
  color: var(--glysimi-teal);
  text-decoration: none;
  transition: all 0.2s ease;
}

.badge-tag:hover {
  background-color: var(--glysimi-teal);
  color: white;
  transform: translateY(-1px);
}

/* Meta badges - counts, years, status */
.meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  margin: 0.125rem;
  border-radius: 0.375rem; /* Less rounded than tags */
  font-size: 0.6875rem; /* Smaller than content tags */
  font-weight: 600;
  background-color: var(--background-soft);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Journal names - typography only, NO background */
.journal-name {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.journal-name:hover {
  color: var(--glysimi-teal);
}

/* Multi-tag container - handles wrapping */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.5rem 0;
  max-width: 100%;
}

/* Special handling for cards with many tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Ensure cards with many tags don't break layout */
.card {
  min-height: fit-content;
  display: flex;
  flex-direction: column;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-footer {
  margin-top: auto;
}

/* Legacy badge and tag support */
.badge,
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: 9999px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--glysimi-light-teal);
  color: var(--glysimi-teal);
}

/* Legacy journal tag for backward compatibility */
.journal-tag {
  background-color: var(--sage-green-light);
  color: var(--sage-green);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
}

/* ==========================================================================
   CONTENT LAYOUT SYSTEM
   ========================================================================== */

/* Enhanced but subtle gradients for all hero sections */
/* Force override Tailwind with highly specific selectors */
section.hero-gradient,
.hero-gradient,
.bg-gradient-to-b {
  background: var(--gradient-hero) !important;
  background-image: var(--gradient-hero) !important;
  background-color: transparent !important;
}

.section-contrast {
  background: linear-gradient(135deg, var(--sage-green-light) 0%, var(--cool-blue-light) 25%, var(--background-soft) 100%);
}

.warm-section {
  background: linear-gradient(135deg, var(--warm-orange-light) 0%, var(--warm-gold-light) 50%, #fff 100%);
}

/* Quote section */
.quote-section {
  background: linear-gradient(135deg, var(--glysimi-teal) 0%, var(--glysimi-teal-dark) 100%);
  color: white;
}

/* Research disclaimer callout */
.research-disclaimer {
  background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
  color: #92400e;
  border-left: 4px solid #f59e0b;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.draft-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

/* ==========================================================================
   ALPHABET NAVIGATION SYSTEM
   ========================================================================== */

.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.alphabet-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--glysimi-teal-light);
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.alphabet-nav .disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.alphabet-nav a:hover,
.alphabet-nav a.active {
  background-color: var(--glysimi-teal);
  border-color: var(--glysimi-teal);
  color: white;
  transform: scale(1.1);
}

/* Topic list styles */
.topic-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
}

.topic-item:hover {
  background-color: var(--background-soft);
}

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

.topic-name {
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.topic-name:hover {
  color: var(--glysimi-teal);
}

.page-count {
  background-color: var(--glysimi-light-teal);
  color: var(--glysimi-teal);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

/* Section header */
.section-letter {
  font-size: 3rem;
  font-weight: 800;
  color: var(--glysimi-teal);
  margin-bottom: 1rem;
  border-bottom: 3px solid var(--glysimi-teal);
  display: inline-block;
  padding-bottom: 0.5rem;
}

/* ==========================================================================
   CONTENT LIST SYSTEM
   ========================================================================== */

.content-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.content-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(19, 128, 143, 0.1);
  transition: all 0.2s ease;
}

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

.content-item:hover {
  background-color: rgba(19, 128, 143, 0.02);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 0 -1rem;
}

.content-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.content-details {
  flex: 1;
  min-width: 0;
}

.content-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--glysimi-teal);
  margin-bottom: 0.25rem;
}

.content-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.content-title:hover {
  color: var(--glysimi-teal);
}

.content-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.content-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--glysimi-teal);
}

.section-header h3 {
  font-size: 1.5rem;
  margin: 0;
}

.section-header .icon {
  margin-right: 0.75rem;
  color: var(--glysimi-teal);
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  color: var(--glysimi-teal);
  font-weight: 500;
  text-decoration: none;
  margin-top: 1.5rem;
  transition: color 0.2s ease;
}

.view-all-link:hover {
  color: var(--glysimi-teal-dark);
}

/* ==========================================================================
   SPECIALIZED COMPONENTS
   ========================================================================== */

/* Feature boxes for app section */
.feature-box {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(19, 128, 143, 0.1);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  background: var(--glysimi-light-teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* Book cover placeholder */
.book-cover {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--glysimi-light-teal) 0%, var(--glysimi-teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  text-align: center;
  padding: 2rem;
  font-size: 2rem;
}

/* Table of contents */
.toc-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  padding: 0.25rem 0;
}

.toc-link:hover {
  color: var(--glysimi-teal);
}

.toc-link.active {
  color: var(--glysimi-teal);
  font-weight: 600;
}

.related-article {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(19, 128, 143, 0.1);
  transition: all 0.2s ease;
}

.related-article:hover {
  border-color: rgba(19, 128, 143, 0.2);
  transform: translateY(-1px);
}

/* Author list styling */
.author-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* Content-specific selectors removed - all content now uses universal .prose styles */

/* Research content now uses universal .prose styles */

/* ==========================================================================
   ICON COLOR VARIANTS
   ========================================================================== */

.bg-brand { background-color: var(--glysimi-light-teal); }
.bg-warm { background-color: var(--warm-orange-light); }
.bg-cool { background-color: var(--cool-blue-light); }
.bg-sage { background-color: var(--sage-green-light); }

/* ==========================================================================
   ANIMATION SYSTEM
   ========================================================================== */

/* Faster, less jarring animations */
.fade-in {
  animation: fadeInQuick 0.6s ease-out forwards;
  opacity: 0.2; /* Show hint of content immediately */
  animation-delay: 0.05s; /* Much faster */
  transform: translateY(20px);
}

@keyframes fadeInQuick {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Faster stagger delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

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

@media (max-width: 768px) {
  :root {
    --spacing-3xl: 1.5rem;
    --spacing-4xl: 2rem;
    --spacing-5xl: 2.5rem;
    --spacing-6xl: 3rem;
  }

  h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
    margin-top: var(--spacing-4xl);
    margin-bottom: var(--spacing-2xl);
  }

  h3 {
    font-size: var(--font-size-xl);
    margin-top: var(--spacing-3xl);
  }

  .prose p {
    margin-bottom: var(--spacing-3xl);
  }

  .prose h1,
  .prose h2,
  .prose h3 {
    margin-top: var(--spacing-4xl);
    margin-bottom: var(--spacing-2xl);
  }

  .prose ul,
  .prose ol {
    margin-bottom: var(--spacing-3xl);
    padding-left: var(--spacing-2xl);
  }

  .prose li {
    margin-bottom: var(--spacing-md);
  }

  .prose blockquote {
    padding: var(--spacing-2xl);
    margin: var(--spacing-3xl) 0;
  }

  .card-content {
    padding: var(--spacing-2xl);
  }
}

/* ==========================================================================
   ACCESSIBILITY AND UTILITIES
   ========================================================================== */

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

/* Horizontal rules */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: var(--spacing-6xl) 0;
}

/* ==========================================================================
   REDUCED MOTION AND PRINT STYLES
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover,
  .card-enhanced:hover,
  .article-card:hover {
    transform: none;
  }
}

@media print {
  .no-print {
    display: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .card,
  .card-enhanced,
  .article-card {
    box-shadow: none;
    border: 1pt solid #ccc;
    break-inside: avoid;
  }

  .draft-label,
  .draft-badge,
  .broken-label {
    display: none;
  }
}

/* ==========================================================================
   ADDITIONAL STYLING FIXES FOR CONSOLIDATED PAGES
   ========================================================================== */

/* Quote callout variant */
.callout-quote {
  border-color: var(--glysimi-teal);
  background-color: var(--glysimi-light-teal);
}
.callout-quote .callout-header {
  background-color: var(--glysimi-light-teal);
  color: var(--glysimi-teal);
}
.callout-quote blockquote {
  margin: 0;
  border: none;
  padding: 0;
  font-style: italic;
  font-size: var(--font-size-lg);
  color: var(--text-primary);
}
.callout-quote cite {
  display: block;
  margin-top: var(--spacing-md);
  font-style: normal;
  font-weight: 600;
  color: var(--text-secondary);
}

/* References list styling */
.references-list {
  max-width: var(--content-width);
}
.references-list .flex {
  align-items: flex-start;
  margin-bottom: var(--spacing-lg);
}
.references-list .text-brand-teal {
  background: var(--glysimi-light-teal);
  color: var(--glysimi-teal);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 700;
  min-width: 2rem;
  text-align: center;
  margin-right: var(--spacing-md);
  flex-shrink: 0;
}

/* ==========================================================================
   TOPIC PAGE STYLING FIXES
   ========================================================================== */

.topic-header {
  margin-bottom: var(--spacing-xl);
}

.topic-label {
  margin-bottom: 0;
  display: block;
}

.topic-title {
  margin-top: -0.25rem; /* Pulls the title up */
  margin-bottom: 0; /* Resetting default h1 margins */
}

.related-topics-section {
    margin-top: var(--spacing-xl);
}

.related-topics-section .tag-container {
    margin-top: 0.25rem;
}

/* ==========================================================================
   PROSE TABLE STYLES
   ========================================================================== */

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-4xl) 0;
  font-size: var(--font-size-sm); /* Slightly smaller font for data */
  line-height: var(--line-height-normal);
  box-shadow: var(--shadow-subtle);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.prose th,
.prose td {
  border: 1px solid var(--border-light);
  padding: var(--spacing-md) var(--spacing-lg);
  text-align: left;
}

.prose thead {
  background-color: var(--glysimi-light-teal);
  border-bottom: 2px solid var(--glysimi-teal);
}

.prose th {
  font-weight: 600;
  color: var(--glysimi-teal-dark);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose tbody tr:nth-child(even) {
  background-color: var(--background-soft);
}

.prose tbody tr:hover {
  background-color: var(--glysimi-light-teal);
}

/* ==========================================================================
   CITATION STYLES - Zotero references
   ========================================================================== */

.zotero-reference,
.zotero-link {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-style: italic;
  /* vertical-align: super; */
}

.zotero-link:hover {
  color: var(--text-accent);
}

/* ==========================================================================
   TAILWIND OVERRIDES - Must be at the end to override Tailwind CSS
   ========================================================================== */

/* Force hero gradient to display */
section.hero-gradient {
  background: linear-gradient(135deg, #e6f3f5 0%, #f5f8f9 25%, rgba(255, 255, 255, 0.9) 50%, #ffffff 100%) !important;
  background-image: linear-gradient(135deg, #e6f3f5 0%, #f5f8f9 25%, rgba(255, 255, 255, 0.9) 50%, #ffffff 100%) !important;
}

/* Override Tailwind's explicit text-gray-900 classes */
h2.text-gray-900,
h3.text-gray-900,
.text-3xl.font-bold.text-gray-900,
.text-lg.font-semibold.text-gray-900,
.text-2xl.font-bold.text-gray-900,
.font-semibold.text-gray-900 {
  color: #13808f !important;
}

/* ==========================================================================
   TOOLTIP SYSTEM for Broken and Unpublished Links
   ========================================================================== */

/* The container for the link text and its tooltip.
   position: relative is essential for positioning the tooltip inside it. */
.broken-link,
.unpublished-link {
  position: relative;
  cursor: help; /* Show a help cursor to indicate it's interactive */
}

/* The tooltip itself. Hidden by default. */
.broken-link-tooltip,
.unpublished-link-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 130%; /* Position it above the text */
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 10;
  width: 180px;
  font-size: 0.875rem;
  line-height: 1.4;
  font-style: normal; /* Ensure tooltip text is not italic */
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* A small arrow pointing down from the tooltip */
.broken-link-tooltip::after,
.unpublished-link-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* --- Show Tooltip States --- */

/* 1. Show on hover (for desktop users) */
.broken-link:hover .broken-link-tooltip,
.unpublished-link:hover .unpublished-link-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(--50%) translateY(-5px); /* Add a slight upward move */
}

/* 2. Show when .tooltip-active class is added by JavaScript (for mobile tap) */
.broken-link.tooltip-active .broken-link-tooltip,
.unpublished-link.tooltip-active .unpublished-link-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* ==========================================================================
   SEARCH TERM HIGHLIGHTING ON PAGES
   ========================================================================== */

/* Search term highlighting on pages */
mark.search-highlight {
  background-color: #fef08a; /* yellow-200 - matches search dropdown highlights */
  padding: 0.125rem 0;
  font-weight: 500;
  border-radius: 0.125rem;
  transition: background-color 0.2s ease;
}

/* Smooth scroll to first highlight */
mark.search-highlight:target,
mark.search-highlight.first-match {
  animation: highlightPulse 1s ease-out;
}

@keyframes highlightPulse {
  0%, 100% { background-color: #fef08a; }
  50% { background-color: #fde047; } /* yellow-300 - slightly darker pulse */
}
