/**
 * MASTER CODEX FINANCIAL - CSS Layer
 * A comprehensive UX enhancement layer for financial applications
 * Implements features 51-100 from the Master Influence & UX Layer specification
 * 
 * NAMESPACE: All classes prefixed with .cdx- for strict isolation
 * MOBILE-FIRST: iOS/Safari optimized with safe-area support
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
  /* Colors - Neon Green Theme for MK Chart */
  --cdx-primary: #39FF14;
  --cdx-primary-rgb: 57, 255, 20;
  --cdx-secondary: #6c757d;
  --cdx-success: #28a745;
  --cdx-danger: #dc3545;
  --cdx-warning: #ffc107;
  --cdx-info: #17a2b8;
  --cdx-light: #f8f9fa;
  --cdx-dark: #343a40;
  --cdx-text: #222;
  --cdx-text-muted: #6c757d;
  --cdx-bg: #fff;
  --cdx-bg-secondary: #f8f9fa;
  --cdx-border: #dee2e6;
  
  /* Typography */
  --cdx-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --cdx-font-mono: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --cdx-font-serif: 'Crimson Text', Georgia, 'Times New Roman', serif;
  --cdx-line-height: 1.6;
  --cdx-line-width: 75ch;
  
  /* Spacing */
  --cdx-spacer: 1rem;
  --cdx-spacer-sm: 0.5rem;
  --cdx-spacer-lg: 1.5rem;
  
  /* Transitions */
  --cdx-transition-fast: 0.15s ease;
  --cdx-transition-normal: 0.2s ease;
  --cdx-transition-slow: 0.3s ease;
  
  /* Shadows */
  --cdx-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --cdx-shadow: 0 2px 4px rgba(0,0,0,0.1);
  --cdx-shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
  --cdx-shadow-lift: 0 8px 24px rgba(0,0,0,0.12);
  
  /* Z-index layers */
  --cdx-z-dropdown: 1000;
  --cdx-z-sticky: 1020;
  --cdx-z-fixed: 1030;
  --cdx-z-modal-backdrop: 1040;
  --cdx-z-modal: 1050;
  --cdx-z-popover: 1060;
  --cdx-z-tooltip: 1070;
  --cdx-z-toast: 1080;
  --cdx-z-overlay: 2147483647;
  
  /* Touch targets */
  --cdx-touch-target: 44px;
  
  /* Safe area insets for iOS */
  --cdx-safe-area-top: env(safe-area-inset-top, 0px);
  --cdx-safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --cdx-safe-area-left: env(safe-area-inset-left, 0px);
  --cdx-safe-area-right: env(safe-area-inset-right, 0px);
}

/* Dark theme variables */
.cdx-dark,
[data-cdx-theme="dark"] {
  --cdx-text: #e9ecef;
  --cdx-text-muted: #adb5bd;
  --cdx-bg: #1a1a2e;
  --cdx-bg-secondary: #16213e;
  --cdx-border: #495057;
  --cdx-shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --cdx-shadow: 0 2px 4px rgba(0,0,0,0.4);
  --cdx-shadow-lg: 0 4px 12px rgba(0,0,0,0.5);
}

/* ==========================================================================
   FEATURE 51: Hover Lift Effect
   ========================================================================== */

.cdx-lift {
  transition: transform var(--cdx-transition-normal), box-shadow var(--cdx-transition-normal);
  will-change: transform;
}

.cdx-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--cdx-shadow-lift);
}

/* ==========================================================================
   FEATURE 52: Active Press Effect
   ========================================================================== */

.cdx-press {
  transition: transform var(--cdx-transition-fast);
}

.cdx-press:active {
  transform: scale(0.98);
}

/* ==========================================================================
   FEATURE 53: Focus Glow Effect
   ========================================================================== */

.cdx-focus-glow:focus,
.cdx-focus-glow:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--cdx-primary-rgb), 0.25);
}

/* Apply to all form inputs by default */
input.cdx-input:focus,
textarea.cdx-textarea:focus,
select.cdx-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--cdx-primary-rgb), 0.25);
  border-color: var(--cdx-primary);
}

/* ==========================================================================
   FEATURE 54: Skeleton Animation (Shimmer)
   ========================================================================== */

