@reference "../../styles/index.css";

.articleLayout {
  @apply max-w-10xl
    ml:grid
    ml:grid-cols-[--spacing(56)_1fr]
    ml:grid-rows-[1fr]
    ml:overflow-visible
    ml:[grid-template-areas:'sidebar_main''sidebar_footer']
    3xl:grid-cols-[--spacing(80)_1fr_--spacing(144)]
    3xl:max-w-12xl
    mx-auto
    block
    w-full
    xl:grid-cols-[--spacing(56)_1fr_--spacing(64)]
    xl:[grid-template-areas:'sidebar_main_metabar''sidebar_footer_metabar']
    2xl:grid-cols-[--spacing(72)_1fr_--spacing(72)];

  > *:nth-child(1) {
    @apply ml:sticky
      ml:top-0
      ml:h-svh
      ml:overflow-y-auto
      [grid-area:sidebar];
  }

  > *:nth-child(2) {
    @apply ml:max-xl:block
      contents;

    > *:first-child {
      @apply ml:bg-gradient-subtle
        ml:dark:bg-gradient-subtle-dark
        3xl:px-18
        ml:bg-fixed
        ml:p-8
        min-w-0
        p-4
        [grid-area:main]
        motion-safe:scroll-smooth
        xl:p-10
        2xl:p-12;
    }

    > *:last-child {
      @apply ml:mt-0
        mt-8
        border-t
        [grid-area:metabar]
        xl:sticky
        xl:top-0
        xl:max-w-none
        xl:border-t-0
        xl:border-l;
    }
  }

  > *:nth-child(3) {
    @apply sticky
      bottom-0
      flex
      w-full
      flex-col
      items-center
      self-stretch
      border-t
      border-t-neutral-200
      bg-white
      py-4
      [grid-area:footer]
      dark:border-t-neutral-900
      dark:bg-neutral-950;
  }
}
