/* Cards platform — extra non-Tailwind tweaks. Component classes live in layouts/base.twig. */

html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* hard guard against accidental horizontal scroll on mobile */
}

/* CSS-grid items don't auto-shrink below content min-width — fix it for our common layout containers. */
main > .grid > * { min-width: 0; }

/* Tables overflow-aware — already wrapped in .overflow-x-auto in views, but keep the wrapper visually tight. */
.overflow-x-auto { -webkit-overflow-scrolling: touch; }

/* Mobile sidebar overlay */
@media (max-width: 1023px) {
  body.mobile-nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 39;
    animation: nav-fade .2s ease;
  }
  body.mobile-nav-open aside {
    display: flex !important;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 40;
    width: 17rem;
    max-width: 80vw;
    box-shadow: -10px 0 30px rgba(0,0,0,0.18);
    animation: nav-slide-in .22s ease;
  }
  body.mobile-nav-open { overflow: hidden; }
}
@keyframes nav-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes nav-slide-in { from { transform: translateX(100%) } to { transform: translateX(0) } }