@keyframes cdx-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.cdx-skeleton {
  background: linear-gradient(
    90deg,
    var(--cdx-bg-secondary) 25%,
    #e8e8e8 50%,
    var(--cdx-bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: cdx-shimmer 1.5s infinite;
  border-radius: 4px;
}

.cdx-dark .cdx-skeleton,
[data-cdx-theme="dark"] .cdx-skeleton {
  background: linear-gradient(
    90deg,
    var(--cdx-bg-secondary) 25%,
    #2a2a4a 50%,
    var(--cdx-bg-secondary) 75%
  );
  background-size: 200% 100%;
}

/* ==========================================================================
   FEATURE 55: Menu Slide Animation
   ========================================================================== */

.cdx-menu-slide {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity var(--cdx-transition-normal), transform var(--cdx-transition-normal);
  pointer-events: none;
}

.cdx-menu-slide.cdx-active,
.cdx-menu-slide[data-cdx-open="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   FEATURE 56: Cursor Hand (Pointer on Interactive Elements)
   ========================================================================== */

.cdx-clickable,
button,
[role="button"],
a,
select,
label[for],
input[type="checkbox"],
input[type="radio"],
input[type="submit"],
input[type="button"],
.cdx-btn {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   FEATURE 57: Link Fade Transition
   ========================================================================== */

.cdx-link,
a.cdx-link {
  transition: color var(--cdx-transition-normal), opacity var(--cdx-transition-normal);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

/* ==========================================================================
   FEATURE 58: Sticky Header
   ========================================================================== */

.cdx-sticky {
  position: sticky;
  top: 0;
  z-index: var(--cdx-z-sticky);
  background: var(--cdx-bg);
}

.cdx-sticky-bottom {
  position: sticky;
  bottom: 0;
  z-index: var(--cdx-z-sticky);
  background: var(--cdx-bg);
  padding-bottom: var(--cdx-safe-area-bottom);
}

/* ==========================================================================
   FEATURE 59: Toast Pop Animation
   ========================================================================== */

@keyframes cdx-toast-slide-up {
  from {
    opacity: 0;
    transform: translateY(100%) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

@keyframes cdx-toast-slide-down {
  from {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
  to {
    opacity: 0;
    transform: translateY(100%) translateX(-50%);
  }
}

.cdx-toast {
  position: fixed;
  bottom: calc(20px + var(--cdx-safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--cdx-dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--cdx-shadow-lg);
  z-index: var(--cdx-z-toast);
  animation: cdx-toast-slide-up 0.3s ease forwards;
  max-width: calc(100vw - 40px);
  text-align: center;
}

.cdx-toast.cdx-toast-exit {
  animation: cdx-toast-slide-down 0.3s ease forwards;
}

.cdx-toast-success { background: var(--cdx-success); }
.cdx-toast-error { background: var(--cdx-danger); }
.cdx-toast-warning { background: var(--cdx-warning); color: var(--cdx-dark); }
.cdx-toast-info { background: var(--cdx-info); }

/* ==========================================================================
   FEATURE 60: Progress Bar (Scroll-linked)
   ========================================================================== */

.cdx-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--cdx-primary);
  z-index: var(--cdx-z-fixed);
  transition: width 0.1s linear;
  width: 0%;
}

/* ==========================================================================
   FEATURE 61: Line Height (Global)
   ========================================================================== */

.cdx-readable {
  line-height: var(--cdx-line-height);
}

/* ==========================================================================
   FEATURE 62: Line Width (Max Text Width)
   ========================================================================== */

.cdx-prose {
  max-width: var(--cdx-line-width);
}

.cdx-prose-centered {
  max-width: var(--cdx-line-width);
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   FEATURE 63: Typography Hierarchy
   ========================================================================== */

.cdx-h1, h1.cdx-heading { font-size: 2.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.cdx-h2, h2.cdx-heading { font-size: 2rem; font-weight: 600; line-height: 1.25; margin-bottom: 0.875rem; }
.cdx-h3, h3.cdx-heading { font-size: 1.75rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.75rem; }
.cdx-h4, h4.cdx-heading { font-size: 1.5rem; font-weight: 500; line-height: 1.35; margin-bottom: 0.625rem; }
.cdx-h5, h5.cdx-heading { font-size: 1.25rem; font-weight: 500; line-height: 1.4; margin-bottom: 0.5rem; }
.cdx-h6, h6.cdx-heading { font-size: 1rem; font-weight: 500; line-height: 1.45; margin-bottom: 0.5rem; }

/* ==========================================================================
   FEATURE 64: Contrast (Text & Background)
   ========================================================================== */

.cdx-contrast {
  color: var(--cdx-text);
  background-color: var(--cdx-bg);
}

.cdx-contrast-inverse {
  color: var(--cdx-bg);
  background-color: var(--cdx-text);
}

/* ==========================================================================
   FEATURE 65: System Fonts
   ========================================================================== */

.cdx-system-font {
  font-family: var(--cdx-font-family);
}

.cdx-mono-font {
  font-family: var(--cdx-font-mono);
}

/* ==========================================================================
   FEATURE 67: Hanging Punctuation (List Styling)
   ========================================================================== */

.cdx-list {
  padding-left: 1.5em;
  list-style-position: outside;
}

.cdx-list li {
  margin-bottom: 0.5em;
}

.cdx-list-none {
  list-style: none;
  padding-left: 0;
}

/* ==========================================================================
   FEATURE 68: Link Style
   ========================================================================== */

.cdx-link-styled {
  color: var(--cdx-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--cdx-transition-normal);
}

.cdx-link-styled:hover {
  color: #0056b3;
}

/* ==========================================================================
   FEATURE 69: Whitespace Utilities
   ========================================================================== */

.cdx-mb-1 { margin-bottom: 0.25rem; }
.cdx-mb-2 { margin-bottom: 0.5rem; }
.cdx-mb-3 { margin-bottom: 1rem; }
.cdx-mb-4 { margin-bottom: 1.5rem; }
.cdx-mb-5 { margin-bottom: 2rem; }

.cdx-mt-1 { margin-top: 0.25rem; }
.cdx-mt-2 { margin-top: 0.5rem; }
.cdx-mt-3 { margin-top: 1rem; }
.cdx-mt-4 { margin-top: 1.5rem; }
.cdx-mt-5 { margin-top: 2rem; }

.cdx-p-1 { padding: 0.25rem; }
.cdx-p-2 { padding: 0.5rem; }
.cdx-p-3 { padding: 1rem; }
.cdx-p-4 { padding: 1.5rem; }
.cdx-p-5 { padding: 2rem; }

/* ==========================================================================
   FEATURE 76: Error Text
   ========================================================================== */

.cdx-error-text {
  color: var(--cdx-danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ==========================================================================
   FEATURE 77: Button Primary
   ========================================================================== */

.cdx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all var(--cdx-transition-normal);
  min-height: var(--cdx-touch-target);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cdx-btn-primary {
  background-color: var(--cdx-dark);
  color: #fff;
}

.cdx-btn-primary:hover {
  background-color: #23272b;
}

.cdx-btn-primary:active {
  transform: scale(0.98);
}

.cdx-btn-secondary {
  background-color: var(--cdx-secondary);
  color: #fff;
}

.cdx-btn-outline {
  background-color: transparent;
  border: 1px solid var(--cdx-border);
  color: var(--cdx-text);
}

.cdx-btn-outline:hover {
  background-color: var(--cdx-bg-secondary);
}

/* ==========================================================================
   FEATURE 78: Touch Target (44px minimum)
   ========================================================================== */

.cdx-touch-target {
  min-height: var(--cdx-touch-target);
  min-width: var(--cdx-touch-target);
}

/* ==========================================================================
   FEATURE 79: Floating Label Pattern
   ========================================================================== */

.cdx-float-label {
  position: relative;
  margin-top: 1rem;
}

.cdx-float-label input,
.cdx-float-label textarea {
  width: 100%;
  padding: 1rem 0.75rem 0.5rem;
  border: 1px solid var(--cdx-border);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--cdx-bg);
  transition: border-color var(--cdx-transition-normal);
}

.cdx-float-label label {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--cdx-text-muted);
  pointer-events: none;
  transition: all var(--cdx-transition-normal);
  background: var(--cdx-bg);
  padding: 0 0.25rem;
}

.cdx-float-label input:focus + label,
.cdx-float-label input:not(:placeholder-shown) + label,
.cdx-float-label textarea:focus + label,
.cdx-float-label textarea:not(:placeholder-shown) + label {
  top: 0;
  font-size: 0.75rem;
  color: var(--cdx-primary);
}

.cdx-float-label input:focus,
.cdx-float-label textarea:focus {
  border-color: var(--cdx-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--cdx-primary-rgb), 0.25);
}

/* ==========================================================================
   FEATURE 80: Breadcrumbs
   ========================================================================== */

.cdx-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  padding: 0.5rem 0;
  list-style: none;
  font-size: 0.875rem;
}

.cdx-breadcrumbs li {
  display: flex;
  align-items: center;
}

.cdx-breadcrumbs li + li::before {
  content: '/';
  padding: 0 0.5rem;
  color: var(--cdx-text-muted);
}

.cdx-breadcrumbs a {
  color: var(--cdx-primary);
  text-decoration: none;
}

.cdx-breadcrumbs a:hover {
  text-decoration: underline;
}

.cdx-breadcrumbs li:last-child {
  color: var(--cdx-text-muted);
}

/* ==========================================================================
   FEATURE 82: Visited Links
   ========================================================================== */

.cdx-link-visited:visited {
  color: #5a3d8a;
}

/* ==========================================================================
   FEATURE 83: Empty State
   ========================================================================== */

.cdx-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--cdx-text-muted);
}

.cdx-empty-state svg {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.cdx-empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--cdx-text);
}

.cdx-empty-state p {
  max-width: 300px;
}

/* ==========================================================================
   FEATURE 84: Custom 404 Overlay
   ========================================================================== */

.cdx-404-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--cdx-bg);
  z-index: var(--cdx-z-overlay);
  padding: var(--cdx-safe-area-top) var(--cdx-safe-area-right) var(--cdx-safe-area-bottom) var(--cdx-safe-area-left);
}

.cdx-404-overlay h1 {
  font-size: 6rem;
  font-weight: 700;
  color: var(--cdx-text-muted);
  margin-bottom: 1rem;
}

.cdx-404-overlay p {
  font-size: 1.25rem;
  color: var(--cdx-text-muted);
  margin-bottom: 2rem;
}

/* ==========================================================================
   FEATURE 85: Search Positioning
   ========================================================================== */

.cdx-search-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: var(--cdx-z-dropdown);
}

/* ==========================================================================
   FEATURE 86: Back to Top Button
   ========================================================================== */

.cdx-back-top {
  position: fixed;
  bottom: calc(20px + var(--cdx-safe-area-bottom));
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cdx-dark);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cdx-transition-normal), visibility var(--cdx-transition-normal), transform var(--cdx-transition-normal);
  z-index: var(--cdx-z-fixed);
  box-shadow: var(--cdx-shadow-lg);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cdx-back-top.cdx-visible {
  opacity: 1;
  visibility: visible;
}

