

:root {
    /* Layout variables */
    --max-content-width: 64rem;         /* 1024px - consistent max width for content */
    
    /* Light theme colors - Enhanced with semantic variants */
    --color-primary: 59 130 246;        /* Blue-500 - vibrant blue */
    --color-primary-dark: 37 99 235;    /* Blue-600 - darker blue */
    --color-primary-light: 147 197 253; /* Blue-300 - medium blue */
    --color-primary-lighter: 219 234 254; /* Blue-100 - very light blue */
    --color-secondary: 107 114 128;     /* Gray-500 */
    --color-accent: 236 72 153;         /* Pink-500 */
    
    /* Semantic colors with variants */
    --color-success: 34 197 94;
    --color-success-light: 220 252 231;
    --color-success-dark: 21 128 61;
    --color-warning: 245 158 11;
    --color-warning-light: 254 240 138;
    --color-warning-dark: 161 98 7;
    --color-error: 239 68 68;
    --color-error-light: 254 226 226;
    --color-error-dark: 185 28 28;
    
    /* Auth-specific colors */
    --auth-success: 22 163 74;  /* Slightly darker green for better readability */
    --auth-error: 220 38 38;    /* Slightly darker red for better readability */
    --color-info: 59 130 246;
    --color-info-light: 219 234 254;
    --color-info-dark: 29 78 216;
    
    /* Light theme backgrounds - Better hierarchy */
    --color-bg-primary: 255 255 255;      /* Pure white - main content */
    --color-bg-secondary: 248 250 252;    /* Slate-50 - subtle sections */
    --color-bg-tertiary: 241 245 249;     /* Slate-100 - cards/containers */
    --color-bg-quaternary: 226 232 240;   /* Slate-200 - borders/separators */
    --color-bg-accent: 239 246 255;       /* Blue-50 - accent areas */
    --color-bg-muted: 249 250 251;        /* Gray-50 - muted backgrounds */
    --color-bg-header: 248 250 252;       /* Slate-50 - header background */
    --color-bg-footer: 248 250 252;       /* Slate-50 - footer background */
    
    /* Light theme text */
    --color-text-primary: 15 23 42;       /* Slate-900 - very dark */
    --color-text-secondary: 71 85 105;    /* Slate-600 - medium dark */
    --color-text-muted: 148 163 184;      /* Slate-400 - medium light */
    
    /* Light theme borders */
    --color-border: 226 232 240;          /* Slate-200 - light gray */
    --color-border-light: 241 245 249;    /* Slate-100 - very light gray */
    --color-border-focus: 59 130 246;     /* Blue-500 - primary blue */
    
    /* Light theme shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    
    /* Hero-specific color variables */
    --hero-bg-gradient-start: rgb(var(--color-primary-lighter));
    --hero-bg-gradient-middle: rgb(var(--color-primary-light));
    --hero-bg-gradient-end: rgb(var(--color-primary-lighter));
    --hero-text-primary: rgb(var(--color-text-primary));
    --hero-text-secondary: rgb(var(--color-text-secondary));
    --hero-text-muted: rgb(var(--color-text-muted));
    --hero-card-bg: rgba(var(--color-text-primary), 0.05);
    --hero-card-bg-hover: rgba(var(--color-text-primary), 0.1);
    --hero-card-border: rgba(var(--color-text-primary), 0.1);
    --hero-card-border-hover: rgba(var(--color-text-primary), 0.2);
    --hero-shadow: 0 25px 50px -12px rgba(var(--color-text-primary), 0.15);
    --hero-text-shadow: 0 2px 4px rgba(var(--color-text-primary), 0.1);
  }


/* User override - .dark class wins over media query */
.dark {
  --bg: #0b0f14;
  --surface: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --brand: #60a5fa;
  
  /* Legacy color mappings for dark theme */
 
  --color-bg-primary: 17 24 39;
  --color-bg-secondary: 30 41 59;
  --color-bg-tertiary: 55 65 81;
  --color-bg-quaternary: 55 65 81;
  --color-bg-accent: 30 58 138;
  --color-bg-muted: 17 24 39;
  --color-bg-header: 30 41 59;
  --color-bg-footer: 30 41 59;
  
  --color-text-primary: 229 231 235;
  --color-text-secondary: 203 213 225;
  --color-text-muted: 156 163 175;
  
  --color-primary: 96 165 250;
  --color-primary-dark: 59 130 246;
  --color-primary-light: 147 197 253;
  --color-primary-lighter: 30 58 138;
  --color-secondary: 156 163 175;
  --color-accent: 16 185 129;
  
  --color-success: 16 185 129;
  --color-success-light: 20 83 45;
  --color-success-dark: 134 239 172;
  --color-warning: 251 191 36;
  --color-warning-light: 133 77 14;
  --color-warning-dark: 250 204 21;
  --color-error: 248 113 113;
  --color-error-light: 127 29 29;
  --color-error-dark: 248 113 113;
  
  --auth-success: 34 197 94;
  --auth-error: 248 113 113;
  --color-info: 96 165 250;
  --color-info-light: 17 24 39;
  --color-info-dark: 147 197 253;
  
  --color-border: 75 85 99;
  --color-border-light: 55 65 81;
  --color-border-focus: 96 165 250;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
}

