@layer base {
  html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-tap-highlight-color: transparent;
  }
  main > :first-child {
    margin-top: 0 !important;
  }
  main > :last-child {
    margin-bottom: 0 !important;
  }
}

/* Mobile Quick Action Bar Animation & Spacing */
.mobile-bottom-bar {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.mobile-bottom-bar.hidden-bar {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

/* Touch-friendly interactive utilities */
@media (max-width: 640px) {
  .touch-target {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Custom Neo-Brutalist scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #FAF7EE;
}
::-webkit-scrollbar-thumb {
  background: #000000;
  border-radius: 5px;
}

/* Graph paper math grid pattern */
.bg-math-grid {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

.bg-footer-grid {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Unified Typography System */
body, button, input, select, textarea {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.font-display-xl,
.font-headline-lg,
.font-headline-md,
.font-label-badge {
  font-family: 'Outfit', sans-serif !important;
}

.font-title-lg,
.font-title-sm,
.font-body-lg,
.font-body-md {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.font-label-code {
  font-family: 'Space Grotesk', monospace !important;
}

/* Unified Typographic Sizing & Hierarchy */
.text-display-xl { font-size: 56px; line-height: 60px; letter-spacing: -0.03em; font-weight: 900; }
.text-headline-lg { font-size: 32px; line-height: 38px; letter-spacing: -0.02em; font-weight: 800; }
.text-headline-md { font-size: 24px; line-height: 30px; font-weight: 800; }
.text-title-lg { font-size: 20px; line-height: 26px; font-weight: 700; }
.text-title-sm { font-size: 16px; line-height: 22px; font-weight: 700; }
.text-body-lg { font-size: 16px; line-height: 24px; font-weight: 600; }
.text-body-md { font-size: 14px; line-height: 20px; font-weight: 500; }
.text-label-code { font-size: 14px; line-height: 18px; letter-spacing: 0.02em; font-weight: 700; }
.text-label-badge { font-size: 13px; line-height: 16px; letter-spacing: 0.05em; font-weight: 800; }

/* Subtle light color input placeholders */
::placeholder,
input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important; /* Light Slate-400 */
  font-weight: 400 !important;
  opacity: 1 !important;
}

::-webkit-input-placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
}

:-ms-input-placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
}