.cdx-back-top:hover {
  transform: translateY(-2px);
}

.cdx-back-top:active {
  transform: scale(0.95);
}

.cdx-back-top svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   FEATURE 89: Modal Close (Backdrop Click)
   ========================================================================== */

.cdx-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--cdx-z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cdx-transition-normal), visibility var(--cdx-transition-normal);
}

.cdx-modal-backdrop.cdx-active {
  opacity: 1;
  visibility: visible;
}

.cdx-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--cdx-bg);
  border-radius: 12px;
  box-shadow: var(--cdx-shadow-lg);
  z-index: var(--cdx-z-modal);
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px - var(--cdx-safe-area-top) - var(--cdx-safe-area-bottom));
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cdx-transition-normal), visibility var(--cdx-transition-normal), transform var(--cdx-transition-normal);
}

.cdx-modal.cdx-active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.cdx-modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--cdx-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cdx-modal-body {
  padding: 1.5rem;
}

.cdx-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--cdx-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.cdx-modal-close {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--cdx-text-muted);
  transition: color var(--cdx-transition-normal);
}

.cdx-modal-close:hover {
  color: var(--cdx-text);
}

/* ==========================================================================
   FEATURE 91: Lazy Load Blur-up
   ========================================================================== */

.cdx-lazy {
  filter: blur(10px);
  transition: filter var(--cdx-transition-slow);
}

.cdx-lazy.cdx-loaded {
  filter: blur(0);
}

/* ==========================================================================
   FEATURE 92: Image Aspect Ratio Boxes
   ========================================================================== */

.cdx-aspect-1-1 { aspect-ratio: 1 / 1; }
.cdx-aspect-4-3 { aspect-ratio: 4 / 3; }
.cdx-aspect-16-9 { aspect-ratio: 16 / 9; }
.cdx-aspect-21-9 { aspect-ratio: 21 / 9; }

.cdx-aspect-box {
  position: relative;
  overflow: hidden;
}

.cdx-aspect-box img,
.cdx-aspect-box video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   FEATURE 93: Alt Warning (Dev Mode)
   ========================================================================== */

.cdx-dev-mode img:not([alt]),
.cdx-dev-mode img[alt=""] {
  outline: 3px solid var(--cdx-danger);
  outline-offset: 2px;
}

/* ==========================================================================
   FEATURE 94: Tablet Media Queries (768px)
   ========================================================================== */

@media (min-width: 768px) {
  .cdx-hide-tablet { display: none !important; }
  .cdx-show-tablet { display: block !important; }
  
  .cdx-col-tablet-2 { grid-template-columns: repeat(2, 1fr); }
  .cdx-col-tablet-3 { grid-template-columns: repeat(3, 1fr); }
  .cdx-col-tablet-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
  .cdx-hide-mobile { display: none !important; }
  .cdx-show-mobile { display: block !important; }
}

/* ==========================================================================
   FEATURE 95: Fast Tap (touch-action: manipulation)
   ========================================================================== */

.cdx-fast-tap {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Apply to all interactive elements */
button,
a,
input,
select,
textarea,
[role="button"] {
  touch-action: manipulation;
}

/* ==========================================================================
   FEATURE 97: External Link Icon
   ========================================================================== */

.cdx-external-link::after {
  content: '';
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.25em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}

/* ==========================================================================
   FEATURE 99: Code Copy Button
   ========================================================================== */

.cdx-code-block {
  position: relative;
}

.cdx-code-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: var(--cdx-bg-secondary);
  border: 1px solid var(--cdx-border);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--cdx-transition-normal);
}

.cdx-code-block:hover .cdx-code-copy {
  opacity: 1;
}

.cdx-code-copy:hover {
  background: var(--cdx-border);
}

/* ==========================================================================
   FEATURE 100: Selection Highlight
   ========================================================================== */

::selection {
  background: rgba(var(--cdx-primary-rgb), 0.3);
  color: inherit;
}

::-moz-selection {
  background: rgba(var(--cdx-primary-rgb), 0.3);
  color: inherit;
}

/* ==========================================================================
   PRINT STYLES (Feature 42)
   ========================================================================== */