/* Apply tokenized theme to body */
body {
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global theme transitions for all elements using CSS custom properties */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}


/* ==========================================================================
   1. THEME TOGGLE COMPONENT
   ========================================================================== */

/* Theme toggle button base styles */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: rgb(var(--color-bg-tertiary));
  border: 1px solid rgb(var(--color-border));
  color: rgb(var(--color-text-muted));
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 2rem;
  height: 2rem;
}

.theme-toggle:hover {
  background-color: rgb(var(--color-bg-quaternary));
  color: rgb(var(--color-text-secondary));
  border-color: rgb(var(--color-border-focus));
  transform: scale(1.05);
}

.theme-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--color-primary), 0.1);
  border-color: rgb(var(--color-primary));
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Icon container */
.theme-toggle-icon {
  width: 1.25rem;
  height: 1.25rem;
  position: relative;
  transition: all 0.3s ease;
}

/* Sun icon (light mode) */
.theme-toggle-icon .sun-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgb(var(--color-warning));
  opacity: 0;
  transform: rotate(180deg) scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Moon icon (dark mode) */
.theme-toggle-icon .moon-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgb(var(--color-primary));
  opacity: 1;
  transform: rotate(0deg) scale(1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode state - show sun, hide moon */
.light .theme-toggle-icon .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.light .theme-toggle-icon .moon-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0.8);
}

/* Dark mode state - show moon, hide sun */
.dark .theme-toggle-icon .sun-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0.8);
}

.dark .theme-toggle-icon .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Hover effects for icons */
.theme-toggle:hover .theme-toggle-icon .sun-icon {
  color: rgb(var(--color-warning-dark));
  transform: rotate(15deg) scale(1.1);
}

.theme-toggle:hover .theme-toggle-icon .moon-icon {
  color: rgb(var(--color-primary-dark));
  transform: rotate(-15deg) scale(1.1);
}

/* Ripple effect on click */
.theme-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background-color: rgba(var(--color-primary), 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  pointer-events: none;
}

.theme-toggle:active::before {
  width: 100%;
  height: 100%;
}

/* Accessibility improvements */
.theme-toggle:focus-visible {
  outline: 2px solid rgb(var(--color-primary));
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .theme-toggle-icon,
  .theme-toggle-icon .sun-icon,
  .theme-toggle-icon .moon-icon {
    transition: none;
  }
  
  .theme-toggle:hover {
    transform: none;
  }
  
  .theme-toggle:active {
    transform: none;
  }
}

/* ==========================================================================
   2. BASE STYLES & RESET
   ========================================================================== */

/* Utility styles */
  /* Semantic background utilities */
  .bg-secondary {
    background-color: rgb(var(--color-bg-secondary));
  }
  
  .bg-tertiary {
    background-color: rgb(var(--color-bg-tertiary));
  }
  
  .bg-quaternary {
    background-color: rgb(var(--color-bg-quaternary));
  }
  
  /* Semantic text utilities */
  .text-primary {
    color: rgb(var(--color-text-primary));
  }
  
  .text-secondary {
    color: rgb(var(--color-text-secondary));
  }
  
  .text-primary-dark {
    color: rgb(var(--color-primary-dark));
  }
  
  .text-muted {
    color: rgb(var(--color-text-muted));
  }
  
  .border {
    border-color: rgb(var(--color-border));
  }
  
  /* Semantic color utilities for components */
  .bg-info-light {
    background-color: rgb(var(--color-info-light));
  }
  
  .bg-success-light {
    background-color: rgb(var(--color-success-light));
  }
  
  .bg-warning-light {
    background-color: rgb(var(--color-warning-light));
  }
  
  .bg-error-light {
    background-color: rgb(var(--color-error-light));
  }
  
  .text-info {
    color: rgb(var(--color-info));
  }
  
  .text-info-dark {
    color: rgb(var(--color-info-dark));
  }
  
  .text-success {
    color: rgb(var(--color-success));
  }
  
  .text-success-dark {
    color: rgb(var(--color-success-dark));
  }
  
  .text-warning {
    color: rgb(var(--color-warning));
  }
  
  .text-warning-dark {
    color: rgb(var(--color-warning-dark));
  }
  
  .text-error {
    color: rgb(var(--color-error));
  }
  
  .text-error-dark {
    color: rgb(var(--color-error-dark));
  }
  
  .border-info {
    border-color: rgb(var(--color-info));
  }
  
  .border-success {
    border-color: rgb(var(--color-success));
  }
  
  .border-warning {
    border-color: rgb(var(--color-warning));
  }
  
  .border-error {
    border-color: rgb(var(--color-error));
  }
  

.text-accent {
  color: rgb(var(--color-primary));
}

.bg-accent {
  background-color: rgb(var(--color-primary));
}

.text-accent-light {
  color: rgb(var(--color-primary-light));
}

.bg-accent-light {
  background-color: rgb(var(--color-primary-light));
}

.border-primary {
  border-color: rgb(var(--color-primary));
}

.text-success {
  color: rgb(var(--color-success));
}

.bg-success {
  background-color: rgb(var(--color-success));
}

.text-success-light {
  color: rgb(var(--color-success-light));
}

.bg-success-light {
  background-color: rgb(var(--color-success-light));
}

