/* Universal focus ring for accessibility */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #F59E0B !important; /* Gold primary */
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15) !important;
  z-index: 10;
}

/* ============================================
   CROSS-BROWSER CONSISTENCY
   Normalize text rendering across Chrome, Safari, Brave, Firefox
   ============================================ */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* Reset default margins/padding for consistency */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  background-color: #070A0F; /* Obsidian - deeper, richer */
  color: #E5E7EB; /* Cleaner white */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Force consistent font metrics across browsers */
  font-size: 16px;
  line-height: 1.6; /* Increased for readability */
  /* Prevent text size adjustments in mobile browsers */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Subtle ambient gradient */
  background-image: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
}

/* Per-browser sizing tweaks for intro + layout consistency */
body[data-browser="chrome"],
body[data-browser="brave"],
body[data-browser="safari"] {
  font-size: 16px !important;
}

/* Mobile optimization: ensure proper viewport and prevent horizontal scroll */
@media (max-width: 640px) {
  body {
    overflow-x: hidden;
    font-size: 14px; /* Slightly smaller base font for mobile */
  }
  
  /* Adjust heading sizes for mobile */
  h1, .text-3xl, .text-4xl {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }
  
  h2, .text-2xl {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
  }
  
  h3, .text-xl {
    font-size: 1.125rem !important;
    line-height: 1.5 !important;
  }
  
  /* Adjust padding/margins for mobile */
  .p-4, .px-4, .py-4 {
    padding: 0.75rem !important;
  }
  
  .gap-6 {
    gap: 1rem !important;
  }
  
  /* Make tables scrollable on mobile */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Explicit theme hooks to avoid flashes and ensure deterministic colors */
body[data-theme="dark"], body.dark {
  background-color: #020617 !important;
  color: #E5E7EB !important;
}

body[data-theme="light"], body.light {
  background-color: #FFF9F0 !important; /* light cream */
  color: #111827 !important; /* dark text */
}

      ::-webkit-scrollbar {
        width: 10px;
        height: 10px;
      }
      ::-webkit-scrollbar-track {
        background: #0B1220; /* Deeper panel */
        border-radius: 4px;
      }
      ::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.3); /* Subtle slate */
        border-radius: 4px;
        border: 2px solid #0B1220;
      }
      ::-webkit-scrollbar-thumb:hover {
        background: #F59E0B; /* Gold on hover */
      }

      .pmo-title {
        font-family: "Helvetica Neue", Helvetica, "Arial Narrow", Arial,
          sans-serif;
        font-weight: 900;
        font-size: 2.25rem;
        text-transform: uppercase;
        font-stretch: condensed;
        transform: skewX(-8deg);
        background: linear-gradient(to right, #f04a00, #f9d616);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
        padding-left: 0.25rem;
        padding-right: 0.25rem;
      }

      .pmomax-gold-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.75rem; /* Slightly larger radius */
        border: 1px solid #F59E0B;
        background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%); /* Refined gradient */
        color: #0B0F17; /* Dark text on gold */
        font-weight: 700;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3), 0 0 20px rgba(245, 158, 11, 0.15); /* Added glow */
        transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
        white-space: nowrap;
      }

      .pmomax-gold-button:hover:not(:disabled) {
        background: linear-gradient(135deg, #FBBF24 0%, #FCD34D 100%);
        transform: translateY(-1px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4), 0 0 25px rgba(245, 158, 11, 0.3);
      }

      .pmomax-gold-button:active:not(:disabled) {
        transform: translateY(0);
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 0 15px rgba(245, 158, 11, 0.15);
      }

      .pmomax-gold-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        box-shadow: none;
      }