@media print {
  .cdx-no-print,
  .cdx-fab,
  .cdx-back-top,
  .cdx-toast,
  .cdx-modal-backdrop,
  .cdx-modal,
  nav,
  footer,
  .cdx-progress-bar {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  a {
    text-decoration: underline;
  }
  
  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
  }
}

/* ==========================================================================
   FLOATING ACTION BUTTON (Feature 2)
   ========================================================================== */

.cdx-fab {
  position: fixed;
  bottom: calc(20px + var(--cdx-safe-area-bottom));
  left: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #39FF14;
  color: #000;
  border: 2px solid #39FF14;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.4), 0 0 40px rgba(57, 255, 20, 0.2);
  z-index: var(--cdx-z-fixed);
  transition: transform var(--cdx-transition-normal), box-shadow var(--cdx-transition-normal);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cdx-fab:hover {
  transform: scale(1.1);
  background: #000;
  color: #39FF14;
  border-color: #39FF14;
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.6), 0 0 60px rgba(57, 255, 20, 0.3), inset 0 0 20px rgba(57, 255, 20, 0.1);
}

.cdx-fab:active {
  transform: scale(0.95);
}

.cdx-fab svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   COMMAND PALETTE (Feature 3)
   ========================================================================== */

.cdx-command-palette {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  width: 100%;
  max-width: 600px;
  background: var(--cdx-bg);
  border-radius: 12px;
  box-shadow: var(--cdx-shadow-lg);
  z-index: var(--cdx-z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cdx-transition-normal), visibility var(--cdx-transition-normal), transform var(--cdx-transition-normal);
  overflow: hidden;
}

.cdx-command-palette.cdx-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.cdx-command-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  border: none;
  border-bottom: 1px solid var(--cdx-border);
  background: transparent;
  color: var(--cdx-text);
}

.cdx-command-input:focus {
  outline: none;
}

.cdx-command-results {
  max-height: 400px;
  overflow-y: auto;
}

.cdx-command-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background var(--cdx-transition-fast);
}

.cdx-command-item:hover,
.cdx-command-item.cdx-selected {
  background: var(--cdx-bg-secondary);
}

.cdx-command-item svg {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  color: var(--cdx-text-muted);
}

.cdx-command-shortcut {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--cdx-text-muted);
  background: var(--cdx-bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* ==========================================================================
   NIGHT SHIFT OVERLAY (Feature 31)
   ========================================================================== */

.cdx-night-shift {
  position: fixed;
  inset: 0;
  background: rgba(255, 180, 100, 0.1);
  pointer-events: none;
  z-index: var(--cdx-z-overlay);
  mix-blend-mode: multiply;
}

/* ==========================================================================
   PULSE LOADER (Feature 32)
   ========================================================================== */

@keyframes cdx-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.cdx-pulse {
  animation: cdx-pulse 1.5s ease-in-out infinite;
}

/* ==========================================================================
   FOCUS TUNNEL (Feature 107)
   ========================================================================== */

/* OLD .cdx-focus-tunnel rule REMOVED — caused white-screen on mobile Safari.
   The JS-controlled .cdx-focus-tunnel-active rule below is the only active version. */

/* ==========================================================================
   QUIET ROOM / ZEN MODE (Features 22, 131)
   ========================================================================== */

.cdx-quiet-room {
  position: fixed;
  inset: 0;
  background: #f5f5dc; /* Beige */
  z-index: var(--cdx-z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cdx-transition-slow), visibility var(--cdx-transition-slow);
}

.cdx-quiet-room.cdx-active {
  opacity: 1;
  visibility: visible;
}

.cdx-quiet-room-content {
  max-width: 800px;
  text-align: center;
  font-family: var(--cdx-font-serif);
  font-size: 1.25rem;
  line-height: 1.8;
  color: #333;
}

.cdx-quiet-room-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
}

/* ==========================================================================
   UNDERWRITING MODE (Feature 134)
   ========================================================================== */

.cdx-underwriting table,
.cdx-underwriting .highcharts-container,
.cdx-underwriting .recharts-wrapper,
.cdx-underwriting svg:not(.cdx-icon) {
  filter: grayscale(100%);
  font-family: var(--cdx-font-mono) !important;
}

.cdx-underwriting table {
  border-collapse: collapse;
}

.cdx-underwriting table th,
.cdx-underwriting table td {
  border: 1px solid #000;
  padding: 0.5rem;
  font-family: var(--cdx-font-mono);
}

/* ==========================================================================
   LEGACY FONT / AUTHORITY (Feature 135)
   ========================================================================== */

.cdx-legacy-font {
  font-family: var(--cdx-font-serif);
}

/* ==========================================================================
   PSYCHOLOGICAL BADGES (Features 128, 140)
   ========================================================================== */

.cdx-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  background: var(--cdx-bg-secondary);
  color: var(--cdx-text-muted);
}

.cdx-badge-highlight {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #8b4513;
}

.cdx-badge-patient {
  background: #e8f5e9;
  color: #2e7d32;
}

/* ==========================================================================
   PEER NOTES / ANNOTATIONS (Feature 129)
   ========================================================================== */

.cdx-annotation {
  font-family: 'Caveat', cursive, var(--cdx-font-family);
  font-size: 0.9rem;
  color: #666;
  background: #fffacd;
  padding: 0.5rem;
  border-radius: 4px;
  transform: rotate(-1deg);
  box-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  margin: 0.5rem 0;
}

/* ==========================================================================
   CIRCADIAN BACKGROUND (Feature 106)
   ========================================================================== */

.cdx-circadian-warm {
  filter: sepia(0.1) saturate(1.1);
}

.cdx-circadian-cool {
  filter: saturate(0.95) brightness(1.02);
}

/* ==========================================================================
   MAGNET CURSOR GLOW (Features 102, 103)
   ========================================================================== */

.cdx-magnet-target {
  transition: transform var(--cdx-transition-fast), box-shadow var(--cdx-transition-fast);
}

.cdx-magnet-target.cdx-attracted {
  box-shadow: 0 0 20px rgba(var(--cdx-primary-rgb), 0.4);
}

/* ==========================================================================
   READ TIME INDICATOR (Feature 23)
   ========================================================================== */

.cdx-read-time {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--cdx-text-muted);
  margin-bottom: 1rem;
}

.cdx-read-time svg {
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
}

/* ==========================================================================
   FEEDBACK WIDGET (Feature 44)
   ========================================================================== */

.cdx-feedback {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--cdx-bg-secondary);
  border-radius: 8px;
}