.text-warning {
  color: rgb(var(--color-warning));
}

.bg-warning {
  background-color: rgb(var(--color-warning));
}

.text-warning-light {
  color: rgb(var(--color-warning-light));
}

.bg-warning-light {
  background-color: rgb(var(--color-warning-light));
}

.text-error {
  color: rgb(var(--color-error));
}

.bg-error {
  background-color: rgb(var(--color-error));
}

.text-error-light {
  color: rgb(var(--color-error-light));
}

.bg-error-light {
  background-color: rgb(var(--color-error-light));
}

/* Semantic background utilities */
.bg-secondary {
  background-color: rgb(var(--color-bg-secondary));
}

.bg-tertiary {
  background-color: rgb(var(--color-bg-tertiary));
}

.bg-quaternary {
  background-color: rgb(var(--color-bg-quaternary));
}

/* Semantic text utilities */
.text-primary {
  color: rgb(var(--color-text-primary));
}

.text-secondary {
  color: rgb(var(--color-text-secondary));
}

.text-primary-dark {
  color: rgb(var(--color-primary-dark));
}

.text-muted {
  color: rgb(var(--color-text-muted));
}

.border {
  border-color: rgb(var(--color-border));
}

/* Semantic color utilities for components */
.bg-info-light {
  background-color: rgb(var(--color-info-light));
}

.bg-success-light {
  background-color: rgb(var(--color-success-light));
}

.bg-warning-light {
  background-color: rgb(var(--color-warning-light));
}

.bg-error-light {
  background-color: rgb(var(--color-error-light));
}

.text-info {
  color: rgb(var(--color-info));
}

.text-success {
  color: rgb(var(--color-success));
}

.text-warning {
  color: rgb(var(--color-warning));
}

.text-error {
  color: rgb(var(--color-error));
}


  .card-comments-section {
    min-height: 8rem;
    background: transparent;
  }

  .card-comments-section:hover {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  }

  /* Comment form styling */
  .judgment-comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .judgment-comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgb(var(--color-border));
    border-radius: 0.5rem;
    resize: none;
    background: rgb(var(--color-bg-secondary));
    color: rgb(var(--color-text-primary));
    transition: all 0.2s ease-in-out;
  }

  .judgment-comment-form textarea:focus {
    outline: none;
    border-color: rgb(var(--color-border-focus));
    box-shadow: 0 0 0 3px rgba(var(--color-primary), 0.1), 0 0 0 2px rgb(var(--color-border-focus));
  }

  .judgment-comment-form textarea::placeholder {
    color: rgb(var(--color-text-muted));
  }

  .char-count {
    font-size: 0.875rem;
    color: rgb(var(--color-text-muted));
  }

  .post-comment-btn {
    padding-left: 1.5rem; padding-right: 1.5rem;
    padding-top: 0.5rem; padding-bottom: 0.5rem;
    background-color: rgb(var(--color-primary));
    background-color: rgb(var(--color-primary-dark));
    color: rgb(255 255 255);
    border-radius: 0.5rem;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
    transition-duration: 200ms;
  }

  .comments-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 2rem; padding-bottom: 2rem;
    color: rgb(var(--color-text-muted));
  }

  .comments-loading p {
    margin-top: 0.75rem;
    color: rgb(var(--color-text-muted));
    font-size: 0.875rem;
  }

  .comments-loading .animate-spin {
    margin-left: auto; margin-right: auto;
  }

  /* Enhanced visual hierarchy for expandable content */
  .judgment-expandable-content .card-content-section:first-child {
    margin-top: 0;
  }

  .judgment-expandable-content .card-content-section:last-child {
    margin-bottom: 0;
  }

  /* Better spacing between sections */
  .judgment-expandable-content .card-content-section + .card-content-section {
    margin-top: 1.5rem;
  }

  /* Improved text contrast in content boxes */
  .content-text {
    color: rgb(var(--color-text-primary));
  }

  /* Better focus states for interactive elements */
  .card-content-section:focus-within {
    border-color: rgb(var(--color-primary) / 0.5);
    box-shadow: 0 0 0 3px rgb(var(--color-primary) / 0.1);
  }

  /* Comments indicator styling */
  .comments-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: rgb(var(--color-text-muted));
    cursor: pointer;
    color: rgb(var(--color-text-primary));
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
    position: relative;
    margin-left: auto;
    margin-right: 0;
  }

  .comments-indicator.has-comments {
    background-color: rgb(var(--color-bg-tertiary));
    background-color: rgb(var(--color-bg-tertiary));
    /* Unknown: px-2 */;
    /* Unknown: py-1 */;
    border-radius: 0.25rem;
  }

  .comment-icon {
    font-size: 0.875rem;
  }

  .comment-text {
    font-weight: 500;
  }

  .expand-icon {
    font-size: 0.75rem;
    /* Unknown: transition-transform */;
    transition-duration: 200ms;
    margin-left: 2px;
  }

  .comments-indicator:hover .expand-icon {
    transform: translateZ(0);
    transform: scale(1.1);
  }

  /* Judgment comment form styling */
  .judgment-comment-form {
    display: flex; flex-direction: column; gap: 1rem;
  }

  .judgment-comment-form textarea {
    min-height: 80px;
    max-height: 200px;
  }

  .judgment-comment-form textarea:focus {
    box-shadow: 0 0 0 2px rgb(var(--color-border-focus));
    box-shadow: 0 0 0 2px rgb(var(--color-primary));
    border-color: rgb(var(--color-primary));
    box-shadow: 0 0 0 3px rgba(var(--color-primary), 0.1), 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transform: translateY(-1px);
  }

  .judgment-comment-form .char-count {
    font-size: 0.875rem;
    color: rgb(var(--color-text-muted));
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
    transition-duration: 200ms;
  }

  .judgment-comment-form .char-count.warning {
    color: rgb(var(--color-warning));
    color: rgb(var(--color-warning));
  }

  .judgment-comment-form .char-count.danger {
    color: rgb(var(--color-error));
    /* Unknown: dark:text-red-400 */;
  }

  .judgment-comment-form .content-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }


/* Individual Post Styles */
.posts-individual-container {
  max-width: 4xl;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Individual Judgment Styles */
.judgments-individual-container {
  max-width: 4xl;
  margin: 0 auto;
  padding: 1.5rem;
}

.judgments-individual-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgb(var(--color-border));
}

.judgments-individual-actions {
  display: flex;
  gap: 0.75rem;
}

.judgments-individual-article {
  background-color: rgb(var(--color-bg-primary));
  border-radius: 0.75rem;
  padding: 2.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid rgb(var(--color-border));
}

.judgments-individual-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: rgb(var(--color-text-primary));
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.judgments-individual-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: rgb(var(--color-bg-secondary));
  border-radius: 0.5rem;
}

.judgments-individual-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.judgments-individual-meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(var(--color-text-secondary));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.judgments-individual-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--color-text-primary));
}

.judgments-individual-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.judgments-individual-content {
  color: rgb(var(--color-text-primary));
  line-height: 1.75;
  font-size: 1.125rem;
  margin-top: 2rem;
}

.judgments-individual-content h1,
.judgments-individual-content h2,
.judgments-individual-content h3,
.judgments-individual-content h4,
.judgments-individual-content h5,
.judgments-individual-content h6 {
  color: rgb(var(--color-text-primary));
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.judgments-individual-content p {
  margin-bottom: 1.5rem;
}

.judgments-individual-content ul,
.judgments-individual-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.judgments-individual-content li {
  margin-bottom: 0.5rem;
}

.judgments-individual-content blockquote {
  border-left: 4px solid rgb(var(--color-primary));
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: rgb(var(--color-text-secondary));
}

.judgments-individual-content code {
  background-color: rgb(var(--color-bg-secondary));
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

.judgments-individual-content pre {
  background-color: rgb(var(--color-bg-secondary));
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.judgments-individual-content pre code {
  background: none;
  padding: 0;
}

@media (max-width: 768px) {
  .judgments-individual-container {
    padding: 1rem;
  }
  
  .judgments-individual-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .judgments-individual-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  .judgments-individual-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .judgments-individual-meta {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .judgments-individual-content {
    font-size: 1rem;
  }
}

.posts-individual-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgb(var(--color-border));
}

.posts-individual-actions {
  display: flex;
  gap: 0.75rem;
}

.posts-individual-article {
  background-color: rgb(var(--color-bg-primary));
  border-radius: 0.75rem;
  padding: 2.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid rgb(var(--color-border));
}

.posts-individual-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: rgb(var(--color-text-primary));
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.posts-individual-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgb(var(--color-border));
  background-color: rgb(var(--color-bg-secondary));
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.posts-individual-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.posts-individual-meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(var(--color-text-secondary));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.posts-individual-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--color-text-primary));
}

.posts-individual-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.posts-individual-content {
  color: rgb(var(--color-text-primary));
  line-height: 1.75;
  font-size: 1.125rem;
  margin-top: 2rem;
}

.posts-individual-content h1,
.posts-individual-content h2,
.posts-individual-content h3,
.posts-individual-content h4,
.posts-individual-content h5,
.posts-individual-content h6 {
  color: rgb(var(--color-text-primary));
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.posts-individual-content h1 {
  font-size: 2rem;
}

.posts-individual-content h2 {
  font-size: 1.75rem;
}

.posts-individual-content h3 {
  font-size: 1.5rem;
}

.posts-individual-content p {
  margin-bottom: 1rem;
}

.posts-individual-content a {
  color: rgb(var(--color-primary));
  text-decoration: underline;
}

.posts-individual-content a:hover {
  color: rgb(var(--color-primary-dark));
}

.posts-individual-content ul,
.posts-individual-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.posts-individual-content li {
  margin-bottom: 0.5rem;
}

.posts-individual-content blockquote {
  border-left: 4px solid rgb(var(--color-primary));
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: rgb(var(--color-text-secondary));
}

.posts-individual-content code {
  background-color: rgb(var(--color-bg-secondary));
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
}

.posts-individual-content pre {
  background-color: rgb(var(--color-bg-secondary));
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.posts-individual-content pre code {
  background: none;
  padding: 0;
}

/* Date badge styling */
.date-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: rgb(var(--color-bg-secondary));
  color: rgb(var(--color-text-secondary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  transition: all 0.2s ease;
}

.date-badge:hover {
  background-color: rgb(var(--color-bg-tertiary));
  border-color: rgb(var(--color-primary));
  color: rgb(var(--color-primary));
}

/* Dark mode date badge */
.dark .date-badge {
  background-color: rgb(var(--color-bg-tertiary));
  color: rgb(var(--color-text-muted));
  border-color: rgb(var(--color-border));
}

.dark .date-badge:hover {
  background-color: rgb(var(--color-bg-quaternary));
  border-color: rgb(var(--color-primary-light));
  color: rgb(var(--color-primary-light));
}

@media (max-width: 768px) {
  .posts-individual-container {
    padding: 1rem;
  }
  
  .posts-individual-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .posts-individual-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  .posts-individual-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .posts-individual-meta {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .posts-individual-article {
    padding: 1.5rem;
  }
  
  .posts-individual-content {
    font-size: 1rem;
  }
}

.tag-icon {
  font-size: 0.875rem;
  line-height: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag-name {
  font-weight: 500;
}

/* Basket Container Styling by ID */
#basket-container-any {
  border: 2px solid rgb(var(--color-info));
  border-radius: 0.5rem;
  padding: 0.75rem;
  background-color: rgb(var(--color-info-light));
}

#basket-container-any h4 {
  color: rgb(var(--color-info-dark));
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
}

#basket-container-all {
  border: 2px solid rgb(var(--color-success));
  border-radius: 0.5rem;
  padding: 0.75rem;
  background-color: rgb(var(--color-success-light));
}

#basket-container-all h4 {
  color: rgb(var(--color-success-dark));
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
}

#basket-container-none {
  border: 2px solid rgb(var(--color-error));
  border-radius: 0.5rem;
  padding: 0.75rem;
  background-color: rgb(var(--color-error-light));
}

#basket-container-none h4 {
  color: rgb(var(--color-error-dark));
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
}

/* Basket Button Styling */
.basket-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  font-weight: 500;
}

.basket-btn-any {
  background-color: rgb(var(--color-info-light));
  color: rgb(var(--color-info-dark));
}

.basket-btn-any:hover {
  background-color: rgb(var(--color-info));
  border-color: rgb(var(--color-info));
  color: white;
}

.basket-btn-all {
  background-color: rgb(var(--color-success-light));
  color: rgb(var(--color-success-dark));
}

.basket-btn-all:hover {
  background-color: rgb(var(--color-success));
  border-color: rgb(var(--color-success));
  color: white;
}

.basket-btn-none {
  background-color: rgb(var(--color-error-light));
  color: rgb(var(--color-error-dark));
}

.basket-btn-none:hover {
  background-color: rgb(var(--color-error));
  border-color: rgb(var(--color-error));
  color: white;
}

/* ==========================================================================
   4.6 POSTS FEATURE
   ========================================================================== */

/* Posts Card */
.posts-card {
  background-color: rgb(var(--color-bg-primary));
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgb(var(--color-border));
  transition: box-shadow 0.2s ease;
}

.posts-card:hover {
  box-shadow: var(--shadow-lg);
}

.posts-card.featured {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.5), 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Posts Content */
.posts-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.posts-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgb(var(--color-text-primary));
  margin-bottom: 0.5rem;
}

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

.posts-card-title a:hover {
  color: rgb(var(--color-primary));
}

.posts-card-meta {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: rgb(var(--color-text-secondary));
  gap: 1rem;
}

.posts-card-excerpt {
  color: rgb(var(--color-text-secondary));
  margin-bottom: 1rem;
  line-height: 1.625;
}

.posts-full-content.hidden {
  display: none;
}

/* Posts Actions */
.posts-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.posts-card-actions-left,
.posts-card-actions-right,
.posts-individual-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.posts-btn,
.posts-individual-back-btn,
.posts-individual-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.posts-btn-primary {
  background-color: rgb(var(--color-primary));
  border-radius: 0.375rem;
}

.posts-btn-primary:hover {
  background-color: rgb(var(--color-primary-dark));
}

.posts-btn-secondary {
  background-color: rgb(var(--color-bg-tertiary));
  color: rgb(var(--color-text-primary));
  border-color: rgb(var(--color-border));
}

.posts-btn-secondary:hover {
  background-color: rgb(var(--color-bg-secondary));
}

.posts-btn-icon {
  padding: 0.5rem;
  color: rgb(var(--color-text-secondary));
  background: none;
  border: none;
  border-radius: 0.375rem;
  transition: color 0.2s ease;
}

.posts-btn-icon:hover {
  color: rgb(var(--color-text-primary));
}

.posts-individual-back-btn,
.posts-individual-action-btn {
  background-color: rgb(var(--color-bg-primary));
  border-color: rgb(var(--color-border));
  color: rgb(var(--color-text-primary));
}

.posts-individual-back-btn:hover,
.posts-individual-action-btn:hover {
  background-color: rgb(var(--color-bg-secondary));
}

/* Posts Featured Badge */
.posts-featured-badge {
  background-color: rgb(var(--color-warning-light));
  color: rgb(var(--color-warning-dark));
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
}

.posts-featured-badge-icon {
  margin-right: 0.25rem;
}