.cdx-feedback-btn {
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background var(--cdx-transition-fast);
}

.cdx-feedback-btn:hover {
  background: var(--cdx-border);
}

.cdx-feedback-btn svg {
  width: 20px;
  height: 20px;
}

.cdx-feedback-btn.cdx-selected {
  background: var(--cdx-primary);
  color: #fff;
}

/* ==========================================================================
   RECENT VIEWS WIDGET (Feature 17)
   ========================================================================== */

.cdx-recent-views {
  padding: 1rem;
  background: var(--cdx-bg-secondary);
  border-radius: 8px;
}

.cdx-recent-views h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--cdx-text-muted);
}

.cdx-recent-views ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cdx-recent-views li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--cdx-border);
}

.cdx-recent-views li:last-child {
  border-bottom: none;
}

.cdx-recent-views a {
  color: var(--cdx-text);
  text-decoration: none;
  font-size: 0.875rem;
}

.cdx-recent-views a:hover {
  color: var(--cdx-primary);
}

/* ==========================================================================
   ONBOARDING CHECKLIST (Feature 18)
   ========================================================================== */

.cdx-onboarding {
  position: fixed;
  bottom: calc(90px + var(--cdx-safe-area-bottom));
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: var(--cdx-bg);
  border-radius: 12px;
  box-shadow: var(--cdx-shadow-lg);
  z-index: var(--cdx-z-fixed);
  overflow: hidden;
}

.cdx-onboarding-header {
  padding: 1rem;
  background: var(--cdx-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cdx-onboarding-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.cdx-onboarding-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.25rem;
}

.cdx-onboarding-body {
  padding: 1rem;
}

.cdx-onboarding-item {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cdx-border);
}

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

.cdx-onboarding-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--cdx-border);
  border-radius: 50%;
  margin-right: 0.75rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cdx-onboarding-item.cdx-complete .cdx-onboarding-check {
  background: var(--cdx-success);
  border-color: var(--cdx-success);
  color: #fff;
}

.cdx-onboarding-text {
  font-size: 0.875rem;
}

.cdx-onboarding-item.cdx-complete .cdx-onboarding-text {
  text-decoration: line-through;
  color: var(--cdx-text-muted);
}

/* ==========================================================================
   PASSWORD VISIBILITY TOGGLE (Feature 74)
   ========================================================================== */

.cdx-password-wrapper {
  position: relative;
}

.cdx-password-wrapper input {
  padding-right: 44px;
}

.cdx-password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 44px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cdx-text-muted);
}

.cdx-password-toggle:hover {
  color: var(--cdx-text);
}

/* ==========================================================================
   CHANGELOG / NEW BADGE (Feature 117)
   ========================================================================== */

.cdx-new-badge {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--cdx-danger);
  color: #fff;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ==========================================================================
   WAIT CURSOR (Feature 113)
   ========================================================================== */

.cdx-loading {
  cursor: wait !important;
}

.cdx-loading * {
  cursor: wait !important;
}

/* ==========================================================================
   PRIVACY BANNER (Feature 137)
   ========================================================================== */

.cdx-privacy-banner {
  background: var(--cdx-bg-secondary);
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--cdx-text-muted);
  border-top: 1px solid var(--cdx-border);
}

.cdx-privacy-banner strong {
  color: var(--cdx-text);
}

/* ==========================================================================
   PACING TOOLTIP (Feature 138)
   ========================================================================== */

.cdx-pacing-tooltip {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.25rem;
  z-index: var(--cdx-z-tooltip);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cdx-transition-normal), visibility var(--cdx-transition-normal);
}

.cdx-pacing-tooltip.cdx-visible {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   GREETER (Feature 12)
   ========================================================================== */

.cdx-greeter {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ==========================================================================
   IDENTITY TOGGLE / COMMITMENT (Feature 124)
   ========================================================================== */

.cdx-noise {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
  transition: filter var(--cdx-transition-normal);
}

.cdx-long-duration-view .cdx-noise {
  filter: blur(0);
  user-select: auto;
  pointer-events: auto;
}

/* ==========================================================================
   MANIFESTO GATE (Feature 125)
   ========================================================================== */

.cdx-gated-content {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
  transition: filter var(--cdx-transition-slow);
}

.cdx-gated-content.cdx-unlocked {
  filter: blur(0);
  user-select: auto;
  pointer-events: auto;
}

/* ==========================================================================
   DISQUALIFY WARNING (Feature 132)
   ========================================================================== */

.cdx-disqualify-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #856404;
}

.cdx-disqualify-warning strong {
  display: block;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   DATED WINDOW (Feature 133)
   ========================================================================== */

.cdx-window-closed {
  background: var(--cdx-bg-secondary);
  border: 1px solid var(--cdx-border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: var(--cdx-text-muted);
}

.cdx-window-closed h3 {
  color: var(--cdx-danger);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   SMART 404 (Feature 139)
   ========================================================================== */

.cdx-404-apology {
  font-style: italic;
  color: var(--cdx-text-muted);
  margin-top: 1rem;
}

/* ==========================================================================
   PATIENT TAG (Feature 140)
   ========================================================================== */

.cdx-patient-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--cdx-text-muted);
  padding: 0.5rem 0;
}

.cdx-patient-tag::before {
  content: '🌱';
  margin-right: 0.5rem;
}

/* ==========================================================================
   VELOCITY TYPOGRAPHY (Feature 101)
   ========================================================================== */

.cdx-velocity-fast h1,
.cdx-velocity-fast h2,
.cdx-velocity-fast h3 {
  font-weight: 800;
}

/* ==========================================================================
   DENSITY MODE (Feature 110)
   ========================================================================== */

.cdx-compact {
  --cdx-spacer: 0.5rem;
  --cdx-spacer-sm: 0.25rem;
  --cdx-spacer-lg: 0.75rem;
}

.cdx-compact .cdx-mb-4 { margin-bottom: 0.75rem; }
.cdx-compact .cdx-p-4 { padding: 0.75rem; }

/* ==========================================================================
   PATINA EFFECT (Feature 111)
   ========================================================================== */

.cdx-patina-1 { background-color: rgba(0, 0, 0, 0.02); }
.cdx-patina-2 { background-color: rgba(0, 0, 0, 0.04); }
.cdx-patina-3 { background-color: rgba(0, 0, 0, 0.06); }
.cdx-patina-4 { background-color: rgba(0, 0, 0, 0.08); }
.cdx-patina-5 { background-color: rgba(0, 0, 0, 0.10); }

/* ==========================================================================
   LINK PEEK PREVIEW (Feature 116)
   ========================================================================== */

.cdx-link-peek {
  position: absolute;
  width: 400px;
  height: 300px;
  background: var(--cdx-bg);
  border: 1px solid var(--cdx-border);
  border-radius: 8px;
  box-shadow: var(--cdx-shadow-lg);
  overflow: hidden;
  z-index: var(--cdx-z-popover);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cdx-transition-normal), visibility var(--cdx-transition-normal);
  pointer-events: none;
}

.cdx-link-peek.cdx-visible {
  opacity: 1;
  visibility: visible;
}

.cdx-link-peek iframe {
  width: 100%;
  height: 100%;
  border: none;
  transform: scale(0.5);
  transform-origin: top left;
  width: 200%;
  height: 200%;
}

/* ==========================================================================
   EXIT INTENT OVERLAY (Feature 123)
   ========================================================================== */

.cdx-exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: var(--cdx-z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cdx-transition-normal), visibility var(--cdx-transition-normal);
}

.cdx-exit-overlay.cdx-active {
  opacity: 1;
  visibility: visible;
}

.cdx-exit-content {
  background: var(--cdx-bg);
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  text-align: center;
}

.cdx-exit-content h2 {
  margin-bottom: 1rem;
}

.cdx-exit-content p {
  color: var(--cdx-text-muted);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   WELCOME PRIME MODAL (Feature 122)
   ========================================================================== */

.cdx-welcome-modal {
  text-align: center;
}

.cdx-welcome-modal h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.cdx-welcome-modal p {
  color: var(--cdx-text-muted);
  margin-bottom: 1.5rem;
}

.cdx-welcome-modal .cdx-highlight {
  color: var(--cdx-primary);
  font-weight: 600;
}

/* ==========================================================================
   RAGE CLICK HELP (Feature 108)
   ========================================================================== */

.cdx-rage-help {
  position: fixed;
  bottom: calc(80px + var(--cdx-safe-area-bottom));
  right: 20px;
  background: var(--cdx-warning);
  color: var(--cdx-dark);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  box-shadow: var(--cdx-shadow-lg);
  z-index: var(--cdx-z-toast);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cdx-transition-normal), visibility var(--cdx-transition-normal);
}

.cdx-rage-help.cdx-visible {
  opacity: 1;
  visibility: visible;
}

.cdx-rage-help a {
  color: var(--cdx-dark);
  font-weight: 600;
  text-decoration: underline;
}


/* ==========================================================================
   ONBOARDING TOUR STYLES
   ========================================================================== */

.cdx-tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: var(--cdx-z-modal-backdrop);
  pointer-events: none;
}

.cdx-tour-spotlight {
  position: absolute;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
  z-index: var(--cdx-z-modal);
  pointer-events: none;
  transition: all 0.3s ease;
}

.cdx-tour-tooltip {
  position: absolute;
  background: #1a1a2e;
  border: 2px solid #39FF14;
  border-radius: 12px;
  padding: 0;
  min-width: 300px;
  max-width: 400px;
  z-index: var(--cdx-z-tooltip);
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.3), 0 4px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cdx-tour-tooltip.cdx-active {
  opacity: 1;
  transform: translateY(0);
}

.cdx-tour-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(57, 255, 20, 0.2);
}

.cdx-tour-step-counter {
  font-size: 12px;
  color: #39FF14;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cdx-tour-close {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.cdx-tour-close:hover {
  color: #39FF14;
}

.cdx-tour-title {
  margin: 0;
  padding: 16px 16px 8px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.cdx-tour-content {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #aaa;
}

.cdx-tour-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(57, 255, 20, 0.2);
  background: rgba(57, 255, 20, 0.05);
  border-radius: 0 0 10px 10px;
}

.cdx-tour-prev,
.cdx-tour-next {
  flex: 1;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cdx-tour-prev {
  background: transparent;
  border: 1px solid #555;
  color: #aaa;
}

.cdx-tour-prev:hover {
  border-color: #39FF14;
  color: #39FF14;
}

.cdx-tour-next {
  background: #39FF14;
  border: none;
  color: #000;
}

.cdx-tour-next:hover {
  background: #4dff33;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

/* ==========================================================================
   FEEDBACK WIDGET STYLES
   ========================================================================== */

.cdx-feedback-widget {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: var(--cdx-z-fixed);
}

.cdx-feedback-trigger {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #39FF14;
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
  transition: all 0.2s;
}

.cdx-feedback-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(57, 255, 20, 0.6);
}

.cdx-feedback-trigger svg {
  width: 24px;
  height: 24px;
}

.cdx-feedback-panel {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 320px;
  background: #1a1a2e;
  border: 2px solid #39FF14;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
}

.cdx-feedback-panel.cdx-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cdx-feedback-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.cdx-feedback-options {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.cdx-feedback-option {
  flex: 1;
  padding: 12px 8px;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.cdx-feedback-option:hover,
.cdx-feedback-option.cdx-selected {
  background: rgba(57, 255, 20, 0.2);
  border-color: #39FF14;
}

.cdx-feedback-option span {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

.cdx-feedback-option small {
  font-size: 11px;
  color: #888;
}

.cdx-feedback-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
}

.cdx-feedback-textarea:focus {
  outline: none;
  border-color: #39FF14;
}

.cdx-feedback-submit {
  width: 100%;
  padding: 12px;
  background: #39FF14;
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cdx-feedback-submit:hover {
  background: #4dff33;
}

/* ==========================================================================
   READ TIME INDICATOR STYLES
   ========================================================================== */

.cdx-read-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 20px;
  font-size: 12px;
  color: #39FF14;
  font-weight: 500;
}

.cdx-read-time svg {
  width: 14px;
  height: 14px;
}

.cdx-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #39FF14, #4dff33);
  z-index: var(--cdx-z-fixed);
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}


/* ==========================================================================
   KEYBOARD SHORTCUTS HINTS PANEL
   ========================================================================== */

.cdx-shortcuts-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cdx-shortcuts-backdrop.cdx-active {
  opacity: 1;
  visibility: visible;
}

.cdx-shortcuts-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  background: #0a0a0a;
  border: 1px solid #39FF14;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(57, 255, 20, 0.3), 0 25px 50px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cdx-shortcuts-panel.cdx-active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.cdx-shortcuts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(57, 255, 20, 0.3);
  background: linear-gradient(180deg, rgba(57, 255, 20, 0.1) 0%, transparent 100%);
}

.cdx-shortcuts-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #39FF14;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.cdx-shortcuts-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 6px;
  background: transparent;
  color: #39FF14;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cdx-shortcuts-close:hover {
  background: #39FF14;
  color: #000;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.cdx-shortcuts-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cdx-shortcuts-category {
  background: rgba(57, 255, 20, 0.03);
  border: 1px solid rgba(57, 255, 20, 0.15);
  border-radius: 8px;
  padding: 1rem;
}