/* Posts Tag Filter */
.posts-tag-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--color-text-primary));
  background-color: rgb(var(--color-bg-tertiary));
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.posts-tag-filter:hover {
  background-color: rgb(var(--color-bg-secondary));
}

.posts-tag-filter-count {
  font-size: 0.75rem;
  color: rgb(var(--color-text-secondary));
}

.posts-tag-filter-expand-icon {
  margin-left: auto;
  color: rgb(var(--color-text-secondary));
}

.posts-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn-tag-filter {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 9999px;
  border: 1px solid rgb(var(--color-border));
  background-color: rgb(var(--color-bg-primary));
  color: rgb(var(--color-text-primary));
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-tag-filter:hover {
  background-color: rgb(var(--color-info-light));
  border-color: rgb(var(--color-info));
}

.btn-tag-filter.active {
  background-color: rgb(var(--color-primary));
  color: white;
  border-color: rgb(var(--color-primary));
}

.btn-tag-filter-count {
  font-size: 0.75rem;
  color: rgb(var(--color-text-secondary));
  margin-left: 0.25rem;
}

/* Individual Post Page */
.posts-individual-container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.posts-individual-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.posts-individual-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: rgb(var(--color-text-primary));
  margin-bottom: 1rem;
}

.posts-individual-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: rgb(var(--color-text-secondary));
  margin-bottom: 1.5rem;
}

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

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

/* Posts States */
.posts-loading,
.posts-error,
.posts-no-results {
  text-align: center;
  padding: 2rem;
}

.posts-error {
  color: rgb(var(--color-error));
}

.posts-no-results {
  padding: 3rem 0;
}

.posts-error-title,
.posts-no-results-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.posts-no-results-title {
  font-weight: 500;
  color: rgb(var(--color-text-primary));
}

.posts-error-title {
  color: rgb(var(--color-error));
}

.posts-error-message,
.posts-no-results-message {
  font-size: 0.875rem;
  color: rgb(var(--color-text-secondary));
}

.posts-no-results-icon {
  color: rgb(var(--color-text-secondary));
  font-size: 3.75rem;
  margin-bottom: 1rem;
}

  /* Divider patterns */
  .divider {
    border-top: 1px solid rgb(var(--color-border));
    border: 1px solid rgb(var(--color-border));
  }

  .divider-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(var(--color-border));
    border: 1px solid rgb(var(--color-border));
  }

/* ==========================================================================
   4.8 LOADING & STATUS
   ========================================================================== */

  /* Loading and status patterns */
  .loading-message {
    font-size: 0.875rem;
    color: rgb(var(--color-text-muted));
  }

  .loading-spinner {
    animation: spin 1s linear infinite;
    border-radius: 9999px;
    height: 2rem;
    width: 2rem;
    border-bottom: 2px solid rgb(var(--color-border));
    border-color: rgb(var(--color-primary));
    margin-left: auto; margin-right: auto;
  }

  .loading-container {
    text-align: center;
    padding-top: 2rem; padding-bottom: 2rem;
  }

/* ==========================================================================
   4.9 TAGS & BADGES
   ========================================================================== */

  /* Tag and badge patterns */
  .tag-badge {
    display: inline-flex;
    align-items: center;
    /* Unknown: px-2 */;
    /* Unknown: py-1 */;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgb(var(--color-border));
  }

  .tag,
  .tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: rgb(var(--color-bg-primary));
    border: 1px solid rgb(var(--color-border));
    border: 1px solid rgb(var(--color-border));
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
  }

/* ==========================================================================
   4.10 MODALS & OVERLAYS
   ========================================================================== */

/* Modal styles moved to modal.css */

/* ==========================================================================
   4.11 SEARCH & FILTERS
   ========================================================================== */

/* ==========================================================================
   4.12 LAYOUT & CONTAINERS
   ========================================================================== */

  /* Search summary styling */
  #search-summary {
    width: 100%;
    max-width: none;
    margin-top: 1rem;
  }

  /* Enhanced search summary styling */
  .search-summary-container {
    width: 100%;
    max-width: none;
    margin-top: 1rem;
  }

  .search-summary-header {
    background-color: rgb(var(--color-bg-tertiary));
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
  }

  .search-summary-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }

  .search-summary-content {
    animation: slideDown 0.2s ease-out;
  }

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

  .search-params-section,
  .search-results-section,
  .search-strategy-section {
    border-left: 3px solid rgb(var(--color-border));
    padding-left: 0.75rem;
  }

  .loading-placeholder {
    text-align: center;
    padding-top: 2rem; padding-bottom: 2rem;
    color: rgb(var(--color-text-muted));
  }

  /* Container visibility patterns - deprecated, keeping for compatibility */
  .container-hidden {
    display: none;
  }

  .container-visible {
    display: block;
  }

  .container-flex {
    display: flex;
  }

  /* Debug panel styling */
  .debug-panel {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: rgb(var(--color-bg-primary));
    border: 1px solid rgb(var(--color-border));
    border: 1px solid rgb(var(--color-border));
    border-radius: 0.5rem;
    padding: 0.75rem;
    /* shadow-lg class - should be defined elsewhere */;
    z-index: 50;
    display: none;
  }

  .debug-panel select {
    color: rgb(var(--color-text-primary));
    background-color: rgb(var(--color-bg-primary));
    border: 1px solid rgb(var(--color-border));
    border: 1px solid rgb(var(--color-border));
    border-radius: 0.25rem;
    /* Unknown: px-2 */;
    /* Unknown: py-1 */;
  }

/* ==========================================================================
   4.15 UTILITY CLASSES
   ========================================================================== */

  .instant-transition {
    transition: none !important;
  }

  .scroll-padding-top {
    scroll-padding-top: 80px;
  }

  .detail-container-padding {
    padding-top: 80px; /* 64px header + 16px breathing room */
  }

  /* Judgment card overflow handling */
  .judgment-card-overflow-visible {
    overflow: visible !important;
  }

  .judgment-card-overflow-visible .judgment-tags-container {
    position: relative;
    z-index: 1;
  }

  .judgment-card-overflow-visible .judgment-tags-expanded {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    margin-top: 4px;
  }

  .judgment-tags-expanded.show {
    display: block !important;
  }

  /* Search controls patterns */
  .search-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-color: rgb(var(--color-bg-secondary));
    border-radius: 0.5rem;
    border: 1px solid rgb(var(--color-border));
    border: 1px solid rgb(var(--color-border));
  }

  .search-controls-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .search-controls-label {
    font-size: 0.875rem;
    color: rgb(var(--color-text-secondary));
    white-space: nowrap;
  }

  /* Custom navigation styles */
  .nav-link {
    color: rgb(var(--color-text-secondary));
    transition: color 0.2s ease;
  }

  .nav-link:hover {
    color: rgb(var(--color-primary));
  }

  /* Modal navigation arrows */
  .nav-arrow {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
    transition-duration: 200ms;
    background-color: rgb(var(--color-bg-tertiary));
    border: 1px solid rgb(var(--color-border));
  }

  .nav-arrow:hover {
    background-color: rgb(var(--color-primary));
    color: white;
    transform: scale(1.05);
  }

  .nav-arrow:active {
    transform: scale(0.95);
  }


    /* Custom legal page styles */
    .legal-page {
    max-width: 56rem;
    margin-left: auto; margin-right: auto;
    padding: 1.5rem;
    }

    .legal-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgb(var(--color-border));
    border-color: rgb(var(--color-border));
    }

    .legal-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: rgb(var(--color-primary));
    }

    .legal-content {
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.625;
    background-color: rgb(var(--color-bg-primary));
    border: 1px solid rgb(var(--color-border));
    }

    .legal-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgb(var(--color-border));
    color: rgb(var(--color-text-primary));
    border-color: rgb(var(--color-border));
    }


    .legal-content p {
    margin-bottom: 1rem;
    color: rgb(var(--color-text-secondary));
    }

    .legal-content strong {
    font-weight: 600;
    color: rgb(var(--color-text-primary));
    }

    .legal-content a {
    text-decoration: underline;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
    transition-duration: 200ms;
    color: rgb(var(--color-primary));
    }

    /* Enhanced Legal Page Components */
    .legal-title {
      font-size: 2.5rem;
      font-weight: 700;
      margin-bottom: 1rem;
      color: rgb(var(--color-primary));
    }

    .legal-subtitle {
      font-size: 1.125rem;
      color: rgb(var(--color-text-secondary));
    }

    .legal-section {
      margin-bottom: 2rem;
    }

    .legal-section-title {
      font-size: 1.5rem;
      font-weight: 600;
      color: rgb(var(--color-text-primary));
      margin-bottom: 1rem;
      padding-bottom: 0.5rem;
      border-bottom: 1px solid rgb(var(--color-border));
    }

    .legal-subsection-title {
      font-size: 1.25rem;
      font-weight: 600;
      color: rgb(var(--color-text-primary));
      margin-bottom: 0.75rem;
      margin-top: 1.5rem;
    }

    .legal-card {
      background-color: rgb(var(--color-bg-primary));
      border: 1px solid rgb(var(--color-border));
      border-radius: 0.5rem;
      padding: 1.5rem;
      box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
      margin-bottom: 1rem;
    }

    .legal-card-highlight {
      background: linear-gradient(135deg, rgb(var(--color-bg-accent)), rgb(var(--color-bg-primary)));
      border-color: rgb(var(--color-primary));
    }

    .legal-text {
      color: rgb(var(--color-text-secondary));
      line-height: 1.625;
      margin-bottom: 1rem;
    }

    .legal-text-large {
      font-size: 1.125rem;
      font-weight: 500;
    }

    .legal-link {
      color: rgb(var(--color-primary));
      text-decoration: underline;
      transition: color 0.2s ease;
    }

    .legal-link:hover {
      color: rgb(var(--color-primary-dark));
      text-decoration: none;
    }

    .legal-list {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .legal-item {
      padding: 0.75rem 0;
    }

    .legal-item-title {
      font-size: 1rem;
      font-weight: 600;
      color: rgb(var(--color-text-primary));
      margin-bottom: 0.5rem;
    }

    .legal-list-simple {
      list-style-type: disc;
      list-style-position: inside;
      color: rgb(var(--color-text-secondary));
      margin-bottom: 1rem;
      padding-left: 1rem;
    }

    .legal-list-simple li {
      margin-bottom: 0.25rem;
    }

    .legal-toc {
      list-style-type: none;
      padding-left: 0;
    }

    .legal-toc li {
      margin-bottom: 0.5rem;
    }

    .legal-toc .legal-link {
      display: block;
      padding: 0.5rem 0;
      border-bottom: 1px solid rgb(var(--color-border-light));
      transition: all 0.2s ease;
    }

    .legal-toc .legal-link:hover {
      background-color: rgb(var(--color-bg-secondary));
      padding-left: 0.5rem;
      border-radius: 0.25rem;
    }

    /* Breadcrumb styles */
    .text-link {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
    transition-duration: 200ms;
    color: rgb(var(--color-primary));
    }
    
    .text-link:hover {
    color: rgb(var(--color-primary-dark));
    }

    .icon-sm {
    width: 1rem;
    height: 1rem;
    }

    .text-muted {
    color: rgb(var(--color-text-muted));
    }

  /* Missing Tailwind max-width utilities */
  .max-w-md {
    max-width: 12rem; /* 448px */
  }
  
  /* Theme transition utilities */
  .theme-transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
    transition-duration: 300ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  
/* ======================= */
/* LAW MARKDOWN CONTENT STYLING */
/* ======================= */

/* Theme Variants - Easy to switch themes by changing root class */
.theme-green {
  --color-primary: 34 197 94; /* Green 500 */
  --color-primary-hover: 22 163 74; /* Green 600 */
}

.theme-purple {
  --color-primary: 147 51 234; /* Purple 500 */
  --color-primary-hover: 126 34 206; /* Purple 600 */
}

.theme-red {
  --color-primary: 239 68 68; /* Red 500 */
  --color-primary-hover: 220 38 38; /* Red 600 */
}


/* Search controls container */
.search-controls-container {
  padding: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center !important;
  align-items: center;
  flex-wrap: wrap;
  text-align: center;
  width: 100%;
  min-height: 3rem;
}

@media (min-width: 640px) {
  .search-controls-container {
    justify-content: flex-start;
  }
}

/* Loading placeholders - match section content width exactly */
.loading-placeholder {
  text-align: center;
    padding-top: 2rem; padding-bottom: 2rem;
    color: rgb(var(--color-text-secondary));
  color: rgb(var(--color-text-secondary));
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto; 
  padding-left: 1rem;
  padding-right: 1rem;
  display: block;
}

@media (min-width: 640px) {
  .loading-placeholder {
    width: 100%;
    max-width: var(--max-content-width);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .loading-placeholder {
    width: 100%;
    max-width: var(--max-content-width);
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Judgment Search Layout */
.judgment-search-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background-color: rgb(var(--color-bg-primary));
  transition: background-color 0.3s ease;
}

.results-config-section {
  background-color: rgb(var(--color-bg-primary));
  border-bottom: none;
  padding: 1.5rem;
}

.config-subframe {
  background-color: rgb(var(--color-bg-primary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.results-display-section {
  background-color: rgb(var(--color-bg-primary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

.results-frame {
  background-color: rgb(var(--color-bg-primary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  padding: 1rem;
}

@media (min-width: 640px) {
  .results-frame {
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .results-frame {
    padding: 2rem;
  }
}

.results-config-grid {
  display: flex;
  justify-content: center;
  align-items: center;
}

.config-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
}

.config-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgb(var(--color-bg-secondary));
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(var(--color-border));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.config-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(var(--color-text-primary));
  white-space: nowrap;
}

.config-select {
  padding: 0.75rem 1rem;
  border: 2px solid rgb(var(--color-border));
  border-radius: 0.5rem;
  background-color: rgb(var(--color-bg-primary));
  color: rgb(var(--color-text-primary));
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  transition: all 0.2s ease-in-out;
  min-width: 80px;
}

.config-select:focus {
  outline: none;
  border-color: rgb(var(--color-primary));
  box-shadow: 0 0 0 3px rgba(var(--color-primary), 0.1), 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  transform: translateY(-1px);
}

.config-button {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.5rem;
  background-color: rgb(var(--color-bg-primary));
  color: rgb(var(--color-primary));
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  min-width: 2.5rem;
}

.config-button:hover {
  background-color: rgb(var(--color-primary));
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Selection Mode Styles */
.judgment-card.selected {
  border-color: rgb(var(--color-primary));
  background-color: rgba(var(--color-primary), 0.05);
}

.law-group.selected {
  border-color: rgb(var(--color-primary));
  background-color: rgba(var(--color-primary), 0.05);
  box-shadow: 0 0 0 2px rgba(var(--color-primary), 0.2);
}

.tag-card.selected,
.posts-card.selected {
  border-color: rgb(var(--color-primary));
  background-color: rgba(var(--color-primary), 0.05);
  box-shadow: 0 0 0 2px rgba(var(--color-primary), 0.2);
}

.selection-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: rgb(var(--color-primary));
  cursor: pointer;
}

.selection-controls-row {
  background-color: rgb(var(--color-bg-secondary));
  border: 1px solid rgb(var(--color-border));
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 1rem;
  display: none;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.selection-controls-row.active {
  display: flex;
}

/* Ensure action controls are visible when selection actions are shown */
#selection-actions[style*="display: flex"] #action-controls,
#selection-actions[style*="display:flex"] #action-controls {
  display: flex;
}