.cdx-shortcuts-category h3 {
  margin: 0 0 0.75rem 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #39FF14;
  opacity: 0.8;
}

.cdx-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cdx-shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.cdx-shortcut-keys {
  display: flex;
  gap: 0.25rem;
}

.cdx-shortcut-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.5rem;
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid rgba(57, 255, 20, 0.4);
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #39FF14;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cdx-shortcut-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
}

.cdx-shortcuts-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(57, 255, 20, 0.2);
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
}

.cdx-shortcuts-footer span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.cdx-shortcuts-footer kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 0.4rem;
  margin: 0 0.25rem;
  background: #1a1a1a;
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 4px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  font-size: 0.7rem;
  color: #39FF14;
}

/* Scrollbar styling for shortcuts panel */
.cdx-shortcuts-content::-webkit-scrollbar {
  width: 6px;
}

.cdx-shortcuts-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.cdx-shortcuts-content::-webkit-scrollbar-thumb {
  background: rgba(57, 255, 20, 0.3);
  border-radius: 3px;
}

.cdx-shortcuts-content::-webkit-scrollbar-thumb:hover {
  background: rgba(57, 255, 20, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .cdx-shortcuts-panel {
    width: 95%;
    max-height: 85vh;
  }
  
  .cdx-shortcuts-content {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .cdx-shortcuts-header {
    padding: 1rem;
  }
  
  .cdx-shortcuts-header h2 {
    font-size: 1.1rem;
  }
}


/* ==========================================================================
   FEATURE 73: Tab Index Fix - Proper focus order
   ========================================================================== */

[tabindex="-1"]:focus {
  outline: none;
}

[tabindex="0"]:focus,
[tabindex]:not([tabindex="-1"]):focus {
  outline: 2px solid #39FF14;
  outline-offset: 2px;
}

/* ==========================================================================
   FEATURE 82: Visited Links - Darken slightly
   ========================================================================== */

a:visited {
  color: color-mix(in oklch, currentColor 80%, #666);
}

.cdx-prose a:visited,
article a:visited {
  color: #888;
}

/* ==========================================================================
   FEATURE 83: Empty State - SVG illustration
   ========================================================================== */

.cdx-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: #666;
}

.cdx-empty-state svg {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.cdx-empty-state h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #888;
}

.cdx-empty-state p {
  margin: 0;
  font-size: 0.9rem;
}

/* ==========================================================================
   FEATURE 84: Custom 404 - Fullscreen overlay
   ========================================================================== */

.cdx-404 {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  color: #fff;
  z-index: 2147483647;
}

.cdx-404 h1 {
  font-size: 6rem;
  font-weight: 700;
  margin: 0;
  color: #39FF14;
  text-shadow: 0 0 30px rgba(57, 255, 20, 0.5);
}

.cdx-404 p {
  font-size: 1.25rem;
  color: #888;
  margin: 1rem 0 2rem;
}

.cdx-404 a {
  padding: 0.75rem 2rem;
  background: #39FF14;
  color: #000;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.2s;
}

.cdx-404 a:hover {
  background: #fff;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

/* ==========================================================================
   FEATURE 85: Search Position - Absolute top-right
   ========================================================================== */

.cdx-search-pos {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

/* ==========================================================================
   FEATURE 87: Icon Set - Feather icons base styles
   ========================================================================== */

.cdx-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

.cdx-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cdx-icon-sm { font-size: 0.875rem; }
.cdx-icon-md { font-size: 1.25rem; }
.cdx-icon-lg { font-size: 1.5rem; }
.cdx-icon-xl { font-size: 2rem; }

/* ==========================================================================
   FEATURE 89: Modal Close - Backdrop click
   ========================================================================== */

.cdx-modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 2147483647;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.cdx-modal-backdrop.cdx-active {
  opacity: 1;
  visibility: visible;
}

.cdx-modal-content {
  background: #1a1a1a;
  border: 1px solid rgba(57, 255, 20, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.cdx-modal-backdrop.cdx-active .cdx-modal-content {
  transform: scale(1);
}

.cdx-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

/* ==========================================================================
   FEATURE 90: Favicon - Distinct styling
   ========================================================================== */

/* Favicon is set via JS, but we can style the link element */
link[rel="icon"] {
  /* Browser handles this */
}

/* ==========================================================================
   FEATURE 91: Lazy Class - Blur-up effect
   ========================================================================== */

.cdx-lazy {
  filter: blur(10px);
  transition: filter 0.3s ease-out;
}

.cdx-lazy.cdx-loaded {
  filter: blur(0);
}

.cdx-lazy-placeholder {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  background-size: 200% 200%;
  animation: cdx-lazy-shimmer 1.5s ease-in-out infinite;
}

@keyframes cdx-lazy-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   FEATURE 92: Image Ratio - Aspect ratio boxes
   ========================================================================== */

.cdx-ratio-1-1 { aspect-ratio: 1 / 1; }
.cdx-ratio-4-3 { aspect-ratio: 4 / 3; }
.cdx-ratio-16-9 { aspect-ratio: 16 / 9; }
.cdx-ratio-21-9 { aspect-ratio: 21 / 9; }
.cdx-ratio-3-2 { aspect-ratio: 3 / 2; }

.cdx-ratio-1-1 img,
.cdx-ratio-4-3 img,
.cdx-ratio-16-9 img,
.cdx-ratio-21-9 img,
.cdx-ratio-3-2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   FEATURE 93: Alt Warning - Red border on missing alts (dev mode)
   ========================================================================== */

.cdx-dev-mode img:not([alt]),
.cdx-dev-mode img[alt=""] {
  outline: 3px solid #ff4444 !important;
  outline-offset: 2px;
}

.cdx-dev-mode img:not([alt])::after,
.cdx-dev-mode img[alt=""]::after {
  content: "Missing alt text";
  position: absolute;
  bottom: 0;
  left: 0;
  background: #ff4444;
  color: #fff;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
}

/* ==========================================================================
   FEATURE 94: Tablets - Media queries for 768px
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1024px) {
  .cdx-tablet-hidden { display: none !important; }
  .cdx-tablet-visible { display: block !important; }
  
  .cdx-tablet-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .cdx-tablet-stack {
    flex-direction: column;
  }
}

/* ==========================================================================
   FEATURE 95: Fast Tap - Touch action manipulation
   ========================================================================== */

button,
a,
[role="button"],
.cdx-tap {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   FEATURE 97: Target Blank - External link icon
   ========================================================================== */

a[target="_blank"]::after,
a[rel*="external"]::after {
  content: " ↗";
  font-size: 0.75em;
  opacity: 0.6;
  vertical-align: super;
}

a[target="_blank"]:hover::after {
  opacity: 1;
}

/* Don't show icon for images or buttons */
a[target="_blank"]:has(img)::after,
a[target="_blank"].cdx-btn::after,
a[target="_blank"].cdx-no-icon::after {
  content: none;
}

/* ==========================================================================
   FEATURE 98: Social Meta - OG tags helper (CSS for preview cards)
   ========================================================================== */

.cdx-og-preview {
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  max-width: 400px;
}

.cdx-og-preview img {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
}

.cdx-og-preview-content {
  padding: 0.75rem;
  background: #1a1a1a;
}

.cdx-og-preview-title {
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #fff;
}

.cdx-og-preview-desc {
  font-size: 0.85rem;
  color: #888;
  margin: 0;
}

/* ==========================================================================
   FEATURE 99: Code Copy - Button inside code blocks
   ========================================================================== */

.cdx-code-wrapper {
  position: relative;
}

.cdx-code-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 4px;
  color: #39FF14;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.cdx-code-wrapper:hover .cdx-code-copy {
  opacity: 1;
}

.cdx-code-copy:hover {
  background: rgba(57, 255, 20, 0.2);
}

.cdx-code-copy.cdx-copied {
  background: #39FF14;
  color: #000;
}

/* ==========================================================================
   FEATURE 100: Selection - Custom selection color
   ========================================================================== */

::selection {
  background: rgba(57, 255, 20, 0.3);
  color: #fff;
}

::-moz-selection {
  background: rgba(57, 255, 20, 0.3);
  color: #fff;
}

/* ==========================================================================
   NEW FEATURES CSS - Focus Tunnel, Wait Cursor, etc.
   ========================================================================== */

/* Feature 107: Focus Tunnel */
/* Disabled on touch/mobile devices to prevent white-screen bug */
@media (hover: hover) and (pointer: fine) {
  .cdx-focus-tunnel-active *:not(.cdx-focus-tunnel-target):not(.cdx-focus-tunnel-target *) {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.15s ease;
  }

  .cdx-focus-tunnel-target {
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 1000;
  }
}

/* Feature 113: Wait Cursor */
.cdx-wait-cursor,
.cdx-wait-cursor * {
  cursor: progress !important;
}

/* Feature 119: Deep Scroll Links */
.cdx-deep-link {
  position: absolute;
  left: -1.5rem;
  top: 0;
  color: #39FF14;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 0.9rem;
}

p:hover .cdx-deep-link {
  opacity: 0.5;
}

.cdx-deep-link:hover {
  opacity: 1 !important;
}

/* Feature 128: Silent Badge */
.cdx-silent-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 4px;
  font-size: 0.7rem;
  color: #39FF14;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
}

/* Feature 129: Peer Notes */
.cdx-peer-notes-active .cdx-peer-note {
  display: block;
}

.cdx-peer-note {
  display: none;
  position: absolute;
  right: -200px;
  width: 180px;
  padding: 0.5rem;
  background: #fffef0;
  border: 1px solid #e0d8a0;
  border-radius: 2px;
  font-family: 'Caveat', 'Comic Sans MS', cursive;
  font-size: 0.9rem;
  color: #333;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Feature 130: Empty Chair */
.cdx-empty-chair {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
  margin-top: 1rem;
}

/* Feature 132: Disqualify Warning */
.cdx-disqualify-warning {
  padding: 1rem;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.cdx-disqualify-warning p {
  margin: 0 0 0.75rem;
  color: #ff8888;
}

.cdx-disqualify-warning label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* Feature 133: Dated Window */
.cdx-window-closed {
  padding: 2rem;
  text-align: center;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #888;
  font-size: 1.25rem;
}

.cdx-expired {
  opacity: 0.6;
  pointer-events: none;
}

/* Feature 135: Legacy Font */
.cdx-legacy-font {
  font-family: 'Crimson Text', Georgia, 'Times New Roman', serif !important;
}

/* Feature 137: Privacy Banner */
.cdx-privacy-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(57, 255, 20, 0.05);
  border-top: 1px solid rgba(57, 255, 20, 0.1);
  font-size: 0.8rem;
  color: #39FF14;
}

/* Feature 140: Patient Tag */
.cdx-patient-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  color: #39FF14;
  margin-top: 1rem;
}

/* Facet Converter Styles */
.cdx-facet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cdx-facet-item {
  padding: 0.5rem 1rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}

.cdx-facet-item:hover {
  border-color: #39FF14;
  color: #39FF14;
}

.cdx-facet-item.cdx-active {
  background: rgba(57, 255, 20, 0.1);
  border-color: #39FF14;
  color: #39FF14;
}

/* Notify Settings Modal */
.cdx-notify-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.cdx-notify-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #ccc;
}

.cdx-notify-options input[type="checkbox"] {
  accent-color: #39FF14;
}

/* Digest Modal */
.cdx-digest-content {
  max-width: 450px;
}

.cdx-digest-date {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.cdx-digest-section {
  padding: 1rem 0;
  border-bottom: 1px solid #333;
}

.cdx-digest-section:last-of-type {
  border-bottom: none;
}

.cdx-digest-section h4 {
  margin: 0 0 0.5rem;
  color: #39FF14;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cdx-digest-section p {
  margin: 0;
  color: #ccc;
}

.cdx-positive {
  color: #39FF14;
}

.cdx-negative {
  color: #ff4444;
}

/* Pin Button */
.cdx-pin-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem;
  background: transparent;
  border: 1px solid #333;
  border-radius: 4px;
  color: #666;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
}

[data-cdx-pinnable]:hover .cdx-pin-btn {
  opacity: 1;
}

.cdx-pin-btn:hover {
  border-color: #39FF14;
  color: #39FF14;
}

.cdx-pinned .cdx-pin-btn {
  opacity: 1;
  color: #39FF14;
  border-color: #39FF14;
}

/* Error Help Link */
.cdx-error-help {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: #39FF14;
}
